Provide In this you will implement a deterministic finite automaton (DFA) using C++ programming language to test if an
Posted: Fri Jul 01, 2022 5:51 am
Provide
In this you will implement a deterministic finiteautomaton (DFA) using C++ programming language to test if an inputDNA sequence matches a regular expression.
The program should mimic how a DFA processes a string: readingone letter at a time and doing state transitions.
If you are asked to implement DFA for RE(AA+TT)(AA+TT)*,
Below are four sample input/output. Only the bolded strings areuser inputs.
Input a DNA sequence: AATT
The pattern AATT is valid
Input a DNA sequence: AATATTAAAA
The pattern AATATTAAAA is not valid
Input a DNA sequence: AAAAAA
The pattern AAAAAA is valid
Input a DNA sequence: AATTTTAAAA
The pattern AATTTTAAAA is valid
If you are asked to implement DFA for RE(AA+TT)(AA+TT)*,
Below are four sample input/output. Only the bolded strings areuser inputs.
Input a DNA sequence: AATT
The pattern AATT is valid
Input a DNA sequence: AATATTAAAA
The pattern AATATTAAAA is not valid
Input a DNA sequence: AAAAAA
The pattern AAAAAA is valid
Input a DNA sequence: AATTTTAAAA
The pattern AATTTTAAAA is valid
If you are asked to implement DFA for RE(TT+G)*(A+T),
Below are four sample input/output. Only the bolded strings areuser inputs.
Input a DNA sequence: GTTTTGT
The pattern GTTTTGT is valid for RE (TT+G)*(A+T)
Input a DNA sequence: GTTTTG
The pattern GTTTTG is not valid for RE (TT+G)*(A+T)
Input a DNA sequence: TTTGT
The pattern TTTGT is not valid for RE (TT+G)*(A+T)
Input a DNA sequence: TTGTTTTA
The pattern TTGTTTTA is valid for RE (TT+G)*(A+T)
PLEASE MAKE SURE IT WORKS FOR THUMBS UP.
In this you will implement a deterministic finiteautomaton (DFA) using C++ programming language to test if an inputDNA sequence matches a regular expression.
The program should mimic how a DFA processes a string: readingone letter at a time and doing state transitions.
If you are asked to implement DFA for RE(AA+TT)(AA+TT)*,
Below are four sample input/output. Only the bolded strings areuser inputs.
Input a DNA sequence: AATT
The pattern AATT is valid
Input a DNA sequence: AATATTAAAA
The pattern AATATTAAAA is not valid
Input a DNA sequence: AAAAAA
The pattern AAAAAA is valid
Input a DNA sequence: AATTTTAAAA
The pattern AATTTTAAAA is valid
If you are asked to implement DFA for RE(AA+TT)(AA+TT)*,
Below are four sample input/output. Only the bolded strings areuser inputs.
Input a DNA sequence: AATT
The pattern AATT is valid
Input a DNA sequence: AATATTAAAA
The pattern AATATTAAAA is not valid
Input a DNA sequence: AAAAAA
The pattern AAAAAA is valid
Input a DNA sequence: AATTTTAAAA
The pattern AATTTTAAAA is valid
If you are asked to implement DFA for RE(TT+G)*(A+T),
Below are four sample input/output. Only the bolded strings areuser inputs.
Input a DNA sequence: GTTTTGT
The pattern GTTTTGT is valid for RE (TT+G)*(A+T)
Input a DNA sequence: GTTTTG
The pattern GTTTTG is not valid for RE (TT+G)*(A+T)
Input a DNA sequence: TTTGT
The pattern TTTGT is not valid for RE (TT+G)*(A+T)
Input a DNA sequence: TTGTTTTA
The pattern TTGTTTTA is valid for RE (TT+G)*(A+T)
PLEASE MAKE SURE IT WORKS FOR THUMBS UP.