• No results found

CS310 : Automata Theory 2020

N/A
N/A
Protected

Academic year: 2022

Share "CS310 : Automata Theory 2020"

Copied!
47
0
0

Loading.... (view fulltext now)

Full text

(1)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 1

CS310 : Automata Theory 2020

Lecture 17: Minimization and its applications

Instructor: S. Akshay

IIT Bombay, India

18-02-2020

(2)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 2

Recap

I Automata and algebraic models: DFA, NFA,-NFA, regular expressions.

I Regular languages: All these models accept the same class of languages.

I Conversionsfrom NFA to DFA (Subset construction), -NFA to DFA, Regular expressions to -NFA, DFA to regular expressions

I Applications: text search using automata, regular expressions in GREP, emacs, python etc.

I Properties and limitations of regular languages

I Closure - under union, intersection, complementation, reversal I Pumping lemmaand its application to show non-regularity I Myhill-Nerode theoremand its applications

I Algorithms for Decision problems for automata/regular languages

(3)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 2

Recap

I Automata and algebraic models: DFA, NFA,-NFA, regular expressions.

I Regular languages: All these models accept the same class of languages.

I Conversionsfrom NFA to DFA (Subset construction), -NFA to DFA, Regular expressions to -NFA, DFA to regular expressions

I Applications: text search using automata, regular expressions in GREP, emacs, python etc.

I Properties and limitations of regular languages

I Closure - under union, intersection, complementation, reversal I Pumping lemmaand its application to show non-regularity I Myhill-Nerode theoremand its applications

I Algorithms for Decision problems for automata/regular languages

(4)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 2

Recap

I Automata and algebraic models: DFA, NFA,-NFA, regular expressions.

I Regular languages: All these models accept the same class of languages.

I Conversionsfrom NFA to DFA (Subset construction), -NFA to DFA, Regular expressions to -NFA, DFA to regular expressions

I Applications: text search using automata, regular expressions in GREP, emacs, python etc.

I Properties and limitations of regular languages

I Closure - under union, intersection, complementation, reversal I Pumping lemmaand its application to show non-regularity I Myhill-Nerode theoremand its applications

I Algorithms for Decision problems for automata/regular languages

(5)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 3

Minimization

Given a DFA, how do we get the one with minimum number of states which accepts the same language?

Algorithm for minimization

I Identify equivalent states using the table-filling algo.

I collapse them and remove redundant states I At end we will obtain a minimal automaton.

(6)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 3

Minimization

Given a DFA, how do we get the one with minimum number of states which accepts the same language?

Algorithm for minimization

I Identify equivalent states using the table-filling algo.

I collapse them and remove redundant states

I At end we will obtain a minimal automaton.

(7)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 3

Minimization

Given a DFA, how do we get the one with minimum number of states which accepts the same language?

Algorithm for minimization

I Identify equivalent states using the table-filling algo.

I collapse them and remove redundant states I At end we will obtain a minimal automaton.

(8)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 4

Example: A table filling view of the algorithm

q0

start q1 q2 q3

q4 q5 q6 q7

0 1

1 0

1 0

0 1

0 1

0 1 1

0 0

1

q1

*

q2

* *

q3

* * *

q4

* * *

q5

* * * *

q6

* * * * * *

q7

* * * * * *

D q0 q1 q2 q3 q4 q5 q6

Distinguishing words I

I 0 I 1 I 01

(9)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 4

Example: A table filling view of the algorithm

q0

start q1 q2 q3

q4 q5 q6 q7

0 1

1 0

1 0

0 1

0 1

0 1 1

0 0

1

q1

*

q2 * * q3

* *

* q4

*

*

*

q5

* *

*

*

q6

* *

*

* * *

q7

*

*

* * * *

D q0 q1 q2 q3 q4 q5 q6

Distinguishing words I

I 0 I 1 I 01

(10)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 4

Example: A table filling view of the algorithm

q0

start q1 q2 q3

q4 q5 q6 q7

0 1

1 0

1 0

0 1

0 1

0 1 1

0 0

1

q1

*

q2 * * q3 * * * q4

*

* *

q5 * * * *

q6

* *

* *

*

* q7

*

* *

*

*

*

D q0 q1 q2 q3 q4 q5 q6

Distinguishing words I

I 0

I 1 I 01

(11)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 4

Example: A table filling view of the algorithm

q0

start q1 q2 q3

q4 q5 q6 q7

0 1

