Nondeterminism (Deterministic) FA required for every state q and - - PowerPoint PPT Presentation

nondeterminism
SMART_READER_LITE
LIVE PREVIEW

Nondeterminism (Deterministic) FA required for every state q and - - PowerPoint PPT Presentation

[Section 4.1] Nondeterminism (Deterministic) FA required for every state q and every symbol of the alphabet to have exactly one arrow out of q labeled . What happens when we drop this requirement ? L = { w {a,b} * | w contains abba as a


slide-1
SLIDE 1

Nondeterminism

(Deterministic) FA required for every state q and every symbol σ of the alphabet to have exactly one arrow out of q labeled σ. What happens when we drop this requirement ? L = { w∈{a,b}* | w contains abba as a substring } Transition diagram (of this new type) :

[Section 4.1]

slide-2
SLIDE 2

Formal definition of an NFA

[Section 4.1]

A nondeterministic finite automaton (NFA) is a 5-tuple (Q,Σ,q0,A,δ) where

  • Q is a finite set of states
  • Σ

is a finite alphabet (input symbols)

  • qo ∈ Q is the initial state
  • A ⊆ Q is a set of accepting states
  • δ : Q×Σ → ___ is the transition function

Give a formal definition of the NFA from the previous slide.

slide-3
SLIDE 3

Defining the computation of an NFA M=(Q,Σ,q0,A,δ). Extended transition function δ* : Q×Σ* → ____ : 1) For every q ∈ Q, let δ*(q,Λ) = 2) For every q ∈ Q, y ∈ Σ*, and σ ∈ Σ, let δ*(q,yσ) = We say that a string x ∈ Σ* is accepted by M if ________ . A string which is not accepted by M is rejected by M. The language accepted by M, denoted by L(M) is the set of all strings accepted by M.

Formal definition of an NFA

[Section 4.1]

slide-4
SLIDE 4

Is the following statement true ? For every FA M = (Q,Σ,q0,A,δ) there exists an NFA M1 = (Q1,Σ,q1,A1,δ1) such that L(M) = L(M1).

NFA’s vs. FA’s

[Section 4.1]

slide-5
SLIDE 5

Is the following statement true ? For every NFA M = (Q,Σ,q0,A,δ) there exists an FA M1 = (Q1,Σ,q1,A1,δ1) such that L(M) = L(M1). Example :

NFA’s vs. FA’s

[Section 4.1]

a a,b b b b a

slide-6
SLIDE 6

Thm : For every NFA M = (Q,Σ,q0,A,δ) there exists an FA M1 = (Q1,Σ,q1,A1,δ1) such that L(M) = L(M1). Construction of M1 :

NFA’s vs. FA’s

[Section 4.1]

slide-7
SLIDE 7

Thm : For every NFA M = (Q,Σ,q0,A,δ) there exists an FA M1 = (Q1,Σ,q1,A1,δ1) such that L(M) = L(M1). Proof that L(M) = L(M1) :

NFA’s vs. FA’s

[Section 4.1]

slide-8
SLIDE 8

Example : NFA accepting a*b*c*.

NFA’s with Λ

[Section 4.2]

slide-9
SLIDE 9

Formal definition of an NFA-Λ

[Section 4.2]

A nondeterministic finite automaton with Λ-transitions (NFA-Λ) is a 5-tuple (Q,Σ,q0,A,δ) where

  • Q is a finite set of states
  • Σ

is a finite alphabet (input symbols)

  • qo ∈ Q is the initial state
  • A ⊆ Q is a set of accepting states
  • δ : ______ → ___ is the transition function

Give a formal definition of the NFA-Λ from the previous slide.

slide-10
SLIDE 10

Defining the computation of an NFA-Λ M=(Q,Σ,q0,A,δ). Extended transition function δ* : ____ → ____ : 1) For every q ∈ Q, let δ*(q,Λ) = 2) For every q ∈ Q, y ∈ Σ*, and σ ∈ Σ, let δ*(q,yσ) =

Formal definition of an NFA-Λ

[Section 4.2]

slide-11
SLIDE 11

Defining the computation of an NFA-Λ M=(Q,Σ,q0,A,δ). Extended transition function δ* : Q×Σ* → 2Q : 1) For every q ∈ Q, let δ*(q,Λ) = 2) For every q ∈ Q, y ∈ Σ*, and σ ∈ Σ, let δ*(q,yσ) =

