You are on page 1of 12

VISVESVARAYA TECHNOLOGICAL UNIVERSITY

“Jnana Sangama”, Belagavi-560014

Mini Project
on
“AUTOMATA THEORY AND COMPUTABILITY USING JFLAP”
Submitted in fulfillment of the syllabus pedagogy for the subject
Automata Theory and Computability (18CS54)
of
V Semester, Bachelor of Engineering
in
Information Science and Engineering

Submitted by,
KALYAN KUMAR R (1DT19IS054)
KOUTUK J MOGER (1DT19IS060)

Under the guidance of


Ms. Surabhi K R
Asst. Professor
Dept. of ISE
DSATM, Bangalore.

DEPARTMENT OF INFORMATION SCIENCE AND ENGINEERING


DAYANANDA SAGAR ACADEMY OF TECHNOLOGY AND MANAGEMENT
(Affiliated to Visvesvaraya Technological University, Belagavi & Approved by AICTE, New Delhi)
6 Branches of Engineering accredited 3 years by NBA, New Delhi
Opp. Art of Living, Udayapura, Kanakapura Road, Bangalore- 560082
2021-2022
DAYANANDA SAGAR ACADEMY OF TECHNOLOGY
AND MANAGEMENT
(Affiliated to Visvesvaraya Technological University, Belagavi & Approved by AICTE, New Delhi)
All Branches of Engineering accredited 3 years by NBA, New Delhi
Opp. Art of Living, Udayapura, Kanakapura Road, Bangalore- 560082

DEPARTMENT OF INFORMATION SCIENCE & ENGINEERING

Certificate
This is to certify that the Mini-Project work entitled “AUTOMATA THEORY AND
COMPUTABILITY USING JFLAP SOFTWARE” is carried out by KALYAN
KUMAR R(1DT19IS054) and KOUTUK J MOGER(1DT19IS060) in fulfilment of the
syllabus pedagogy for the subject Automata Theory and Computability in Information
Science and Engineering of the Visvesvaraya Technological University, Belagavi
during the year 2021-2022. It is certified that all the corrections/ suggestions indicated for
the given internal assessment have been incorporated in the report. This report has been
approved as it satisfies the requirements with respect to the pedagogy Mini-Project work.

Signature of the Guide Signature of the HOD


Ms. Surabhi K R Dr. Sumithra Devi K A
Asst. Professor, Dept. of ISE Dean Academics & HOD
DSATM, Bangalore. Dept. of ISE DSATM,
Bangalore.
MINI PROJECT ON AUTOMATA THEORY

INTRODUCTION TO SOFTWARE
JFLAP :
JFLAP is software for experimenting with formal languages topics including
nondeterministic finite automata, nondeterministic pushdown automata, multi-tape
Turing machines, several types of grammars, parsing, and L-systems. In addition to
constructing and testing examples for these, JFLAP allows one to experiment with
construction proofs from one form to another, such as converting an NFA to a DFA to
a minimal state DFA to a regular expression or regular grammar.

WHAT A JFLAP DO ?
The functionalities provided by JFLAP is huge, here are some of the important
features used in the curriculum. Following is some of task done by the tool
• It allows to create finite automata and test for acceptance or rejection.
• The string can be parsed by giving the sample input, it can be done either step
by step or directly to check the result.
• The finite automata can be converted into regular expression, grammar, also
feature of combining two or more automata and minimizing is possible.
• It also helps to check whether the given FA is non -deterministic or
deterministic, if non-deterministic the transition with nondeterminism can be
highlighted.
• One can check the multiple input string at the same time for the automata
given. It can generate the possible strings accepted by the automaton given
• Can check type of grammar defined
• It can generate the derivation steps and derivation tree of given input string for
the grammar.
• It can convert the grammar into PDA. It can allow to build turing machine and
can convert into the grammar.
• One can check wether the input string accepted by the given Turing machine or
not .The functionalities are not jut restricted to the list given above,but these
features are enough to stimulate the concepts of automata.

V SEM., Dept. of ISE, DSATM. 2021 1


MINI PROJECT ON AUTOMATA THEORY

1.FINITE AUTOMATA AND REGULAR LANGUAGES

A finite automaton is a collection of 5-tuple (Q, ∑, δ, q0, F), where:

Q: finite set of states


∑: finite set of the input symbol
q0: initial state
F: final state
δ: Transition function