1 0

1 0

0 1

0 1

0 1 1

0 0

1

q1 * q2 * * q3 * * *

q4 * * *

q5 * * * *

q6

*

* * *

*

*

q7 * * * * * *

D q0 q1 q2 q3 q4 q5 q6

Distinguishing words I

I 0 I 1

I 01

(12)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 4

Example: A table filling view of the algorithm

q0

start q1 q2 q3

q4 q5 q6 q7

0 1

1 0

1 0

0 1

0 1

0 1 1

0 0

1

q1 * q2 * * q3 * * *

q4 * * *

q5 * * * *

q6 * * * * * *

q7 * * * * * *

D q0 q1 q2 q3 q4 q5 q6

Distinguishing words I

I 0 I 1 I 01

(13)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 5

Example : DFA minimization

After applying the minimization, we obtain.

B0

start B1 B2

B5 B6

0 1

1 0

1 0

0 1 1

0

Blocks ={{q0,q4}

| {z }

B0

,{q1,q7}

| {z }

B1

,{q2}

| {z }

B2

,{q3,q5}

| {z }

B5

,{q6}

| {z }

B6

}

(14)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 6

Properties of DFA minimization

Theorem

Let Abe a minimized DFA. No DFA smaller than A recognizesL(A).

Proof.

Assume a DFAA0 such that A0 has fewer states than AandL(A) =L(A0).

Therefore, initial statesq0 andq00 of Aand A0 respectively are equivalent. claim: All states of Aare equivalent to some state ofA0.

We know all states ofA are reachable from its initial state(why?). Letq be a state inA.

Let wordw takeAto q.

Let wordw takeA0 to some state q0.

q andq0 must be equivalent. Otherwise,q0 andq00 are not equivalent.(why?)

q0

start start q00

A A0

q w

q0 w

...

(15)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 6

Properties of DFA minimization

Theorem

Let Abe a minimized DFA. No DFA smaller than A recognizesL(A).

Proof.

Assume a DFA A0 such that A0 has fewer states than AandL(A) =L(A0).

Therefore, initial statesq0 andq00 of Aand A0 respectively are equivalent. claim: All states of Aare equivalent to some state ofA0.

We know all states ofA are reachable from its initial state(why?). Letq be a state inA.

Let wordw takeAto q.

Let wordw takeA0 to some state q0.

q andq0 must be equivalent. Otherwise,q0 andq00 are not equivalent.(why?)

q0

start start q00

A A0

q w

q0 w

...

(16)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 6

Properties of DFA minimization

Theorem

Let Abe a minimized DFA. No DFA smaller than A recognizesL(A).

Proof.

Assume a DFA A0 such that A0 has fewer states than AandL(A) =L(A0).

Therefore, initial states q0 andq00 of Aand A0 respectively are equivalent.

claim: All states of Aare equivalent to some state ofA0.

We know all states ofA are reachable from its initial state(why?). Letq be a state inA.

Let wordw takeAto q.

Let wordw takeA0 to some state q0.

q and q0 must be equivalent. Otherwise, q0 andq00 are not equivalent.(why?)

q0

start start q00

A A0

q w

q0 w

...

(17)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 6

Properties of DFA minimization

Theorem

Let Abe a minimized DFA. No DFA smaller than A recognizesL(A).

Proof.

Assume a DFA A0 such that A0 has fewer states than AandL(A) =L(A0).

Therefore, initial states q0 andq00 of Aand A0 respectively are equivalent.

claim: All states of Aare equivalent to some state ofA0.

We know all states ofA are reachable from its initial state(why?). Letq be a state inA.

Let wordw takeAto q.

Let wordw takeA0 to some state q0.

q and q0 must be equivalent. Otherwise, q0 andq00 are not equivalent.(why?)

q0

start start q00

A A0

q w

q0 w

...

(18)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 6

Properties of DFA minimization

Theorem

Let Abe a minimized DFA. No DFA smaller than A recognizesL(A).

Proof.

Assume a DFA A0 such that A0 has fewer states than AandL(A) =L(A0).

Therefore, initial states q0 andq00 of Aand A0 respectively are equivalent.

claim: All states of Aare equivalent to some state ofA0.

We know all states ofAare reachable from its initial state(why?).

Letq be a state inA. Let wordw takeAto q.

Let wordw takeA0 to some state q0.

q and q0 must be equivalent. Otherwise, q0 andq00 are not equivalent.(why?)