Formal definition of an NFA-Λ

[Section 4.2]

Λ-closure of a set S ⊆ Q, denoted Λ(S), is the set of all states reachable from S by a sequence of Λ-transitions. Define Λ(S) :

slide-12
SLIDE 12

Defining the computation of an NFA-Λ M=(Q,Σ,q0,A,δ). Extended transition function δ* : Q×Σ* → 2Q : 1) For every q ∈ Q, let δ*(q,Λ) = Λ( { q } ) 2) For every q ∈ Q, y ∈ Σ*, and σ ∈ Σ, let δ*(q,yσ) = Λ( ∪p∈δ*(q,y) δ(p,σ) ) We say that a string x ∈ Σ* is accepted by M if __________. A string which is not accepted by M is rejected by M. The language accepted by M, denoted by L(M) is the set of all strings accepted by M.

Formal definition of an NFA-Λ

[Section 4.2]

slide-13
SLIDE 13

Is the following statement true ? For every NFA M = (Q,Σ,q0,A,δ) there exists an NFA-Λ M1 = (Q1,Σ,q1,A1,δ1) such that L(M) = L(M1).

NFA-Λ’s vs. NFA’s

[Section 4.2]

slide-14
SLIDE 14

Is the following statement true ? For every NFA-Λ M = (Q,Σ,q0,A,δ) there exists an NFA M1 = (Q1,Σ,q1,A1,δ1) such that L(M) = L(M1).

NFA-Λ’s vs. NFA’s

[Section 4.2]

slide-15
SLIDE 15

Is the following statement true ? For every NFA-Λ M = (Q,Σ,q0,A,δ) there exists an NFA M1 = (Q1,Σ,q1,A1,δ1) such that L(M) = L(M1).

NFA-Λ’s vs. NFA’s

[Section 4.2]

slide-16
SLIDE 16

Proof of Kleene’s Thm

[Section 4.3]

Kleene’s Thm: A language L over Σ is regular iff there exists a finite automaton that accepts L. Part 1 : For every regular language there exists an NFA-Λ accepting it.

slide-17
SLIDE 17

Proof of Kleene’s Thm

[Section 4.3]

Kleene’s Thm: A language L over Σ is regular iff there exists a finite automaton that accepts L. Part 1 : For every regular language there exists an NFA-Λ accepting it.

slide-18
SLIDE 18

Proof of Kleene’s Thm

[Section 4.3]

Part 2 : Any language accepted by an FA is regular. Let M=({1,2,3,…,k},Σ,q0,A,δ) be an FA. We will show that for every p,q,r ∈ Q, the following language is regular : L(p,q,r) = { x∈Σ* | δ*(p,x)=q and for every prefix y of x other than Λ and x we have δ*(p,y) ≤ r } Can we then conclude that L(M) is regular ?

slide-19
SLIDE 19

Proof of Kleene’s Thm

[Section 4.3]

Claim : Let M=({1,2,3,…,k},Σ,q0,A,δ) be an FA. For every p,q,r ∈ Q, the following language is regular : L(p,q,r) = { x∈Σ* | δ*(p,x)=q and for every prefix y of x other than Λ and x we have δ*(p,y) ≤ r }

slide-20
SLIDE 20

Proof of Kleene’s Thm

[Section 4.3]

Claim : Let M=({1,2,3,…,k},Σ,q0,A,δ) be an FA. For every p,q,r ∈ Q, the following language is regular : L(p,q,r) = { x∈Σ* | δ*(p,x)=q and for every prefix y of x other than Λ and x we have δ*(p,y) ≤ r }

slide-21
SLIDE 21

Proof of Kleene’s Thm

[Section 4.3]

Claim : Let M=({1,2,3,…,k},Σ,q0,A,δ) be an FA. For every p,q,r ∈ Q, the following language is regular : L(p,q,r) = { x∈Σ* | δ*(p,x)=q and for every prefix y of x other than Λ and x we have δ*(p,y) ≤ r }

slide-22
SLIDE 22

Proof of Kleene’s Thm

[Section 4.3]

Claim : Let M=({1,2,3,…,k},Σ,q0,A,δ) be an FA. For every p,q,r ∈ Q, the following language is regular : L(p,q,r) = { x∈Σ* | δ*(p,x)=q and for every prefix y of x other than Λ and x we have δ*(p,y) ≤ r }