Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Assignment Pool - 2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

ASSIGNMENT POOL- 2

1. Construct a CFG for the language of odd length palindrome string over {a, b}.

2. Show that id+id*id can be generated by two distinct leftmost derivation in the
grammar E->E+E | E*E | (E) | id

3. Let G be the grammar S->aB/bA,A->a/aS/bAA,B->b/bS/aBB. obtain parse tree for the string
aaabbabbba

4. Differentiate between Finite Automata with output and without output with example.

5. Let the production of the grammar be S-> 0B | 1A, A-> 0 | 0S | 1AA, B-> 1|1S |0BB. For the
string 0110 find the right most derivation

6. Write the CFG for the language L= (an bn | n>1)

7. The set of Regular languages are closed under following operations

a) Union
b) Concatenation
c) Kleene *
d) Kleene +
e) Intersection
f) Difference
g) Complement
Justify with suitable example.

8. Differentiate between Chomsky Normal Form and Griebach Normal Form

9. Differentiate between ambiguous and unambiguous grammars and prove that following
grammars are ambiguous

a) E->E+E/E*E/(E)/id
b) S->SS/(S)/a/∧

10. Find a reduced grammar equivalent to the grammar G by removing useless symbols whose
productions are

11. Construct a reduced grammar by removing useless symbols equivalent to the grammar
12. State rules to remove null-productions from CFG. Consider the grammar G whose
productions are

Remove null Productions from this given grammar.

13. State Rules to remove unit productions. Consider the grammar G whose productions are

Eliminate unit productions and get an equivalent grammar.

14. Formally define Moore and Mealy Machine and explain difference in output functions of two
machines by suitable example.

15. Give Rules for converting Context Free grammar into Chomsky Normal Form Grammar(CNF).

Also, convert the given grammar into CNF.

16. In each case below, find a context-free grammar with no null-productions that generates the
same language, except possibly for null, as the given CFG

17. By making use of closure properties of regular Languages prove that if L is regular the
complement of L is also regular. Prove your point with suitable DFA example.

18. How can you prove that given language is not regular by Pumping lemma? Write down
proper steps.

19. Discuss Myhill-Nerode Theorem for minimizing the DFA given below
20. Construct a grammar in Greibach normal form equivalent to the grammar

21. Using the pumping lemma, show that the following sets are not regular

22.

23. Gives Rules to convert CFG to GNF. Explain with suitable example.

24. Construct a minimum state automaton equivalent to the DFA described as

25. Construct the minimum state automaton equivalent to the transition diagram
26. Consider a Mealy machine

a) Construct Transition table for this given Mealy Machine


b) Find Output for input 001
c) Construct a Moore machine equivalent to this Mealy machine

27. Consider the Moore machine described by the transition table given by Table. Find Output
for input string 001 and Construct the corresponding Mealy machine

28. Consider the Moore machine described by the transition table given by Table.
a) Draw equivalent transition diagram from given table
b) Construct the corresponding Mealy machine represent it by transition table and
transition diagram

You might also like