Chapter 11
Discrete Mathematics with Applications · 176 exercises
Problem 23
Construct a NDFSA that accepts the language generated by the regular grammar \(G=(N, T, P, \sigma),\) where: $$\begin{aligned}&N=| \sigma, \mathbf{A}, \mathbf{B}\\}, T=\\{\mathbf{a}, \mathbf{b}\\}, \text { and } P=\\{\sigma \rightarrow \mathbf{a} \mathbf{A}, \mathbf{A} \rightarrow \mathbf{a} \mathbf{A}, \mathbf{A} \rightarrow \mathbf{b B}, \mathbf{B} \rightarrow\\\ &\mathrm{bB}, \mathrm{A} \rightarrow \mathrm{a}\\} \end{aligned}$$
3 step solution
Problem 23
Use the grammar \(G=(N, T, P, \sigma),\) where \(N=\\{A, \sigma\\}, T=\\{\mathrm{a}, \mathrm{b}\\},\) and \(P=\\{\sigma \rightarrow \mathbf{a} \sigma, \sigma \rightarrow \mathbf{a} \mathbf{A}, \mathbf{A} \rightarrow \mathbf{b}\\}.\) Identify the language \(L(G)\)
3 step solution
Problem 24
Construct a NDFSA that accepts the language generated by the regular grammar \(G=(N, T, P, \sigma),\) where: $$\begin{aligned}&N=\\{\sigma, \mathrm{A}, \mathrm{B}\\}, T=\\{\mathrm{a}, \mathrm{b}\\}, \text { and } P=\\{\sigma \rightarrow \mathrm{a} \mathrm{A}, \sigma \rightarrow \mathrm{b} \mathrm{A}, \mathrm{A} \rightarrow \mathrm{aB}, \sigma \rightarrow\\\ &\mathbf{b}, \mathbf{B} \rightarrow \mathbf{b}\\} \end{aligned}$$
4 step solution
Problem 24
Consider the grammar \(G=(N, T, P, \sigma),\) where \(N=\\{\sigma\\}, T=\\{\mathrm{a}, \mathrm{b}\\},\) and \(P=\\{\sigma \rightarrow \mathbf{a} \sigma \mathbf{b}, \sigma \rightarrow \mathbf{a b}\\} .\) Determine if each word belongs to \(L(G).\) abba
3 step solution
Problem 25
Construct a NDFSA that accepts the language generated by the regular grammar \(G=(N, T, P, \sigma),\) where: \(N=\\{\sigma, \mathrm{A}, \mathrm{B}, \mathrm{C}, \mathrm{D}\\}, T=\\{\mathrm{a}, \mathrm{b}\\},\) and \(P=\\{\sigma \rightarrow \mathrm{b} \sigma, \sigma \rightarrow \mathrm{a} \mathrm{A}, \mathrm{A} \rightarrow \mathrm{a} \mathrm{A}\) \(\mathrm{A} \rightarrow \mathrm{bB}, \mathrm{B} \rightarrow \mathrm{aA}, \mathrm{B} \rightarrow \mathrm{bC}, \mathrm{C} \rightarrow \mathrm{aD}, \mathrm{C} \rightarrow \mathrm{b} \sigma, \mathrm{D} \rightarrow \mathrm{aD}, \mathrm{D} \rightarrow \mathrm{bD}, \mathrm{C} \rightarrow\) af
3 step solution
Problem 25
Consider the grammar \(G=(N, T, P, \sigma),\) where \(N=\\{\sigma\\}, T=\\{a, b\\},\) and \(P=\\{\sigma \rightarrow a \sigma b, \sigma \rightarrow a b\\} .\) Determine if each word belongs to \(L(G)\) . $$\mathrm{abab}$$
2 step solution
Problem 25
Characterize the language recognized by the FSAs.
5 step solution
Problem 25
Arrange the binary words of each length in increasing order.Length two. Length two.
3 step solution
Problem 25
Consider the grammar \(G=(N, T, P, \sigma),\) where \(N=\\{\sigma\\}, T=\\{\mathrm{a}, \mathrm{b}\\},\) and \(P=\\{\sigma \rightarrow \mathbf{a} \sigma \mathbf{b}, \sigma \rightarrow \mathbf{a b}\\} .\) Determine if each word belongs to \(L(G).\) abab
3 step solution
Problem 26
Construct a NDFSA that accepts the language generated by the regular grammar \(G=(N, T, P, \sigma),\) where: $$\begin{aligned} &N=\\{\sigma, \mathrm{A}, \mathrm{B}, \mathrm{C}\\}, T=\\{\mathrm{a}, \mathrm{b}\\}, \text { and } P=\\{\sigma \rightarrow \mathrm{b} \sigma, \sigma \rightarrow \mathrm{a} \mathrm{A}, \mathrm{A} \rightarrow \mathrm{a} \mathrm{A}\\\ &\mathrm{A} \rightarrow \mathrm{bB}, \mathrm{B} \rightarrow \mathrm{aA}, \mathrm{B} \rightarrow \mathrm{bC}, \mathrm{C} \rightarrow \mathrm{aA}, \mathrm{C} \rightarrow \mathrm{b} \sigma, \mathrm{B} \rightarrow \mathrm{b}\\} \end{aligned}$$
4 step solution
Problem 26
Consider the grammar \(G=(N, T, P, \sigma),\) where \(N=\\{\sigma\\}, T=\\{a, b\\},\) and \(P=\\{\sigma \rightarrow a \sigma b, \sigma \rightarrow a b\\} .\) Determine if each word belongs to \(L(G)\) . $$\mathrm{a}^{2} \mathrm{b}^{2}$$
6 step solution
Problem 26
Consider the grammar \(G=(N, T, P, \sigma),\) where \(N=\\{\sigma\\}, T=\\{\mathrm{a}, \mathrm{b}\\},\) and \(P=\\{\sigma \rightarrow \mathbf{a} \sigma \mathbf{b}, \sigma \rightarrow \mathbf{a b}\\} .\) Determine if each word belongs to \(L(G).\) $$a^{2} b^{2}$$
4 step solution
Problem 27
A ternary word is a word over the alphabet \(\\{0,1,2\\} .\) Arrange the ternary words of each length in increasing order. Length one
2 step solution
Problem 27
Consider the grammar \(G=(N, T, P, \sigma),\) where \(N=\\{\sigma\\}, T=\\{a, b\\},\) and \(P=\\{\sigma \rightarrow a \sigma b, \sigma \rightarrow a b\\} .\) Determine if each word belongs to \(L(G)\) . $$\mathrm{a}^{3} \mathrm{b}^{3}$$
3 step solution
Problem 27
Consider the grammar \(G=(N, T, P, \sigma),\) where \(N=\\{\sigma\\}, T=\\{\mathrm{a}, \mathrm{b}\\},\) and \(P=\\{\sigma \rightarrow \mathbf{a} \sigma \mathbf{b}, \sigma \rightarrow \mathbf{a b}\\} .\) Determine if each word belongs to \(L(G).\) $$a^{3} b^{3}$$
2 step solution
Problem 28
A ternary word is a word over the alphabet \(\\{0,1,2\\} .\) Arrange the ternary words of each length in increasing order. Length two
3 step solution
Problem 28
Create a NDFSA that accepts the regular language over \(\\{a, b\\}\) of strings that: Contain at least one \(a\)
5 step solution
Problem 28
Consider the grammar \(G=(N, T, P, \sigma),\) where \(N=\\{\sigma\\}, T=\\{\mathrm{a}, \mathrm{b}\\},\) and \(P=\\{\sigma \rightarrow \mathbf{a} \sigma \mathbf{b}, \sigma \rightarrow \mathbf{a b}\\} .\) Determine if each word belongs to \(L(G).\) Identify the language \(L(G)\)
3 step solution
Problem 29
Find the language generated by each grammar \(G=(N, T, P, \sigma)\) where:$$N=\\{\sigma, \mathrm{A}, \mathrm{B}\\}, T=\\{\mathrm{a}, \mathrm{b}\\}, P=\\{\sigma \rightarrow \mathrm{a} \mathrm{A}, \mathrm{A} \rightarrow \mathrm{Bb}, \mathrm{A} \rightarrow \mathrm{a}, \mathrm{B} \rightarrow \mathrm{b}\\}$$
5 step solution
Problem 29
Let \(\Sigma\) be a nonempty alphabet. Prove that \(\Sigma^{*}\) is infinite. (Hint: Assume \(\Sigma^{*}\) is finite. since \(\Sigma \neq \emptyset,\) it contains an element \(a .\) Let \(x \in \Sigma^{*}\) with largest length. Now consider \(x a .\) )
5 step solution
Problem 29
Create a NDFSA that accepts the regular language over \(\\{a, b\\}\) of strings that: Begin with aa.
5 step solution
Problem 30
Create a NDFSA that accepts the regular language over \(\\{a, b\\}\) of strings that: End with \(b b\)
3 step solution
Problem 30
Find the language generated by each grammar \(G=(N, T, P, \sigma)\) where: $$\begin{array}{l} N=\\{\sigma, \mathrm{A}, \mathrm{B}\\}, T=\\{\mathrm{a}, \mathrm{b}\\}, P=\\{\sigma \rightarrow \mathrm{a} \mathrm{Aa}, \mathrm{A} \rightarrow \mathrm{bBb}, \sigma \rightarrow \lambda, \mathrm{A} \rightarrow \mathrm{a}, \\ \mathrm{B} \rightarrow \mathrm{a}, \mathrm{B} \rightarrow \mathrm{b}\\} \end{array}$$
4 step solution
Problem 31
Create a NDFSA that accepts the regular language over \(\\{a, b\\}\) of strings that: Contain \(a b a\) as a substring.
3 step solution
Problem 31
Develop a grammar that generates each language over {0,1}. $$\\{1,11,1111,11111111, \ldots\\}$$
4 step solution
Problem 32
Create a NDFSA that accepts the regular language over \(\\{a, b\\}\) of strings that: Contain \(a^{3}\) as a substring.
4 step solution
Problem 32
Let \(A=\\{a, b c\\}\) and \(B=\\{\lambda, a b, b c\\} .\) Find each concatenation. \(A^{2}\)
4 step solution
Problem 32
Develop a grammar that generates each language over {0,1}. $$\\{0,00,10,100,110,0000,1010, \ldots\\}$$
4 step solution
Problem 33
Create a NDFSA that accepts the regular language over \(\\{a, b\\}\) of strings that: Begin with \(a a\) or \(b b\)
3 step solution
Problem 33
Develop a grammar that generates each language over {0,1}. The set of words with prefix 00.
3 step solution
Problem 34
Create a NDFSA that accepts the regular language over \(\\{a, b\\}\) of strings that: Contain \(b a^{2} b\) as a substring.
4 step solution
Problem 34
Develop a grammar that generates each language over {0,1}. The set of words with suffix \(11 .\)
3 step solution
Problem 35
Create a NDFSA that accepts the regular language over \(\\{\mathrm{a}, \mathrm{b}\\}\) of strings that: Begin with \(a a\) , but not end in \(b b.\)
4 step solution
Problem 36
Create a NDFSA that accepts the regular language over \(\\{\mathrm{a}, \mathrm{b}\\}\) of strings that: Begin with \(a a\) and end in \(b b.\)
6 step solution
Problem 36
Create a grammar to produce each language over \(\\{\mathrm{a}, \mathrm{b}\\}\). $$\left\\{b^{n} a b^{n} | n \geq 0\right\\}$$
4 step solution
Problem 36
Let \(m\) denote the number of \(a\) 's in a string. Design an FSA that accepts strings over \(\\{a, b\\}\) which: Contain exactly one \(a.\)
3 step solution
Problem 36
Let \(A=\\{a, b c\\}\) and \(B=\\{\lambda, a b, b c\\} .\) Find each concatenation. \(A(B \cup C)=A B \cup A C\)
3 step solution
Problem 36
Create a grammar to produce each language over \(\\{a, b\\}\). $$\left\\{b^{n} a b^{n} | n \geq 0\right\\}$$
5 step solution
Problem 37
Create a grammar to produce each language over \(\\{\mathrm{a}, \mathrm{b}\\}\). $$\left\\{a^{n} b | n \geq 1\right\\}$$
4 step solution
Problem 37
Let \(m\) denote the number of \(a^{\prime} s\) in a string. Design an FSA that accepts strings over \(\\{a, b\\}\) which: Begin with \(a a\)
3 step solution
Problem 37
Let \(m\) denote the number of \(a\) 's in a string. Design an FSA that accepts strings over \(\\{a, b\\}\) which: Begin with \(a a.\)
5 step solution
Problem 37
Create a grammar to produce each language over \(\\{a, b\\}\). $$\left\\{\mathbf{a}^{n} \mathbf{b} | n \geq 1\right\\}$$
2 step solution
Problem 38
Create a grammar to produce each language over \(\\{\mathrm{a}, \mathrm{b}\\}\). $$\left\\{\mathbf{a}^{n} \text { bal } n \geq 1\right\\}$$
5 step solution
Problem 38
VCreate a grammar to produce each language over \(\\{a, b\\}\). $$\left\\{\mathrm{a}^{n} \mathrm{ba} | n \geq 1\right\\}$$
3 step solution
Problem 39
Create a grammar to produce each language over \(\\{\mathrm{a}, \mathrm{b}\\}\). $$\left\\{\mathbf{a}^{m} \mathbf{b}^{n} | m, n \geq 1\right\\}$$
5 step solution
Problem 39
Let \(m\) denote the number of \(a^{\prime} s\) in a string. Design an FSA that accepts strings over \(\\{a, b\\}\) which: Contain aaa as a substring.
3 step solution
Problem 39
Let \(m\) denote the number of \(a\) 's in a string. Design an FSA that accepts strings over \(\\{a, b\\}\) which: Contain aaa as a substring.
4 step solution
Problem 39
Create a grammar to produce each language over \(\\{a, b\\}\). $$\left\\{\mathbf{a}^{m} \mathbf{b}^{n} | m, n \geq 1\right\\}$$
3 step solution
Problem 40
Design an FSM accepting strings over \(\\{\mathrm{a}, \mathrm{b}\\}\) that: Contain \(a a\) as a sub string.
3 step solution
Problem 40
Create a grammar to produce each language over \(\\{\mathrm{a}, \mathrm{b}\\}\). The set of palindromes.
3 step solution