q0

start start q00

A A0

q w

q0 w

...

(19)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 6

Properties of DFA minimization

Theorem

Let Abe a minimized DFA. No DFA smaller than A recognizesL(A).

Proof.

Assume a DFA A0 such that A0 has fewer states than AandL(A) =L(A0).

Therefore, initial states q0 andq00 of Aand A0 respectively are equivalent.

claim: All states of Aare equivalent to some state ofA0.

We know all states ofAare reachable from its initial state(why?). Letq be a state inA.

Let wordw takeAto q.

Let wordw takeA0 to some state q0.

q and q0 must be equivalent. Otherwise, q0 andq00 are not equivalent.(why?)

q0

start start q00

A A0

q

w

q0 w

...

(20)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 6

Properties of DFA minimization

Theorem

Let Abe a minimized DFA. No DFA smaller than A recognizesL(A).

Proof.

Assume a DFA A0 such that A0 has fewer states than AandL(A) =L(A0).

Therefore, initial states q0 andq00 of Aand A0 respectively are equivalent.

claim: All states of Aare equivalent to some state ofA0.

We know all states ofAare reachable from its initial state(why?). Letq be a state inA.

Let wordw takeAto q.

Let wordw takeA0 to some state q0.

q and q0 must be equivalent. Otherwise, q0 andq00 are not equivalent.(why?)

q0

start start q00

A A0

q w

q0 w

...

(21)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 6

Properties of DFA minimization

Theorem

Let Abe a minimized DFA. No DFA smaller than A recognizesL(A).

Proof.

Assume a DFA A0 such that A0 has fewer states than AandL(A) =L(A0).

Therefore, initial states q0 andq00 of Aand A0 respectively are equivalent.

claim: All states of Aare equivalent to some state ofA0.

We know all states ofAare reachable from its initial state(why?). Letq be a state inA.

Let wordw takeAto q.

Let wordw takeA0 to some state q0.

q and q0 must be equivalent. Otherwise, q0 andq00 are not equivalent.(why?)

q0

start start q00

A A0

q w

q0 w

...

(22)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 6

Properties of DFA minimization

Theorem

Let Abe a minimized DFA. No DFA smaller than A recognizesL(A).

Proof.

Assume a DFA A0 such that A0 has fewer states than AandL(A) =L(A0).

Therefore, initial states q0 andq00 of Aand A0 respectively are equivalent.

claim: All states of Aare equivalent to some state ofA0.

We know all states ofAare reachable from its initial state(why?). Letq be a state inA.

Let wordw takeAto q.

Let wordw takeA0 to some state q0.

q and q0 must be equivalent. Otherwise, q0 andq00 are not equivalent.(why?) q0

start start q00

A A0

q w

q0 w

...

(23)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 7

Properties of DFA minimization

Proof(Contd.)

Due to the pigeonhole principle, there are statesq1 andq2 of Asuch that they are equivalent to the same state of A0.

Therefore,q1 andq2 are equivalent.

SinceAis minimized, no two states ofA are equivalent. Contradiction. In fact, the minimized DFA is unique up to renaming of states. What is its link to the Myhill-Nerode theorem?

(24)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 7

Properties of DFA minimization

Proof(Contd.)

Due to the pigeonhole principle, there are statesq1 andq2 of Asuch that they are equivalent to the same state of A0.

Therefore, q1 andq2 are equivalent.

SinceAis minimized, no two states ofA are equivalent. Contradiction. In fact, the minimized DFA is unique up to renaming of states. What is its link to the Myhill-Nerode theorem?

(25)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 7

Properties of DFA minimization

Proof(Contd.)

Due to the pigeonhole principle, there are statesq1 andq2 of Asuch that they are equivalent to the same state of A0.

Therefore, q1 andq2 are equivalent.

Since Ais minimized, no two states ofA are equivalent. Contradiction.

In fact, the minimized DFA is unique up to renaming of states. What is its link to the Myhill-Nerode theorem?

(26)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 7

Properties of DFA minimization

Proof(Contd.)

Due to the pigeonhole principle, there are statesq1 andq2 of Asuch that they are equivalent to the same state of A0.

Therefore, q1 andq2 are equivalent.

Since Ais minimized, no two states ofA are equivalent. Contradiction.

In fact, the minimized DFA is unique up to renaming of states. What is its link to the Myhill-Nerode theorem?

(27)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 8

Recall: Myhill-Nerode relation

Right congruence

