Question 1. How many labeled connected graphs with 50 vertices and 70 edges are? Answer 1. We use the wtEdgConClever proc in maple to find this 557570125262936299552095051452832858951958306952392379552719516748979534894703561052813706583449695070191616000000 Number of label connected graphs with 50 vertices and 70 edges Question 2. How many labeled graphs with i connected components with 50 vertices and 70 edges are for i=2,3,4,5? Explain how you do it, by using the taylor command in Maple. Answer 2. I wrote a new procedure to do this WtEdConGclever2:=proc(N,a, k) local f,i,x: option remember: f:=log(add((1+a)^binomial(i,2)*x^i/i!,i=0..N+1))^k/k!: f:=taylor(f,x=0,N+1): [seq(expand(coeff(f,x,i)*i!),i=1..N)]: end: With 2 components 2267762282072205271778791270680596849921516338574571823883456519281730035101965414722739023408444177334403072000000 With 3 components 4084614615513849564059280183743190588234377301848961646892154560205839868330317696952259164363869748482983526400000 With 4 components 4336520950646656327224993268880264842114984745013581637572959168612209444462829083123209142308423023328834795520000 Question 3 Compare Estimate cutoff and findCutoff Answer 3 EstimateCutOff(30, 1000) Pretty close 81 FindCutOff(30, 1.05) 84 Question 4 Try to do the optional challenge from the homework of Lecture 18 exactly, using evalf(FindCutOff(n,1.05)/n), for n= 20,30,40,50,60. Do you see a trend? Answer 4 seq(evalf(FindCutOff(n, 1.05)/n), n=20..60,10) 2.450000000, 2.800000000, 3., 3.160000000, 3.300000000 It's an increasing trend Question 5 Generalize procedure EstProbConn(n,m,N): and write a procedure EstProbKcomps(n,m,k,N): that estimates the probability that a random graph with n vertices and m edges has exactly k components, by sampling N such random graphs. Note that EstProbKcomps(n,m,1,N) is exactly the same as EstProbConn(n,m,N) (except, since we are doing simulations, you get different answers each time) Answer 5 EstProbKConn:=proc(n,m,N, k) local i,co, G: co:=0: for i from 1 to N do G:=RandGr(n,m): if nops(CCs(G))=k then co:=co+1: fi: od: evalf(co/N): end: Question 6 ProbConn(n,m): To write a procedure ProbKcomponents(n,m,k) that uses the method of exponential generating functions to find the EXACT probability that a random graph with n vertices and m edges has k components. Note that ProbKcomponents(n,m,1) is EXACTLY the same as ProbConn(m,m,1) How does ProbKcomponents(40,50,2) differ from EstProbKcomps(40,50,2,300)? Answer 6 ProbKComponents:=proc(n,m, k) local a: evalf(coeff(WtEdConGclever2(n,a, k)[n],a,m)/binomial(n*(n-1)/2,m)): end: ProbConn(10, 20) 0.9768915520 EstProbKConn(40, 50, 300, 2) 0.09666666667