0% found this document useful (0 votes)
5 views16 pages

Lecture 2 - Theory of Automata and Formal Languages

The document discusses the theory of automata and formal languages, focusing on the definitions and types of automata, specifically deterministic (DFA) and non-deterministic (NFA) automata. It explains the structure of a DFA, including its graphical representation, transition table, and acceptance criteria for strings. Additionally, it covers finite automata with and without output, providing examples of languages recognized by different automata configurations.

Uploaded by

dorianhartwell78
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views16 pages

Lecture 2 - Theory of Automata and Formal Languages

The document discusses the theory of automata and formal languages, focusing on the definitions and types of automata, specifically deterministic (DFA) and non-deterministic (NFA) automata. It explains the structure of a DFA, including its graphical representation, transition table, and acceptance criteria for strings. Additionally, it covers finite automata with and without output, providing examples of languages recognized by different automata configurations.

Uploaded by

dorianhartwell78
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

THEORY OF AUTOMATA AND

FORMAL LANGUAGES
Ahtiqa Tabassum
Lecture 2
Automata

■ An automaton is an abstract model of a digital computer.


■ An automaton has a mechanism to read input, which is a string over a given
alphabet.
Types of Automata

Deterministic Automata (DFA)


■ For each state and input symbol, there is exactly one possible transition to another
state.
■ The behavior of the DFA is predictable and there’s no ambiguity in its operation.
Non-deterministic Automata (NFA)
■ For some states and input symbols, there may be multiple possible transitions or no
transition at all.
■ The NFA can be in more than one state at a time, allowing for multiple possible
paths.
Deterministic Finite Automaton (DFA)

■ A Deterministic Finite Automator (DFA) is a 5-tuple


Deterministic Finite Automaton (DFA)

■ Graphical Representation – diagraph called state diagram


Input

Initial State

Final State

Transition
Deterministic Finite Automaton (DFA)

Transition Table
■ A DFA can also be represented by a transition table, where each row corresponds to
a state, and each column corresponds to an input symbol. The table shows the next
state for each state and input symbol.
Deterministic Finite Automaton (DFA)

Acceptance by DFA
To accept a string:
■ all the input string is scanned and the last state (q final) is accepting

qfinal  F
To reject a string:
■ all the input string is scanned and the last state (q last) is non-accepting

qlast  F qlast  (Q − F )
Finite Automata

■ A finite automaton is a model that has a finite set of states (represented in the figure by
circles) and its control moves from one state to another state in response to external
inputs (represented by arrows).
Finite automata without output
■ Deterministic finite automata.
■ Non deterministic finite automata.
■ Non deterministic finite automata with E
Finite automata with output
■ Moore machine
■ Mealy machine
Activity

L(M ) = {a b : n  0}
n

a a, b

b a, b
q0 q1 q2

accept trap state


Activity
a
b

The language is regular: b


L = awa : w  a, b* q0 a q2 q3

b a
L = L( M ) q4

a, b
Activity
a, b
L(M ) = { all strings with prefix ab }

q0 a q1 b q2

b a accept

q3 a, b
Activity
L (M ) = { all binary strings containing
substring 001 }

0,1
1 0
1

 0 0 00 1 001
0
Activity
L (M ) = { all binary strings without
substring 001 }
1 0 0,1
1

 0 1
0 00 001

0
Activity
 = {a , b } a, b a, b

q0 q0

L(M ) = { } L(M ) =  *

Empty language All strings


Activity

 = {a , b } a, b

q0 a, b q0

L(M ) = {  }
Language of the empty string
THANK YOU!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy