![]() |
![]() |
|
accept(or, starts with the
acceptif you want multiple accept-states) to indicate acceptance. Finishing in any other state will be interpreted as rejecting the input. (The tape-contents are irrelevent.)
To clarify: The input alphabet for this language is Σ={-,=,1}, and (for example) 11-111=1∈ L. (That is, are checking just the syntax of unary-subtraction.)
note: This definition allows any/all of x,y,z can have zero 1s.
yaml gotcha: You must include single-quotes around -. (However they are not needed for =.)
Note: Start with a copy of your answer to the previous problem. (Be sure to save that one first!)
tip: If you are decrementing both x and y: Remove a 1 from y before finding a corresponding 1 in x. (That way, in case y has reached zero (ε), you don't need to go back to un-change a decrement to &vx.;)Note: My solution used 4 phases; each phase had about 4-5 states.Note: My solution removed 1s from the right edge of y and z (but the left edge of x). I think this might help keep a solution slightly simpler?
Note: This is similar to our example of duplicating a string (u to uu) except that the duplicated-bits are all spaces (and then followed by '$').
Note: We use the fact that this machine exists in passing, in the Ch17b slides, writing a non-deterministic decider for composite numbers.
This page licensed CC-BY 4.0 Ian Barland Page last generated | Please mail any suggestions (incl. typos, broken links) to ibarland ![]() |