Michael Yen, Assignment 22, 12/6/20 Ok to post hw Lecture 22: Due Dec.6, 9:00pm. Email ShaloshBEKhad@gmail.com an attachment hw22FirstLast.txt Indicate whether it is OK to post 1) (i) How many labeled ROOTED trees are there with 67 vertices and 12 leaves? (recall that a leaf is a vertex with no children) coeff(TreeSeqL(67, t)[67], t, 12) 762668035595791008261768918050546247626868131307789154916300139847357281766830345010754357481701376000000000000000 (ii) How many labeled connected graphs are there with 40 vertices and 43 edges? ATreeSeq(40,4)[40] 90324445150366623501655158316607196285055246080819484164096000000000 [Added Nov. 30, 2020: The procedure TreeSeqL(N,t) counts ROOTED labelled trees, according to the number of leaves, and not as (possibly) stated erroneously in the lecture, unrooted trees]. 2) Write a procedure SeqRTchild(S,N), that inputs a finite set of positive integers, S, and a positive integer N, and outputs the first N entries in the the list enumerating rooted labeled trees where every vertex is either a leaf (i.e. 0 children) or has a mumber of children that must be in the set S. Output SeqRTchild(S,30) for the following sets S if it is in the OEIS, state the A-number. If it is not, say so. SeqRTchild:=proc(S,N) local i,z,r,L; r:=1: for i in S do r:=r+z^i/i! od: L:=FunEqToSeq(r,z,N): [seq(L[i]*i!,i=1..N)]: end: (i) S={1,2} [1, 2, 9, 60, 540, 6120, 83790, 1345680, 24811920, 516650400, 11992503600, 307069963200, 8598348158400, 261387760233600, 8573572885878000, 301809119163552000, 11349727401396384000, 454104511068656448000, 19261139319649202976000, 863322072620761353600000, 40773827104421643872640000, 2023875495295596087425280000, 105332242685105264094826560000, 5735708550546738271386278400000, 326147227825931039498338368000000, 19331417684656062052163800704000000, 1192397948395996947851508470208000000, 76423144363428788116850162439936000000, 5082319675112720794728326340468480000000, 350237858762665841457922825150517760000000] A036774 (ii) S={1,2,3} [1, 2, 9, 64, 620, 7620, 113610, 1992480, 40194000, 916927200, 23341071600, 655922836800, 20169411662400, 673645440468000, 24285190867938000, 939899116892736000, 38870133445791648000, 1710655202853140544000, 79826043011286892320000, 3936948118406837614080000, 204621522793150838094720000, 11178604265076638556566400000, 640388553630453545818380480000, 38387232536896126731768560640000, 2403064339811928039326054976000000, 156818747958686937121259124864000000, 10650385643669848416683879984448000000, 751628530768336472601918781589376000000, 55042291463200564036152308362108416000000, 4177087476268464699702716097295433280000000] A036775 (iii) S={1,2,3,4} [1, 2, 9, 64, 625, 7770, 117390, 2088520, 42771960, 991090800, 25635767850, 732235165200, 22890759391500, 777398836414200, 28501053507927000, 1121908690738836000, 47194400446765572000, 2112854517933207048000, 100302903229033765260000, 5032863920347902999360000, 266142789859931099850735000, 14793716799246351968271270000, 862334292493260819652189770000, 52598740360757139570304122840000, 3350601497282429844614781621000000, 222502645937108446633845155034000000, 15377726069589880161099060181555500000, 1104405005369409845057238883356756000000, 82305294967517874944444655399748251000000, 6356500157372156884942344746141640750000000] A036776 (iv) S={1,3,4} [1, 2, 6, 28, 205, 2070, 25410, 359800, 5798520, 105663600, 2155645800, 48657886200, 1202586485100, 32282071621800, 935338118715000, 29098128631572000, 967482670702548000, 34237946556613800000, 1284878182355343576000, 50967054449973501840000, 2130726049102025710335000, 93635584072373169516690000, 4315205169032986063745910000, 208100688549145598367481320000, 10480987284242370363188721000000, 550305134278266412524553074000000, 30071585130474224199248414028000000, 1707632930666682627425158334994000000, 100623961896825486602731615774407000000, 6144749285013439594202104990964370000000] Not in OEIS (v) S={2,3,4} [1, 0, 3, 4, 65, 300, 4200, 37240, 567000, 7459200, 130873050, 2248785000, 45820074300, 960718558800, 22551581052000, 554522292324000, 14815285064580000, 416528503687296000, 12512460971526516000, 395230114168409520000, 13202761194110062575000, 462497255518711713300000, 17016880547516875585560000, 654449323331533231461960000, 26304817680413388661545000000, 1101639603994780236225840000000, 48032136805779324344283637500000, 2175711882725905740823116510000000, 102281934821615478250848501975000000, 4982410035314032207875141453300000000] Not in OEIS 3) Write a procedure SeqRTchildNone(S,N), that inputs a finite set of positive integers, S, and a positive integer N, and outputs the first N entries in the list enumerating rooted labeled trees where every vertex is either a leaf (i.e. 0 children) or has a number of children that must NOT be in the set S (otherwise it can have any number of children) Output SeqRTchildNone(S,30) for the following sets S if it is in the OEIS, state the A-number. If it is not, say so. SeqRTchildNone:=proc(S,N) local i,z,r,L; r:=exp(z): for i in S do r:=r-z^i/i! od: L:=FunEqToSeq(r,z,N): [seq(L[i]*i!,i=1..N)]: end: (i) S={1,2} [1, 0, 0, 4, 5, 6, 427, 1968, 6561, 220510, 2129171, 13847736, 337904437, 5156062926, 54298310445, 1192150218496, 24147409593089, 364887230459454, 8145781717395223, 197451127561855320, 3926192043196053981, 94990207383298607710, 2610336306304411857305, 64078852103083131579744, 1726495205831435720085025, 52484675948201890653360126, 1518445334604977900122070187, 45861761590549321813006087288, 1526865236101367578721315510501, 50384530075662682488952867803630] Not in OEIS (ii) S={1,2,3} [1, 0, 0, 0, 5, 6, 7, 8, 2529, 11350, 36971, 104556, 10182757, 99054970, 632882265, 3303250096, 165364954369, 2689602118254, 28186612549255, 233809699635780, 7892319785766381, 179814939414630850, 2756870670036244125, 33096414795555263400, 912900463740631221025, 25500259308250835585126, 525446228008825720959987, 8542226394636207936384988, 221053236679631262456996629, 6917456518383991775275958250] Not in OEIS (iii) S={1,2,3,4} [1, 0, 0, 0, 0, 6, 7, 8, 9, 10, 13871, 60996, 195637, 546560, 1411425, 427249696, 4124980929, 26013422934, 134201794555, 614270986500, 72817031988981, 1211924018940580, 12610860108434875, 103535416865167920, 734250836621295625, 45715497965321732626, 1118451164263614198837, 17224976603614475727388, 205357624826971857095129, 2077663816106417272277280] Not in OEIS (iv) S={1,3,4} [1, 0, 3, 0, 60, 6, 3157, 1184, 319545, 275410, 53033321, 83703456, 13098092449, 33167158220, 4510571784825, 16803854861296, 2066927734933569, 10656494045569638, 1216790715487035979, 8295602009107807560, 895347027336888089481, 7792315471001122039000, 805563125856063419979883, 8701845909614991922610520, 870378180227805997956836425, 11404602278067389636121827626, 1112438746363268367847514778237, 17345790119923612625856930761584, 1660574626556038794681719869586525, 30316620075363168814557434112312780] Not in OEIS (v) S={2,3,4} [1, 2, 6, 24, 120, 726, 5299, 47776, 546921, 7889140, 136394401, 2665805088, 56527983109, 1272143206894, 30092542593975, 746083879217776, 19400233368172481, 530317219796563464, 15282749263331425861, 465396262003998042440, 14992883794257587989701, 510699344284110989954122, 18354927165740287915555401, 693811746109567482139376664, 27479365035663372539331241225, 1136209816394200462905288576876, 48889737108198130555987699902039, 2183691389126980386553090058226016, 101058267340716742644796216036535641, 4839369087144324614043894777799206870] Not in OEIS 4) By using procedure TreeSeqL(N,x) and procedure AveAndMoms(f,x,K) with K=6, added after class, try to L:=TreeSeqL(20,x) L2:=seq(AveAndMoms(L[i],x,6),i=10..20) L2:=[[3.874204890, 0.9717699729, 0.04597233260, 2.880591791, 0.4530490436, 13.28567252], [4.240976184, 1.021012632, 0.04283420832, 2.892739701, 0.4219174574, 13.45582050], [4.607942767, 1.067904651, 0.04032624454, 2.902543063, 0.3972558490, 13.59351360], [4.975057187, 1.112764001, 0.03825826354, 2.910643699, 0.3770309388, 13.70765380], [5.342286216, 1.155840948, 0.03651136348, 2.917462756, 0.3600022320, 13.80404000], [5.709605890, 1.197337091, 0.03500727023, 2.923289797, 0.3453681411, 13.88664930], [6.076998493, 1.237417919, 0.03369221607, 2.928331398, 0.3325858865, 13.95831915], [6.444450643, 1.276221414, 0.03252792996, 2.932739401, 0.3212734193, 14.02113820], [6.811952042, 1.313864160, 0.03148633971, 2.936628204, 0.3111529453, 14.07668346], [7.179494641, 1.350445776, 0.03054631879, 2.940085803, 0.3020168320, 14.12617106], [7.547072051, 1.386052230, 0.02969161273, 2.943181100, 0.2937061876, 14.17055571]] (i) Estimate the limit of the average number of leaves in a labelled tree with vertex n divided by n L2[1,1]/10=0.3874204890 L2[6,1]/15=0.3806403927 L2[11,1]/20=0.3773536026 It's around 0.37, so to me the limit seems like 1/e. (ii) Estimate the limit of the standard-deviation of the number of the random variable ` number of leaves in a labelled tree with vertex n', divided by n L2[1,2]/10=0.09717699729 L2[6,2]/15=0.07982247273 L2[11,2]/20=0.06930261150 I'm not sure for this one, 20 terms doesn't seem like enough. 0.5? If I get the 30th term of TreeSeqL and check the second value, I get 0.05671202010. What about the 40th term? 0.04916418330 Okay, so my guess was incorrect. I will do my best and estimate the limit as 0 because if I try to get 100 terms, it takes too long. (iii)The third, fourth, fifth, and sixth scaled moments 0,3,0,4 (as in the moment sequence)