0% found this document useful (0 votes)
19 views14 pages

Unit 1

Uploaded by

Iron Man
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)
19 views14 pages

Unit 1

Uploaded by

Iron Man
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/ 14

Theory of Computation

Swati Jaipurkar,
Assistant Professor,
Department of Computer Science & Engg
MIT, Aurangabad, Maharashtra. INDIA
Formal Definition of FA

▪ A FA can be represented by a 5-tuple (Q , ∑ , δ , q0 , F) where −


▪ Q : {q0, q1, q2, …} is a finite nonempty set of states.
▪ ∑ : {a, b, …} ,is a finite nonempty set of symbols called the
alphabet.
▪ δ is the transition function which maps Q × ∑ into Q
▪ q0 is the initial state from where any input is processed (q0 ∈ Q).
▪ F is a set of final state/states of Q (F ⊆ Q).
Transition system

A transition system or state transition diagram is a directed graph which can be


constructed as follows:
▪ There is a node for each state in Q, which is represented by the circle.
▪ There is a directed edge from node q to node p labelled a if δ(q, a) = p.
▪ In the start/initial state, there is an arrow with no source.
▪ Final states or accepting states are indicating by a double circle.
Notations Used:
Example:

Transition Diagram
Representing FA using Transition graph

▪ Each finite automaton consists of a set of states connected by transitions.


Properties of Transition Functions

▪ Property 1: δ (q, ^) = q is a Finite Automata


▪ The state of the system can be changed only by an input symbol.

▪ Property 2 : for all strings w and input symbol a,


▪ δ (q, aw) = δ (δ (q, a) , w )
▪ δ (q, wa) = δ (δ (q, w) , a )
Example : Transition system
Example 2 : Transition system

Q. 1 Determine initial/start state/s, Final state/s.


Q. 2 Check whether following strings are acceptable or not.
1. a, 2. abb, 3. aaa, 4. b, 5. bbb, 6. baab, 7. bbabab 8. abbab
Acceptability of a string by FA

▪ A string ‘w’ is acceptable by a Finite Automata


M= (Q , ∑ , δ , q0 , F) if

δ (q0, w) = q for some q € F


This is actually acceptability by final state

Final state is also called as


ACCEPTING STATE
Transition Table

0 q2
q0 0
1 1 1
1 0 q3
q1
0

Transition Diagram Example 3.5


Present State Next State
I/P = 0 I/P = 1
Identify Initial state and q0 q2 q1
Final State
q1 q3 q0
q2 q0 q3
q3 q1 q2
Acceptability of a string {110000} by FA

δ (q0, 110000) = δ (q1, 10000)


= δ (q0, 0000)
= δ (q2,000)
= δ (q0,00)
= δ (q2,0)
= δ (q0,^)
= q0

‘q0’ is Final State there fore Check Acceptability of


string is acceptable. a. 110101 b. 000000 c. 11111
Acceptability of a string {11111} by FA

δ (q0, 11111) = δ (q1, 1111)


= δ (q0, 111)
= δ (q1,11)
= δ (q0,1)
= δ (q1,^)
= q1

‘q1’ is NOT Final State there Check Acceptability of


fore string is REJECTED. a. 110101 b. 000000 c. 11111
Acceptability of a string {000000} by FA

δ (q0, 000000) = δ (q2, 00000)


= δ (q0, 0000)
= δ (q2,000)
= δ (q0,00)
= δ (q2,0)
= δ (q0,^)
= q0

‘q0’ is Final State there fore


string is Accepted by FA.
Acceptability of a string {110101} by FA

δ (q0, 110101) = δ (q1, 10101)


= δ (q0, 0101)
= δ (q2,101)
= δ (q3,01)
= δ (q1,1)
= δ (q0,^)
= q0

‘q0’ is Final State there fore


string is ACCEPTED.

You might also like