HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Can product DFA for intersection of two disjoint languages be minimal?

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
candfalanguagesproducttwofordisjointintersectionminimal

Problem

I know that it isn't necessary that cross product automaton for two minimal DFAs be minimal, but according to my analysis, if two DFAs do not have any common string then their cross product of minimal DFAs would be minimal. What should I do to prove this?

Solution

No.

Counterexample:

Let alphabet $\Sigma = \left\{ 0, 1 \right\}$, languages $L_1 = \left\{ w0 \,\middle|\, w \in \Sigma^\ast \right\}$ (i.e. the last digit is $0$), $L_2 = \left\{ w1 \,\middle|\, w \in \Sigma^\ast \right\}$ (i.e. the last digit is $1$). Note that $L_1 \cap L_2 = \emptyset$.

Then the following DFAs $M_1$ and $M_2$ are minimal for $L_1$ and $L_2$ respectively:

And the cross product of $M_1$ and $M_2$ (for the intersection of languages) is:

But this is not minimal for the empty language. A minimal DFA for the language is:

In fact, cross-product DFA of $M_1$ and $M_2$ recognizes an intersection of languages $L(M_1) \cap L(M_2)$ (if a state of cross-product DFA is accepting when the original two states are both accepting on original DFAs). So in this case a generated cross-product DFA always recognizes the empty language. Since a minimal DFA for the empty language has only one state and cross-product DFA has ((#states of $M_1$) × (#states of $M_2$)) states, almost all cross-product DFAs are non-minimal.

Also, even though if you define a state of cross-product DFA is accepting when either of the original two states is accepting, the above $(L_1, L_2)$ is a counterexample. Since $L_1 \cup L_2 = \Sigma^\ast$, the minimal DFA has only one state.

Context

StackExchange Computer Science Q#101421, answer score: 3

Revisions (0)

No revisions yet.