Encodings and homomorphisms of languages

[23/100%]
Show
LaTeX

Let the homomorphism C:{a,b,c}∗→{0,1}∗C:\left\{ a, b, c\right\}^{*} \rightarrow \left\{ 0,1\right\}^{*} be defined by the equalities C(a)=10,C(b)=01,C(c)=εC(a)=10, C(b)=01, C(c)=\varepsilon.

Construct a deterministic finite automaton that recognizes the language C−1(L)C^{-1}(L) for the language L={w:w ends in 01 and contains an even number of ones }L=\left\{ w: w\text{ ends in 01 and contains an even number of ones }\right\}.

?

A coding scheme from the alphabet Σ={a,b,c}\Sigma =\left\{ a, b, c\right\} into the alphabet Ω={0,1,2}\Omega =\left\{ 0,1,2\right\} is given by: C={(aa,0),(abc,11),(ba,21),(c,ε),(bb,2),(ab,22),(b,1)}C=\left\{ (a a, 0),(a b c, 11),(b a, 21),(c, \varepsilon ),(b b, 2), (a b, 22),(b, 1)\right\}. Find the sets of codes for the following words:

?
(a)

abaabac;

(b)

bacbbaccab;

(c)

aabcabccaab;

(d)

abcbbaabc.

A coding scheme from the alphabet {0}\left\{ 0\right\} into the alphabet {a,b}\left\{ a, b\right\} is given by: C={(0,a),(00,b)}C=\left\{ (0, a),(00, b)\right\}. Prove that the word 0n0^{n} can be encoded in Fn+1F_{n+1} ways, where FiF_{i} is the corresponding Fibonacci number.

?

Let the language LL over the alphabet {a,b}\left\{ a, b\right\} consist of all words that begin with aaa a and contain a number of symbols aa that is a multiple of three. The homomorphism h:{0,1,2}∗→{a,b}∗h:\left\{ 0,1,2\right\}^{*} \rightarrow \left\{ a, b\right\}^{*} is given by the equalities h(0)=aaah(0)=a a a, h(1)=ba,h(2)=εh(1)=b a, h(2)=\varepsilon. Determine which of the following three words belong to the preimage h−1(L)h^{-1}(L) of the language LL under the homomorphism hh:

?
(a)

w1=21112w_{1}=21112;

(b)

w2=20101012w_{2}=20101012;

(c)

w3=00211011w_{3}=00211011.

Let the language LL over the alphabet {a,b,c}\left\{ a, b, c\right\} consist of all words that begin with aaa a and contain the substring bbb b. Which of the following phrases defines the language h(L)h(L), the image of LL under the following homomorphism h:{a,b,c}∗→{0,1}∗:h(a)=01,h(b)=11,h(c)=εh:\left\{ a, b, c\right\}^{*} \rightarrow \left\{ 0,1\right\}^{*}: h(a)=01, h(b)=11, h(c)=\varepsilon?

?
(a)

All words over the alphabet {0,1}\left\{ 0,1\right\} beginning with 0101, with length divisible by 4.

(b)

All words of even length over the alphabet {0,1}\left\{ 0,1\right\} beginning with 0101.

(c)

All words of even length over the alphabet {0,1}\left\{ 0,1\right\} beginning with 0101, in which every second symbol is a one and which contain the substring 1111.

(d)

All words over the alphabet {0,1}\left\{ 0,1\right\} beginning with 0101, in which the symbols at even positions are ones and which contain the substring 1111.

Let the language LL over the alphabet {a,b,c}\left\{ a, b, c\right\} consist of all words that end with bccb c c and contain the substring acaa c a. Which of the following phrases defines the language h(L)h(L), the image of LL under the following homomorphism h:{a,b,c}∗→{0,1}∗:h(a)=0,h(b)=10,h(c)=εh:\left\{ a, b, c\right\}^{*} \rightarrow \left\{ 0,1\right\}^{*}: h(a)=0, h(b)=10, h(c)=\varepsilon?

?
(a)

All words over the alphabet {0,1}\left\{ 0,1\right\} ending with 10, with length 12 or more.

(b)

All words of even length over the alphabet {0,1}\left\{ 0,1\right\} containing the substring 0000.

(c)

