enumerating restricted terms
play

Enumerating (restricted) -terms Motzkin trees -terms with bounded - PowerPoint PPT Presentation

Enumerating (restricted) -terms Danile GARDY Enriched trees Enumerating (restricted) -terms Motzkin trees -terms with bounded number of Danile GARDY unary nodes -terms of bounded PRiSM, Universit Versailles St-Quentin en


  1. Enumerating (restricted) λ -terms Danièle GARDY Enriched trees Enumerating (restricted) λ -terms Motzkin trees λ -terms with bounded number of Danièle GARDY unary nodes λ -terms of bounded PRiSM, Université Versailles St-Quentin en Yvelines unary height and λ -terms of D.M.G., T.U. Wien fixed arity Concluding remarks In collaboration with O. Bodini, B. Gittenberger and A. Jacquot

  2. Enumerating (restricted) λ -terms Danièle Enriched trees 1 GARDY Enriched trees Motzkin trees Motzkin trees 2 λ -terms with bounded number of unary nodes λ -terms with bounded number of unary nodes 3 λ -terms of bounded unary height λ -terms of bounded unary height 4 λ -terms of fixed arity Concluding remarks 5 λ -terms of fixed arity Concluding remarks 6

  3. Enumerating (restricted) λ -terms Danièle GARDY Enriched trees Motzkin trees λ -terms with bounded number of λ -terms and enriched (Motzkin) unary nodes λ -terms of bounded trees unary height λ -terms of fixed arity Concluding remarks

  4. Enumerating (restricted) Definition of λ -terms λ -terms Danièle GARDY Enriched trees Motzkin trees λ -terms with T ::= a | ( T ∗ T ) | λ a . T bounded number of unary nodes ( T ∗ T ) : application λ a . T : abstraction λ -terms of bounded unary height ( λ x . ( x ∗ x ) ∗ λ y . y ) λ y . ( λ x . x ∗ λ x . y ) λ -terms of fixed arity Concluding remarks y x y x x

  5. Enumerating (restricted) Enriched Motzkin trees λ -terms Danièle GARDY Enriched trees Motzkin trees λ -terms with x y bounded number of unary nodes y λ -terms of bounded unary height x x λ -terms of fixed arity Labelling rules: Concluding remarks • Binary nodes are unlabelled • Unary nodes get distinct labels (colors) • Leaves get the label (color) of one of their unary ancestors

  6. Enumerating (restricted) Free and bound variables λ -terms Danièle GARDY Enriched trees • Here all variables are bound: closed terms Motzkin trees λ -terms with bounded number of unary nodes λ -terms of bounded unary height λ -terms of fixed arity • Some variables may be free Concluding remarks

  7. Enumerating (restricted) Enumeration? λ -terms Danièle GARDY • Recursive definition for λ -terms? Enriched trees • L : class of λ -terms with free variables Motzkin trees • N atomic class of binary node λ -terms with • U atomic class of unary node bounded number of • F atomic class of free leaf unary nodes • B atomic class of bound leaf λ -terms of bounded unary height � N × L 2 � L = F + + ( U × subs ( F → F + B , L )) λ -terms of fixed arity • L ℓ, n number of λ -terms of size n (total number of nodes) Concluding remarks with ℓ free leaves ℓ, n L ℓ, n f ℓ z n satisfies a • Generating function L ( z , f ) = � functional equation L ( z , f ) = fz + z L ( z , f ) 2 + z L ( z , f + 1 ) .

  8. Enumerating (restricted) Analytic combinatorics λ -terms Danièle GARDY Enriched trees n a n z n • Generating function of a sequence a n : A ( z ) = � Motzkin trees • A ( z ) considered as a function of complex variable z : λ -terms with bounded domain of analycity? radius of convergence ρ ? number of unary nodes • Type and location of dominant singularity determine the λ -terms of bounded asymptotic behaviour of the sequence a n unary height ρ ) α ( α �∈ N ) gives • E.g., ρ algebraic of type ( 1 − z λ -terms of fixed arity Concluding [ z n ] A ( z ) ∼ ρ n n − α − 1 remarks Γ( − α ) • Extensions to multivariate cases, asymptotic distributions

  9. Enumerating (restricted) Enumeration??? λ -terms Danièle GARDY Enriched trees • Generating function enumerating closed λ -terms Motzkin trees (without free variables): L ( z , 0) λ -terms with bounded • Generating function enumerating all λ -terms: number of L ( z , 1 ) = 1 unary nodes z L ( z , 0 ) − L ( z , 0 ) 2 λ -terms of � � bounded 1 � • L ( z , 0 ) = 1 − Λ( z ) with Λ( z ) equal to unary height 2 z λ -terms of fixed arity � � 1 − 2 z − 4 nz 2 + 2 z √ ... � Concluding 1 − 2 z − 4 z 2 + 2 z 1 − 2 z + 2 z .... remarks • L ( z , 0 ) has null radius of convergence ⇒ standard tools of analytic combinatorics fail

  10. Enumerating (restricted) What can we do? λ -terms Danièle GARDY • Try to find a way to deal with null radius of Enriched trees convergence? Motzkin trees • Ad hoc methods? λ -terms with bounded number of unary nodes � n ( 1 − 1 / log n ) � n ( 1 − 1 / 3 log n ) � ( 4 − ǫ ) n � ( 12 + ǫ ) n ≤ L n ≤ λ -terms of log n log n bounded unary height λ -terms of [David et al. 10; here leaves have size 0] fixed arity • Consider sub-classes of terms? Concluding remarks • Restrict the total number of abstractions [Bodini-G-Gittenberger’14] • Restrict the number of abstractions in a path from the root towards a leaf: bounded unary height [Bodini-G-Gittenberger’11, Bodini-G-Gittenberger’14] • Restrict the number of pointers from an abstraction to a leaf [Bodini-G-Jacquot’10; Bodini-G-Gittenberger-Jacquot’13, Bodini-Gittenberger’15]

  11. Enumerating (restricted) λ -terms Danièle GARDY Enriched trees Motzkin trees λ -terms with bounded number of unary nodes Motzkin trees λ -terms of bounded unary height λ -terms of fixed arity Concluding remarks

  12. Enumerating (restricted) Motzkin trees λ -terms Danièle GARDY Enriched trees Motzkin trees λ -terms with bounded number of unary nodes λ -terms of bounded unary height M = Z + ( U × M ) + ( Z × M 2 ) λ -terms of fixed arity Concluding M ( z ) = 1 remarks � � � 1 − 2 z − 3 z 2 1 − z − 2 z Dominant singularity at z = 1 / 3 of square-root type 3 n + 1 2 [ z n ] M ( z ) ∼ 2 n √ π n

  13. Enumerating (restricted) q unary nodes λ -terms Danièle GARDY q � M q = U × M q − 1 + A × M ℓ × M q − ℓ . Enriched trees Motzkin trees ℓ = 0 λ -terms with Recurrence equation on the generating functions bounded number of unary nodes zM q − 1 ( z ) + z � 1 ≤ ℓ ≤ q − 1 M ℓ ( z ) M q − ℓ ( z ) M q ( z ) = . λ -terms of 1 − 2 zM 0 ( z ) bounded unary height ⇒ there exist polynomials P q s.t. λ -terms of fixed arity M q ( z ) = z q + 1 P q ( z 2 ) Concluding remarks 2 , ( 1 − 4 z 2 ) q − 1 Straightforward computations give √ 2 P q ( 1 / 4 ) 4 n n q − 3 [ z n ] M q ( z ) ∼ [ z n ] M ≤ q ∼ 2 Γ( q − 1 2 )

  14. Enumerating (restricted) Leaves at same unary height λ -terms Danièle GARDY Enriched trees Motzkin trees λ -terms with bounded number of unary nodes λ -terms of bounded unary height λ -terms of fixed arity Concluding remarks • Tree on the left: all leaves have unary height 1 • Tree on the right: leaves have unary heights 1, 2 and 1

  15. Enumerating (restricted) Leaves at same unary height λ -terms Danièle GARDY MH k = U × MH k − 1 + A × MH 2 Enriched trees k Motzkin trees On generating functions λ -terms with bounded   � number of � unary nodes � MH k = 1 �  1 − 1 − 2 z + 2 z 1 − 2 z + 2 z ... + 2 z 1 − 4 z 2   λ -terms of 2  bounded unary height λ -terms of Two singularities fixed arity Concluding 1 • z = − 1 2 (negligible) 2 of type ( 1 + 2 z ) remarks 1 2 k + 1 (dominant, comes from the • z = 1 2 of type ( 1 + 2 z ) innermost radicand) 1 1 2 k + 1 2 n n − 1 − ⇒ [ z n ] MH k ( z ) ∼ 2 2 k + 1 1 2 k + 1 Γ( 1 − 2 k + 1 )

  16. Enumerating (restricted) Bounded unary height λ -terms Danièle GARDY Here leaves can have different unary height! Enriched trees Motzkin trees MH ≤ k = Z + U × MH ≤ k − 1 + A × MH 2 ≤ k λ -terms with bounded number of Generating function unary nodes λ -terms of  �  � bounded � � 1 � � 1 − 2 z − 4 z 2 + 2 z 1 − 2 z − 4 z 2 + 2 z unary height  � 1 − 4 z 2  MH ≤ k =  1 − ... + 2 z   2  λ -terms of fixed arity Dominant singularity ρ k comes from outermost radicand, Concluding remarks decreases towards 1 3 � 1 + 4 ρ 2 k ⇒ [ z n ] MH ≤ k ∼ n √ π n 4 ρ n + 1 k

  17. Enumerating (restricted) λ -terms Danièle GARDY Enriched trees Motzkin trees λ -terms with bounded λ -terms with bounded number number of unary nodes λ -terms of of unary nodes bounded unary height λ -terms of fixed arity Concluding remarks

  18. Enumerating (restricted) q unary nodes λ -terms Danièle GARDY q Enriched trees � � � S q = U × subs ( F → F + B , S q − 1 ) + ( A , S ℓ , S q − ℓ ) Motzkin trees ℓ = 0 λ -terms with bounded number of Generating function unary nodes λ -terms of bounded q unary height � S q ( z , f ) = zS q − 1 ( z , f + 1 ) + z S ℓ ( z , f ) S q − ℓ ( z , f ) . λ -terms of fixed arity ℓ = 0 Concluding remarks G.F. for closed terms S q ( z , 0 ) ? √ 1 1 − 4 z 2 S 1 ( z , 0 ) = 2 − ; 2 √ 2 z 3 z 1 − 4 z 2 − z 1 − 8 z 2 2 ( 1 − 2 z 2 ) + √ √ S 2 ( z , 0 ) = 1 − 4 z 2 ; 2 (no terms of size n = q mod 2)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend