Uploaded by mboulila

Solutions to Automata Theory Sipser

advertisement
1
Let ∑3 contains all size-3 columns of 0s and 1s as follows
∑3=⎡⎣⎢000⎤⎦⎥,⎡⎣⎢001⎤⎦⎥,⎡⎣⎢010⎤⎦⎥,..,⎡⎣⎢111⎤⎦⎥
A string in Σ3 gives three rows of 0s and 1s. Consider each row to be a binary number. Let
B={ω∈Σ3∗| the bottom row of ω is the sum of the top two rows}
For example,
⎡⎣⎢001⎤⎦⎥⎡⎣⎢100⎤⎦⎥⎡⎣⎢110⎤⎦⎥∈B, but ⎡⎣⎢001⎤⎦⎥⎡⎣⎢101⎤⎦⎥∉B
Show that B is regular
This problem is marked as challenging in the book. It suggests that I work on BR first and then show B is
regular. I am allowed to use the following theorem
Theorem: If B is regular then BR is regular
BR is just all the strings reversed in B
How would you approach this problem?. I don't know why BR would help because given the language, it
looks like there is no BR or BR=B
Solution:
Think of your language B as the language of all valid binary long additions. Now you need to define an
NFA that verifies whether a long addition is correct. As you perform long addition from the least
significant bit first, this is easier to do for BR.
You will need to keep track of a carry bit using two different states, starting in the no-carry state. Then,
being in one of those two states, some inputs are valid, some are invalid, and some change the carry.
For example [0 0 1]T is valid in the carry state and doesn't produce a carry, whereas it's invalid in the
non-carry state; [1 1 0]T is valid if there's no carry, but it produces a carry.
You accept a string if you're left without a carry after reading it in completely.
Download