Question

In: Computer Science

1. Design a FA for the language L = {w : na(w) ≤ 4}. 2. Design...

1. Design a FA for the language L = {w : na(w) ≤ 4}.

2. Design a FA that accepts all strings that contain the substring aba.

3. Design a FA for the language L = {ai baj : i, j ≥ 0, i + j is odd}

4. Design a FA for the language L = {bnam : n ≤ 2, m ≥ 3}

Solutions

Expert Solution

Question 1:

taking alphabet over {a,b}

finite automata is

Question 2:

contains substring "aba"

Question : 3

a^i ba^j where i+j=odd

that means if i is even j is odd

or else j is even i is odd

Simulation:

Question 4:

b^n a^m n<=2 and m>=3

that means no of b is not greater than 2

and no of a is not less than 3

simulation:

Any queries comment please


Related Solutions

For a given language L = { w | na(w) + nb(w) = nc(w) } where...
For a given language L = { w | na(w) + nb(w) = nc(w) } where S = G = {a, b, c} Looking for answer to 3 Construct a PDA M that accepts L with S = G = {a, b, c} Show the sequence of instantaneous descriptions for the acceptance of acacbcbc by M in 1). Give a CFG G that generates L, L(G) = L.
Let L ⊆ Σ ∗ and define S(L), the suffix-language of L, as S(L) = {w...
Let L ⊆ Σ ∗ and define S(L), the suffix-language of L, as S(L) = {w ∈ Σ ∗ | x = yw for some x ∈ L, y ∈ Σ ∗ } Show that if L is regular, then S(L) is also regular.
Draw an NFA for the following language then convert to a DFA: L = {w :...
Draw an NFA for the following language then convert to a DFA: L = {w : |w| is odd or |w| is a multiple of 4} where Σ = {0, 1}
L W TP MP MC 1 20 10 2 60 40 3 80 4 190 4...
L W TP MP MC 1 20 10 2 60 40 3 80 4 190 4 5 220 What is the wage that this firm must pay for the third worker? _________ What is the wage that this firm must pay for the fifth worker? _________ The TP associated with the first worker is ____________. The TP of three workers is __________. The MC associated with an output of 140 is _______. Diminishing returns sets in with the addition of...
Given the language L={w| the number of a’s is greater than or equal to the number...
Given the language L={w| the number of a’s is greater than or equal to the number of b’s in w} a) Using the Pumping Lemma to prove L is not a regular language. b) Using closure property to prove L is not a regular language.
1. Determine ΔGo for the following reaction: 2 Na(s) + 2 H2O(l) --> H2(g) + 2...
1. Determine ΔGo for the following reaction: 2 Na(s) + 2 H2O(l) --> H2(g) + 2 OH-(aq) + 2 Na+(aq) 2. Calculate K for the oxidation of iron by H+: 2 Fe(s) + 6 H+(aq) --> 2 Fe3+(aq) + 3 H2(g)
6. Suppose the production function is given by Q=1/20*L^1/2*K^1/4;price of labor(w) = 0.50 and price of...
6. Suppose the production function is given by Q=1/20*L^1/2*K^1/4;price of labor(w) = 0.50 and price of capital (r) = 4: The market price for the output produced is P= 560: (a) Short-run production: ii. Write down this firm's LONG-RUN cost minimization problem. [Note: In long-run, nothing is fixed, so the firm can choose both labor and capital optimally to minimize its cost.] iii. Solving the long-run cost minimization problem, we get the long-run cost function C(Q) = (12)*(5Q)^4/3: Find out...
q = K^1/2 L^1/2 p=$20, v=$8, w=$4 a) suppose k= 16, find short-run total and marginal...
q = K^1/2 L^1/2 p=$20, v=$8, w=$4 a) suppose k= 16, find short-run total and marginal costs, and also firm supply function. Find the price that the firm shuts down its production. b) find firm profit maximization demand function and short-run supply function
3. the production function is f(L, M)=4*(L^1/2) (M^1/2), where L is the number of units of...
3. the production function is f(L, M)=4*(L^1/2) (M^1/2), where L is the number of units of labor and M is the number of machines used. If the cost of labor is $49 per unit and the cost of machines is $25 per unit, then how much will be the total cost of producing 7 units of output ?
1.True or False: a)If a language L is recognized by a 2^n-state DFA, then it must...
1.True or False: a)If a language L is recognized by a 2^n-state DFA, then it must be recognized by some NFA with no more than n states. b)For every three regular expressions R, S, and T, the languages denoted by R(S∪T) and (RS)∪(RT) are the same. Please explain.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT