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
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
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
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
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.
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.
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.
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
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
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
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
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
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
}
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
...
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
...
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
...
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
...
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
...
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
...
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
...
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
...
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
...
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?
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?
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?
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?
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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×Γ∗
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)
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.
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.
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.
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.
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.