All words of even length over the alphabet {0,1}\left\{ 0,1\right\} ending with 10, in which every second symbol is a zero.

(d)

All words over the alphabet {0,1}\left\{ 0,1\right\} ending with 10, in which every second symbol is a zero and which contain the substring 0000.

(e)

All words of even length over the alphabet {0,1}\left\{ 0,1\right\} ending with 10, in which every sixth symbol is a zero and which contain the substring 0000.

A coding scheme from the alphabet Σ={0,1}\Sigma =\left\{ 0,1\right\} into the alphabet Ω={a,b}\Omega =\left\{ a, b\right\} is given by: C={(00,aa),(01,b),(1,a)}C=\left\{ (00, a a),(01, b),(1, a)\right\}. Find the results of encoding the following languages, represented by regular expressions:

?
(a)

(0+1)∗(0+1)^{*};

(b)

(01+10)∗(01+10)^{*};

(c)

(000+11)∗(000+11)^{*};

(d)

(101∗+00)∗\left(101^{*}+00\right)^{*}.

A coding scheme from the alphabet Σ={0,1}\Sigma =\left\{ 0,1\right\} into the alphabet Ω={a,b}\Omega =\left\{ a, b\right\} is given by: C={(000,ab),(10,a),(11,bb)}C=\left\{ (000, a b),(10, a),(11, b b)\right\}. Find the results of encoding the following languages, represented by regular expressions:

?
(a)

(0+1)∗(0+1)^{*};

(b)

(10+0)∗(ε+1)(10+0)^{*}(\varepsilon +1);

(c)

(00+11)∗(00+11)^{*};

(d)

(001+01+110)∗(001+01+110)^{*}.

Let a deterministic finite automaton M=({q0,q1,q2,q3},{a,b,c},P,0,{2})\mathfrak {M}=(\left\{ q_{0}, q_{1}, q_{2}, q_{3}\right\} , \left\{ a, b, c\right\} , P, 0, \left\{ 2\right\} ) be given, with program P={q0,a→q1;q0,b→q1;q0,c→q0;q1,a→q1;q1,b→q2;q1,c→q2;q2,a→q3;q2,b→q3;q2,c→q2;q3,a→q3;q3,b→q3;q3,c→q3}P=\left\{ q_{0}, a \rightarrow q_{1} ; q_{0}, b \rightarrow q_{1} ; q_{0}, c \rightarrow q_{0} ; q_{1}, a \rightarrow q_{1} ; q_{1}, b \rightarrow q_{2} ; q_{1}, c \rightarrow q_{2} ; q_{2}, a \rightarrow q_{3} ; q_{2}, b \rightarrow q_{3} ; q_{2}, c \rightarrow q_{2} ; q_{3}, a \rightarrow q_{3} ; q_{3}, b \rightarrow q_{3} ; q_{3}, c \rightarrow q_{3}\right\}, together with a homomorphism h:{a,b,c}∗→{0,1}∗h:\left\{ a, b, c\right\}^{*} \rightarrow \left\{ 0,1\right\}^{*}, for which h(a)=01,h(b)=11h(a)=01, h(b)=11, h(c)=εh(c)=\varepsilon. Which of the following three automata M1,M2,M3\mathfrak {M}_{1}, \mathfrak {M}_{2}, \mathfrak {M}_{3} recognize the homomorphic image h(LA)h\left(L_{A}\right)?

?
(a)

M1=({qi:i=0,…,11},{0,1},P1,q0,F1={q1,q2})\mathfrak {M}_{1}=\left(\left\{ q_{i}: i=0, \ldots , 11\right\} ,\left\{ 0,1\right\} , P_{1}, q_{0}, F_{1}=\left\{ q_{1}, q_{2}\right\} \right);

(b)

M2=({q0,q1,q2,q3,q4,q5,q6},{0,1},P2,q0,F2={q1,q2})\mathfrak {M}_{2}=\left(\left\{ q_{0}, q_{1}, q_{2}, q_{3}, q_{4}, q_{5}, q_{6}\right\} ,\left\{ 0,1\right\} , P_{2}, q_{0}, F_{2}=\left\{ q_{1}, q_{2}\right\} \right);

(c)