An equivalence relation ≡on Σ is called aright congruenceif∀x,y ∈Σ and w ∈Σ x ≡y =⇒ x·w ≡y·w.

Refinement

An equivalence relation≡on Σ is said torefine a language Lifx ≡y then x∈Liff y ∈L.

Finite index

An equivalence relation≡on Σ is said to havefinite index if the number of equivalence classes of≡is finite.

Myhill-Nerode relation

An equivalence relation≡is called aMyhill-Nerode relation for languageLif it is a right congruence, it refinesLand it is of finite index.

(28)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 8

Recall: Myhill-Nerode relation

Right congruence

An equivalence relation ≡on Σ is called aright congruenceif∀x,y ∈Σ and w ∈Σ x ≡y =⇒ x·w ≡y·w.

Refinement

An equivalence relation ≡on Σ is said torefine a language Lifx ≡y then x ∈Liff y ∈L.

Finite index

An equivalence relation≡on Σ is said to havefinite index if the number of equivalence classes of≡is finite.

Myhill-Nerode relation

An equivalence relation≡is called aMyhill-Nerode relation for languageLif it is a right congruence, it refinesLand it is of finite index.

(29)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 8

Recall: Myhill-Nerode relation

Right congruence

An equivalence relation ≡on Σ is called aright congruenceif∀x,y ∈Σ and w ∈Σ x ≡y =⇒ x·w ≡y·w.

Refinement

An equivalence relation ≡on Σ is said torefine a language Lifx ≡y then x ∈Liff y ∈L.

Finite index

An equivalence relation ≡on Σ is said to havefinite index if the number of equivalence classes of ≡is finite.

Myhill-Nerode relation

An equivalence relation≡is called aMyhill-Nerode relation for languageLif it is a right congruence, it refinesLand it is of finite index.

(30)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 8

Recall: Myhill-Nerode relation

Right congruence

An equivalence relation ≡on Σ is called aright congruenceif∀x,y ∈Σ and w ∈Σ x ≡y =⇒ x·w ≡y·w.

Refinement

An equivalence relation ≡on Σ is said torefine a language Lifx ≡y then x ∈Liff y ∈L.

Finite index

An equivalence relation ≡on Σ is said to havefinite index if the number of equivalence classes of ≡is finite.

Myhill-Nerode relation

An equivalence relation ≡is called aMyhill-Nerode relation for languageLif it is a right congruence, it refines Land it is of finite index.

(31)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 9

Link between Myhill-Nerode and minimization

Given an arbitrary language L over Σ. Consider the relation≡L defined by x ≡Ly iff for all z ∈Σ, either both xz,yz ∈L or bothxz,yz6∈L.

I It is an equivalence relation. I It is right congruent, refines L. Theorem

IfLis regular then≡L is of finite-index.

Exercise 1: prove this! Hint: show that any Myhill-Nerode relation≡for L must refine≡L, i.e., any equiv class of≡L is a union of equiv classes of ≡.

I Thus, the DFA constructed from ≡L is “the” canonical DFA! I Exercise 2 (easy): Show that this DFA has minimum no. of states I Exercise 3 (star!): Show that there is a 1-1 correspondance between this

DFA and the minimized DFA.

(32)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 9

Link between Myhill-Nerode and minimization

Given an arbitrary language L over Σ. Consider the relation≡L defined by x ≡Ly iff for all z ∈Σ, either both xz,yz ∈L or bothxz,yz6∈L.

I It is an equivalence relation.

I It is right congruent, refines L. Theorem

IfLis regular then≡L is of finite-index.

Exercise 1: prove this! Hint: show that any Myhill-Nerode relation≡for L must refine≡L, i.e., any equiv class of≡L is a union of equiv classes of ≡.

I Thus, the DFA constructed from ≡L is “the” canonical DFA! I Exercise 2 (easy): Show that this DFA has minimum no. of states I Exercise 3 (star!): Show that there is a 1-1 correspondance between this

DFA and the minimized DFA.

(33)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 9

Link between Myhill-Nerode and minimization

Given an arbitrary language L over Σ. Consider the relation≡L defined by x ≡Ly iff for all z ∈Σ, either both xz,yz ∈L or bothxz,yz6∈L.

I It is an equivalence relation.

I It is right congruent, refines L.

Theorem

IfLis regular then≡L is of finite-index.

