Lecture 9: Due Oct. 11, 9:00pm. Email ShaloshBEKhad@gmail.com an attachment hw9FirstLast.txt OK to post CPID: 1 2 3 4 5 6 7 8 9 RUID: 1 8 6 0 0 0 0 3 2 ############################################################################################################################################################################ 1) Carefully read and understand the Maple code for Lecture 9, that contain procedures DiagSeq2(f,x,y,N), DiagWalks2D(S,N), DiagSeq3(f,x,y,z,N), DiagWalks3D(S,N). Using these procedures answer the following questions. Let a[i] be the i-th digit of your RUID. If it is zero, make it 1. (i) What is the coefficient of x50y50 in the bi-Taylor expansion (around (0,0)) of the rational function #1/(1-a[1]*x-a[2]*y+a[5]*x*y-a[6]*x^3+a[7]*y^3) #A: function is: 1/(1-x-8y+xy-x^3+*y^3). Using DiagSeq2(1/(1-x-8y+xy-x^3+*y^3),x,y,50), the maple code never compiles. Thus an answer is unreachable. (ii) In how many ways can you walk from [0,0,0] to [30,30,30] if the fundamental ("atomic") steps are {[a[1],a[3],a[9]], [a[2], a[4], a[5], [a[4],a[3],a[3]} #A: Atomic walks are {[1,6,2], [8,1,1], [1,6,6]}, in which there only exist 1 way to get to [30,30,30] using the givein atomic steps. ############################################################################################################################################################################ 2) Write a Maple procedure WordsMod(a,S,x) that inputs a positive integer a, subsest S of {1,2,..., a} and a variable x and outputs the rational function that is the generating function of finite sequence of positive integers that leave remainder that belongs to S when divided by a. Use the Maple "factor" to make it as nice as possible. What is the number of ways of walking from 0 to 100 where all positive steps are allowed except multiples of 5? WordsMod :=proc(a, S, n) local f, s, i,k; f := 1/(1 - sum(x^s,s in S)); end proc #A:17943803336550012914104102513 ############################################################################################################################################################################ 3) Write a Maple procedure, ResComps(S,x), that inputs a finite set S of positive integers, and outputs the generating function for a(n) defined as the number of compositions of n where each component can be any positive integer except members of S. Using this, find the exact value of the number of walks from 0 to 300 where every step-size is permitted except 2 and 3 #A:1870501431868933225023318760 (most likely wrong) ############################################################################################################################################################################ 4) Using procedure DiagWalks2D(S,N), with N=40 (or higher, if necessary) find which of the following is in the OEIS, and also use Maple's command gfun[listtorec](L,f(n)) to guess a linear recurrence equation with POLYNOMIAL coefficients for the sequences DiagWalks2D(S,40) where (i) S={[0,1],[1,0]} A:A000984 (ii) S={[0,1],[1,0],[1,1]} A:A001850 (iii) S={[0,1],[1,0],[0,2],[2,0]} A:A036692 (iv) S={[0,1],[0,2],[1,0],[2,0],[1,1],[2,2]} A:A192365 ############################################################################################################################################################################ 5) Using procedure DiagWalks3D(S,N), with N=50 (or higher, if necessary) find which of the following is in the OEIS, and also use Maple's command gfun[listtorec](L,f(n)) to guess a linear recurrence equation with POLYNOMIAL coefficients. (i) S={[1,0,0],[0,1,0],[0,0,1]} #A:A006480 (ii) S={[0,0,1],[0,1,0],[0,0,1],[1,1,0],[1,0,1],[0,1,1]} #A:A268542 (iii) S={[0,0,1],[0,1,0],[0,0,1],[1,1,0],[1,0,1],[0,1,1],[1,1,1]} #A:A112019 ############################################################################################################################################################################ 6)Write a 4-dimensional analog of DiagSeq3(f,x,y,z,N) and DiagWalks3D(S,N), calling them DiagSeq4(f,x1,x2,x3,x4,N) and DiagWalks4D(S,N) where S is a set of quadruples of positive integers (except that [0,0,0,0] is not allowed DiagSeq4 := proc(f, w, x, y, z, N) local i; if subs({w = 0, x = 0, y = 0, z = 0}, denom(f)) = 0 then print(`The denominator of`, f, `should have a non-zero constant term `); RETURN(FAIL); end if; [seq(coeff(taylor(coeff(taylor(coeff(taylor(coeff(taylor(f, w = 0, N + 1), w, i)*x = 0, N + 1), x, i), y = 0, N + 1), y, i), z = 0, N + 1), z, i), i = 0 .. N)]; end proc DiagWalks4D:=proc(S,N) local s,w,x,y,z: if not (type(S, set) and type(N,integer) and N>=0) then print(`Bad input`): RETURN(FAIL): end if; DiagSeq4(1/(1-add(w^s[1]*x^s[2]*y^s[3]*z^s[4], s in S)),x,y,z,w,N ) : end proc