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

Assignment 2

The document contains a series of questions focused on constructing Deterministic Finite Automata (DFA) and Non-Deterministic Finite Automata (NFA) for various conditions related to strings over specified alphabets. The DFA questions involve conditions such as divisibility of 1's, absence of certain substrings, and parity of 0's and 1's. The NFA questions address string endings, specific substrings, and occurrences of patterns within the strings.

Uploaded by

Vicky Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Assignment 2

The document contains a series of questions focused on constructing Deterministic Finite Automata (DFA) and Non-Deterministic Finite Automata (NFA) for various conditions related to strings over specified alphabets. The DFA questions involve conditions such as divisibility of 1's, absence of certain substrings, and parity of 0's and 1's. The NFA questions address string endings, specific substrings, and occurrences of patterns within the strings.

Uploaded by

Vicky Sharma
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Questions on Deterministic Finite Automata (DFA)

Q 1:
Construct a DFA that accepts all strings over the alphabet Σ = {0, 1} where the total number of 1’s is divisible by 3.

Q 2:
Construct a DFA that accepts all strings over the alphabet Σ = {a, b} that do not contain the substring ”ab”.

Q 3:
Construct a DFA that accepts all binary strings where the total number of 0’s is odd, and the total number of 1’s is even.

Q 4:
Construct a DFA that accepts strings over Σ = {a, b} where every string starts and ends with the same symbol.

Q 5:
Construct a DFA that accepts all strings over Σ = {a, b} where the substring ”ba” does not appear.

Questions on Non-Deterministic Finite Automata (NFA)


Q 1:
Construct an NFA that accepts all strings over Σ = {a, b} that end with either ”ab” or ”ba”.

Q 2:
Construct an NFA that accepts all strings over Σ = {a, b} containing the substring ”abba”.

Q 3:
Construct an NFA that accepts all strings over Σ = {0, 1} where the number of 1’s is at least 2.

Q 4:
Construct an NFA that accepts strings over Σ = {a, b} where the string starts with ”a” and contains ”bb” anywhere in the
string.

Q 5:
Construct an NFA that accepts all strings over Σ = {a, b} containing at least one occurrence of ”aa” or ”bb”.

You might also like