[Solved]-Question 1 Context Free Grammar Arithmetic Expressions Alphabet Int S S S S S S S Int Vali Q37210643

QUESTION 1 Context free grammar for arithmetic expressions over the alphabet (int, (,), +, – is: s s S s s-s s>int Some valid example expressions are: (int), int, (int (int- int)) Some invalid example expressions are: (int, int(int -, int) 1. Convert this grammar to an empty stack Push Down Automata (PDA) with a single state allowing multiple stack operations in one PDA transition. 2. Using solution from (1), find a sequence of PDA transitions to show that the expression (int +int int) is valid for the grammar. At each step of the sequence, indicate the contents of the stack and the PDA transition used. Refer to Exercise Questions on converting context free grammars to Push Down Automata Show transcribed image text QUESTION 1 Context free grammar for arithmetic expressions over the alphabet (int, (,), +, – is: s s S s s-s s>int Some valid example expressions are: (int), int, (int (int- int)) Some invalid example expressions are: (int, int(int -, int) 1. Convert this grammar to an empty stack Push Down Automata (PDA) with a single state allowing multiple stack operations in one PDA transition. 2. Using solution from (1), find a sequence of PDA transitions to show that the expression (int +int int) is valid for the grammar. At each step of the sequence, indicate the contents of the stack and the PDA transition used. Refer to Exercise Questions on converting context free grammars to Push Down Automata
Expert Answer
Answer to QUESTION 1 Context free grammar for arithmetic expressions over the alphabet (int, (,), +, – is: s s S s s-s s>int Some … . . .
OR

