# OK to post homework # Vikrant, Apr 03 2022, Assignment 19 # ================================================================================ # 0. Code that has been given. # ================================================================================ read("C19.txt"): # ================================================================================ # 1. Umbras; apply x1^a1*...*xk^ak -> P^na1*...*P^nak, then multinomial. # ================================================================================ UmbT:= proc(P,var,N) local n,i: [seq(Umb(subs({seq(var[i]=P^n,i=1..nops(var))},P),var),n=1..N)]: end: # UmbT(x+y,[x,y],20); # UmbT(x+y+z,[x,y,z],20); # UmbT(x1+x2+x3+x4,[x1,x2,x3,x4],20); # UmbT(1+2*x+3*y,[x,y],20); # UmbT((1+x)*(1+y)*(1+z),[x,y,z],20); # ================================================================================ # 2. Discrepancy between outputs of Zs(..)/2[v] and NuC(v,[[0,1,1],[0,0,1]]). # ================================================================================ # IsCond3G(v,[[0,1,1],[0,0,1]]) does not do what you think it does when v is even. # It biases comparisons between 1 and 3 towards 3 winning. # More specifically, ties between 1 and 3 are counted as 3 winning 1. # Fixing the conditionals in IsCond3G(..) to remove this bias results in the outputs # of NuC(..), which calls IsCond3G(..), matching that of Zs(..)/2. # ================================================================================ # 3. # ================================================================================