Exercise 1: prove this! Hint: show that any Myhill-Nerode relation≡for L must refine≡L, i.e., any equiv class of≡L is a union of equiv classes of ≡.

I Thus, the DFA constructed from ≡L is “the” canonical DFA! I Exercise 2 (easy): Show that this DFA has minimum no. of states I Exercise 3 (star!): Show that there is a 1-1 correspondance between this

DFA and the minimized DFA.

(34)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 9

Link between Myhill-Nerode and minimization

Given an arbitrary language L over Σ. Consider the relation≡L defined by x ≡Ly iff for all z ∈Σ, either both xz,yz ∈L or bothxz,yz6∈L.

I It is an equivalence relation.

I It is right congruent, refines L.

Theorem

IfL is regular then≡L is of finite-index.

Exercise 1: prove this!

Hint: show that any Myhill-Nerode relation≡for L must refine≡L, i.e., any equiv class of≡L is a union of equiv classes of ≡.

I Thus, the DFA constructed from ≡L is “the” canonical DFA! I Exercise 2 (easy): Show that this DFA has minimum no. of states I Exercise 3 (star!): Show that there is a 1-1 correspondance between this

DFA and the minimized DFA.

(35)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 9

Link between Myhill-Nerode and minimization

Given an arbitrary language L over Σ. Consider the relation≡L defined by x ≡Ly iff for all z ∈Σ, either both xz,yz ∈L or bothxz,yz6∈L.

I It is an equivalence relation.

I It is right congruent, refines L.

Theorem

IfL is regular then≡L is of finite-index.

Exercise 1: prove this! Hint: show that any Myhill-Nerode relation≡for L must refine ≡L, i.e., any equiv class of≡L is a union of equiv classes of ≡.

I Thus, the DFA constructed from ≡L is “the” canonical DFA! I Exercise 2 (easy): Show that this DFA has minimum no. of states I Exercise 3 (star!): Show that there is a 1-1 correspondance between this

DFA and the minimized DFA.

(36)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 9

Link between Myhill-Nerode and minimization

Given an arbitrary language L over Σ. Consider the relation≡L defined by x ≡Ly iff for all z ∈Σ, either both xz,yz ∈L or bothxz,yz6∈L.

I It is an equivalence relation.

I It is right congruent, refines L.

Theorem

IfL is regular then≡L is of finite-index.

Exercise 1: prove this! Hint: show that any Myhill-Nerode relation≡for L must refine ≡L, i.e., any equiv class of≡L is a union of equiv classes of ≡.

I Thus, the DFA constructed from≡L is “the” canonical DFA!

I Exercise 2 (easy): Show that this DFA has minimum no. of states I Exercise 3 (star!): Show that there is a 1-1 correspondance between this

DFA and the minimized DFA.

(37)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 9

Link between Myhill-Nerode and minimization

Given an arbitrary language L over Σ. Consider the relation≡L defined by x ≡Ly iff for all z ∈Σ, either both xz,yz ∈L or bothxz,yz6∈L.

I It is an equivalence relation.

I It is right congruent, refines L.

Theorem

IfL is regular then≡L is of finite-index.

Exercise 1: prove this! Hint: show that any Myhill-Nerode relation≡for L must refine ≡L, i.e., any equiv class of≡L is a union of equiv classes of ≡.

I Thus, the DFA constructed from≡L is “the” canonical DFA!

I Exercise 2 (easy): Show that this DFA has minimum no. of states

I Exercise 3 (star!): Show that there is a 1-1 correspondance between this DFA and the minimized DFA.

(38)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 9

Link between Myhill-Nerode and minimization

Given an arbitrary language L over Σ. Consider the relation≡L defined by x ≡Ly iff for all z ∈Σ, either both xz,yz ∈L or bothxz,yz6∈L.

I It is an equivalence relation.

I It is right congruent, refines L.

Theorem

IfL is regular then≡L is of finite-index.

Exercise 1: prove this! Hint: show that any Myhill-Nerode relation≡for L must refine ≡L, i.e., any equiv class of≡L is a union of equiv classes of ≡.

I Thus, the DFA constructed from≡L is “the” canonical DFA!

I Exercise 2 (easy): Show that this DFA has minimum no. of states I Exercise 3 (star!): Show that there is a 1-1 correspondance between this

DFA and the minimized DFA.

(39)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 10

Applications: Minimization in Natural Language Processing!

Finite state transducers

I A DFA in which you read an input and produce an output!

I Input from Σ, output from Γ.

