0% found this document useful (0 votes)
2 views20 pages

TOC Assignment-1 Solutions

The document is an assignment for a Theory of Computation course at ACS College of Engineering, focusing on designing Deterministic Finite Automata (DFA) and Non-deterministic Finite Automata (NFA) for various languages. It includes ten questions that require formal definitions and constructions of automata for specific string conditions and patterns. The assignment is targeted at students in their fifth semester of Computer Science Engineering with a focus on Data Science and Cybersecurity.

Uploaded by

ayan mohamed
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)
2 views20 pages

TOC Assignment-1 Solutions

The document is an assignment for a Theory of Computation course at ACS College of Engineering, focusing on designing Deterministic Finite Automata (DFA) and Non-deterministic Finite Automata (NFA) for various languages. It includes ten questions that require formal definitions and constructions of automata for specific string conditions and patterns. The assignment is targeted at students in their fifth semester of Computer Science Engineering with a focus on Data Science and Cybersecurity.

Uploaded by

ayan mohamed
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/ 20

ACS COLLEGE OF ENGINEERING

Department of CSE-Data Science

THEORY OF COMPUTATION (BCS503)

ASSIGNMENT-1

CLASS: V SEM CSE-DS/CSE-CY MAX MARKS:100

(Scaled down to 10 marks)

Questions:

1. Give Formal definition of DFA and also design a DFA to read a string made up of letters
“computer” and recognize the strings that contain “come” as substring.
2. Design finite automata for following languages
i)Set of all strings that end with ab or ba over Σ={a,b}
ii)L={w/w∈ (a+b)* such that na(w)mod 3 =0 and nb(w)mod 2=0}

3. Construct DFA for the following languages defines on Σ={a,b}

A) L={w|w∈ {a,b}* and |w| mod 3≠2}


B) String with odd number of a’s and odd number of b’s.

4. Construct DFSM , String of a’s and b’s such that every block of five consecutive symbols
have at least two b’s on Σ={a,b}

5. Design a Deterministic Finite Automata over language Σ={a,b} , L={w| |w| mod 3> |w| mod 2}

6. Design a DFA that recognizes, L={W|W is non-empty and has 1 on every odd position}

7. Define DFSM. Design DFSM to accept each of the following:

i) L={w∈ {0,1}*: w corresponds to the binary encoding, without leading 0’s of natural numbers that
are evenly divisible by 4}

ii)Design a DFA, L={w∈ {a,b}*: ( #a(w)+2-#b(w)) ≡ 5 0} (#a(w) is the number of a’s in w)

8. Define NFA and design an NFA for the language L2, where L={awa|w∈ {a,b}n,n≥0}

9.Design a NFA to recognize L={w|w ∈ 0101n or 010n where n≥0}

10.Design a DFA on Σ={a,b},

i) To accept strings that doesnt have substring ‘abb’

ii) To accept strings that either begin, ends or both with string ‘ab’.

You might also like