Question

In: Computer Science

Automata Theory and Formal Languages Instructions: Draw the DFA (Deterministic Finite Automaton) of the following: DFA...

Automata Theory and Formal Languages

Instructions:

Draw the DFA (Deterministic Finite Automaton) of the following:

  1. DFA in which set of all strings can be accepted which end with ‘a’
  2. DFA in which set of all strings can be accepted which start with ab
  3. DFA in which set of all strings can be accepted which contain ab
  4. DFA in which set of all strings can be accepted which ends with ab

Solutions

Expert Solution

Solution:

(a)

Explanation:

=>In the given DFA there are 3 states.

=>State A is the initial state, state B is the final state and state D is dead state.

=>At the final state only strings are accepted by the language otherwise rejected.

=>We can see that all strings ending with a is accepted at the final state B.

(b)

Explanation:

=>In the given DFA there are 4 states.

=>State A is the initial state, state C is the final state, state B is intermediate state and state D is dead state.

=>Strings are accepted at the final state only.

=>We can see that all the strings starting with ab will be accepted at the final state C.

(c)

Explanation:

=>In the given DFA there are 3 states.

=>State A is the initial state, state B is the final state and state C is the final state.

=>Strings are accepted at the final state only.

=>We can see that all the strings which contain ab as substring will be accepted.

(d)

Explanation:

=>In the given DFA there are 4 states.

=>State A is the initial state, state C is the final state, state B is the intermediate state and state D is the dead state.

=>Strings are accepted at the final state only.

=>We can see that all the strings which end with ab will be accepted at the final state C.

I have explained each and every part with the help of statements attached to it.


Related Solutions

Automata Theory and Formal Languages Instructions: Draw the DFA (Deterministic Finite Automaton) of the following: DFA...
Automata Theory and Formal Languages Instructions: Draw the DFA (Deterministic Finite Automaton) of the following: DFA for binary number divisible by 2 DFA for binary number divisible by 3 DFA in which set of all strings can be accepted which start with a DFA in which set of all strings can be accepted which contains ‘a’
DFA Python DFA simulator A deterministic finite automaton (DFA) - also known as deterministic finite state...
DFA Python DFA simulator A deterministic finite automaton (DFA) - also known as deterministic finite state machine - is a finite state machine that accepts/rejects finite strings of symbols and only produces a unique computation (or run) of the automaton for each input string. Write a DFA simulator using the python programming language. Read your DFA from a textfile. First line contains a list of the final states (as integers), separated by a space. Rest of file contains the transitions...
Description: In this assignment, you will implement a deterministic finite automata (DFA) using C++ programming language...
Description: In this assignment, you will implement a deterministic finite automata (DFA) using C++ programming language to extract all matching patterns (substrings) from a given input DNA sequence string. The alphabet for generating DNA sequences is {A, T, G, C}. Write a regular expression that represents all DNA strings that begin with ‘A’ and end with ‘T’. Note: assume empty string is not a valid string. Design a deterministic finite automaton to recognize the regular expression. Write a program which...
Create a Deterministic finite automaton that takes in binary strings and accepts them which has both...
Create a Deterministic finite automaton that takes in binary strings and accepts them which has both an odd number of zeros and a sum that is divisible by 3 (but no others). For example, 0111 should be accepted, but not 011 or 111.
Provide an informal description and state diagram of pushdown automata for the following languages, with the...
Provide an informal description and state diagram of pushdown automata for the following languages, with the alphabet {a, b} A) {w | w = (a^i)(b^j) where i > j > 0} B) {w | w contains an even number of b's} C) {w | (a^k)bbb(a^k) where k >= 0} D) {w | w=(b^k)a(b^k)(a^j)(b^j) where j, k >= 0}
Formal Languages Give a regular expression for each of the following languages: L2a = {w ?...
Formal Languages Give a regular expression for each of the following languages: L2a = {w ? {0,1}* | w corresponds to the binary encoding of non-negative integers that are evenly divisible by 4 L2b = {w ? {a,b}* | w contains at least one 'a' and exactly two b's} L2c = {w ? {0, 1, 2}* | w starts with a 2, ends with a 1 and contains an even number of 0's}.
Construct NFA of following languages and convert it to equivalent DFA. The set of all binary...
Construct NFA of following languages and convert it to equivalent DFA. The set of all binary strings such that 3th symbol from right end is 0.
Prove that string concatenation cannot be checked by finite automata by showing that the following language...
Prove that string concatenation cannot be checked by finite automata by showing that the following language over Σ = {0, 1} is not regular: L3 = {w1#w2#w1w2 : w1, w2 ∈ Σ ∗ }
Give the finite-state automaton and the regular grammar for the following: (a) (ab v ba)* v...
Give the finite-state automaton and the regular grammar for the following: (a) (ab v ba)* v (ab)* (b) (11*)*(110 v 01) (c) All strings over {0,1} containing the string 010 (d) All strings over {0,1} which do not contain the string 010
Draw an NFA for the following language then convert to a DFA: L = {w :...
Draw an NFA for the following language then convert to a DFA: L = {w : |w| is odd or |w| is a multiple of 4} where Σ = {0, 1}
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT