Abstract

Let G i = ( V N , V T , P , X i ) be a linear context-free grammar with the nonterminals V N , the terminals V T , the start symbol X i , and a special production system P ⊆ V N × ( V N V N ∪ V T ). The stack size S i ( τ ) of a derivation tree τ generated by G i is the maximum number of nodes in the stack during postorder traversing of τ . We give an explicit formula for the average stack size {if354-1} of a derivation tree with n leaves that are labeled by terminals and show that {if354-2} has an asymptotic behavior of the form {if354-3}, where the functions F 1 ( i )} ( n ) and F 2 ( i )} ( n ) are quotients of trigonometric polynomials.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.