I In fact after each input letter, output may be string from Γ. I As usual, output depends on state of machine and letter being read.

(40)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 10

Applications: Minimization in Natural Language Processing!

Finite state transducers

I A DFA in which you read an input and produce an output!

I Input from Σ, output from Γ.

I In fact after each input letter, output may be string from Γ. I As usual, output depends on state of machine and letter being read.

Exercise 1: Define this formally.

(41)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 10

Applications: Minimization in Natural Language Processing!

Finite state transducers

I A DFA in which you read an input and produce an output!

I Input from Σ, output from Γ.

I In fact after each input letter, output may be string from Γ. I As usual, output depends on state of machine and letter being read.

Exercise 1: Define this formally.

I T = (Q,Σ,Γ, δ,q0) where I Q is finite set of states

I Σ,Γ are input and output alphabets I δ :Q×Σ→Q×Γ

(42)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 10

Applications: Minimization in Natural Language Processing!

Finite state transducers

I A DFA in which you read an input and produce an output!

I Input from Σ, output from Γ.

I In fact after each input letter, output may be string from Γ. I As usual, output depends on state of machine and letter being read.

Exercise 1: Define this formally.

I T = (Q,Σ,Γ, δ,q0) where I Q is finite set of states

I Σ,Γ are input and output alphabets I δ :Q×Σ→Q×Γ

Example: Input w ∈ {a,b}, Output: string w0 ∈ {0,1}such that

#0(w0) = 2.#a(w) and #1(w0) = #b(w)

(43)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 11

Applications: Minimization in NLP

I Text processing: Given input as English alphabet, output can be capitalized words.

I Translation: Given input in English, output can be in Gujarati.

I Speech processing: Given input in speech patterns/sounds, output can be English phrases

Applications use FST models and ideally one wants to construct the smallest model. So build a large one and minimize it!

References in piazza.

(44)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 11

Applications: Minimization in NLP

I Text processing: Given input as English alphabet, output can be capitalized words.

I Translation: Given input in English, output can be in Gujarati.

I Speech processing: Given input in speech patterns/sounds, output can be English phrases

Applications use FST models and ideally one wants to construct the smallest model. So build a large one and minimize it!

References in piazza.

(45)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 11

Applications: Minimization in NLP

I Text processing: Given input as English alphabet, output can be capitalized words.

I Translation: Given input in English, output can be in Gujarati.

I Speech processing: Given input in speech patterns/sounds, output can be English phrases

Applications use FST models and ideally one wants to construct the smallest model. So build a large one and minimize it!

References in piazza.

(46)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 11

Applications: Minimization in NLP

I Text processing: Given input as English alphabet, output can be capitalized words.

I Translation: Given input in English, output can be in Gujarati.

I Speech processing: Given input in speech patterns/sounds, output can be English phrases

Applications use FST models and ideally one wants to construct the smallest model. So build a large one and minimize it!

References in piazza.

(47)

CS310 : Automata Theory 2020 Instructor: S. Akshay IIT Bombay, India 11

Applications: Minimization in NLP

I Text processing: Given input as English alphabet, output can be capitalized words.

I Translation: Given input in English, output can be in Gujarati.

I Speech processing: Given input in speech patterns/sounds, output can be English phrases

Applications use FST models and ideally one wants to construct the smallest model. So build a large one and minimize it!

References in piazza.

References

Related documents

Suppose string w is the yield of a parse tree of a CFG G in CNF form, and suppose the length of the longest path in the tree is n, then |w | ≤ 2 n−1 Proof: By induction on

● Merge into a single floating-point image that represents the entire range of intensities.. Visual Response to

function is defined at a fixed set of sample points on the shape. Levy

Also the intensity of absorption is directly proportional to the concentration of chemical bonds in a given sample.. Note: The vibration of chemical bonds must involve a change

The output in the context of applications running inside the virtual machines refers to the QoS requirements such as response time and throughput, whereas the input parameters can

Can be constructed in polynomial time from N, w , i.e., polytime reduction For detailed proof, read: Section 7.5 from Sipser’s book or Section 10.2 from Hopcroft, Motwani,

I Section 8.4, 8.5, Introduction to Automata Theory, Languages and Computation, Hopcroft, Motwani and Ullman.. I Section 3.2, 4.1, Introduction to the Theory of Computation,

If there is a difference between the dc bias currents for the same applied input, then this also causes an output offset voltage:. • The effect on the output can be calculated