Question

In: Advanced Math

L= {x^a y^b z^c | c=a+b(mod 2)} .Create a DFA and NFA for the language L....

L= {x^a y^b z^c | c=a+b(mod 2)} .Create a DFA and NFA for the language L. Solution and explanation please..

Solutions

Expert Solution

Any DFA that accepts the given language must satisfy the following:

If a string is not of the form then it must be rejected;

If then must be rejected.

We define a DFA keeping these in view. The DFA is where

with denoting (respectively) the start state and the set of final states. The transition function is as follows:

Explanation: To understand the DFA just defined, note that the states denoted by pairs, for example , indicates that the machine has by now seen no , it has seen a string of the form , and that . So the second counter basically keeps track of , and the machine keeps being in one of these states as long as the string it has already seen is of the form . And as soon as the machine sees a string that is not of this form, it moves to the "reject" state .

Proof of the fact that the machine accepts .

As explained above, when the machine sees a string that is not of the form , it moves to reject state . If a machine sees a string then it ends up being in or according as , respectively. Thus, the machine ends in the unique final state if and only if . But if and only if . Since , this is equivalent to .

Hence, the machine accepts a string if and only if it is of the form with . Therefore, the DFA we constructed, , accepts .

Since DFA is NFA, we have constructed an NFA also, namely, itself.


Related Solutions

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}
Let x, y ∈ Z. Prove that x ≡ y + 1 (mod 2) if and...
Let x, y ∈ Z. Prove that x ≡ y + 1 (mod 2) if and only if x ≡ y + 1 (mod 4) or x ≡ y + 3 (mod 4)
Create separate class with these members a, b, c, x, y, z int a b c...
Create separate class with these members a, b, c, x, y, z int a b c float x y z Demonstrate 3) A two arg float, int constructor, and a three arg int, float, float constructor to instantiate objects, initialize variables read from the keyboard, display the sum Note:- Please type and execute this above java program and also give the output for both problems. (Type a java program)
Mystery(y, z: positive integer) 1 x=0 2 while z > 0 3       if z mod 2...
Mystery(y, z: positive integer) 1 x=0 2 while z > 0 3       if z mod 2 ==1 then 4                x = x + y 5       y = 2y 6       z = floor(z/2)           //floor is the rounding down operation 7 return x Simulate this algorithm for y=4 and z=7 and answer the following questions: (3 points) At the end of the first execution of the while loop, x=_____, y=______ and z=_______. (3 points) At the end of the second execution of...
Find all x ∈ Z such that x≡2 mod 221 and x≡5 mod 184.
Find all x ∈ Z such that x≡2 mod 221 and x≡5 mod 184.
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.
Given function f(x,y,z)=x^(2)+2*y^(2)+z^(2), subject to two constraints x+y+z=6 and x-2*y+z=0. find the extreme value of f(x,y,z)...
Given function f(x,y,z)=x^(2)+2*y^(2)+z^(2), subject to two constraints x+y+z=6 and x-2*y+z=0. find the extreme value of f(x,y,z) and determine whether it is maximum of minimum.
*(1)(a) Find a formula for the intersection of a cone {(x,y,z): x^2+y^2=z^2} with a plane {(x,y,z):...
*(1)(a) Find a formula for the intersection of a cone {(x,y,z): x^2+y^2=z^2} with a plane {(x,y,z): z=c}. (b) Find a formula for the intersection of a cone {(x,y,z): x^2+y^2=z^2} with a plane {(x,y,z): x=a}. (c) Find a formula for the intersection of a cone {(x,y,z): x^2+y^2=z^2} with a plane {(x,y,z): y=b}. *(2) Find a formula for the intersection of a cone {(x,y,z): x^2+y^2=z^2} with a plane {(x,y,z): z=kx+b} assuming both b and k are positive. (a) For what value of...
What are (a) the x component, (b) the y component, and (c) the z component of...
What are (a) the x component, (b) the y component, and (c) the z component of r Overscript right-arrow EndScripts equals a Overscript right-arrow EndScripts minus b Overscript right-arrow EndScripts plus c Overscript right-arrow EndScripts if a Overscript right-arrow EndScripts equals 5.4 i Overscript ̂ EndScripts plus 1.9 j Overscript ̂ EndScripts minus 3.6 k Overscript ̂ EndScripts , b Overscript right-arrow EndScripts equals negative 4.1 i Overscript ̂ EndScripts plus 5.4 j Overscript ̂ EndScripts plus 3.7 k Overscript...
Consider the parabolas y=x^2 and y=a(x-b)^2+c, where a,b,c are all real numbers (a) Derive an equation...
Consider the parabolas y=x^2 and y=a(x-b)^2+c, where a,b,c are all real numbers (a) Derive an equation for a line tangent to both of these parabolas (show all steps with a proof, assuming that such a line exists) (b) Assume that the doubly-tangent line has an equation y+Ax+B. Find an example of values of a,b,c (other than the ones given here) such that A,B ∈ Z
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT