Automata Theory - Quick Guide
Automata Theory - Quick Guide
Related Terminologies
Alphabet
String
Examples −
:
If S = ‘cabcad’, |S|= 6
Kleene Star
Representation − ∑+ = ∑1 ∪ ∑2 ∪ ∑3 ∪…….
∑+ = ∑* − { λ }
Language
q0 is the initial state from where any input is processed (q0 ∈ Q).
Q = {a, b, c},
∑ = {0, 1},
q0 = {a},
F = {c}, and
Present State Next State for Input 0 Next State for Input 1
a a b
b c a
c b c
(Here the power set of Q (2Q) has been taken because in case
of NDFA, from a state, transition can occur to any combination
of Q states)
q0 is the initial state from where any input is processed (q0 ∈ Q).
Example
Q = {a, b, c}
∑ = {0, 1}
:
q0 = {a}
F = {c}
Present State Next State for Input 0 Next State for Input 1
a a, b b
b c a, c
c b, c c
DFA vs NDFA
The following table lists the differences between DFA and NDFA.
DFA NDFA
The transition from a state is to a The transition from a state can be
single particular next state for each to multiple next states for each
input symbol. Hence it is called input symbol. Hence it is called
deterministic. non-deterministic.
Empty string transitions are not NDFA permits empty string
seen in DFA. transitions.
Classifier
A classifier has more than two final states and it gives a single
output when it terminates.
Transducer
δ*(q0, S) ∈ F
{S | S ∈ ∑* and δ*(q0, S) ∈ F}
δ*(q0, S′) ∉ F
{S | S ∈ ∑* and δ*(q0, S) ∉ F}
Example
Let us consider the DFA shown in Figure 1.3. From the DFA, the
acceptable strings can be derived.
Strings accepted by the above DFA: {0, 00, 11, 010, 101, ...........}
Strings not accepted by the above DFA: {1, 011, 111, ........}
:
NDFA to DFA Conversion
Problem Statement
Let X = (Qx, ∑, δx, q0, Fx) be an NDFA which accepts the language
L(X). We have to design an equivalent DFA Y = (Qy, ∑, δy, q0, Fy)
such that L(Y) = L(X). The following procedure converts the NDFA
to its equivalent DFA −
Algorithm
Input − An NDFA
Step 3 − Mark the start state of the DFA by q0 (Same as the NDFA).
Step 4 − Find out the combination of States {Q0, Q1,... , Qn} for each
possible input alphabet.
Step 5 − Each time we generate a new DFA state under the input
alphabet columns, we have to apply step 4 again, otherwise go to
step 6.
Step 6 − The states which contain any of the final states of the
NDFA are the final states of the equivalent DFA.
Example
Let us consider the NDFA shown in the figure below.
:
q δ(q,0) δ(q,1)
a {a,b,c,d,e} {d,e}
b {c} {e}
c ∅ {b}
d {e} ∅
e ∅ ∅
Using the above algorithm, we find its equivalent DFA. The state
table of the DFA is shown in below.
q δ(q,0) δ(q,1)
[a] [a,b,c,d,e] [d,e]
[a,b,c,d,e] [a,b,c,d,e] [b,d,e]
[d,e] [e] ∅
[b,d,e] [c,e] [e]
[e] ∅ ∅
[c, e] ∅ [b]
[b] [c] [e]
[c] ∅ [b]
Input − DFA
Step 1 − Draw a table for all pairs of states (Qi, Qj) not necessarily
connected directly [All are unmarked initially]
Step 2 − Consider every state pair (Qi, Qj) in the DFA where Qi ∈ F
and Qj ∉ F or vice versa and mark them. [Here F is the set of final
states]
:
Step 3 − Repeat this step until we cannot mark anymore states −
If there is an unmarked pair (Qi, Qj), mark it if the pair {δ (Qi, A), δ (Qi,
A)} is marked for some input alphabet.
Step 4 − Combine all the unmarked pair (Qi, Qj) and make them a
single state in the reduced DFA.
Example
a b c d e f
a
b
c
d
e
f
a b c d e f
a
b
c
d
e
f
:
Step 3 − We will try to mark the state pairs, with green colored
check mark, transitively. If we input 1 to state ‘a’ and ‘f’, it will go to
state ‘c’ and ‘f’ respectively. (c, f) is already marked, hence we will
mark pair (a, f). Now, we input 1 to state ‘b’ and ‘f’; it will go to state
‘d’ and ‘f’ respectively. (d, f) is already marked, hence we will mark
pair (b, f).
a b c d e f
a
b
c
d
e
f
After step 3, we have got state combinations {a, b} {c, d} {c, e} {d, e}
that are unmarked.
So the final minimized DFA will contain three states {f}, {a, b} and {c,
d, e}
:
DFA Minimization using Equivalence Theorem
If X and Y are two states in a DFA, we can combine these two states
into {X, Y} if they are not distinguishable. Two states are
distinguishable, if there is at least one string S, such that one of δ (X,
S) and δ (Y, S) is accepting and another is not accepting. Hence, a
DFA is minimal if and only if all the states are distinguishable.
Algorithm 3
Step 1 − All the states Q are divided in two partitions − final states
and non-final states and are denoted by P0. All the states in a
partition are 0th equivalent. Take a counter k and initialize it with 0.
Step 4 − Combine kth equivalent sets and make them the new states
of the reduced DFA.
Example
P0 = {(c,d,e), (a,b,f)}
P1 = {(c,d,e), (a,b),(f)}
P2 = {(c,d,e), (a,b),(f)}
Hence, P1 = P2.
There are three states in the reduced DFA. The reduced DFA is as
follows −
:
Q δ(q,0) δ(q,1)
(a, b) (a, b) (c,d,e)
(c,d,e) (c,d,e) (f)
(f) (f) (f)
Mealy Machine
Moore machine
Mealy Machine
q0 is the initial state from where any input is processed (q0 ∈ Q).
Next state
Present state input = 0 input = 1
State Output State Output
→a b x1 c x1
b b x2 d x3
c d x3 c x1
d d x3 d x2
Moore Machine
q0 is the initial state from where any input is processed (q0 ∈ Q).
Next State
Present state Output
Input = 0 Input = 1
→a b c x2
b b d x1
c c d x2
d d d x3
Step 2 − Copy all the Moore Machine transition states into this table
format.
Next State
Present State Output
a=0 a=1
→a d b 1
b a d 0
c c c 0
d b a 1
Step 1 & 2 −
Next State
Present State a=0 a=1
State Output State Output
→a d b
b a d
c c c
d b a
Step 3 −
Next State
Present State a=0 a=1
State Output State Output
=> a d 1 b 0
b a 1 d 1
c c 0 c 0
:
d b 0 a 1
Step 1 − Calculate the number of different outputs for each state (Qi)
that are available in the state table of the Mealy machine.
Step 2 − If all the outputs of Qi are same, copy state Qi. If it has n
distinct outputs, break Qi into n states as Qin where n = 0, 1, 2.......
Step 3 − If the output of the initial state is 1, insert a new initial state
at the beginning which gives 0 output.
Example
Next State
Present State a=0 a=1
Next State Output Next State Output
→a d 0 b 1
b a 1 d 0
c c 1 c 0
d b 0 a 1
Here, states ‘a’ and ‘d’ give only 1 and 0 outputs respectively, so we
retain states ‘a’ and ‘d’. But states ‘b’ and ‘c’ produce different
outputs (1 and 0). So, we divide b into b0, b1 and c into c0, c1.
:
Next State
Present State Output
a=0 a=1
→a d b1 1
b0 a d 0
b1 a d 1
c0 c1 C0 0
c1 c1 C0 1
d b0 a 0
Introduction to Grammars
n the literary sense of the term, grammars denote syntactical rules
for conversation in natural languages. Linguistics have attempted to
define grammars since the inception of natural languages like
English, Sanskrit, Mandarin, etc.
Grammar
A grammar G can be formally written as a 4-tuple (N, T, S, P) where
−
Example
Grammar G1 −
Here,
Productions, P : S → AB, A → a, B → b
Example
Grammar G2 −
Here,
ε is an empty string.
xαy Gxβy
Example
L(G)={W|W ∈ ∑*, S G W}
Example
:
If there is a grammar
L(G) = {ab}
Example
= {am bn | m ≥ 1 and n ≥ 1}
Example
Solution
Here, the start symbol has to take at least one ‘b’ preceded by any
number of ‘a’ including null.
To accept the string set {b, ab, bb, aab, abb, …….}, we have taken the
productions −
S → aS , S → B, B → b and B → bB
S → B → b (Accepted)
S → B → bB → bb (Accepted)
S → aS → aB → ab (Accepted)
Example
Solution −
Since L(G) = {am bn | m > 0 and n ≥ 0}, the set of strings accepted
:
can be rewritten as −
Here, the start symbol has to take at least one ‘a’ followed by any
number of ‘b’ including null.
To accept the string set {a, aa, ab, aaa, aab, abb, …….}, we have
taken the productions −
S → aA, A → aA , A → B, B → bB ,B → λ
S → aA → aB → aλ → a (Accepted)
Type - 3 Grammar
Type-3 grammars generate regular languages. Type-3 grammars
:
must have a single non-terminal on the left-hand side and a right-
hand side consisting of a single terminal or single terminal followed
by a single non-terminal.
and a ∈ T (Terminal)
Example
X → ε
X → a | aY
Y → b
Type - 2 Grammar
Type-2 grammars generate context-free languages.
Example
:
S → X a
X → a
X → aX
X → abc
X → ε
Type - 1 Grammar
Type-1 grammars generate context-sensitive languages. The
productions must be in the form
αAβ→αγβ
where A ∈ N (Non-terminal)
Example
AB → AbBc
A → bcA
B → b
Type - 0 Grammar
Type-0 grammars generate recursively enumerable languages. The
productions have no restrictions. They are any phase structure
:
grammar including all formal grammars.
Example
S → ACaB
Bc → acB
CB → DB
aD → Db
Regular Expressions
A Regular Expression can be recursively defined as follows −
Some RE Examples
Regular
Regular Set
Expressions
(0 + 10*) L = { 0, 1, 10, 100, 1000, 10000, … }
(0*10*) L = {1, 01, 10, 010, 0010, …}
(0 + ε)(1 + ε) L = {ε, 0, 1, 01}
Set of strings of a’s and b’s of any length including the
(a+b)*
null string. So L = { ε, a, b, aa , ab , bb , ba, aaa…….}
Set of strings of a’s and b’s ending with the string abb. So
(a+b)*abb
L = {abb, aabb, babb, aaabb, ababb, …………..}
Set consisting of even number of 1’s including empty
(11)*
string, So L= {ε, 11, 1111, 111111, ……….}
Set of strings consisting of even number of a’s followed
(aa)*(bb)*b by odd number of b’s , so L = {b, aab, aabbb, aabbbbb,
aaaab, aaaabbb, …………..}
String of a’s and b’s of even length can be obtained by
(aa + ab + concatenating any combination of the strings aa, ab, ba
ba + bb)* and bb including null, so L = {aa, ab, ba, bb, aaab, aaba,
…………..}
Regular Sets
Any set that represents the value of the Regular Expression is called
a Regular Set.
:
Properties of Regular Sets
Proof −
Hence, proved.
Proof −
Hence, proved.
Proof −
RE = (aa)*
So, L = {ε, aa, aaaa, aaaaaa, .......} (Strings of even length including
Null)
So, L’ = {a, aaa, aaaaa, .....} (Strings of odd length excluding Null)
Hence, proved.
Proof −
So, L1 = {a, aa, aaa, aaaa, ....} (Strings of all possible lengths
excluding Null)
Hence, proved.
Proof −
RE (L) = 01 + 10 + 11 + 10
Hence, proved.
Proof −
RE (L*) = a (a)*
Hence, proved.
:
Property 7. The concatenation of two regular sets is regular.
Proof −
Here, L1 = {0, 00, 10, 000, 010, ......} (Set of strings ending in 0)
Then, L1 L2 = {001,0010,0011,0001,00010,00011,1001,10010,.............}
Hence, proved.
∅* = ε
ε* = ε
RR* = R*R
R*R* = R*
(R*)* = R*
RR* = R*R
(PQ)*P =P(QP)*
(a+b)* = (a*b*)* = (a*+b*)* = (a+b*)* = a*(ba*)*
R + ∅ = ∅ + R = R (The identity for union)
R ε = ε R = R (The identity for concatenation)
∅ L = L ∅ = ∅ (The annihilator for concatenation)
R + R = R (Idempotent law)
L (M + N) = LM + LN (Left distributive law)
(M + N) L = ML + NL (Right distributive law)
:
ε + RR* = ε + R*R = R*
Arden's Theorem
In order to find out a regular expression of a Finite Automaton, we
use Arden’s Theorem along with the properties of regular
expressions.
Statement −
Proof −
= Q + QP + RPP
When we put the value of R recursively again and again, we get the
following equation −
R = Q + QP + QP2 + QP3…..
R = Q (ε + P + P2 + P3 + …. )
Hence, proved.
Step 1 − Create equations as the following form for all the states of
the DFA having n states with initial state q1.
…………………………
…………………………
…………………………
…………………………
Rij represents the set of labels of edges from qi to qj, if no such edge
exists, then Rij = ∅
Step 2 − Solve these equations to get the equation for the final state
in terms of Rij
Problem
The equations for the three states q1, q2, and q3 are as follows −
q3 = q2a
q1 = q1a + q3a + ε
= (a + b(b + ab)*aa)*
Problem
Solution −
q1 = q10 + ε
q2 = q11 + q20
:
q3 = q21 + q30 + q31
q1 = ε0* [As, εR = R]
So, q1 = 0*
q2 = 0*1 + q20
Construction of an FA from an RE
We can use Thompson's Construction to find out a Finite Automaton
from a Regular Expression. We will reduce the regular expression into
smallest regular expressions and converting these to NFA and finally
to DFA.
Method
Step 1 Construct an NFA with Null moves from the given regular
expression.
:
Step 2 Remove Null transition from the NFA and convert it into its
equivalent DFA.
Problem
Solution
q0 − an initial state q0 ∈ Q
Problem
Solution
Step 1 −
Step 2 −
Now we will Copy all these edges from q1 without changing the
edges from qf and get the following FA −
:
Step 3 −
So the FA becomes −
Step 4 −
|w| ≥ c
|y| > 0
|xy| ≤ c
For all k ≥ 0, the string xykz is also in L.
Problem
Solution −
Number of as = (p + 2q + r) = (p + q + r) + q = n + q
Hence, xy2z = an+q bn. Since q ≠ 0, xy2z is not of the form anbn.
DFA Complement
If (Q, ∑, δ, q0, F) be a DFA that accepts a language L, then the
complement of the DFA can be obtained by swapping its accepting
states with its non-accepting states and vice versa.
∑ = {a, b}
So, RE = a+.
Now we will swap its accepting states with its non-accepting states
and vice versa and will get the following −
∑ = {a, b}
Example
Representation Technique
Top-down Approach −
Bottom-up Approach −
The derivation or the yield of a parse tree is the final string obtained
by concatenating the labels of the leaves of the tree from left to
right, ignoring the Nulls. However, if all the leaves are Null, derivation
is Null.
Example
Example
Example
Problem
Check whether the grammar G with production rules −
is ambiguous or not.
Solution
Let’s find out the derivation tree for the string "a+a*a". It has two
leftmost derivations.
Parse tree 1 −
:
Derivation 2 − X → X*X → X+X*X → a+ X*X → a+a*X → a+a*a
Parse tree 2 −
Since there are two parse trees for a single string "a+a*a", the
grammar G is ambiguous.
Union
Concatenation
Kleene Star operation
Union
Let L1 and L2 be two context free languages. Then L1 ∪ L2 is also
context free.
Example
Concatenation
If L1 and L2 are context free languages, then L1L2 is also context free.
Example
Kleene Star
If L is a context free language, then L* is also context free.
Example
CFG Simplification
In a CFG, it may happen that all the production rules and symbols are
not needed for the derivation of strings. Besides, there may be some
null productions and unit productions. Elimination of these
productions and symbols is called simplification of CFGs.
Simplification essentially comprises of the following steps −
Reduction of CFG
Removal of Unit Productions
Removal of Null Productions
Reduction of CFG
CFGs are reduced in two phases −
Derivation Procedure −
Step 1 − Include all symbols, W1, that derive some terminal and
initialize i=1.
Derivation Procedure −
Step 2 − Include all symbols, Yi+1, that can be derived from Yi and
include all production rules that have been applied.
Problem
Solution
Phase 1 −
T = { a, c, e }
W2 = { A, C, E } U { S } from rule S → AC
W3 = { A, C, E, S } U ∅
G’ = { { A, C, E, S }, { a, c, e }, P, {S}}
:
where P: S → AC, A → a, C → c , E → aA | e
Phase 2 −
Y1 = { S }
Y2 = { S, A, C } from rule S → AC
Y4 = { S, A, C, a, c }
G” = { { A, C, S }, { a, c }, P, {S}}
where P: S → AC, A → a, C → c
Removal Procedure −
Step 3 − Repeat from step 1 until all unit productions are removed.
Problem
Solution −
Y → Z, Z → M, and M → N
S → XY, X → a, Y → Z | b, Z → M, M → a, N → a
S → XY, X → a, Y → Z | b, Z → a, M → a, N → a
S → XY, X → a, Y → a | b, Z → a, M → a, N → a
S → XY, X → a, Y → a | b
:
Removal of Null Productions
In a CFG, a non-terminal symbol ‘A’ is a nullable variable if there is a
production A → ε or there is a derivation that starts at A and finally
ends up with
ε: A → .......… → ε
Removal Procedure
Problem
S → ASA | aB | b, A → B, B → b | ∈
Solution −
S→ASA | aB | b | a, A ε B| b | &epsilon, B → b
S→ASA | aB | b | a | SA | AS | S, A → B| b, B → b
A→a
A → BC
S→ε
Problem
S → ASA | aB, A → B | S, B → b | ε
Solution
B → ∈ and A → ∈
S0→S, S→ ASA | aB | a, A → B | S | ∈, B → b
S0→S, S→ ASA | aB | a | AS | SA | S, A → B | S, B → b
A→S|b
B→b
A → b |ASA | aB | a | AS | SA, B → b
(4) Now we will find out more than two variables in the R.H.S
Hence we will apply step 4 and step 5 to get the following final
production set which is in CNF −
S0→ AX | aB | a | AS | SA
S→ AX | aB | a | AS | SA
A → b |AX | aB | a | AS | SA
B→b
X → SA
S→ AX | YB | a | AS | SA
A → b A → b |AX | YB | a | AS | SA
B→b
X → SA
Y→a
A→b
A → bD1…Dn
S→ε
Problem
S → XY | Xn | p
X → mX | m
Y → Xn | o
Solution
Here, S does not appear on the right side of any production and
there are no unit or null productions in the production rule set. So, we
can skip Step 1 to Step 3.
Step 4
X in S → XY | Xo | p
with
mX | m
we obtain
S → mXY | mY | mXo | mo | p.
X → mX | m
we obtain
Y → mXn | mn | o.
S → mXY | mY | mXC | mC | p
X → mX | m
Y → mXD | mD | o
O→o
P→p
Solution
|vwx| ≤ n and vx ≠ ε.
Hence vwx cannot involve both 0s and 2s, since the last 0 and the
first 2 are at least (n+1) positions apart. There are two cases −
Case 1 − vwx has no 2s. Then vx has only 0s and 1s. Then uwy,
which would have to be in L, has n 2s, but fewer than n 0s or 1s.
an input tape,
a control unit, and
a stack with infinite size.
A PDA may or may not read an input symbol, but it has to read the
top of the stack in every transition.
∑ is input alphabet
S is stack symbols
This means at state q1, if we encounter an input string ‘a’ and top
symbol of the stack is ‘b’, then we pop ‘b’, push ‘c’ on top of the
stack and move to state q2.
w is unconsumed input
Turnstile Notation
This implies that while taking a transition from state p to state q, the
input symbol ‘a’ is consumed, and the top of the stack ‘T’ is
replaced by a new string ‘α’.
For a PDA (Q, ∑, S, δ, q0, I, F), the language accepted by the empty
stack is −
Example
Solution
Here, in this example, the number of ‘a’ and ‘b’ have to be same.
Example
Solution
Initially we put a special symbol ‘$’ into the empty stack. At state q2,
the w is being read. In state q3, each 0 or 1 is popped when it
matches the input. If any other input is given, the PDA will go to a
dead state. When we reach that special symbol ‘$’, we go to the
accepting state q4.
L(G) = L(P)
In the next two topics, we will discuss how to convert from PDA to
CFG and vice versa.
Step 3 − The start symbol of CFG will be the start symbol in the
PDA.
Problem
:
Construct a PDA from the following CFG.
S → XS | ε , A → aXb | Ab | ab
Solution
where δ −
δ(q, a, a) = {(q, ε )}
δ(q, 1, 1) = {(q, ε )}
If the top symbol of the stack matches with the input symbol
being read, pop it.
If the input string is fully read and the stack is empty, go to the
final state ‘F’.
:
Example
Solution
⊢(y*z, X*YI) ⊢(y*z, y*YI) ⊢(*z,*YI) ⊢(z, YI) ⊢(z, zI) ⊢(ε, I)
If the top of the stack element matches with the current input
symbol, pop it.
If the input string is fully read and only if the start symbol ‘S’
remains in the stack, pop it and go to the final state ‘F’.
Example
Solution
⊢(y*z, +SI) ⊢ (*z, y+SI) ⊢ (*z, Y+SI) ⊢ (*z, X+SI) ⊢ (z, *X+SI)
Definition
A Turing Machine (TM) is a mathematical model which consists of an
infinite length tape divided into cells on which input is given. It
consists of a head which reads the input tape. A state register stores
the state of the Turing machine. After reading an input symbol, it is
replaced with another symbol, its internal state is changed, and it
moves from one cell to the right or left. If the TM reaches the final
state, the input string is accepted, otherwise rejected.
Here the transition 1Rq1 implies that the write symbol is 1, the tape
moves right, and the next state is q1. Similarly, the transition 1Lq2
implies that the write symbol is 1, the tape moves left, and the next
state is q2.
S(n) = O(n)
Example 1
Solution
From the above moves, we can see that M enters the state q1 if
it scans an even number of α’s, and it enters the state q2 if it
scans an odd number of α’s. Hence q2 is the only accepting
state.
Hence,
:
M = {{q1, q2}, {1}, {1, B}, δ, q1, B, {q2}}
where δ is given by −
Example 2
Solution
Hence,
M = {{q0, q1, q2, q3, q4, qf}, {0,1, B}, {1, B}, δ, q0, B, {qf}}
where δ is given by −
δ is a transition function;
The machine starts from the initial state q0 and the head scans from
the left end marker ‘End’. In each step, it reads the symbol on the
tape under its head. It writes a new symbol on that tape cell and then
it moves the head either into left or right one tape cell. A transition
function determines the actions to be taken.
It has two special states called accept state and reject state. If at
any point of time it enters into the accepted state, the input is
accepted and if it enters into the reject state, the input is rejected by
the TM. In some cases, it continues to run infinitely without being
accepted or rejected for some certain input symbols.
Here,
Language Decidability
A language is called Decidable or Recursive if there is a Turing
machine which accepts and halts on every input string w. Every
decidable language is Turing-Acceptable.
For a decidable language, for each input string, the TM halts either at
the accept or the reject state as depicted in the following diagram −
:
Example 1
Find out whether the following problem is decidable or not −
Solution
Divide the number ‘m’ by all the numbers between ‘2’ and ‘√m’
starting from ‘2’.
Example 2
Given a regular language L and string w, how can we check if w ∈ L?
Solution
:
Take the DFA that accepts L and check if w is accepted
Note −
Undecidable Languages
For an undecidable language, there is no Turing Machine which
accepts the language and makes a decision for every input string w
(TM can make decision for some input string though). A decision
problem P is called “undecidable” if the language L of all yes
instances to P is not decidable. Undecidable languages are not
recursive languages, but sometimes, they may be recursively
enumerable languages.
:
Example
The halting problem of Turing machine
The mortality problem
The mortal matrix problem
The Post correspondence problem, etc.
Rice Theorem
:
Rice theorem states that any non-trivial semantic property of a
language which is recognized by a Turing machine is undecidable. A
property, P, is the language of all Turing machines that satisfy that
property.
Formal Definition
If P is a non-trivial property, and the language holding the property,
Lp , is recognized by Turing machine M, then Lp = {<M> | L(M) ∈ P} is
undecidable.
On input x
Run M on w
If M does not accept (or doesn't halt), then do not accept x (or
do not halt)
If M accepts w then run M0 on x. If M0 accepts x, then accept x.
Example 1
Find whether the lists
Solution
x1 x2 x3
M Abb aa aaa
N Bba aaa aa
Here,
x2x1x3 = ‘aaabbaaa’
x2x1x3 = y2y1y3
Example 2
:
Find whether the lists M = (ab, bab, bbaaa) and N = (a, ba, bab)
have a Post Correspondence Solution?
Solution
x1 x2 x3
M ab bab bbaaa
N a ba bab
Advertisements
: