Write a grammar that generates strings that contain matched brackets and parenth
ID: 3531133 • Letter: W
Question
Write a grammar that generates strings that contain matched brackets and parentheses. Examples of valid strings are: [([])] ()()[[]] [[]][()]() Examples of invalid strings are: [} [[] ()()) ][() Given the following grammar: rightarrow a b rightarrow b | b rightarrow a | a Indicate which of the following strings are valid according to this grammar. For those that are valid, construct the parse tree. baab bbbaaaaab bbbab aabab bbbaaabb In English, describe the strings generated by this grammar as specifically as possible.Explanation / Answer
hope this might help u for 1st q http://stackoverflow.com/questions/3172179/valid-permutation-of-parenthesis
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.