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

Constructive proof to show the quotient of two regular languages is regular

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

Problem

I have a question regarding the quotient of two regular languages, $R$ and $L$.

I saw the answers to this question: are regular languages closed under division
and the proof sketch is not constructive, because $L$ can be any language.
I'm thinking about a constructive proof when $L$ is regular: how can we construct that $F2$ group in the case when $L$ is regular?

We can't go over every word $x$ in $L$ and check if $\delta(q,x)\in F1$ in the case when $L$ is infinite...

Solution

The quotient of two languages $R$ and $L$ is
$$R/L = \left\{x\in \Sigma^{*} : \exists y \in L. xy \in R\right\}$$

Here is a constructive solution using a non-deterministic finite automaton (NFA) to show $R/L$ is regular when both $R$ and $L$ are regular.

Let $(Q_1,\Sigma,\delta_1,s_1,F_1)$ and $(Q_2,\Sigma,\delta_2,s_2,F_2)$ be deterministic finite automata for $R$ and $L$ respectively. Define a NFA

$$D=(Q_1 \times \{s_2\} \times \{1\} \cup Q_1 \times Q_2\times \{2\}, \Sigma, \delta, (s_1,s_2, 1), F_1 \times F_2\times \{2\})$$
where the transitions are:

  • $\delta((q_1,s_2,1),\sigma) = \{ (\delta_1(q_1,\sigma),s_2, 1)\}$.



  • $\delta((q_1,s_2,1),\epsilon) = \{ (q_1,s_2, 2)\}$.



  • $\delta((q_1,q_2,2),\sigma) = \{ (\delta_1(q_1,\sigma),\delta_2(q_2,\sigma), 2)\}$.



I'll leave it as an exercise for you to verify the language accepted by $D$ is $R/L$.

Context

StackExchange Computer Science Q#102037, answer score: 4

Revisions (0)

No revisions yet.