Expert answer:Using the C++-implementation of (possibly nondeterministic)Turing machines, create a deterministic Turing machine (transducer) thatdoes the following: If the input is a finite string over the alphabet {0, 1}, then the inputcan be interpreted as a binary number. The Turing machine assumes that the input is a binary number withmost significant digit first, and increases this number by one.
homefinal.pdf
turing.zip
Unformatted Attachment Preview
CS Track Core Theory, Programming Exercise
Deadline: Monday 04.12.2017
The tasks must be made individually. Code must be submitted to Moodle by
Monday 04.12.2017, not later than 23.59. Hand drawn Turing machines with
explanations must be handed in to me (HdN) in room 7.222 not later than 18.00.
1. (5 pts.) Using the C ++ -implementation of (possibly nondeterministic)
Turing machines, create a deterministic Turing machine (transducer) that
does the following:
• If the input is a finite string over the alphabet {0, 1}, then the input
can be interpreted as a binary number.
• The Turing machine assumes that the input is a binary number with
most significant digit first, and increases this number by one.
Here are some examples:
101
results in
1011 results in
11111 results in
110
1100
100000
There is no need to modify the C ++ code for the Turing machine. You
can follow the example in turing.cpp. You are free to add states and
symbols to the files state.h and symbol.h.
2. Let us write a nondeterministic Turing machine that solves the SATproblem for CNF.
For simplicity, we encode atoms as single letters. Assume an alphabet
Σ = { a, b, c, d, e, ′ |′ , ′ −′ , ′ +′ }. We will use ′ |′ as separator between
clauses, ′ −′ for building negative literals, and ′ +′ for building positive
literals.
|-a+b|+a+b|-c|
// In the language.
|-a+b|+a+b|-b|
// Not in the language.
|+a+b|-a+b|-a-b|+a-b| // Not in the language.
1
(a) (5 pts.) Write a deterministic Turing machine that checks whether
an input represents a well-formed representation of a SAT problem.
It should accept all inputs above, but it should reject for example
|+a-b|++a| and |+ab|.
(b) (5 pts.) Write a nondeterministic Turing machine (transducer) that
selects/guesses an atom from each clause in a set of clauses. For example, in the first example above, a possible output would be -a+b-c.
In the last example, a possible output would be +a+b-b+a.
(c) (5 pts.) Write a Deterministic Turing machine that takes a sequence
of literals and accepts this sequence if there is no complementary pair
in it (No pair of form +v and −v). It would accept -a+b-c, but reject
+a+b-b+a.
(d) (5 pts.) It should now be possible to combine the three Turing
machines of the previous tasks into a single, nondeterministic Turing
machine that recognizes the SAT-problem for CNF.
Please provide drawings for your Turing machines, and show that they
work by providing a few examples.
2
…
Purchase answer to see full
attachment
You will get a plagiarism-free paper and you can get an originality report upon request.
All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more