Você está na página 1de 3

CS2303-Theory of Computation / III-CSE-B :: QB / Unit Test-1 PART-A: 1. Define automaton. Also give any 2 applications of automata theory.

2. What is formal language definition? 3. What are the ways of saying If Then? Give an example. 4. Define induction principle.
5. Prove this statement Ceil of a real number x is equal to its floor if x is an integer by using if and only if. 6. Prove that there is no string x in (a, b)* such that ax=xb by using contradiction. 7. Using structural induction prove the stamen recursive definition of a tree.

8. Construct a DFA which accepts string of a and it should have an even number of a. 9. Write the transition table for the given FA.
10. Construct a DFA for parity checker with both I/O tapes.

11. Difference between NFA and DFA with an example.


12. Define the language described by NFA and DFA. 13. Construct a DFA for odd number of 0s and even number of 1s. 14. Draw an FA for All Strings containing exactly 4 -0s and at least 2-1s. 15. Draw an FA for All Strings that dont contain the substring 110. 16. Construct an NFA accepting the set of strings over {a,b} ending in aba.. 17. Construct a NFA that accepts string over = {0,1} which has 4th symbol 1 from right. 18. Give the relationship among DFA, NFA with / without -transitions and RE. 19. What is Regular Expression? 20. Distinguish Regular Expression (RE) and Regular Language (RL). 21. Write a regular expression for the language accepting all strings having any number of

as and bs except zero.


22. List the applications of Regular Expressions. 23. Write a RE for accepting the language over the alphabet 0,1 that have the set of all strings starting and ending with 00. 24. Construct a NFA for the given RE: (a+b)* 25. Write a RE for L={w | w contains 0s and 1s in alternate way (not like 00 or not 11 )

PART-B
1. (i) Prove the following by the principle of mathematical induction. .K4 = (n (n+1) (2n+1) (3n2 +3n-1)) / 30 (ii) Construct the DFA equivalent to the following NFA.

2. (i)) There is no pair of integers A and B such that A mod B=B mod A (ii)) If x is sum of squares of 4 positive integer, then 2x >= X2 3. (i) Explain additional forms of proof with examples. (ii) Derive the finite automata with transition (ab) (a+b)*
n 4. (i) Prove by induction for n>=1, where i=1 i2= n (n+1)2(n+1) / 6

(4) (4)

(ii) Construct DFA which recognizes the inputs of a,b where L=am bn where m,n>1 and m,n>=1 5. (i) Design a DFA for the language L={x {a, b, c}* ; |x| is a multiple of 2 or 3}

(ii) If L is accepted by an NFA with -transitions, then show that L is accepted by an NFA without -transitions. 6. (i) Construct the DFA equivalent to the NFA, M= ({q0, q1}, {0,1},{q0},{q1},)

=>

States/Inputs q0 q1

0 {q0,q1} -

1 {q1} {q0,q1}

(ii) Prove that-A Language L is accepted by some -NFA if and only if L is accepted by some DFA. 7. (i) Design a NFA for the language L={x {0,1}* ; x contains any number of 0s followed by at least a single 1} (ii) Construct a DFA for the set of all strings of 0s and 1s not containing 101 as a substring. Also obtain the regular expression for the same. 8. (i) Draw the -NFA for the given transition table. Compute the -Closure of each state and find its equivalent DFA.

States/Inputs

->p q *r

{q} {r}

{p}

{q}

{r}

(ii) Prove that-Let r be a regular expression, then there exists a NFA with -transitions that
accepts L(r).

9. (i) Design a FA from the given RE: 10+(0+11)0*1 (ii) Construct a FA to accept the given RE: (0+1)*(00+11)(0+1)* 10. (i) Draw the -NFA for the given transition table. Compute the -Closure of each state and find
its equivalent DFA.

States/Inputs ->p q *r

a {p} {q} {r}

b {q} {r}

c {r} {p}

{p} {q}

(ii) Construct an NFA for the the given RE: (a+b)*a+b

Você também pode gostar