> #Weiji Zheng, Assignment 19, 11/22/2020 ; > #OK TO POST HOMEWORK ; > ; > #Q1 ; > #Carefully read the section about exponential generating functions in Dr. Z.'s essay. Reproduce the proof that egf(AxB)=egf(A)*egf(B) in your own words, and understand it . [It may come up in the oral part of the Final Exam!] ; > ; > #My Understanding: > #For A and B, the 2 families with a(n) or b(n) labled objects, we can produce a set C by using the process A x B ; > #Denoted as C = A x B ; > #since we have a(k) * b(n-k) ways to pick typical objects, we can conclude (n)=Sum(binomial(n,k)*a(k)*b(n-k),k=0..n). ; > #By definition, egf(AxB) = egf(C) = Sum(c(n)/n! * x^n, n=0..infinity) ; > #we put c(n) into it, get Sum(c(n)/n! * x^n, n=0..infinity) = Sum( (Sum(binomial(n,k)*a(k)*b(n-k),k=0..n))/n! * x^n, n=0..infinity) ; > # egf(C) = Sum( (Sum(a(k)*b(n-k)/k!*(n-k)! * x^n, k=0..n), n=0..infinity) ; > # egf(C) = sum(a(k)*x^k/k!, k=0..infinity) * sum(b(k)*x^(n-k)/(n-k!), n-k=0..infinity) ; > #while [sum(a(k)*x^k/k!, k=0..infinity)] and [sum(b(k)*x^(n-k)/(n-k!), n-k=0..infinity)] are excatly egf(A) and egf(B) ; > #we get egf(C) = egf(A*B) = egf(A) * egf(B) ; > ; > #Q2 ; > #Using Maple or otherwise find the ordinary generating function and exponential generating function for a(n)=n*(n-1)*(n-2) (n ¡Ý 0) ; > ; > #a(n)=n*(n-1)*(n-2) (n ¡Ý 0) ; > ; > #ogf ; > #0 ; > #0 > #0 > #3*2*1 = 6 > #4*3*2 = 24 > #5*4*3 > #6*5*4 > #7*6*5 > #we get a(n)=n*(n-1)*(n-2) = n!/(n-3)! ; > #fx = ; > #sum(n*(n-1)*(n-2)*x^n, n=3..infinity); ==> 6*x^3/(x-1)^4 ; > ; > #egf ; > #sum(n*(n-1)*(n-2)*x^n/n!, n=3..infinity); ==> x^3*exp(x) ; > ; > #Q3 ; > ; > #(i)How many ordered pairs [SP1,SP2] are there where SP1 and SP2 are set partitions of different sets whose total numbers is 100 and the labels are {1, ..., 100} > #(ii)How many sets {SP1,SP2} where SP1 and SP2 are set-partitions of different sets whose total numbers is 100 and the labels are {1, ..., 100}? ; > ; > ; > #since egf of sp is exp(exp(x)-1) ; > #we can use ; > #coeff(taylor(EGF, x = 0, 101), x, 100)*100! while egf = exp(exp(x)-1) * 2 in 1 but egf = exp(exp(x)-1) * exp(exp(x)-1) in 2 ; > ; > ; > ;