0% found this document useful (0 votes)
79 views7 pages

Assignment 2

This document outlines an assignment on computing theory that involves demonstrating knowledge of Turing machines, universality, and computability. It requires analyzing several Turing machines and their languages, investigating the Towers of Hanoi problem and Platypus tournaments, and exploring variations of the Platypus game. Students must submit answers to assessment questions and data from their Platypus game experiments. The assignment will be graded based on completeness, accuracy, investigation quality, required task completion, and comments on results.

Uploaded by

Huey Ying
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
79 views7 pages

Assignment 2

This document outlines an assignment on computing theory that involves demonstrating knowledge of Turing machines, universality, and computability. It requires analyzing several Turing machines and their languages, investigating the Towers of Hanoi problem and Platypus tournaments, and exploring variations of the Platypus game. Students must submit answers to assessment questions and data from their Platypus game experiments. The assignment will be graded based on completeness, accuracy, investigation quality, required task completion, and comments on results.

Uploaded by

Huey Ying
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Computing Theory

COSC 1107/1105
Assignment 2: Universality

1 Overview
This assignment requires you to demonstrate your knowledge of the key concepts of
Turing machines, universality, and computability . You are also required to report
on some further experiments with the Platypus game.

2 Assessment details
1. Turing machines (4+4+4+6 = 18 marks)
Consider the Turing machine M1 below. You can download this from Canvas here
(a) What language is accepted by M1 ? Explain your answer. Show some examples
of strings accepted and rejected to justify your answer. You must show at least
one accepted string of length at least 12, and at least one rejected string of
length at least 12. (4 marks)
(b) There are only three transitions in this machine that alter the symbol on the
tape. These are below.
State Input Output Direction New State
q0 a X L q1
q2 b Y L q3
q4 c Z L q5
What happens to the language of M1 if we replace these transitions by the
ones below?
State Input Output Direction New State
q2 a X L q3
q4 b Y L q5
q0 c Z L q1
Explain your answer. Show some examples of strings accepted and rejected to
justify your answer. You must show at least one accepted string of length at
least 12, and at least one rejected string of length at least 12. (4 marks)
(c) Give a deterministic machine equivalent to M1 (i.e. the machine in part a
above). Give a description English explaining why it is equivalent. Use the
same examples of strings accepted and rejected as in the first question above
to support your answer. (4 marks)
(d) Consider the Turing machines M2 and M3 below. You can download these
from Canvas here and here.

2
These machines are clearly very similar. What languages are accepted by these
machines? Explain your answer. Use examples of strings accepted and rejected
by each machine to support your answer. All such strings must contain exactly
two # symbols. You must show at least one accepted string of length at least
12, and at least one rejected string of length at least 12 for each machine. (6
marks)

2. Computability (2+2+2+6+4 = 16 marks)

(a) The Towers of Hanoi is a classic problem in computing. To move a tower


of height n from one pole to another (observing the rules of course) takes a
minimum of 2n − 1 steps. It is said the world will end before this problem can
be solved when n = 64.
Calculate how long it will take to solve this problem for the cases where 32 ≤
n ≤ 64, assuming 1 move per second. Does this support the claim about the
end of the world being sooner?
Use a spreadsheet for this calculation, and report the cases for n = 32, 40, 48, 56
and 64. (2 marks)
(b) It is estimated that the Big Bang was 13.7 billion years ago. This is

13, 700, 000, 000 × 365.25 × 24 × 60 × 60 = 43, 233, 912, 000, 000, 000

seconds ago.
Calculate the value of n for which the Towers of Hanoi problem can be solved
in this time at the rate of 1 move per second.
Compare this value with the number of machines that could play a complete
Platypus tournament in this time at the rate of 1 match per second. In other

3
words, find the value of m for which m teams can play a tournament involving
43, 233, 912, 000, 000, 000 matches.
You will also find a spreadsheet very useful for this. (2 marks)
(c) Calculate the largest Platypus tournament you can play on your machine in 4
hours, ie 4 × 60 × 60 = 14, 400 seconds. Use the value calculated in the first
assignment for how long it takes you to play a match. (2 marks)
(d) Intractable problems are decidable problems, but for which the best known
solution is exponential (or worse). Describe two intractable problems and
their practical application. You should write one paragraph on each problem,
and a reason that you selected each one. Some suggestions will be given in
class and on Canvas. (6 marks)
(e) The generalised Platypus game is defined as follows. Let M1 and M2 be Tur-
ing machines, which share the same tape. The tape is initially blank. The
configuration of the two machines may be considered as shown below.

As in the Platypus game, each machine takes turns to move (but there is no
scoring involved).
Show that the halting problem for the generalised Platypus game is undecid-
able.
Hint: Reduce the Blank Tape problem to the halting problem for the gener-
alised Platypus game. In other words, assuming you have a machine to decide
the halting problem for the generalised Platypus game, use it to construct a
machine to solve the Blank Tape problem. (4 marks)

4
4. Platypus game (6+2+4+2 = 14 marks)
As discussed in lectures, some variations of the Platypus game seem appropriate.
Your tasks is to rerun your tournament with your allocated machines, with different
parameters, and to compare the results.

(a) You should include at least the variations below (and more if you wish). The
code to do all this will be provided.
Variation Description
Standard No changes; this is the original version
Tree 5 points for whenever either tree is reached
Green 2 points rather than 1 for changing green to yellow
Short Maximum game length of 50 rather than 100
Long Maximum game length of 200 rather than 100
Tiebreaker A random starting configuration is chosen with game length is 200
For each of the variations above, you should report the following results.

5
ˆ Time taken
ˆ Top 10 machines
ˆ Number of wins
ˆ Number of draws
ˆ Number of winless machines
Report your results in a table like this.

Standard Tree Green Short Long Tiebreaker


Time
Top 10
Wins
Draws
Winless machines
You should identify your top ten machines by the overall number, ie in the
range 1 to 268,435,456. (6 marks)
(b) Which of the above variations took the longest time to run? Use this longest
time to re-calculate the tournament times as in the first assignment Question
4c, ie:
“A tournament of this form involving n teams requires n(n + 1)/2 matches.
Use your longest measured time above to calculate the average time it takes
for a match on your machine, and use this value to calculate long it would take
to run a tournament for 100, 1,000, 10,000, 100,000, and 1,000,000 matches.
Present your results in the form of a calculation and a table of the form below.”
(2 marks)

n Matches Estimated time


100
1,000
10,000
100,000
1,000,000

(c) Investigate some combinations of the above six variations of the game. Which
of them produces the most interesting results? Explain your conclusion. (4
marks)
(d) Two further changes are to use more than two players. Run your tournament
(with otherwise standard rules) for 3 and 4 players. How does the time taken
to do this compare to the standard 2-player game?
Report your results as follows.

Players Matches Time Taken


2 36,046
3
4

(2 marks)

6
3 Submission
You should submit PDF file containing your answers to the questions, and all .csv files
generated by your exploration of the Platypus game. Do not use a .zip file. No file
formats other than .pdf or .csv will be accepted.

4 Marking guidelines
Your assignment will be marked out of 60, according to the criteria below.

ˆ Completeness and accuracy of your answers to the Turing machines question.

ˆ Completeness and accuracy of your answers to the computability question.

ˆ Quality of your investigation into universality.

ˆ Satisfactory completion of the required tasks for the Platypus game tournament.

ˆ Quality of your comments on the Platypus game tournament.

5 Rubric
Your assignment will be graded in accordance with the rubric in Canvas.

You might also like