C-F languages (or see the following figure). In particular..it points out that the language {am,a"b" | m,n = N} is a deterministic C-F language, but not LL(k) for any k Palindromes over {a, b} Non-deterministic C-F {am,a"b" | m.ne N}; Deterministic C-F -LL(K) {ab❘n EN}- Regular To show the language is not LL(k) for any k, note that a grammar for this language is SAB A→ B -> 10 or S-A|B A→ B (you only need to answer one case here, either one). The language contains A as an element. Now consider the case k = 1 and consider the input string ab. When the first symbol is scanned, we get an 'a'. This information alone is not enough for us to make a proper choice. So we don't even know what to do with the first step in | the parsing process. For k = 2, if we consider the input string aabb, we face the same problem. For any k > 2, the input string ab would cause exactly the same problem. So this grammar is not LL(k) for any k. On the other hand, by putting proper instructions into the blanks of the following figure, we get a deterministic final-state PDA that accepts the language {am, anbn | m,n EN }. a,x a, a push(a) push(a) start or a,x a, a push(a) push(a) start (again, you only need to answer one case here, either one). Hence, this language is indeed deterministic C-F, but not LL(K) for any k.
C-F languages (or see the following figure). In particular..it points out that the language {am,a"b" | m,n = N} is a deterministic C-F language, but not LL(k) for any k Palindromes over {a, b} Non-deterministic C-F {am,a"b" | m.ne N}; Deterministic C-F -LL(K) {ab❘n EN}- Regular To show the language is not LL(k) for any k, note that a grammar for this language is SAB A→ B -> 10 or S-A|B A→ B (you only need to answer one case here, either one). The language contains A as an element. Now consider the case k = 1 and consider the input string ab. When the first symbol is scanned, we get an 'a'. This information alone is not enough for us to make a proper choice. So we don't even know what to do with the first step in | the parsing process. For k = 2, if we consider the input string aabb, we face the same problem. For any k > 2, the input string ab would cause exactly the same problem. So this grammar is not LL(k) for any k. On the other hand, by putting proper instructions into the blanks of the following figure, we get a deterministic final-state PDA that accepts the language {am, anbn | m,n EN }. a,x a, a push(a) push(a) start or a,x a, a push(a) push(a) start (again, you only need to answer one case here, either one). Hence, this language is indeed deterministic C-F, but not LL(K) for any k.
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 1 steps
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education