- #1
opt!kal
- 19
- 0
Hi there, I've been working on DFA's and NFA's in class, and for the most part I get it, but I want to make sure I am doing a couple of these right, and maybe you guys can give some insight on how to complete the ones that make no sense to me. With that, on to the first one!
For this problem, we'll work over the alphabet [tex]\Sigma[/tex]= {a, b, c}. Design a DFA to recognize the language: L[tex]_{}1[/tex] = {w| if there is a b in w, then there is a c in w}
I couldn't think of any other way of posting this, so I am just attaching an image (a pretty bad one at that, sorry!):
http://img149.imageshack.us/my.php?image=52818077vp2.jpg
Anyways, does that seem right? I didnt know what to do if b didnt exist since if b->c and b=false, we don't know what c could be right? Any help is greatly appreciated!
Im also having trouble with:
Using the same alphabet, design NFAs for each of the following languages:
L[tex]_{}4[/tex]= {w| w ends with bac}
L[tex]_{}5[/tex]= {w||w| mod 2 = 1 or w ends with a}
for the first one I got:
http://img144.imageshack.us/my.php?image=54291944wd1.jpg
But the second I have no idea.
Finally could someone tell me where to even start with:
Recall that we can interpret a string over {0,1} as the binary representation of an
integer starting with the least signicant bit, so that for example 011 = 6.Using the alphabet {0,1}, prove that the language {x | x mod 3 = 0} is regular.
Any help is greatly appreciated!
Homework Statement
For this problem, we'll work over the alphabet [tex]\Sigma[/tex]= {a, b, c}. Design a DFA to recognize the language: L[tex]_{}1[/tex] = {w| if there is a b in w, then there is a c in w}
The Attempt at a Solution
I couldn't think of any other way of posting this, so I am just attaching an image (a pretty bad one at that, sorry!):
http://img149.imageshack.us/my.php?image=52818077vp2.jpg
Anyways, does that seem right? I didnt know what to do if b didnt exist since if b->c and b=false, we don't know what c could be right? Any help is greatly appreciated!
Im also having trouble with:
Using the same alphabet, design NFAs for each of the following languages:
L[tex]_{}4[/tex]= {w| w ends with bac}
L[tex]_{}5[/tex]= {w||w| mod 2 = 1 or w ends with a}
for the first one I got:
http://img144.imageshack.us/my.php?image=54291944wd1.jpg
But the second I have no idea.
Finally could someone tell me where to even start with:
Recall that we can interpret a string over {0,1} as the binary representation of an
integer starting with the least signicant bit, so that for example 011 = 6.Using the alphabet {0,1}, prove that the language {x | x mod 3 = 0} is regular.
Any help is greatly appreciated!