M3=({q0,q1,q2,q3,q4,q5,q6},{0,1},P3,q0,F3={q0,q1,q2})\mathfrak {M}_{3}=\left(\left\{ q_{0}, q_{1}, q_{2}, q_{3}, q_{4}, q_{5}, q_{6}\right\} ,\left\{ 0,1\right\} , P_{3}, q_{0}, F_{3}=\left\{ q_{0}, q_{1}, q_{2}\right\} \right).

The programs of the automata are given by the tables in Fig. 32 (a dash means the absence of the corresponding transition).

Given a deterministic finite automaton (Fig. 33) recognizing some language LL. Construct a nondeterministic finite automaton recognizing the language C(L)C(L) for the coding schemes CC from Problems

?
(a)

484

(b)

485

Fig. 33: Automaton from Problem 487.Fig. 33: Automaton from Problem 487.

Let the homomorphism C:{0,1,2}∗→{a,b}∗C:\left\{ 0,1,2\right\}^{*} \rightarrow \left\{ a, b\right\}^{*} be defined by the equalities C(0)=ab,C(1)=b,C(2)=aaC(0)=a b, C(1)=b, C(2)=a a.

Construct a deterministic finite automaton that recognizes the image C(L)C(L) of the language

L={w:w does not begin with 1 and does not contain 00}. L=\left\{ w: w \text{ does not begin with } 1 \text{ and does not contain } 00\right\} .
?

Let the homomorphism C:{0,1}∗→{a,b,c}∗C:\left\{ 0,1\right\}^{*} \rightarrow \left\{ a, b, c\right\}^{*} be defined by the equalities C(0)=aa,C(1)=bcC(0)=a a, C(1)=b c.

Construct a deterministic finite automaton that recognizes the image C(L)C(L) of the language

L={w:w begins with 0 and contains 11}. L=\left\{ w: w \text{ begins with } 0 \text{ and contains } 11\right\} .
?

Let the homomorphism C:{0,1,2}∗→{a,b,c}∗C:\left\{ 0,1,2\right\}^{*} \rightarrow \left\{ a, b, c\right\}^{*} be defined by the equalities C(0)=ba,C(1)=ε,C(2)=bcC(0)=b a, C(1)=\varepsilon , C(2)=b c.

Construct a deterministic finite automaton that recognizes the language C(L)C(L) for the language L={w: the digits 2 occur in w in blocks of even length, and at least one such block is present}L=\left\{ w:\text{ the digits 2 occur in }w\text{ in blocks of even length, and at least one such block is present}\right\}

?

Let the homomorphism C:{a,b,c}∗→{0,1}∗C:\left\{ a, b, c\right\}^{*} \rightarrow \left\{ 0,1\right\}^{*} be defined by the equalities C(a)=10,C(b)=01,C(c)=εC(a)=10, C(b)=01, C(c)=\varepsilon.

Construct a deterministic finite automaton that recognizes the language C−1(L)C^{-1}(L) for the language

