4. Which of the following is a parse tree for the grammar S → abS, S → ab? S 5 a b (a) b а a b (d) a a 5 b (c) 5 a (b) S a 5 a S a) (a) b) (b) а (e) b 5. Which of the parse trees below yield the same word? a 5 a a (a) S b b a a (d) S 5 a (b) 15 a 5 a 5 5 (e) 15 ហ (f) a d) (f) 5 b a b (f) a b (c) a) d and f b) a and c c) a and b d) c and d 1. Consider the grammars: G₁: S SaS aala →>> G2: S→ SS & G3: S→ SS a G4: S SS aa → G5: S→ Sala G6: SaSalaala G7: SSAS | E Describe the language of each of these grammars. Then, identify from the list below a pair of grammars that define the same language. a) G6, G7 b) G5, G6 c) G5, G2 d) G1, G7 2. Here is a parse tree that uses some unknown grammar G. S B A S a A B a b A a Which of the following productions is surely one of those for grammar G? a) Bb b) S B c) A S d) Aa 3. Here is a context-free grammar G: S -> AB A → 0A1 | 2 B → 1B | 3A Which of the following strings is in L(G)? a) 0002111112 b) 00213021 00211100211 d) 21113021
4. Which of the following is a parse tree for the grammar S → abS, S → ab? S 5 a b (a) b а a b (d) a a 5 b (c) 5 a (b) S a 5 a S a) (a) b) (b) а (e) b 5. Which of the parse trees below yield the same word? a 5 a a (a) S b b a a (d) S 5 a (b) 15 a 5 a 5 5 (e) 15 ហ (f) a d) (f) 5 b a b (f) a b (c) a) d and f b) a and c c) a and b d) c and d 1. Consider the grammars: G₁: S SaS aala →>> G2: S→ SS & G3: S→ SS a G4: S SS aa → G5: S→ Sala G6: SaSalaala G7: SSAS | E Describe the language of each of these grammars. Then, identify from the list below a pair of grammars that define the same language. a) G6, G7 b) G5, G6 c) G5, G2 d) G1, G7 2. Here is a parse tree that uses some unknown grammar G. S B A S a A B a b A a Which of the following productions is surely one of those for grammar G? a) Bb b) S B c) A S d) Aa 3. Here is a context-free grammar G: S -> AB A → 0A1 | 2 B → 1B | 3A Which of the following strings is in L(G)? a) 0002111112 b) 00213021 00211100211 d) 21113021
Advanced Engineering Mathematics
10th Edition
ISBN:9780470458365
Author:Erwin Kreyszig
Publisher:Erwin Kreyszig
Chapter2: Second-order Linear Odes
Section: Chapter Questions
Problem 1RQ
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 2 steps with 4 images
Similar questions
Recommended textbooks for you
Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated
Numerical Methods for Engineers
Advanced Math
ISBN:
9780073397924
Author:
Steven C. Chapra Dr., Raymond P. Canale
Publisher:
McGraw-Hill Education
Introductory Mathematics for Engineering Applicat…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY
Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated
Numerical Methods for Engineers
Advanced Math
ISBN:
9780073397924
Author:
Steven C. Chapra Dr., Raymond P. Canale
Publisher:
McGraw-Hill Education
Introductory Mathematics for Engineering Applicat…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,