0% found this document useful (0 votes)
47 views

TOC Assignment1 1

This document contains a detailed assignment on theory of computation including 50 questions across two sections. The questions cover topics like compiler design, finite automata, regular expressions, grammars and Chomsky hierarchy. The second section includes exercises to design deterministic and non-deterministic finite automata for various languages.

Uploaded by

yashika1587.be21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

TOC Assignment1 1

This document contains a detailed assignment on theory of computation including 50 questions across two sections. The questions cover topics like compiler design, finite automata, regular expressions, grammars and Chomsky hierarchy. The second section includes exercises to design deterministic and non-deterministic finite automata for various languages.

Uploaded by

yashika1587.be21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Shinnu Jangra TOC-Assigment-1 Submission Date: 26-July-2022

Assignment-1
Semester III

Roll No:
Date:
Department:
Title of the Course: TOC
Course Code:

Section - A

Q.1 Define compiler and its phases with example?


Q.2 Uses of a symbol table and error handler in compiler design?
Q.4 Define Finite automata and its type? Also explain the applications of FA?
Q.5 what are the difference between DFA and NFA explain with example?
Q.6 The minimum number of states required to recognize FA with ∑ = {0, 1} accepts
the set of all strings ending with four 0’s. Design a DFA for given language?
Q.7 Define Kleene closure and Positive Closure with suitable example?
Q.8 Define grammar in TOC and also explain Chomsky Classification?

Section - B

1. Design a DFA which accepts “aab” string with input ∑= {a,b})?


2. Draw a DFA for the language accepting strings ending with ’01’ over input
alphabets ∑ = {0, 1}.
3. Draw a DFA for the language accepting strings ending with ‘abb’ over input
alphabets ∑ = {a, b}.
4. Draw a DFA for the language accepting strings” (a + b)*abba” over input
alphabets ∑ = {a, b}.
5. Design a DFA for Regular expression for the given language = (0 + 1)*0011.
6. Draw a DFA for the language accepting strings starting with ‘ab’ over input
alphabets ∑ = {a, b}.
7. Design a DFA for Regular expression for the given language = a(a + b)*.
8. Draw a DFA for the language accepting strings starting with ‘101’ over input
alphabets ∑ = {0, 1}.
9. Draw a DFA that accepts a language L over input alphabets ∑ = {0, 1} such
that L is the set of all strings starting with ’00’.
10. Construct a DFA that accepts a language L over input alphabets ∑ = {a, b}
such that L is the set of all strings starting with ‘aa’ or ‘bb’.
11. Construct a DFA that accepts a language L over input alphabets ∑ = {a, b}
such that L is the set of all strings starting with ‘aba’.
12. Design a FA with ∑ = {0, 1} accepts those string which starts with 1 and ends
with 0.
13. Design a FA with ∑ = {0, 1} accepts the only input 101.
Shinnu Jangra TOC-Assigment-1 Submission Date: 26-July-2022

14. Design FA with ∑ = {0, 1} accepts even number of 0's and even number of 1's.
15. Design FA with ∑ = {0, 1} accepts odd number of 0's and even number of 1's.
16. Design FA with ∑ = {0, 1} accepts even number of 0's and odd number of 1's.
17. Design FA with ∑ = {0, 1} accepts odd number of 0's and odd number of 1's.
18. Design FA with ∑ = {0, 1} accepts the set of all strings with three consecutive
0's.
19. Design a DFA L(M) = {w | w ε {0, 1}*} and W is a string that does not contain
consecutive 1's.
20. Design a FA with ∑ = {0, 1} accepts the strings with an even number of 0's
followed by single 1.
21. NFA with ∑ = {0, 1} accepts all strings with 01.
22. NFA with ∑ = {0, 1} and accept all string of length atleast 2
23. Design a NFA for the transition table as given below:

24. Design an NFA with ∑ = {0, 1} accepts all string ending with 01.
25. Design an NFA with ∑ = {0, 1} in which double '1' is followed by double '0'.
26. Design an NFA in which all the string contain a substring 1110.
27. Design an NFA with ∑ = {0, 1} accepts all string in which the third symbol
from the right end is always 0.
28. Draw a DFA for the language accepting strings ending with ‘00’ over input
alphabets ∑={0, 1} ?
29. Draw a DFA for the language accepting strings ending with ‘0110’ over input
alphabets ∑ = {0, 1}?
30. Draw a DFA for the language accepting strings ending with ‘0011’ over input
alphabets ∑ = {0, 1}?
31. Draw a DFA for the language accepting strings with ‘0’ and ‘1’ only over input
alphabets ∑={0, 1} ?
32. Draw a DFA for the language accepting strings starting with ‘0110’ over input
alphabets ∑ = {0, 1}?
33. Design a DFA for Given Languages:
L1= {xϵ ∑*|x contains even no’s of 0’s}
L2= {xϵ ∑*|x contains odd no’s of 1’s}
34. Design a DFA for the given L = {w | w has exactly two “a” and at least two “b”}
35. Draw a DFA for the language accepting strings starting with ‘00’ or ’11’ over
input alphabets ∑ = {0, 1} ?
36. Draw a DFA for the language accepting odd binary numbers strings over
input alphabets ∑ = {0, 1}?
Shinnu Jangra TOC-Assigment-1 Submission Date: 26-July-2022

37. Draw a DFA for the language accepting odd or even binary numbers strings
over input alphabets ∑ = {0, 1}?
38. Example 20: Draw a DFA for the language accepting strings containg even
number of total zeros over input alphabets ∑ = {0, 1}?
39. Draw a DFA for the language accepting strings starting and ending with
different characters over input alphabets ∑ = {0, 1}?
40. Draw a DFA for the language accepting strings starting and ending with ‘0’
always over input alphabets ∑ = {0, 1} ?
41. Draw a DFA for the language accepting strings containing three consecutives
‘0’ always over input alphabets ∑ = {0, 1} ?
42. Draw a DFA for the language accepting strings containing at most two ‘0’
over input alphabets ∑ = {0, 1}?
43. Draw a DFA for the language accepting strings with ‘011’ as substring over
input alphabets ∑ = {0, 1}?
44. Draw a DFA for the language accepting strings ending in either ’01’, or ’10’
over input alphabets ∑ = {0, 1} ?
45. Construct DFA for binary integer divisible by 3 ?
46. Draw a DFA for the language accepting strings containing neither ’00’, nor
’11’ as substring over input alphabets ∑ = {0, 1} ?
47. Draw a non-deterministic finite automata which accept a string containing
“the” anywhere in a string of {a-z}, e.g., “there” but not “those”.
48. Draw a deterministic and non-deterministic finite automata which accept a
string containing “ing” at the end of a string in a string of {a-z}, e.g.,
“anything” but not “anywhere”.
49. Design a minimal DFA for set of all strings over {a,b} such that the 3rd symbol
from the RHS is “a”.
50. Design a minimal DFA for set of all strings over {a,b} such that the 4th symbol
from the RHS is “a”.

Thanks and Regards


SHINNU JANGRA
(CURIN)

You might also like