A Language L Is Said To Be Context-Free If There Is A CFG G That Accepts L
A Language L Is Said To Be Context-Free If There Is A CFG G That Accepts L
OR
S→ AaA
A→ aA | bA | ε
ii. L= ai bj | i≠ j }
S→ aSb | A |B
A→ aA | a
B→ bB | b 1+2+2
b) Minimize the following DFA.
3+2
2. a) Minimize the following DFA.
0 1
(q0,q3) (q1,q5) (q2,q5)
(q0,q4) (q1,q5) (q2,q5)
(q1,q2) (q3,q3) (q4,q3)
(q1,q5) (q3,q5) (q4,q5)
(q2,q5) (q4,q5) (q3,q5)
(q3,q4) (q5,q5) (q5,q5)
0 1
(q0,q3) (q1,q5) (q2,q5) 3+2
(q0,q4) (q1,q5) (q2,q5)
(q1,q2) (q3,q3) (q4,q3)
(q3,q4) (q5,q5) (q5,q5)
0 1
(q1,q2) (q3,q3) (q4,q3)
(q3,q4) (q5,q5) (q5,q5)
S→aA
A→aB
B→aC | ⋵
C→aD | ⋵
D→aE | ⋵
E →aS | ⋵
1+3 + 2
Or equivalent transition diagram can be written.
where + and – have higher priority than * and / and are right
associative. Show a derivation of 𝑎 + (𝑏 ∗ 𝑐) using the resulting
grammar.
1+3+2
Or equivalent transition diagram can be written
BT* Bloom’s Taxonomy, L* Level; CO* Course Outcome; PO* Program Outcome
*****************