{VERSION 2 3 "DEC ALPHA UNIX" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 }{CSTYLE "Hyperlink" -1 17 "" 0 1 0 128 128 1 0 0 1 0 0 0 0 0 0 } {CSTYLE "2D Comment" 2 18 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "2 D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 256 " " 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 257 "" 1 14 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 259 "" 0 8 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 260 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 261 "" 0 8 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 262 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 263 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 264 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 265 "" 1 12 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 266 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 267 "" 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 268 "" 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 269 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{CSTYLE "" -1 270 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0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PSTYLE "" 11 12 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 } 1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 256 1 {CSTYLE "" -1 -1 " " 1 18 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "" 0 257 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 } 3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 258 1 {CSTYLE "" -1 -1 " " 1 8 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "" 0 259 1 {CSTYLE "" -1 -1 "" 1 8 0 0 0 0 0 0 0 0 0 0 0 0 0 } 0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 260 1 {CSTYLE "" -1 -1 " " 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 257 "" 0 "" {TEXT 268 37 "GENERATING MARKED COMBS TRUCT GRAMMARS" }}{PARA 256 "" 0 "" {TEXT 257 37 "An introduction and \+ some applications" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 260 "" 0 " " {TEXT -1 22 "Marni Mishna July 1997" }}{PARA 0 "" 0 "" {TEXT -1 0 " " }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }} {PARA 0 "" 0 "" {TEXT -1 3 "A " }{HYPERLNK 17 "combstruct" 2 "combstr uct" "" }{TEXT -1 9 " grammar " }{TEXT 258 1 "G" }{TEXT -1 137 " can b e used to generate objects, or can itself be manipulated to form relat ed grammars. For example, one can associate a marked grammar " }{TEXT 259 4 "M(G)" }{TEXT 261 1 " " }{TEXT -1 5 "with " }{TEXT 256 1 "G" } {TEXT -1 223 ". A marked grammar generates structures with a fixed num ber of tags affixed to a specified object. For example, one could ta g cycles in a permutation, the substring of a regular expression or th e components of a forest. " }{TEXT 281 4 "M(G)" }{TEXT -1 502 " could then generate the permutations with one cycle tagged, one occurence o f the substring marked or two components in a forest tagged. The tags have the form of an Epsilon product. The relationship between the two grammars becomes evident when considering the generating functions. M arked grammars can be used to solve problems with numbers of component s of a certain type (such as average number of cycles in a permutation ), moments, or more complicated combinatorial parameters such as pathl ength." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "with(combstruct);" }}{PARA 12 "" 1 "" {XPPMATH 20 "6# 71%+allstructsG%&countG%%drawG%)finishedG%'gfeqnsG%)gfseriesG%(gfsolve G%,iterstructsG%%markG%'momentG%+nextstructG%,prog_gfeqnsG%.prog_gfser iesG%-prog_gfsolveG%)varianceG" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 15 "Marked Grammars" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 24 "A marked st ructure from " }{TEXT 263 4 "M(G)" }{TEXT -1 37 " is equivalent to its counterpart in " }{TEXT 264 1 "G" }{TEXT -1 130 " with a certain numb er of substructures, or objects distinguished. The objects are disting uished with marks-- a product with some " }{TEXT 262 7 "Epsilon" } {TEXT -1 18 ". If for example, " }{TEXT 276 1 "G" }{TEXT -1 25 " descr ibes binary trees, " }{TEXT 277 1 "G" }{TEXT -1 36 " could be marked i n such a way that " }{TEXT 278 4 "M(G)" }{TEXT -1 148 " generates bina ry trees with a fixed number of atoms marked (nodes colored). Marked g rammars are valid grammars consisting of productions made from " } {TEXT 269 5 "Union" }{TEXT -1 2 ", " }{TEXT 270 4 "Prod" }{TEXT -1 2 " , " }{TEXT 271 3 "Set" }{TEXT -1 2 ", " }{TEXT 272 8 "Sequence" } {TEXT -1 6 ", and " }{TEXT 273 5 "Cycle" }{TEXT -1 314 ". A particula r non-terminal from the original grammar is chosen, to be the recipie nt of marks. The corresponding marked production may not be the sam e kind of production, though they do maintain a bijection. The marks \+ are unordered, and if Z is the object we are marking we may only do so once for any given " }{TEXT 260 1 "Z" }{TEXT -1 1 "." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 53 "Combstruct generates m arked grammars via the command " }{HYPERLNK 17 "combstruct[mark]" 2 "c ombstruct, mark" "" }{TEXT -1 71 " . Given the marked grammar we can d raw examples from the new grammar. " }}{PARA 0 "" 0 "" {TEXT -1 15 "Th e production " }{XPPEDIT 18 0 "A[1]" "&%\"AG6#\"\"\"" }{TEXT -1 24 " g enerates objects like " }{TEXT 274 1 "A" }{TEXT -1 57 " with one node \+ marked. In general, the marked production " }{XPPEDIT 18 0 "A[k]" "&% \"AG6#%\"kG" }{TEXT -1 24 " generates objects with " }{TEXT 275 1 "k" }{TEXT -1 8 " marks. " }}}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 21 "Example : Binary Trees" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 141 "The grammar mbi ntree generates trees with two coloured nodes. It also contains the p roductions for trees with one and zero coloured nodes. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 93 "bintree:= \{A=Union(Z, T), T=Prod(Z, A, A)\}: \nmbintree:=mark(bintree, unlabelled, [Z, tag], 2);" }}{PARA 12 "" 1 " " {XPPMATH 20 "6#>%)mbintreeG \+ " 0 "" {MPLTEXT 1 0 43 "draw([A[1], mbintree, unlabelled], size=5);" } }{PARA 11 "" 1 "" {XPPMATH 20 "6#-%%ProdG6$-F$6$&%\"ZG6#\"\"!%$tagG-F$ 6$-F$6$F(-F$6$F(F(F(" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 5 "Thus " } {XPPEDIT 18 0 "A[2]" "&%\"AG6#\"\"#" }{TEXT -1 22 " has two nodes mark ed." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "draw([A[2], mbintree, unlabe lled], size=5);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%%ProdG6$&%\"ZG6# \"\"!-F$6$-F$6$F&-F$6$-F$6$F&%$tagGF0F&" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 219 "There is a mapping from the marked objects to the gramma r. Hence, it is possible that the structures produced do not directly \+ resemble objects from the original grammar. This is even the case for the 0-marked objects." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "draw([A[ 0], mbintree, unlabelled], size=5);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "draw([A, bintree, unlabelled], size=5);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%%ProdG6$&%\"ZG6#\"\"!-F$6$-F$6$F&-F$6$F&F&F&" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#-%%ProdG6%%\"ZG-F$6%F&F&F&F&" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 173 "The number of different trees of \+ size five with one node marked is the number of trees of size five tim es five, the number of ways to mark the nodes of a tree of five nodes. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "count([A, bintree, unlabelled], size =5);" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "count([A[1], mbintree , unlabelled], size=5);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"#" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#\"#5" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 75 "We can choose type labelled as well. The labels are put on afte r the marks." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "mbintree:=mark(bint ree, labelled, [Z, tag], 2):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "dra w([A[1], mbintree, labelled], size=5);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#-%%ProdG6$&&%\"ZG6#\"\"!6#\"\"%-F$6$&F'6#\"\"$-F$6$&F'6#\"\"&-F$ 6$&F'6#\"\"#-F$6$&F'6#\"\"\"%$tagG" }}}{PARA 0 "" 0 "" {TEXT -1 135 "W e can just as easily mark only the leaves in the binary tree. We must \+ redescribe the grammar as to make it clear what the leaves are. " }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 74 "BTree:= \{T=Union(Leaf, T2), T2=Prod(Node, T, T), Node=Atom, Leaf=Epsilon\}:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "L_Btree:=mark(BTree, unlabelled, [Leaf, L], 1 ):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 86 "count([T[1], L_Btree, unlabelled], size=5)/count([T[0], L_Btree, unlabelled], size=5);" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"'" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 236 "The average number of leaves in a binary tree with five \+ nodes is six. Although in the case of trees this number is constant, t his computation shows how marking can be applied to the computation of averages of combinatorial parameters. " }}}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 12 "Applications" }}{SECT 0 {PARA 4 "" 0 "" {TEXT -1 18 "Generating Moments" }}{PARA 0 "" 0 "" {HYPERLNK 17 "Generating functions" 2 "gfsolve" "" }{TEXT -1 115 " are very useful tools for finding means, standard deviations and other mo ments of distribution. Given a structure " }{TEXT 288 1 "A" }{TEXT -1 48 " and the substructure of interest marked with a " }{TEXT 294 1 "u " }{TEXT -1 36 ", consider the generating function " }{TEXT 289 7 "A( x,u)." }{TEXT -1 41 " The generating function for the mean is " } {XPPEDIT 18 0 "[x^n] *diff(A(x,u), u)[u=1]/[x^n]/A(x, 1))=sum(a[n,k]*k *x^n)" "/**7#)%\"xG%\"nG\"\"\"&-%%diffG6$-%\"AG6$F&%\"uGF06#/F0\"\"\"F (7#)F&F'!\"\"-F.6$F&\"\"\"F6-%$sumG6#*(&%\"aG6$F'%\"kGF(FAF()F&F'F(" } {TEXT -1 7 " where " }{XPPEDIT 18 0 "a[n,k]" "&%\"aG6$%\"nG%\"kG" } {TEXT -1 35 " is the number of objects of size " }{TEXT 299 1 "n" } {TEXT -1 6 " with " }{TEXT 300 1 "k" }{TEXT -1 116 " occurrences of th e subobject. It is possible to extract this quantity from the univari ate generating function for " }{XPPEDIT 18 0 "A[1]" "&%\"AG6#\"\"\"" } {TEXT -1 28 " . The generating function " }{XPPEDIT 18 0 "A[2](x)" "- &%\"AG6#\"\"#6#%\"xG" }{TEXT -1 55 " yields information about the vari ance and in fact the " }{XPPEDIT 18 0 "k^(th) " ")%\"kG%#thG" }{TEXT -1 58 " moment can be determined from the generating function of " } {XPPEDIT 18 0 "A[k" "&%\"AG6#%\"kG" }{TEXT -1 122 " . Determining mom ents in this way is useful when the bivariate generating function cann ot be found in its explicit form." }}{SECT 0 {PARA 5 "" 0 "" {TEXT -1 14 "Set Partitions" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 112 "We can comp are the result using marks with the result obtained by working with th e original generating function." }}{PARA 0 "" 0 "" {TEXT -1 57 "Consid er the following grammar defining Set partitions. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 107 "set_part:=\{S=Set(Prod(part,Set(Z,card>=1))),part =Epsilon\}, labelled:\nm_set_part:=mark(set_part,[part,u],2):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "set_part_gf:=gfsolve(set_par t, z, [[u,part]]):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "m_set _part_gf:=gfsolve(m_set_part,labelled,z):" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 104 "s[0]:= subs(set_part_gf,S(z,u));\ns[1]:=subs(m_set _part_gf,S[1](z)); \ns[2]:= subs(m_set_part_gf,S[2](z));" }}{PARA 11 " " 1 "" {XPPMATH 20 "6#>&%\"sG6#\"\"!-%$expG6#*&%\"uG\"\"\",&-F)6#%\"zG F-!\"\"F-F-" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"sG6#\"\"\",&*&-%$e xpG6#,&-F+6#%\"zGF'!\"\"F'F'F.F'F'F*F1" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"sG6#\"\"#,(*&-%$expG6#,&-F+6#%\"zG\"\"\"!\"\"F1F1F.F'#F1F'* &F*F1F.F1F2F*F3" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 38 "The first mome nt is the derivative of " }{TEXT 293 7 "S(u,z) " }{TEXT -1 15 "with re pect to " }{TEXT 301 1 "u" }{TEXT -1 15 ", evaluated at " }{TEXT 302 1 "u" }{TEXT -1 28 "=1. This is the same as our " }{XPPEDIT 18 0 "S[1] (z)" "-&%\"SG6#\"\"\"6#%\"zG" }{TEXT -1 1 "." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "expand(subs(u=1,diff(s[0],u))-s[1]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"!" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "expand(subs(u=1, 1/2*diff(s[0], u, u))-s[2]);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"\"!" }}}}{SECT 0 {PARA 5 "" 0 "" {TEXT -1 60 "The mea n number of external nodes / leaves in a binary tree " }}{PARA 0 "" 0 "" {TEXT -1 261 "We return to binary trees to show how we can use mark ing to determine information about the number of substructures in a s tructure. The first example uses a marked grammar to illustrate the pl ain fact that the number of external nodes in a binary tree of size " }{TEXT 295 4 "2n+1" }{TEXT -1 4 " is " }{TEXT 296 3 "n+1" }{TEXT -1 126 ". This is followed by applying the same technique to determine t he average number of internal nodes in a binary tree of size " }{TEXT 290 2 "n " }{TEXT -1 58 "with both children external. (Such nodes are \+ often called " }{TEXT 298 6 "leaves" }{TEXT -1 1 ")" }}{PARA 0 "" 0 " " {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 282 "To count the number of external nodes we generate the grammar that has two external nodes ma rked. With the generating functions we can compute the moments and det ermine the average number of external nodes (which should be almost a \+ half) and the variance (which should be zero). " }}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 158 "bintree:=\{T=Union(XN, ST), ST=Prod(N, T, T ), XN=Atom, N=Atom\}:\nmbintree:=mark(bintree, unlabelled, [XN, tree], 2):\ngf_bintree:=gfsolve(mbintree,unlabelled,z):" }}}{EXCHG {PARA 0 " " 0 "" {XPPEDIT 18 0 "T[1](z)" "-&%\"TG6#\"\"\"6#%\"zG" }{TEXT -1 145 " gives us the first moment with respect to that which we have marked, the leaves. Thus to find the average number of leaves in an object of size " }{TEXT 292 1 "n" }{TEXT -1 31 ", we divide the coefficient of \+ " }{XPPEDIT 18 0 "z^n" ")%\"zG%\"nG" }{TEXT -1 4 " in " }{XPPEDIT 18 0 "T[1](z)" "-&%\"TG6#\"\"\"6#%\"zG" }{TEXT -1 37 " by the correspondi ng coefficient in " }{XPPEDIT 18 0 "T[0](z)" "-&%\"TG6#\"\"!6#%\"zG" } {TEXT -1 4 ". " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 98 "T0:=subs(gf_bin tree,T[0](z)); T1:= subs(gf_bintree,T[1](z)); T2:=factor(subs(gf_bintr ee,T[2](z)));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#T0G,$*&%\"zG!\"\", &\"\"\"F**$,&F*F**$F'\"\"#!\"%#F*F.F(F*F0" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#T1G*&%\"zG\"\"\",&F'F'*$F&\"\"#!\"%#!\"\"F*" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%#T2G,$**%\"zG\"\"$,$*&,&F'\"\"#!\"\" \"\"\"F.,&F'F,F.F.F.F-#F-F,F+F-F/F-F-" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 71 "coeff(series(T1, z, 130), z^121)/coeff(series(T0, z, \+ 130), z^121)/121.;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#$\"+9BKT]!#5" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "61/121.;" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#$\"+9BKT]!#5" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 114 "Since it is the same for each tree the variance should be 0. We can \+ compute it using the twice marked production." }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 191 "t0seq:=series(T0, z, 20):\nt1seq:=series(T1, z, 20): \nE2seq:=series(2*T2+T1, z, 20):\nseq(coeff(E2seq, z^i)/coeff(t0seq, z ^i)-(coeff(t1seq, z^i)/coeff(t0seq, z^i))^2, i=[1,3,5,7,9,11,13,15,17] );" }}{PARA 0 "" 0 "" {TEXT -1 50 "Our results are consistent with com mon knowledge. " }}{PARA 11 "" 1 "" {XPPMATH 20 "6+\"\"!F#F#F#F#F#F#F# F#" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 272 "Now we try the same techn ique to determine the average number of internal nodes such that both \+ nodes are external. We will consider the trees with external nodes r emoved. The leaves on the pared trees correspond to the internal nodes with both nodes external nodes. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 219 "pared_bintree:= \{T=Union(L, ST), ST=Union(Prod(N, T , T), Prod(N, Epsilon, T), Prod(N, T, Epsilon)),L=Atom, N=Atom\}:\nmpb intree:=mark(pared_bintree, unlabelled, [L, tree], 2):\ngf_pbintree:=g fsolve(mpbintree,unlabelled,z):" }}{PARA 0 "" 0 "" {XPPEDIT 18 0 "T[1] (z)" "-&%\"TG6#\"\"\"6#%\"zG" }{TEXT -1 145 " gives us the first momen t with respect to that which we have marked, the leaves. Thus to find \+ the average number of leaves in an object of size " }{TEXT 291 1 "n" } {TEXT -1 31 ", we divide the coefficient of " }{XPPEDIT 18 0 "z^n" ")% \"zG%\"nG" }{TEXT -1 4 " in " }{XPPEDIT 18 0 "T[1](z)" "-&%\"TG6#\"\" \"6#%\"zG" }{TEXT -1 37 " by the corresponding coefficient in " } {XPPEDIT 18 0 "T[0](z)" "-&%\"TG6#\"\"!6#%\"zG" }{TEXT -1 14 ", as bef ore " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 114 "T[0]:=subs(gf_pb intree,T[0](z));\nT[1]:=factor(subs(gf_pbintree,T[1](z)));\nT[2]:=fact or(subs(gf_pbintree,T[2](z)));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&% \"TG6#\"\"!,$*&%\"zG!\"\",(F*!\"#\"\"\"F.*$,&F.F.F*!\"%#F.\"\"#F+F.F2 " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"TG6#\"\"\"*&%\"zGF',&F'F'F)! \"%#!\"\"\"\"#" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%\"TG6#\"\"#,$*(% \"zG\"\"$,&\"\"\"F-F*!\"%#!\"\"F',&F*\"\"%F0F-F0F0" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 68 "We can now determine closed forms for the average and the variance. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "with (gfun):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 313 "TT[0]:=rsolve(d iffeqtorec(holexprtodiffeq(T[0], y(z)), y(z), u(n))minus \{u(0)=0\}, u (n));\nTT[1]:=rsolve(diffeqtorec(holexprtodiffeq(T[1], y(z)), y(z), u( n)) minus \{u(1)=0, u(0)=0\}, u(n));\nTT[2]:=rsolve(diffeqtorec(holexp rtodiffeq(T[2], y(z)), y(z), u(n)) minus \{u(2)=0, u(1) = 0, u(0) = 0 \}, u(n)); \n" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%#TT G6#\"\"!**)\"\"%%\"nG\"\"\"-%&GAMMAG6#,&F+F,#F,\"\"#F,F,-F.6#,&F2F,F+F ,!\"\"%#PiG#F6F2" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%#TTG6#\"\"\"**) \"\"%,&%\"nGF'!\"\"F'F'-%&GAMMAG6#,&F,F'#F-\"\"#F'F'-F/6#F,F-%#PiGF2" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>&%#TTG6#\"\"#,$**)\"\"%%\"nG\"\"\"- %&GAMMAG6#,&F,F-#!\"$F'F-F--F/6#,&!\"#F-F,F-!\"\"%#PiG#F8F'#F-\"#K" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 36 "simplify(TT[1]/TT[0], power , GAMMA);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,$*(%\"nG\"\"\",&F%F&F&F& F&,&F%\"\"#!\"\"F&F*#F&F)" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "asympt(\"/n, n);" }}{PARA 0 "" 0 "" {TEXT -1 46 "A quarter of the \+ tree is leaves, as expected. " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,0#\" \"\"\"\"%F%*$%\"nG!\"\"#\"\"$\"\")*$F(!\"##F+\"#;*$F(!\"$#F+\"#K*$F(! \"%#F+\"#k*$F(!\"&#F+\"$G\"-%\"OG6#*$F(!\"'F%" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 58 "simplify((2*TT[2]+TT[1])/TT[0]-(TT[1]/TT[0])^2, \+ symbolic);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,$*,%\"nG\"\"\",&F%F&F&F &F&,(*$F%\"\"#F&F%!\"$F*F&F&,&F%F*!\"\"F&!\"#,&F%F*F+F&F-#F&F*" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 15 "asympt(\"/n, n);" }}{PARA 0 "" 0 "" {TEXT -1 67 "The normalized variance is tending to a constant. This is expected." }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,,#\"\"\"\"#;F%* $%\"nG!\"\"#F%\"#K*$F(!\"##!\"$F+*$F(F/#!\"*\"#k-%\"OG6#*$F(!\"%F%" }} }}{SECT 0 {PARA 5 "" 0 "" {TEXT -1 49 "The mean number of cycles in a \+ random permutation" }}{PARA 0 "" 0 "" {TEXT -1 220 "We can use the sam e method to determine information about substructures other than atoms . For example, we could count the average number of cycles in a random permutation. Just as easily we can also compute the variance." }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 38 "Perm:= \{P=Set(C), C=Cycle(Z , card>0)\}:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 82 "M_Perm:=mar k(Perm, labelled, [C, m], 2):\nM_Perm_gf:= gfsolve(M_Perm, labelled, z ):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 87 "p0:=subs(M_Perm_gf, P [0](z));p1:=subs(M_Perm_gf, P[1](z));p2:=subs(M_Perm_gf, P[2](z));" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%#p0G,$*$,&!\"\"\"\"\"%\"zGF)F(F(" }} {PARA 11 "" 1 "" {XPPMATH 20 "6#>%#p1G,$*&-%#lnG6#,$*$,&!\"\"\"\"\"%\" zGF.F-F-F.F,F-F-" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#p2G,$*&-%#lnG6# ,$*$,&!\"\"\"\"\"%\"zGF.F-F-\"\"#F,F-#F-F0" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 146 "Next, we can try to solve for the coefficients in the ge nerating function. We can see from the closed form that the coefficien ts of p0 are all 1. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 70 "PP0 :=rsolve(diffeqtorec(holexprtodiffeq(p0, y(z)), y(z), u(n)), u(n));" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 70 "PP1:=rsolve(diffeqtorec(holexprtod iffeq(p1, y(z)), y(z), u(n)), u(n));" }}{PARA 11 "" 1 "" {XPPMATH 20 " 6#>%$PP0G<$/-%\"uG6#%\"nG\"\"\"/-F(6#\"\"!F+" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%$PP1G,&-%$PsiG6#,&%\"nG\"\"\"F+F+F+%&gammaGF+" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 23 "Thus, a permutation of " }{TEXT 297 1 "n" }{TEXT -1 16 " has on average " }{XPPEDIT 18 0 "(Psi(n+1)+ga mma)" ",&-%$PsiG6#,&%\"nG\"\"\"\"\"\"F(F(%&gammaGF(" }{TEXT -1 51 " cy cles. We can now try to determine the variance. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 91 "PP2:=rsolve(diffeqtorec(holexprtodiffeq(p2, y(z)), y( z), u(n)) minus\{u(1)=0,u(0)=0\}, u(n));" }}{PARA 12 "" 1 "" {XPPMATH 20 "6#>%$PP2G-%'rsolveG6$<$/-%\"uG6#\"\"##\"\"\"F-,**&,(!\"\"F/%\"nG! \"#*$F4F-F3F/-F+6#F4F/F/*&,(F4\"\"&\"\"$F/F6F-F/-F+6#,&F4F/F/F/F/F/*&, (F4!\"$F6F3F5F/F/-F+6#,&F-F/F4F/F/F/F/F/F7" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 83 "We cannot solve PP2 explicitly, so we solve for particula r values of n, say 1..10. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 177 "p0se q:=series(p0, z, 20):p1seq:=series(p1, z, 20):E2seq:=series(2*p2+p1, z , 20):\nseq(eval(coeff(E2seq, z^i)/coeff(p0seq, z^i)-(coeff(p1seq, z^i )/coeff(p0seq, z^i))^2), i=1..10);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6, \"\"!#\"\"\"\"\"%#\"#<\"#O#\"#&*\"$W\"#\"%^H\"%+O#\"%^MF/#\"'*p!>\"'+k <#\"'r*R)\"'+cq#\"(Rp=)\"(+/N'#\"'R.N\"';SD" }}}{EXCHG {PARA 0 "" 0 " " {TEXT -1 27 "Alternately we can use the " }{HYPERLNK 17 "variance" 2 "combstruct, variance" "" }{TEXT -1 31 " command to get these value s :" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 70 "seq(combstruct[variance]([P, Perm, labelled], size =i, C), i=1..10); " }}{PARA 11 "" 1 "" {XPPMATH 20 "6,\"\"!#\"\"\"\"\"%#\"#<\"#O#\"#&*\"$W\"#\"%^H\"%+O#\"%^M F/#\"'*p!>\"'+k<#\"'r*R)\"'+cq#\"(Rp=)\"(+/N'#\"'R.N\"';SD" }}}}} {SECT 0 {PARA 4 "" 0 "" {TEXT -1 11 "Path Length" }}{SECT 0 {PARA 5 " " 0 "" {TEXT -1 23 " Creating the bijection" }}{PARA 258 "" 0 "" {TEXT 265 554 "The internal pathlength of a tree is the sum of the di stances from each node to the root node. When the nodes of the tree ar e used to store data, the average pathlength of that type of tree is c learly related to the average complexity of data retrieval. We can us e a marked grammar of a tree to determine the average pathlength of a \+ family of trees. The distance from a node to the root is the number \+ of predecessors of the node. Thus, we can count the total pathlength b y counting the number of ways we can place two marks on the tree, one \+ (call it " }{TEXT 282 5 "adult" }{TEXT 283 37 ") an ancestor of the ot her (call it " }{TEXT 284 3 "kid" }{TEXT 285 2 ")." }}{PARA 259 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 68 "We can describe such t rees as the composition of three smaller trees" }}{PARA 0 "" 0 "" {TEXT -1 29 "Tree1: The subtree rooted at " }{TEXT 279 3 "kid" }} {PARA 0 "" 0 "" {TEXT -1 29 "Tree2: The subtree rooted at " }{TEXT 280 5 "adult" }{TEXT -1 19 " with Tree1 removed" }}{PARA 0 "" 0 "" {TEXT -1 51 "Tree3: The entire tree with Tree1 and Tree2 removed" }} {PARA 0 "" 0 "" {INLPLOT "65-%'CURVESG6%7S7$$!\"(\"\"!$!\"$F*7$$!3cLLL $Q6G\"p!#<$!3cLLL$Q6G\"HF07$$!3bmm;M!\\p$oF0$!3bmm;M!\\p$GF07$$!36LLL) )Qj^nF0$!36LLL))Qj^FF07$$!3BLLL=KvlmF0$!3BLLL=KvlEF07$$!3Kmm;C2G!e'F0$ !3Kmm;C2G!e#F07$$!39LL$3yO5]'F0$!39LL$3yO5]#F07$$!3&*****\\nU)*=kF0$!3 &*****\\nU)*=CF07$$!3iLL$3WDTL'F0$!3iLL$3WDTL#F07$$!3()****\\d(Q&\\iF0 $!3()****\\d(Q&\\AF07$$!3'**fF0$!33+++q)>'**>F07$$!3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\#F07$$!3-+ ]i![Q`V#F0$\"3)***\\P>:mkDF07$$!3/+]PC9wxBF0$\"3'***\\iv&QAi#F07$$!3%* ***\\iiwbJ#F0$\"31++vtLU%o#F07$$!3))*****\\kL8D#F0$\"37+++bjm[FF07$$!3 4++D@W[)=#F0$\"3\"****\\(yb^6GF07$$!3,+]ilXnF@F0$\"3****\\PMaKsGF07$$! 3#)***\\()eb,1#F0$\"3=++D6W%)RHF07$$!3@+++&y'[**>F0$\"3z*****\\@80+$F0 7$$!3&*****\\())4Z$>F0$\"30++]7,HlIF07$$!39+]i!R7g(=F0$\"3')**\\P4w)R7 $F07$$!3$)****\\A0%=\"=F0$\"3<++]x%f\")=$F07$$!3?+]i&zf9v\"F0$\"3!)** \\P/-a[KF07$$!3'***\\7QXM)o\"F0$\"3/+](=Yb;J$F07$$!38++]PyjE;F0$\"3()* ***\\i@OtLF07$$!39+]iSm.i:F0$\"3')**\\PfL'zV$F07$$!3\")******4!=)*\\\" F0$\"3>+++!*>=+NF07$$!3(****\\PZ!>O9F0$\"3.++DE&4Qc$F07$$!3$)**\\i0)*3 t8F0$\"3<+]P%>5pi$F07$$!3')*****\\%o5:8F0$\"39+++bJ*[o$F07$$!3\"****\\ (G=l[7F0$\"34++Dr\"[8v$F07$$!3++++qO@*=\"F0$\"3++++Ijy5QF07$$!3$***\\i &>Se7\"F0$\"32+]P/)fT(QF07$$!3$***\\P%p$=l5F0$\"32+]i0j\"[$RF07$$F[hoF *F\\_nFizF`[l-F$6%7SFdgp7$$!3')******\\!R!p\")Fes$\"3@+++0R!p\"QF07$$! 3x****\\<(Hfd'Fes$\"3w***\\<(HfdOF07$$!3x*****\\l6Vy%Fes$\"3)*****\\l6 VyMF07$$!3\\)****\\e<3)HFes$\"3'*****\\e<3)H$F07$$!3b****\\2_*e=\"Fes$ \"32++v?&*e=JF07$$\"3f4++DgF#y%Fhv$\"38++vRs<_HF07$$\"3o****\\#QI8?#Fe s$\"3\")***\\<'p')zFF07$$\"3U-+]UdO$)RFes$\"3)****\\dUj;g#F07$$\"3T++] #4'ofdFes$\"3u***\\2RJSU#F07$$\"3(>+++\"*\\oe(Fes$\"3-+++4]JTAF07$$\"3 *G++]z;i>*Fes$\"3\\****\\?$y.3#F07$$\"3b+++t#)z+6F0$\"3X*****ps,#**=F0 7$$\"33+++&z=FG\"F0$\"3#******\\?\"G<a\"F07$$\"3>++Da\\B<;F0$\"3\")***\\d/lFQ\"F07$$\"38+++j:a1=F0$\"3()** ***pVeM>\"F07$$\"3I+++#44p'>F0$\"3q*****z!44L5F07$$\"3@++D_YX`@F0$\"3) y***\\xMXl%)Fes7$$\"3H+++#3z&=BF0$\"34(*****z\"4U\"oFes7$$\"3a++D_nu* \\#F0$\"3j%***\\xC`-]Fes7$$\"3R++v;7EsEF0$\"35'***\\KyQxKFes7$$\"3`++] i>E_GF0$\"3v%****\\P!Qx9Fes7$$\"32,+DP)ev,$F0$!3#p5+]s$)ev\"Fhv7$$\"3Y ++]ZQ&e>$F0$!3b/++v%Q&e>Fes7$$\"36++DaA0\"Q$F0$!36,+]UD_5QFes7$$\"31++ v6!oAa$F0$!3c++]<,oAaFes7$$\"3O++]YaQ;PF0$!3c.++lW&Q;(Fes7$$\"3]+++%zl i*QF0$!3/0++Szli*)Fes7$$\"36++]?OCsSF0$!36++]?OCs5F07$$\"3\\++D;7^UUF0 $!3\\++D;7^U7F07$$\"3]++]^VcJWF0$!3]++]^VcJ9F07$$\"3%******>+P9g%F0$!3 %******>+P9g\"F07$$\"3/,++:B\"Gy%F0$!3/,++:B\"Gy\"F07$$\"3]++D1`;Z\\F0 $!3]++D1`;Z>F07$$\"3P,++Pl%o7&F0$!3P,++Pl%o7#F07$$\"3y***\\Ad7fH&F0$!3 y***\\Ad7fH#F07$$\"3k++D$HNEZ&F0$!3k++D$HNEZ#F07$$\"3r+++bSTXcF0$!3r++ +bSTXEF07$$\"39++D1uHEeF0$!39++D1uHEGF07$$\"3B,++s&40+'F0$!3B,++s&40+$ F07$$\"3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*RE8F0$\"3\\++DTl*RE$Fes7$$!32+]7h(Gc@\"F0$\"3o++D6wGc@Fes7$$ !3****\\7X$p55\"F0$\"3()***\\7X$p55Fes7$$!3`++DEKxo)*Fes$!3q%***\\PxE7 8Fhv7$$!3_*****\\\"z;%p)Fes$!3[+++&3KeI\"Fes7$$!3_++]<\\dfwFes$!3[**** \\#3D/M#Fes7$$!3P)****\\Co[\\'Fes$!3j,++b<80NFes7$$!38+++v\"z`K&Fes$!3 ()*****\\#3iuYFes7$$!3Z)****\\vf$)>%Fes$!3`,++X-k,eFes7$$!35***\\7:=\\ <$Fes$!3!4+]([=3DoFes7$$!3'))****\\4Zz&>Fes$!39,++0H0U!)Fes7$$!3?$**** **zH,F*Fhv$!3o+++?q)H2*Fes7$$\"39B+](y%3AFFhv$!3B+](y%3AF5F07$$\"3L*** ***pEsL8Fes$!3$******pEsL8\"F07$$\"3]-+vy>P)\\#Fes$!3D+](y>P)\\7F07$$ \"3#4+]i`$R2OFes$!34+]i`$R2O\"F07$$\"3L/+](=TXw%Fes$!3V++v=TXw9F07$$\" 32.+v`R;FeFes$!3J+]P&R;Fe\"F07$$\"3R++]ihMtpFes$!3/++D;YL(p\"F07$$\"3N ,+v[t!R;)Fes$!38+]([t!R;=F07$$\"3+,+DhVH+#*Fes$!35+]7O%H+#>F07$$\"3H++ vs?'>.\"F0$!3H++vs?'>.#F07$$\"3%*******Q%*fZ6F0$!3%*******Q%*fZ@F07$$ \"3v***\\<\\\"F0$!3))***\\-%*><\\#F07$$\"3r*****pyB4g\"F0$!3r*** **pyB4g#F07$$\"34++]-A_<F0$!3J++]fqoQHF07$$\"3****\\(yOst/#F0$!3****\\( yOst/$F07$$\"3;+]PJ)z4;#F0$!3;+]PJ)z4;$F07$$\"3]****\\#*=0sAF0$!3]**** \\#*=0sKF07$$\"3G+](o/M$)Q#F0$!3G+](o/M$)Q$F07$$\"3g+++#eF.]#F0$!3g+++ #eF.]$F07$$\"3S++DZr&[h#F0$!3S++DZr&[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)=#F0F]`m7$$!38++]PyjE@F0 F]`m7$$!39+]iSm.i?F0F]`m7$$!3\")******4!=)**>F0F]`m7$$!3(****\\PZ!>O>F 0F]`m7$$!3$)**\\i0)*3t=F0F]`m7$$!3')*****\\%o5:=F0F]`m7$$!3\"****\\(G= l[Sei\"F0F]`m7$$!3$***\\P%p $=l:F0F]`mF\\`uFizF`[l-%*AXESSTYLEG6#%%NONEG-%&TITLEG6#%GMapping~of~Tr ee~with~Two~Colored~nodesG-%+AXESLABELSG6$%\"xG%!G-%%VIEWG6$;$!#IF*$Fj goF*%(DEFAULTG" 2 383 186 186 3 0 1 0 2 9 0 1 1 1.000000 45.000000 45.000000 10040 10061 10056 10074 0 0 0 20040 0 12010 0 255 0 0 255 0 0 1 3 0 0 0 194 30 0 0 0 0 0 0 }}{PARA 0 "" 0 "" {TEXT -1 97 "Our leav es will be epsilons and thus of no size so we can superimpose the node s corresponding to " }{TEXT 286 3 "kid" }{TEXT -1 5 " and " }{TEXT 287 5 "adult" }{TEXT -1 24 " over the marked leaves." }}{PARA 0 "" 0 " " {TEXT -1 66 "With marking we can easily generate all trees with one \+ leaf marked" }}}{SECT 0 {PARA 5 "" 0 "" {TEXT -1 12 "Binary Trees" }} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 7 "T:='T':" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 112 "BTree:= \{T=Union(L, ST), ST=Prod(N, T, T), \+ N=Atom, L=Epsilon\}:\nBTree_mleaf:=mark(BTree, unlabelled, [L, m1], 1) :" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 258 "Next, we add our bijection. We must make one of the two trees with a marked leaf a tree with at l east one node, else duplication occurs. Thus, our bijection is a tree \+ of size at least one with one leaf marked, a tree with one leaf marked followed by a tree. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "BTree_pl:= BTree_mleaf union \{PT= Prod(ST[1], T[1], T[0])\}: " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 93 "To count the total pathlengths of all binary tr ees with five nodes we count this new object. " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 45 "count([PT, BTree_pl, unlabelled], size = 3); " }} {PARA 11 "" 1 "" {XPPMATH 20 "6#\"#e" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 59 "Since all of the generating functions are algebraic, using " } {HYPERLNK 17 "gfun" 2 "gfun" "" }{TEXT -1 69 " we can determine a line ar recurrence which is solvable with rsolve, " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "BTree_gf:=gfsolve(BTree_pl, labelled, z):" }} {PARA 0 "> " 0 "" {MPLTEXT 1 0 93 "Bcount:=rsolve(diffeqtorec(holexprt odiffeq(subs(BTree_gf, PT(z)), y(z)), y(z), u(n)), u(n));\n" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%'BcountG,&)\"\"%%\"nG\"\"#*.F&\"\"\")#F+F) F(F+)F)F(F+-%&GAMMAG6#,&#\"\"$F)F+F(F+F+-F06#,&F)F+F(F+!\"\"%#PiG#F8F) !\"%" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 96 "TreeCount:=rsolve(d iffeqtorec(holexprtodiffeq(subs(BTree_gf,T[0](z)), y(z)), y(z), u(n)), u(n));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%*TreeCountG**)\"\"%%\"nG \"\"\"-%&GAMMAG6#,&F(F)#F)\"\"#F)F)-F+6#,&F/F)F(F)!\"\"%#PiG#F3F/" }}} {EXCHG {PARA 0 "" 0 "" {TEXT -1 75 "We can determine the general expre ssion for pathlength of a tree of size n:" }}}{EXCHG {PARA 0 "> " 0 " " {MPLTEXT 1 0 34 "simplify(Bcount, power, symbolic);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#*(,&*()\"\"%%\"nG\"\"\"-%&GAMMAG6#,&\"\"#F)F(F)F)% #PiG#F)F.F.*&)F',&F(F)F)F)F)-F+6#,&#\"\"$F.F)F(F)F)!\"\"F)F*F9F/#F9F. " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 54 "We can determine the expressi on of average pathlength " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "simplify(Bcount/TreeCount, power, symbolic);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,$*&,**(-%&GAMMAG6#%\"nG\"\"\"F*\"\"#%#PiG#F+F,F+*(F'F+ F*F+F-F.F+*&-F(6#,&F*F+F.F+F+F*F+!\"#F1!\"\"F+F1F5F," }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 66 "Asympt gives us information about the size of t his asymptotically:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "map( combine, asympt(Bcount/TreeCount, n),exp);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#,0*&%#PiG#\"\"\"\"\"#*$%\"nG!\"\"#!\"$F(F(F*!\"%*&F%F&F )#F+F(#\"\"*\"\"%!\"#F'*&F%F&F)F&#\"#<\"#k*&F%F&F)#\"\"$F(#F;\"$7&-%\" OG6#*$F)#\"\"&F(F'" }}}}{SECT 0 {PARA 5 "" 0 "" {TEXT -1 14 " Ternary \+ Trees" }}{EXCHG {PARA 0 "" 0 "" {TEXT -1 227 "We can apply the same ap proach to other types of trees . One way to generalize binary trees is to consider trees with more than two children per node. Ternary trees have three children per node. We use the exact same procedure:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 65 "TTree:= \{T=Union(L, ST), ST =Prod(N, T, T, T),N=Atom, L=Epsilon \}:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "TTree_mleaf:=mark(TTree, unlabelled, [L, ll], 1):" }} }{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "TTree_pl:= TTree_mleaf unio n \{PT= Prod(ST[1], T[1], T[0])\}: " }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 57 "We can now find the average pathlength of ternary trees: " }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 44 "count([PT, TTree_pl, unlabel led], size =2); " }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"#F" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 172 "To make a comparison with binary trees w e will consider two trees not of the same number of nodes, but with th e same number of sum of nodes and leaves. A binary tree with " } {XPPEDIT 18 0 "n[1]" "&%\"nG6#\"\"\"" }{TEXT -1 11 " nodes has " } {XPPEDIT 18 0 "n[1]" "&%\"nG6#\"\"\"" }{TEXT -1 31 "+1 leaves, for a t otal sum of 2" }{XPPEDIT 18 0 "n[1]" "&%\"nG6#\"\"\"" }{TEXT -1 24 "+1 . A ternary tree with " }{XPPEDIT 18 0 "n[2]" "&%\"nG6#\"\"#" }{TEXT -1 12 " nodes has 2" }{XPPEDIT 18 0 "n[2]" "&%\"nG6#\"\"#" }{TEXT -1 31 "+1 leaves, for a total sum of 3" }{XPPEDIT 18 0 "n[2]" "&%\"nG6#\" \"#" }{TEXT -1 15 "+1 . If we set " }{XPPEDIT 18 0 "n[1]=60" "/&%\"nG6 #\"\"\"\"#g" }{TEXT -1 5 " and " }{XPPEDIT 18 0 "n[2]=40" "/&%\"nG6#\" \"#\"#S" }{TEXT -1 24 " these sums are equal. " }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 97 "evalf(count([PT, TTree_pl, unlabelled], size = 40)/count([T[0], TTree_pl, unlabelled], size =40));" }}{PARA 11 "" 1 " " {XPPMATH 20 "6#$\"+ " 0 "" {MPLTEXT 1 0 97 "evalf(count([PT, BTree_pl, unlabelled], size =60)/count([T[0], BTree_pl, unlabelled], size =60));" }}{PARA 11 "" 1 "" {XPPMATH 20 "6 #$\"+,hZO9!\"'" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 184 "As one would e xpect the average path length for ternary trees is much shorter than f or binary trees. Next we try to solve for a closed form for the averag e pathlength of ternary trees:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 43 "TTree_gf:=gfsolve(TTree_pl, unlabelled, z):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 85 "rsolve(diffeqtorec(holexprtodiffeq(subs(TTree_gf, \+ PT(z)), y(z)), y(z), u(n)), u(n));\n" }{XPPMATH 20 "6#-%'rsolveG6$<+/- %\"uG6#\"\"#\"\"$/-F)6#F,\"#L/-F)6#\"\"%\"$#G/-F)6#\"\"&\"%*>#/-F)6#\" \"'\"&#R;/-F)6#\"\"(\"'h!>\"/-F)6#\"\"!FH/-F)6#\"\"\"FH,,*&,(\"&AJ\"FL %\"nG\"&\\!f*$FQF+FRFL-F)6#FQFLFL*&,(!&W+\"FLFQ!&]k$FS!&a*=FL-F)6#,&FQ FLFLFLFLFL*&,(!%GfFLFQ\"$*=FS\"$***FL-F)6#,&FQFLF+FLFLFL*&,(\"%+IFLFQ \"%)\\\"FS\"$%=FL-F)6#,&FQFLF,FLFLFL*&,(FQ!$O\"!$)GFLFS!#;FL-F)6#,&FQF LF4FLFLFLFT" }}{PARA 0 "" 0 "" {TEXT -1 61 "Unfortunately, the solver \+ is unable to solve the expression. " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 10 "Reference s" }}{PARA 0 "" 0 "" {TEXT -1 8 "Moments:" }}{PARA 0 "" 0 "" {TEXT -1 35 " 1. Sedgewick, R, Flajolet, P. " }{TEXT 266 46 "An Introductio n to the Analysis of Algorithms," }{TEXT -1 22 " Addison Wellsley 1996 " }}{PARA 0 "" 0 "" {TEXT -1 17 " 2. Wilf, H. G" }{TEXT 267 23 "ene ratingfunctionology," }{TEXT -1 20 " Academic Press 1990" }}}{PARA 0 " " 0 "" {TEXT -1 0 "" }}}{MARK "1 0 0" 17 }{VIEWOPTS 1 1 0 1 1 1803 }