Create a turing machine using jflap
Budget: £10 – £60 GBP
- Create a turing machine using jflap
- use this as my login adck797
- Generate integers x and y from your login. Call the first digit of your login i and the second j. Note below that |z|, for some number z, denotes the ceiling of z.
The numbers x and y are defined as follows:
• X = [(i + 1)/4]
• y = I + 1)/4]
Also, let & be the first and last characters of your login together with the symbol '*' (if these two letters are the same, then please select the next letter in the English alphabet for your second letter).
Input to a Turing Machine is a sequence of occurrences of your first letter, followed by a sequence of occurrences of your last letter, followed by a *. You may assume that the input has the correct syntax, i.e., only these two letters occur in the input, in the correct order (followed by a *). You may also assume that the input contains at least one letter followed by a *. Note that the input could be such that only one of the two letters are present (see the last two examples below).
For example, if your login is cabd591, then a = 2, y = 3
and alphabet = (c,d}. In this case, valid inputs to the
Turing Machine might be:
coccccceddddd*
• ccdddd*
• coccedddad*
• С*
• ddd*
Write a deterministic, single tape Turing Machine with at most 25 states, that copies the letters before the *, to after the *, so that the letters are interleaved as follows: y occurrences of the first letter, followed by x occurrences of the second, followed by y occurrences of the first, etc... with any remaining letters (also interleaved) at the end.
The input should remain unchanged.
So, returning to the input examples above, the Turing Machine should halt with the following on its tape respectively:
• ccccccceddddd*cccddcccddccd
• ccdddd*ccdddd
• cccceddddd*cccddccddd
• С*с
• ddd*ddd
- you can assume that the tape of your turing machine is a 2- way tape, i.e it is infinite (unbounded) in both directions
- make it so that it does not exceed more than 25 states
- use this as my login adck797
- Generate integers x and y from your login. Call the first digit of your login i and the second j. Note below that |z|, for some number z, denotes the ceiling of z.
The numbers x and y are defined as follows:
• X = [(i + 1)/4]
• y = I + 1)/4]
Also, let & be the first and last characters of your login together with the symbol '*' (if these two letters are the same, then please select the next letter in the English alphabet for your second letter).
Input to a Turing Machine is a sequence of occurrences of your first letter, followed by a sequence of occurrences of your last letter, followed by a *. You may assume that the input has the correct syntax, i.e., only these two letters occur in the input, in the correct order (followed by a *). You may also assume that the input contains at least one letter followed by a *. Note that the input could be such that only one of the two letters are present (see the last two examples below).
For example, if your login is cabd591, then a = 2, y = 3
and alphabet = (c,d}. In this case, valid inputs to the
Turing Machine might be:
coccccceddddd*
• ccdddd*
• coccedddad*
• С*
• ddd*
Write a deterministic, single tape Turing Machine with at most 25 states, that copies the letters before the *, to after the *, so that the letters are interleaved as follows: y occurrences of the first letter, followed by x occurrences of the second, followed by y occurrences of the first, etc... with any remaining letters (also interleaved) at the end.
The input should remain unchanged.
So, returning to the input examples above, the Turing Machine should halt with the following on its tape respectively:
• ccccccceddddd*cccddcccddccd
• ccdddd*ccdddd
• cccceddddd*cccddccddd
• С*с
• ddd*ddd
- you can assume that the tape of your turing machine is a 2- way tape, i.e it is infinite (unbounded) in both directions
- make it so that it does not exceed more than 25 states
Related categories:
Business, Accounting, Human Resources & Legal
Programming
Computational Linguistics