TYBSc CS TCS QB
TYBSc CS TCS QB
1 Mark(20 questions)
1. What are the proper prefix and proper suffix of the string ‘‘India’’?
2. Define DFA.
3. If A = {∈}. Find the value of |A|.
4. Differentiate between Moore and Mealy machine.
5. Define suffix of a string. Give one example.
6. DFA may have many final states. Comment.
7. Construct Melay machine which toggles its input.
8. State True or False. Finite Automata has an infinite number of states.
9. Write down the ∈-closure of each state from the following FA.
17. Compare output function ‘λ’ function of Mealy and Moore machine.
18.
19. Give the purpose of Mealy and Moore machine.
20. Give the formal definition ∈−NFA.
21. State true or false – DFA can have any numbers of transitions to the next state from a given state
on given symbol.
22. Enlist the tuples of Mealy and Moore Machine.
23. Define Formal Language.
24. Define String.
25. Define Symbol.
26. Give the formal definition NFA.
27. Define minimization of FA
28. What is Finite Automata ? Enlist its type.
29. What is a null string?
30. What is length of string?
6. Construct a Moore machine for a language L over {0, 1} which outputs ‘$’ if string ends with ‘100’, outputs
‘#’ if string ends with ‘001’, otherwise outputs ‘*’.
7. Convert the following NFA with ∈ moves to DFA.
8. Construct minimal DFA for the following:
M = ({A, B, C, D, E}, {0, 1}, δ, A, {E})
when δ is given by
14. Construct a Moore and Mealy Machine which outputs “valid” for valid string and “invalid” for invalid
String for Language L= a(a+b)*b
15. Design a DFA in which every ‘b’ is preceded by ‘a’ over {a,b,c}
16. Construct minimal DFA for the following
17. Design a mealy machine over {a,b,c} if input ends with ‘bac’ print A else print B.
18. Construct a DFA equivalent to NFA
19. Construct a DFA which accepts odd numbers of 1’s and even numbers of 0’s over {0,1}.
20. Construct a DFA to accept all the string over {0,1} such that every pair of adjacent 0’s appears before any
pair of adjacent 1’s
21. Construct a DFA over {0,1} whose second and second last symbol is 1.
22. Describe DFA as a pattern recognizer in details
23. Construct minimal DFA for the following
24. Construct minimal DFA for the following
30. Find minimum state FA equivalent to the following DFA, M = ({qo, ..., qs}. (a, b}. , δ, qo,{q4,q5})
5 Marks (10 Problems)
1. Construct a DFA to accept the set of all strings over {0, 1, 2} such that the string ends with ‘012’ or ‘20’.
2. Convert the following given NFA to DFA :
8. Construct DFA which accepts all strings over {a,b,c} such that if it starts with ‘a’ then it should
contain even numbers of ‘b’. Else if it starts with ‘c’ then itshould contain substring ‘cba’ in it.
9. Construct a DFA for language over {0,1,2} which accepts all strings containing at least one
occurrences of a double symbol.
10. Design a DFA which checks whether given number(decimal) is divisible by 3
1 Mark(10 questions)
1. Define regular expression.
2. Which tool is used to prove that the language is not regular ?
3. Write the smallest possible string accepted by regular expression : (0 + 1)* 01*.
4. State true or false. Pumping lemma is used to show that language is not context tree.
5. State true or false => Every FA can have regular Expression.
6. Write smallest possible string accepted by the following regular expression. 10 + (0 + 11)0*1
7. Define Regular Language
8. What is purpose of pumping Lemma?
9. Enlist closure properties of regular Languages
10. State true or false => (R*)*=R*