0% found this document useful (0 votes)
77 views

Acceptability of String & Transition Graph

The document provides information about finite automata including: 1) It discusses the acceptability of strings by a finite automaton and properties of transition functions. 2) Transition graphs are used to represent the state transitions of a finite automaton as it reads input strings. 3) The language accepted by a finite automaton (L(M)) contains all strings that cause the automaton to reach an accepting state.

Uploaded by

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

Acceptability of String & Transition Graph

The document provides information about finite automata including: 1) It discusses the acceptability of strings by a finite automaton and properties of transition functions. 2) Transition graphs are used to represent the state transitions of a finite automaton as it reads input strings. 3) The language accepted by a finite automaton (L(M)) contains all strings that cause the automaton to reach an accepting state.

Uploaded by

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

CSE322

Finite Automata

Lecture #2
Topics

 Acceptability of a String by a Finite Automaton

 Transition Graph and Properties of Transition Functions


Finite Automaton

Input
String
Output
“Accept”
Finite
or
Automaton
“Reject”
Transition Graph

a, b

q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4

initial accepting
state state
transition
state
Initial Configuration
Input String
a b b a

a, b

q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4
Reading the Input

a b b a

a, b

q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4
a b b a

a, b

q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4
a b b a

a, b

q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4
a b b a

a, b

q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4
Input finished

a b b a

a, b

q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4

accept
Rejection

a b a

a, b

q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4
a b a

a, b

q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4
a b a

a, b

q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4
a b a

a, b

q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4
Input finished

a b a

a, b

reject
q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4
Another Rejection

a, b

q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4

a, b

q5
a a, b
b a b
q0 a q1 b q2 b q3 a q4

reject
Another Example

a a b

a a,b

q0 b q1 a, b q2
a a b

a a,b

q0 b q1 a, b q2
a a b

a a,b

q0 b q1 a, b q2
a a b

a a,b

q0 b q1 a, b q2
Input finished

a a b

a a,b
accept

q0 b q1 a, b q2
Rejection Example

b a b

a a,b

q0 b q1 a, b q2
b a b

a a,b

q0 b q1 a, b q2
b a b

a a,b

q0 b q1 a, b q2
b a b

a a,b

q0 b q1 a, b q2
Input finished

b a b

a a,b

q0 b q1 a, b q2

reject
Languages Accepted by FAs
FA M

Definition:
The language L M  contains
all input strings accepted by M

L M  = { strings that bring M


to an accepting state}
L M    abba M

a, b

q5
b a a, b
a b
q0 a q1 b q2 b q3 a q4
accept
Example
L M     , ab, abba M

a, b

q5
b a a a, b
b
q0 a q1 b q2 b q3 a q4
accept accept accept
Example

L M   {a b : n  0}
n

a a,b

q0 b q1 a, b q2

accept trap state


Transition Function 

 :Q  Q

a, b

q5
b a a, b
a b
q0 a q1 b q2 b q3 a q4
  q0 , a   q1

a, b

q5
b a a, b
a b
q0 a q1 b q2 b q3 a q4
  q0 , b   q5

a, b

q5
b a a, b
a b
q0 a q1 b q2 b q3 a q4
  q2 , b   q3

a, b

q5
b a a, b
a b
q0 a q1 b q2 b q3 a q4
Transition Function 
 a b
q0 q1 q5
q1 q5 q2
q2 q5 q3
q3 q4 q5 a, b
q4 q5 q5
q5 q5 q5 q5
b a a, b
a b
q0 a q1 b q2 b q3 a q4
Extended Transition Function *

 * : Q  *  Q

a, b

q5
b a a, b
a b
q0 a q1 b q2 b q3 a q4
 *  q0 , ab   q2

a, b

q5
b a a, b
a b
q0 a q1 b q2 b q3 a q4
 *  q0 , abba   q4

a, b

q5
b a a, b
a b
q0 a q1 b q2 b q3 a q4
 *  q0 , abbbaa   q5

a, b

q5
b a a, b
a b
q0 a q1 b q2 b q3 a q4
Recursive Definition
 *  q,    q
 *  q, w    ( * (q, w), )

q w q1  q

 *  q , w    q
 *  q, w    (q1, )
 (q1, )  q
 *  q, w    ( * (q, w), )
 *  q, w  q1
a, b

q5
b a a, b
a b
q0 a q1 b q2 b q3 a q4
a, b

q5
a, b
b
q0 q1 b q3 a q4

You might also like