Problem 1 onstruct regular expressions for the below “English” statements. If you cannot construct one, explain why that may be the case. 1. Given, an alphabet, Σ = {a, b, c}, a string without b’s ends with c, a string without a’s ends with b and a string without c’s ends with a. 2. (Optional for practice) A 7 digit number plate which has 3 capital letters followed a capital letter or a
...[Show More]
Problem 1 onstruct regular expressions for the below “English” statements. If you cannot construct one, explain why that may be the case. 1. Given, an alphabet, Σ = {a, b, c}, a string without b’s ends with c, a string without a’s ends with b and a string without c’s ends with a. 2. (Optional for practice) A 7 digit number plate which has 3 capital letters followed a capital letter or a digit, followed by 3 digits such that the last digit is not 3 or 9. 3. An equal number of opening parentheses,“(” followed by equal number of closing parentheses, “)”. CMPSC461 Midterm #1 1/7 Problem 2 F is a grammar represented with the start symbol, S. The rules of this grammar are S → S − P|P − S|P P → USU|V |V + P U → a|b|d V → 9|c|8 Assume only S, P, U and V are nonterminals. 1. Derive 8+c+a9-8b-bcd-d9b using left most derivation. If it is not possible, provide valid reason for your answer. 2. Draw the parse tree for the string you derived in (a) 3. Is the grammar amb
[Show Less]