kleene’s theorem group no. 3 presented to mam amina presented by roll no. 2429 roll no. 2433 roll...

33

Upload: vanessa-warren

Post on 05-Jan-2016

223 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam
Page 2: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Kleene’s Theorem

Group No. 3Presented To

Mam Amina Presented By

Roll No. 2429Roll No. 2433Roll No. 2435Roll No. 2438

Page 3: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Unification

Theorem:

Any language that can be defined by A regular expression, or A finite automaton, or A transition graph

can be defined by all 3 methods.

This is the fundamental theorem of finite automata.

Page 4: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Proof Architecture

Part 1: Every language that can be defined by an FA

can be defined by a TG.

Part 2: Every language that can be defined by a TG can

be defined by a regular expression.

Part 3: Every language that can be defined by a regular expression can be defined by an FA.

Page 5: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Proof of Part 1

This is the easiest part

we know that every finite automaton is itself already a transition graph. Therefore, any

language that has been defined by afinite automaton has already been defined by a transition graph.

Page 6: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Proof of Part 2: Turning TGs into Regular Expressions

We prove this part by providing a constructive algorithm:We present a algorithm that starts out with a transition

graph andends up with a regular expression that defines the

same language. To be acceptable as a method of proof, the algorithm

we presentwill satisfy two criteria: (i) It works for every

conceivable TG,and (ii) it guarantees to finish its job in a finite number

of steps.

Page 7: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Creating A Unique Start State

Consider an abstract transition graph T that may have many startstates.

We can simplify T so that it has only one unique start state thathas no incoming edges.

We do this by introducing a new start state that we label with theminus sign, and that we connect to all the previous start states by

edges labeled with . We then drop the minus signs from theprevious start states.

If a word w used to be accepted by starting at one of the previousstart states, then it can now be accepted by starting at the new

uniquestart state.

Page 8: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam
Page 9: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Creating A Unique Final State

Let us make another simplification in T so that it has a unique,unexitable final state, without changing the language it accepts. If T had no final state, then it accepts no strings at all and has no language. So, we need to produce no regular expression other than

the null, or empty, expression. If T has several final states, we can introduce a new unique final state labeled with a plus sign. We then draw new edges from all the former

final states to the new one, dropping the old plus signs, and labeling

each new edge with the null string. This process is depicted in the next slide.

Page 10: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam
Page 11: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Example

Page 12: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam
Page 13: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam
Page 14: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam
Page 15: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam
Page 16: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam
Page 17: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam
Page 18: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Proof of Part 3: Converting Regular Expressions into FAs

We prove this part by recursive definition and constructive algorithm at the same time.

We know that every regular expression can be built up from the letters of the alphabet and by repeated

application of certain rules: (i) addition, (ii) concatenation, and (iii) closure.

We will show that as we are building up a regular expression, we could at the same time building up an FA that accepts the same language.

Page 19: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Rules of Regular expression

Rule 1: If r1 and r2 are regular expressions, then so are:

(ii) r1r2(iii) r1 + r2

(iv) r1*

Rule 2: Nothing else is a regular expression.

Page 20: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Rule 1

There is an FA that accepts any particular letter of the alphabet.

There is an FA that accepts only the word .

Page 21: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Proof of Rule 1

Page 22: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Rule 2

If there is an FA called FA1 that accepts the language defined by the

regular expression r1, and there is an FA called FA2 that accepts the

language defined by the regular expression r2, then there is an FA

that we shall call FA3 that accepts the language defined by the

regular expression (r1 + r2).

Page 23: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Proof of Rule 2

We shall show that FA3 exists by presenting an algorithm showing how to construct FA3.

Algorithm: Starting with two machines, FA1 with states x1; x2; x3; :::, and

FA2 with states y1; y2; y3; :::, we construct a new machine FA3with states z1; z2; z3; ::: where each zi is of the form x something

or y something. The combination state x start or y start is the start state of the new machine FA3. If either the x part or the y part is a final state, then the

corresponding z is a final state.

Page 24: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Example

Page 25: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam
Page 26: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Rule 3

If there is an FA1 that accepts the language defined by the regular

expression r1, and there is an FA2 that accepts the language defined

by the regular expression r2, then there is an FA3 that accepts the

language defined by the (concatenation) regular expression (r1r2),

i.e. the product language.

Page 27: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Example

Page 28: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam
Page 29: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Rule 4

If r is a regular expression and FA1 is a finite automaton that acceptsexactly the language defined by r, then there is an FA, called FA2,that will accepts exactly the language defined by r.

Page 30: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam

Example

Page 31: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam
Page 32: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam
Page 33: Kleene’s Theorem Group No. 3 Presented To Mam Amina Presented By Roll No. 2429 Roll No. 2433 Roll No. 2435 Roll No. 2438 Group No. 3 Presented To Mam