Skip to main content

Posts

Showing posts from April, 2020

Automata and Formal Language Question Answer

1. Construct CFG for the following Languages: a) Set of all binary strings where number of 0’s are greater than number of 1’s. 2. Prove that the following CFGs are ambiguous: a) 𝑆 β†’ π‘Žπ‘†π‘ | 𝑆𝑆| πœ– b) 𝑆 β†’ π‘†π‘Žπ‘† |𝑆𝑏𝑆 |𝑐 c) 𝑆 β†’ π‘Žπ΅ | π‘Žπ‘, 𝐴 β†’ π‘Žπ΄π΅|π‘Ž, 𝐡 β†’ 𝐴𝐡𝑏 |𝑏 3. Convert the following CFGs into their equivalent Chomsky Normal Form: a) 𝑆 β†’ 𝐡𝑆𝐡 | 𝐡 πœ–, 𝐡 β†’ 00 πœ– b) 𝑆 β†’ 𝑏𝐴 |π‘Žπ΅ , 𝐴 β†’ 𝑏𝐴𝐴|π‘Žπ‘† π‘Ž , 𝐡 β†’ π‘Žπ΅π΅ | 𝑏𝑆 | b For Solutions Click in the Download Button: Download Solutions