Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the following context-free grammars: 1. S0S101 with string 00011. 2. S>+SSSS a with string + aaa. 3. S>S+SSS(S)S a with string (a+a)a For each

image text in transcribed
Consider the following context-free grammars: 1. S0S101 with string 00011. 2. S>+SSSS a with string + aaa. 3. S>S+SSS(S)S a with string (a+a)a For each grammar: a) Give a leftmost derivation for the string. b) Give a rightmost derivation for the string. c) Give a parse tree for the string. d) Is the grammar ambiguous or unambiguous? Justify your answer. e) Describe the language generated by this grammar. Problem 1: Considering the alphabet {a,b} derive a Non-Deterministic-Finite Automaton (NFA) using the Thompson construction that is able to recognize the sentences generated by the regular expression b(abbba)b. Does the sentence w= "abbb" belong to the language generated by this regular expression? Justify

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions