VISVESVARAYA TECHNOLOGICAL UNIVERSITY
BELAGAVI-590018, KARNATAKA
Assignment
ON
“Conversion of NFA to DFA using JFLAP Software”
Submitted in the partial fulfillment of requirements for the award of Degree
B.E. in Computer Science and Engineering
Nikhil H C 4BD23CS121
Course Co-ordinator Program Coordinator
Prof. Shankar Sarji P [Link]. Dr. Nirmala C R Ph.D.
Assistant. Professor Head of Department
Dept of CSE, BIET CS & E, BIET
BAPUJI INSTITUTE OF ENGINEERING AND TECHNOLOGY
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
DAVANGERE-577004
Q.12) Convert the following NFA to DFA using JFLAP Software
Ans: ~Conversion of NFA to DFA
Q.13) Define DFSM. Design a DFSM in JFLAP software to accept each of the following languages:
Ans. DFSM: Deterministic Finite State Machine
A DFSM is formally defined as a 5-tuple, represented as M = (Q, Σ, δ, q0, F):
1. Q (States): A finite set of states the machine can be in
o Example: {q0,q1,q2}
2. Σ (Alphabet): A finite set of input symbols (characters) the machine can read. 7
o Example: {0, 1}
3. δ (Transition Function): The rules that define how the machine moves from one state to another.
It takes the current state and an input symbol and returns the single next state.9
o Example: δ (q0,0) = q1 (If in state q0 and you read a '0', go to state q1).
4. q0(Start State): The single state the machine begins in before reading any input.
qo must be one of the states in set Q.
5. F (Final/Accepting States): A set of one or more states. If the machine ends in one of these states after reading
the entire input string, the string is "accepted". Otherwise, it is "rejected". F is a subset of Q.
o Example: {q2}
i) L= {wε{0,1}* : w has 001 as a substring}
ans.
ii) The given string beginning with aab, show the transition for w=abababb
ans.
iii) The given string not ending with abb, show the transition for w=abababb
ans.
iv) L={ wε{0,1}* : w has even number of a’s and even number of b’s}
ans.
v) L= {wε{0,1}* : w does not end in 01}
ans.
vi) L= {wε{a,b}* : every a in w is immediately preceded and followed by b}
ans.
Q.14) Define distinguishable and indistinguishable states. Minimise the states of following DFA USING JFLAP
SOFTWARE
Ans. Distinguishable States: Two states are distinguishable if there is at least one input string that takes one state to
an accepting state and the other to a non-accepting state.
Indistinguishable States: Two states are indistinguishable if, for every possible input string, they both end up in
either an accepting state or a non-accepting state together.
ans. ~Unminimized DFA
~Minimized DFA
Q.15) Draw DFA to accept strings of a’s and b’s where language L={|w|mod3>=|w|mod2} using JFLAP
Software
ans.