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

TOC Chapter-2 For Reference

the need

Uploaded by

aksharkevadiya20
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)
54 views

TOC Chapter-2 For Reference

the need

Uploaded by

aksharkevadiya20
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/ 122

THEORY OF

COMPUTATION
Subject Code: 3160704
Chapter-2
(partial coverage)
Topics: Minimization of Finite automata,
Regular And Non Regular
Languages – pumping lemma, Kleene’s Theorem.
Outline
● Minimization of Finite automata
● Regular And Non Regular Languages – pumping lemma.
● Kleene’s Theorem
Minimization of Finite Automata (FA)

● DFA minimization stands for converting a given DFA to its equivalent DFA with minimum
number of states.
● DFA minimization is also called as Optimization of DFA and uses partitioning algorithm.
● It is desirable to reduce number of states as far as possible because it requires less space
and is easily processed.
● The pair of states say (p,q) are distinguishable states, if the transitions goes to final states
and non-final states respectively.
● The pair of states say (p,q) are non-distinguishable states if both the transitions move to
either final states group or non-final states group.
● Here to minimize the FA all the non- distinguishable states are to be merged and used as
single state.
Why minimization

● Reduced Complexity: Minimizing a DFA reduces its complexity by eliminating redundant states and
transitions.
Minimization of DFA
We can the following two methods to minimize a DFA:
● The equivalence method
● The Myhill Nerode method (Table Filling Method)

Minimize DFA

The equivalence Myhill Nerode method / Table Filling Method


method
Minimization of Finite automata– Steps

● Step-1 : Remove the unreachable states


● Step-2 : First states are divided into final states group and non-final state
group.
● Step-3 : Now the input is applied on states
● Step-4 : Again group the similar states as another group.
● Step-5 : Repeat step 3 and 4 until we get the similar group.
Minimization of Finite automata

● Table-Filling Method
Minimization of Finite automata– Steps (Method-I)

1. Remove the unreachable states


2. Convert state in equivalent classes : Make groups of
a. Accepting State -> Final States
b. Non Accepting State -> Non Final States
3. Now the input is applied on states
4. Again group the similar states as another group.
5. Repeat step 3 and 4 until we get the similar group.
Example
Example
1. Remove the unreachable states

0
Example
2. Convert state in equivalent classes : Make groups of
a. Accepting State -> Final States
b. Non Accepting State -> Non Final States
0
TABLE FILLING METHOD
Minimization of DFA- Table Filling algorithm
Minimization of DFA- Table Filling algorithm
Minimization of DFA- Table Filling algorithm
● Table filling is recursive discovery of distinguishable pairs in DFA
Minimization of DFA- Table Filling algorithm
Minimization of DFA- Table Filling algorithm
Example:
REFERENCE- Minimization of DFA
● https://www.youtube.com/watch?v=A7eKj_GXam0 for example
● https://www.youtube.com/watch?v=Dx2RJ2DXRYs
● Book- TOC by G.P Saradhi varma & B.T Rao - for Algorithm and theory Scitech
publication
● Book- Introduction To Automata Theory by john hopcroft Pearson publication.
● https://www.geeksforgeeks.org/minimization-of-dfa-using-myhill-nerode-theorem/
● https://www.gatevidyalay.com/minimization-of-dfa-minimize-dfa-example/
Pumping Lemma
● Lemma means mini theorem
● Pumping lemma states that - if a language is regular then every string in a
language will have a section that can be repeated or pumped any number of
times and still be in the language.
Pumping Lemma for Regular Language
Pumping lemma
● In the theory of formal languages, the pumping lemma for regular languages is a lemma that describes an
essential property of all regular languages.
● Informally, it says that all sufficiently long strings in a regular language may be pumped—that is, have a middle
section of the string repeated an arbitrary number of times—to produce a new string that is also part of the language.
References for Pumping Lemma
https://www.youtube.com/watch?v=Ty9tpikilAo

https://www.youtube.com/watch?v=kZzH8E-s-9o&list=TLPQMDEwMzIwMjQ8ACa
Z9n1iwg&index=4

https://www.youtube.com/watch?v=qtnNyUlO6vU

https://www.youtube.com/watch?v=x2J5kaf6gjg - Examples
Kleene’s Theorem
● A language over an alphabet is regular if and only if it can be accepted by a
finite automaton.
● Kleene's theorem is used to show the equivalence between regular
languages, regular expressions, and finite automata.
Kleene’s Theorem
Kleene’s Theorem
Kleene’s Theorem
Kleene’s Theorem
A regular expression can be used to represent a finite automaton and vice versa.
Regular expressions are composed of unions, concatenations, and Kleene's star.

Kleene's theorem defines rules to perform these operations on regular


expressions to convert them into finite automata.
DFA vs NFA vs TG
● DFA stands for Deterministic Finite Automaton,
○ which is a type of automaton that recognizes a regular language.
○ It has a finite set of states, and for each input symbol, there is a unique transition to a new state.
● NFA stands for Nondeterministic Finite Automaton,
○ which is a type of automaton that also recognizes a regular language.
○ However, unlike DFA, it allows for multiple transitions from a state for a given input symbol. This means
that the next state is not uniquely determined by the current state and input symbol.
● TG stands for Transition Graph,
○ which is a graphical representation of a finite automaton.
○ It is a directed graph where the nodes represent states, and the edges represent transitions between
states.
● Overall, the main difference between DFA, TG, and NFA is the way they process input
symbols and how they transition between states.
○ While DFA is deterministic and has a unique transition for each input symbol, NFA allows for multiple transitions
and is nondeterministic. TG is a visualization tool used to represent both DFA and NFA.
Kleene Theorem

NFA
Kleene Theorem

DFA
Kleene Theorem

TG
Theorem 1 (Part 1 of Kleene's theorem): Any regular language is accepted by a finite automaton.
Theorem 1 (Part 1 of Kleene's theorem): Any regular language is accepted by a finite automaton.
Kleene’s Theorem
Kleene’s Theorem
Kleene's Theorem states the equivalence of the following three statements −

● A language accepted by Finite Automata can also be accepted by a Transition


graph.
● A language accepted by a Transition graph can also be accepted by Regular
Expression.
● A language accepted by Regular Expression can also be accepted by finite
Automata.
Kleene’s theorem references
https://www.youtube.com/watch?v=1O7TOfgfDVk

https://www.tutorialspoint.com/what-is-kleene-s-theorem-in-toc

https://www.cs.odu.edu/~toida/nerzic/390teched/regular/fa/kleene-1.html

https://neuraldump.net/2017/11/proof-of-kleenes-theorem/

https://www.youtube.com/watch?v=pQUAdykTOkk
Re-visited
Re-visited
Every (*) Star
operations has 4
epsilon(ε) moves
No epsilon(ε) move for
Concatenation operation
Every OR
operations has 4
epsilon(ε) moves
Rules
● We can have Max two epsilon (ε) out moves from a single state
References for Thompson's construction
https://en.wikipedia.org/wiki/Thompson%s_construction

https://www.youtube.com/watch?v=DryssBQeOaM

https://www.youtube.com/watch?v=tPBh8MOw8_Y

https://cse.iitkgp.ac.in/~bivasm/notes/scribe/11CS10055.pdf

You might also like