L=\left\{ w: w \text{ ends in } 01

and contains an even number of ones.

?

Let the homomorphism C:{a,b,c}∗→{0,1}∗C:\left\{ a, b, c\right\}^{*} \rightarrow \left\{ 0,1\right\}^{*} be defined by the equalities C(a)=01,C(b)=11,C(c)=εC(a)=01, C(b)=11, C(c)=\varepsilon.

Construct a deterministic finite automaton that recognizes the preimage C−1(L)C^{-1}(L) of the language

L={w:w begins with 11 and does not contain 010}. L=\left\{ w: w \text{ begins with } 11 \text{ and does not contain } 010\right\} .
?

Let the homomorphism C:{a,b,c}∗→{0,1}∗C:\left\{ a, b, c\right\}^{*} \rightarrow \left\{ 0,1\right\}^{*} be defined by the equalities C(a)=00,C(b)=011,C(c)=01C(a)=00, C(b)=011, C(c)=01.

Construct a deterministic finite automaton that recognizes the language C−1(L)C^{-1}(L) for the language

L={w:w contains the substring 001 or the substring 10}. L=\left\{ w: w \text{ contains the substring } 001 \text{ or the substring } 10\right\} .
?

Prove that any encoding operation CC for a language can be represented as a superposition of the preimage of a homomorphism ψ\psi and a homomorphism φ:C(L)=φ(ψ−1(L))\varphi : C(L)=\varphi \left(\psi^{-1}(L)\right) for some ψ\psi and φ\varphi.

?

Let us define the cylindrification operation, which is inverse to the projection operation. Let CC be the projection of the alphabet Σ\Sigma onto the alphabet Ω⊆Σ\Omega \subseteq \Sigma. For any language L⊆Ω∗L \subseteq \Omega^{*} define its cylindrification to the alphabet Σ\Sigma as the language

ZΣ(L)={w∈Σ∗:C(w)∈L}. Z_{\Sigma }(L)=\left\{ w \in \Sigma ^{*}: C(w) \in L\right\} .

Show that for an automatic language LL the language ZΣ(L)Z_{\Sigma }(L) is also an automatic language. Propose a procedure for rebuilding an automaton recognizing LL into an automaton recognizing ZΣ(L)Z_{\Sigma }(L).

?

Show that if the homomorphism C:Σ∗→Ω∗C: \Sigma^{*} \rightarrow \Omega^{*} is prefix-free, then the result of the inverse encoding C−1C^{-1} can be computed by a finite transducer. We assume C−1(w)C^{-1}(w) may be anything if w∉rng⁡Cw \notin \operatorname {rng} C.

?

Let CC be a coding scheme from the alphabet Σ\Sigma into itself, and let LL be an automatic language over the alphabet Σ\Sigma. Prove that the language C∗(L)C^{*}(L) is also automatic:

C∗(L)=⋃{C[x]:x∈L,C[x]≠∅}∪{x:x∈L,C[x]=∅}. C^{*}(L)=\bigcup \left\{ C[x]: x \in L, C[x] \neq \varnothing \right\} \cup \left\{ x: x \in L, C[x]=\varnothing \right\} .

Thus C∗(L)C^{*}(L) contains the codes of words from LL that can be encoded, together with all words from LL that cannot be encoded.

?

Let CC be a coding scheme from the alphabet Σ\Sigma into itself. Give an example showing that the following language may fail to be automatic:

L={x∈Σ∗:x∈C[x]} L=\left\{ x \in \Sigma ^{*}: x \in C[x]\right\}

that is, LL is the set of words that, under encoding, can map to themselves. ⊛\circledast

?

Let C:Σ∗→Ω∗C: \Sigma^{*} \rightarrow \Omega^{*} be a language homomorphism. Prove that checking the correctness of φ\varphi by means of a finite automaton (by analogy with Problems 523 and 524 on the preceding page) is possible if and only if one of the following two cases holds:

?
(a)

∣C(a)∣=1\left|C(a)\right|=1 for all a∈Σa \in \Sigma;

(b)

∣C(a)∣=0\left|C(a)\right|=0 for all a∈Σa \in \Sigma.

When checking the condition C(u)=vC(u)=v, we assume that the shorter word is padded on the right with the special symbol Λ\Lambda. For example, to check C(ab)=aacbC(a b)=a a c b, the automaton is fed the word ⊛\circledast

⟦aa⟧⟦ba⟧⟦Λc⟧⟦Λb⟧ \llbracket \begin{array}{c} a \\ a \end{array} \rrbracket \llbracket \begin{array}{c} b \\ a \end{array} \rrbracket \llbracket \begin{array}{c} \Lambda \\ c \end{array} \rrbracket \llbracket \begin{array}{c} \Lambda \\ b \end{array} \rrbracket

Find an unambiguous homomorphism C:Σ∗→Ω∗C: \Sigma^{*} \rightarrow \Omega^{*} that is computed by some finite transducer, but for which the inverse encoding C−1C^{-1} cannot be performed by any finite transducer. We assume C−1(w)C^{-1}(w) may be anything if w∉rng⁡Cw \notin \operatorname {rng} C. ⊛\circledast

?

References

[ДДК+21a] Дехтярь М.И., Дудаков С.М., Карлов М.И., Карлов Б.Н. Лекции по дискретной математике. 3-е изд., Тверской государственный университет, 2021.
[ДДК+21b] Дехтярь М.И., Дудаков С.М., Карлов Б.Н., Карлов М.И. Задачник по дискретной математике. 2-е изд., Тверской государственный университет, 2021.