COMP4141 Assignment 3 (Part B) 2021 Term 1
Due: Monday, 12th April, 12:00 (AEST)
Submission is through WebCMS/give and should be a single pdf file, maximum size 2Mb. Prose should
be typed, not handwritten. Use of LATEX is encouraged, but not required.
Discussion of assignment material with others is permitted at a high level, but the work submitted must
be your own in line with the University’s plagiarism policy.
Problem 1 (10 marks)
Suppose we define a deterministic two-stack PDA to be a machine with a finite stack alphabet, a finite set
of control states, and two stacks. Such a machine is initialised by loading the input into one of the stacks
(backwards, so that the left of the word sits at the top of the stack), and starting the machine in its initial
state. It then computes at each step of computation reading the top of the two stacks, and deterministically
performing a push or pop onto each of the stacks, and changing the control state. The machine has an
accept and a reject state. Show that two-stack PDA’s are equivalent to Turing machines: a language L is
accepted by some two-stack PDA iff it is accepted by some deterministic Turing Machine.
Problem 2 (10 marks)
Let Σ1 and Σ2 be disjoint sets. Say that a language L ⊆ Σ∗1 is decidably verifiable if there is a decidable
language L′ ⊆ Σ∗1 × Σ∗2 such that
L = {w : there exists c ∈ Σ∗2 such that (w, c) ∈ L′} (‡)
(a) Show that if L is recursively enumerable, then it is decidably verifiable. (4 marks)
(b) Show that if L is decidably verifiable, then it is recursively enumerable. (6 marks)
Observation
This is the “computable” analogue of the (polynomially) verifiable classification of NP. It is also
worth noting the similarity with Problem 5 in Assignment 2: using the notation from that problem,
condition (‡) can also be expressed as L = L′ ÷ Σ∗2 .
Problem 3 (10 marks)
Is the following language decidable, recursively enumerable but not decidable, or not recursively enumer-
Input: A Turing Machine M
Question: Is there an input which will make M return to its start state?
1
Remark
Partial marks can be obtained for a suboptimal answer (e.g. showing the problem is recursively
enumerable without determining if it is decidable)
Problem 4 (10 marks)
Is the following language decidable, recursively enumerable but not decidable, or not recursively enumer-
NETM
Input: A Turing Machine M
Question: Is |L(M)| ≤ 1?
Remark
Partial marks can be obtained for a suboptimal answer (e.g. showing the problem is recursively
enumerable without determining if it is decidable)
Problem 5∗ (10 marks)
Is the following language decidable, recursively enumerable but not decidable, or not recursively enumer-
SingletonTM
Input: A Turing Machine M
Question: Is |L(M)| = 1?
Remark
Partial marks can be obtained for a suboptimal answer (e.g. showing the problem is recursively
enumerable without determining if it is decidable)
2
{"ft_lang_label":"__label__en","ft_lang_prob":0.84328395,"math_prob":0.8749827,"size":2994,"snap":"2023-40-2023-50","text_gpt3_token_len":758,"char_repetition_ratio":0.13612041,"word_repetition_ratio":0.24110672,"special_character_ratio":0.22979292,"punctuation_ratio":0.107826084,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9884362,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-09-22T01:10:18Z\",\"WARC-Record-ID\":\"<urn:uuid:a9e3744b-e322-401d-a79b-94960ed9ef09>\",\"Content-Length\":\"13807\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d1e7bd5a-83ec-4487-9033-c29064b31ad5>\",\"WARC-Concurrent-To\":\"<urn:uuid:3120fc64-0773-4632-b249-907465a4051f>\",\"WARC-IP-Address\":\"47.254.17.117\",\"WARC-Target-URI\":\"https://www.xuebaunion.com/detail/1151.html\",\"WARC-Payload-Digest\":\"sha1:SVJH5GPT5KLM5EY5CJPEDHPEVDSI2SAR\",\"WARC-Block-Digest\":\"sha1:TDMMFTL42Y3PRDXDVZIDMCPFRQGRCAHQ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233506320.28_warc_CC-MAIN-20230922002008-20230922032008-00432.warc.gz\"}"}