PROBLEM 1:

Draw a DFSM to accept the following language L= {wbab | w {a,b}*}

Solution:

Design a DFA to accept strings of a’s and b’s starting with bab

Here, q0 is the initial state and q3 is the final state

V SEM., Dept. of ISE, DSATM. 2021 2


MINI PROJECT ON AUTOMATA THEORY

Solution:

2. NON-DETERMINISTIC FINITE AUTOMATA

A Non-Deterministic finite automaton is a collection of 5-tuple (Q, ∑, δ, q0, F),


where:

Q: finite set of states


∑: finite set of the input symbol
q0: initial state
F: final state
δ: Transition function
V SEM., Dept. of ISE, DSATM. 2021 3
MINI PROJECT ON AUTOMATA THEORY

PROBLEM 2:
Design a nfa to accept language L = {w | w ababn or aban where n>=0}

Design a NFA to accept a,b as input and reach final state q3 after accepting
ababn and reach q5 after accepting aban as input. Here, q0 is the initial state and
q3 and q5 are the final states.

Solution:

V SEM., Dept. of ISE, DSATM. 2021 4


MINI PROJECT ON AUTOMATA THEORY

3.MELAY MACHINE
A Mealy machine is a machine in which output symbol depends upon the
present input symbol and present state of the machine. In the Mealy machine,
the output is represented with each input symbol for each state separated by /.
The Mealy machine can be described by 6 tuples (Q, q0, ∑, O, δ, λ') where
• Q: finite set of states
• q0: initial state of machine
• ∑: finite set of input alphabet
• O: output alphabet
• δ: transition function where Q × ∑ → Q
• λ': output function where Q × ∑ →O

PROBLEM 3:

Construct a Mealy machine which accepts a binary number and produces its
equivalent 1’s compliment

V SEM., Dept. of ISE, DSATM. 2021 5


MINI PROJECT ON AUTOMATA THEORY

Solution:
For all transitions entering into state q0, associate output 0 with the
transition.
For all transitions entering into state q1, associate output 1 with the
transition.

4.MOORE MACHINE
Moore machine is a finite state machine in which the next state is decided by
the current state and current input symbol. The output symbol at a given time
depends only on the present state of the machine. Moore machine can be
described by 6 tuples (Q, q0, ∑, O, δ, λ) where,
• Q: finite set of states
• q0: initial state of machine
• ∑: finite set of input symbols
• O: output alphabet
V SEM., Dept. of ISE, DSATM. 2021 6
MINI PROJECT ON AUTOMATA THEORY

• δ: transition function where Q × ∑ → Q


• λ: output function where Q → O
Problem 4:
Construct a Moore machine which accepts a binary number and produces its
equivalent 1’s compliment

Solution:
Design a Moore machine,
associate output 0 with state q0
associate output 0 with state q0.

V SEM., Dept. of ISE, DSATM. 2021 7


MINI PROJECT ON AUTOMATA THEORY

5. PUSHDOWN AUTOMATA
• Pushdown automata is a way to implement a CFG in the same way we
design DFA for a regular grammar. A DFA can remember a finite
amount of information, but a PDA can remember an infinite amount of
information.
• Pushdown automata is simply an NFA augmented with an "external
stack memory". The addition of stack is used to provide a last-in-first-
out memory management capability to Pushdown automata. Pushdown
automata can store an unbounded amount of information on the stack. It
can access a limited amount of information on the stack. A PDA can
push an element onto the top of the stack and pop off an element from
the top of the stack. To read an element into the stack, the top elements
must be popped off and are lost.
• A PDA is more powerful than FA. Any language which can be
acceptable by FA can also be acceptable by PDA. PDA also accepts a
class of language which even cannot be accepted by FA. Thus PDA is
much more superior to FA.

V SEM., Dept. of ISE, DSATM. 2021 8


MINI PROJECT ON AUTOMATA THEORY

PROBLEM 5:
Construct a PDA to accept Language L = {0n1n | n>= 0}

Let q0 be the start state and ∑ = {a,b}. We can check for string consisting of n
number of 0’s followed by n number of 1’s

V SEM., Dept. of ISE, DSATM. 2021 9


MINI PROJECT ON AUTOMATA THEORY

Solution:

V SEM., Dept. of ISE, DSATM. 2021 10

You might also like