A = (Q, Σ,δ, q ,F) : w = a a …a
A = (Q, Σ,δ, q ,F) : w = a a …a
20 If two states are not distinguishable by the table filling algorithm, then the states are equivalent Proof: Assume a DFA
A ={Q, ,, q0,F}
Suppose the theorem is false i.e., There is at least one pair of states {p,q} such that 1. States p & q are distinguishable, in the sense, that there is some string w such that exactly one of ^(p,w) and ^(q,w) is accepting and yet 2. The table filling algorithm does not find p and q to be distinguished Call such pair of states as bad pairs If there are bad pairs, then there must be some that are distinguished by the shortest strings among all those strings that distinguish bad pair Let {p,q} be the bad pair & Let w
= a1a2an
The exactly one of ^(p,w) and ^(q,w) is accepting Observe that w cannot be since if distinguishes a pair of states, then that pair is marked by the basis part of the table filling algorithm. Thus n >=1 Consider the states r = (p, a1) and s = (q, a1) . States r and s are distinguished by the string a2a3an , since this string takes r and s to the states ^(p,w) and ^(q,w). However the string distinguishing r from s is shorter than any string that distinguishes a bad pair. Thus {r,s} cannot be bad pair. Rather the table filling algorithm must have discovered that they are distinguishable.
But the inductive part of the table filling algorithm will not stop until it has inferred that p and q are distinguishable, since it finds (p, a1)
We have contradicted our assumption that bad pairs exist. If there are bad pairs, then every pair of distinguishable states is distinguished by the table filling algorithm and the theorem is true.