Академический Документы
Профессиональный Документы
Культура Документы
1304026
NITHIN RAJ D
1304027
ATCHAYA KUMAR
1304047
GNANESH V
1304028
MURUGESHWAR U 1304039
RIBERRO SILVA
1304020
INTRODUCTION:
The automaton simulation is done using an automaton simulator. The
automaton simulator allows us to draw and simulate a variety of theoretical
machines, including:
Turing machines
q0
q2
q0
*q1
q1
q1
q2
q2
q1
Transition table:
The following is a transition diagram for the same DFA represented as a
transition table above:
PROBLEM:
Design a DFA to accept a language of all strings containing = {0, 1} and
ending with ab.
SOLUTION:
The solution is obtained by beginning with a starting state.
The starting state should be able to read the input symbol a or b and
determine its next state.
Each state should have 2 possible outcomes or state changes 1 on
reading a and 1 on reading b.
Before reaching the final state, the DFA should have read the preceding
a before the final b, in which case the DFA accepts the language.
The DFA is represented as a transition diagram and transitions are
drawn for each state showing what transitions are made on reading
each input symbol.
Transition diagram:
q0
q1
q0
q1
q1
q2
*q2
q1
q2
INPUT:
The input is given using the input field present in the simulator.
The input reads the string symbol by symbol.
For each symbol, if the symbol is part of i.e if its a valid symbol for the
given DFA, it shows the transition for the symbol from the state to the
next state.
If the symbol is not part of i.e if an invalid symbol is entered, it does
not show a transition and the state turns red in color and the language
is rejected.
SIMULATION:
The simulation is run to check if the designed DFA accepts or rejects the given
strings. The simulation is run for the following 2 example inputs i.e to accept
or reject the strings:
abbabab
abba
1. For the input string abbabab:
The DFA starts with the starting state and makes the transitions
according to the input symbols being read as the input from the string.
The DFA reads b and transitions to q0. Input read so far: abb
The DFA reads a and transitions to q1. Input read so far: abba
The DFA reads b and transitions to q2. Input read so far: abbab
The DFA reads a and transitions to q1. Input read so far: abbaba
The DFA reads b and transitions to q2. Input read so far: abbabab
STATUS: ACCEPTED [Since the DFA stopped in the accepting state after
it finished reading the input]
The DFA reads b and transitions to q0. Input read so far: abb
The DFA reads a and transitions to q1. Input read so far: abba
STATUS: REJECTED [Since the DFA did not stop in the accepting state
after it finished reading the input. It stopped in q1 which is not an
accepting state]
SCREENSHOTS:
CONCLUSION:
Thus the automaton simulation was done to design a Deterministic finite
automata and run the simulation to accept or reject the given language. This
simulation allowed us to read the input string symbol after symbol and
showed the transitions from each state as each input symbol was read. This
way, we were able to see the transitions and see how the DFA works. In the
case that the given language is not accepted, we can see where the transition
stops and why it is not being accepted. Also, being able to see the transitions
step by step, it becomes easier to debug the DFA and correct the design in the
case the DFA does not work as it was intended to. Therefore, the simulation is
the perfect way to understand how automata works and how the input strings
are processed by the abstract machine.