首页 > > 详细

解析COSC1107/1105迭代、回归解析、讲解php、Web开发解析、辅导asp编程、asp辅导

COSC1107/1105 - Computing Theory
Assignment 2 (15%)
Total marks: 100
Deadline: Sunday, the 14th of October, 2018 23:59
Please read all the following information before attempting your assignment. This is an individual assignment. You
may not collude with any other individual, or plagiarise their work. Students are expected to present the results of their own
thinking and writing. Never copy another student’s work (even if they “explain it to you first”) and never give your written
work to others. Keep any conversation high-level and never show your solution to others. Never copy from the web or
any other resource. Remember you are meant to generate the solution to the questions by yourself. Suspected collusion or
plagiarism will be dealt with according to RMIT policy.
Submission Instructions: You will need to submit one PDF file via the following Google Submission Form.:.
https://tinyurl.com/rmitct18-ass2-sub
The PDF file can have any name as long its extension is .pdf. The file must be typeset in a word processor (scanned files
will not be marked). When submitting your file using the form. above, you must use your RMIT Student Email account. Refer
to this FAQ.
Submissions not compatible with the instructions above will attract zero marks and do not warrant a re-submission.
In the submission form. you will be required to certify that the submitted solution represents your own work only by
agreeing to the following statement:
I certify that this is all my own original work. If I took any parts from elsewhere, then they were non-essential
parts of the assignment, and they are clearly attributed in my submission. I will show I agree to this honour
code by typing “Yes”:
If you are not able to certify this, it is best not to submit anything.
Assignment Overview: This assignment has just three exercise around three topics: undecidability, complexity, and
Pumping Lemma. The exercise are either conceptual questions or formal proofs. Topic for Exercise 3 has yet not been
covered and will be discussed in Week 9. However, you should be able to work on Exercises 1 and 2 already and it is highly
recommended you do that, so you can work on Exercise 3 alone later.
Corrections: From time to time, students or staff find errors (e.g., typos or wrong symbols) in the assignment specification.
In that case, a corrected version will be uploaded to the course web page as quickly as possible, an announcement will be
made on the course web page as well as in the forum. Check the version on the bottom left.
Forum postings on assignment: Never post any information on the forum that may disclose how to solve a question or
what the solution may be. You may only post assignment related questions for clarification, for example, to clarify certain
notation. Any post discussing possible solutions or strategies may directly be considered plagiarism, see above. If in doubt,
do not post and ask your tutor the question instead. Remember that I do not wish to put the forum in a moderated mode,
however, a breach of this policy will force me to do so. This would also mean that sometimes your questions may not get
answered timely.
Silence Policy: A silence policy will take effect 48hrs before this assignment is due. This means no questions about
this assignment will be answered, whether they are asked on the discussion board, by email, or in person. You must ensure
that all your queries are resolved prior to those 48 hours, including questions about submission using Google form. You are
reminded that leaving things until the last minute and any problem that ensues, are no grounds for extensions, re-submission
or re-marking.
1
COSC1107/1105 - Computing Theory Assignment 2 Page 2 of 4
Exercise 1: Undecidability. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35 marks
(a) (5 marks) One technique to show that a decision problem is undecidable is to reduce a known undecidable problem,
like the Halting Problem, to the problem of concern. Explain what requirement on that reduction (besides being a
reduction, of course) is fundamental for this approach to work. Also, state which Theorem in Sudkamp’s book makes
use of this requirement.
(b) (15 marks) Prove that the problem of deciding whether a Turing Machine M halts on input w is undecidable. Use
the fact that deciding whether a Turing Machine M accepts no input whatsoever, i.e., L(M) =;, is undecidable.
(c) (15 marks) Consider the following two decision problems:
P1: Given a Turing machine T and a string w, is there exactly one way that machine T can accept w?
P2: Given a Turing machine T and a string w, does T accept w?
Use the fact that problem P2 has already been shown undecidable (in the tutorial!), to prove that problem P1 is also
undecidable.
Exercise 2: Complexity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25 marks
(a) (8 marks) If f, g and h are non-decreasing complexity functions. Prove mathematically that if f(n) 2O(h(n)),
then f(n)2O(g h(n) + c), for any constant c 0, where a b is the composite function of a and b.
(b) (5 marks) One technique to show that a decision problem is NP-hard, is to reduce a known NP-hard problem, such
as 3SAT, to the problem of concern. Explain what requirements, and why, on such reduction are fundamental for the
approach to work. Also, state which Theorem in Sudkamp’s book makes use of this requirement.
(c) (5 marks) Suppose you are studying the computational complexity of a given problem X. It is known that the
boolean satisfiability problem can be reduced to X in polynomial time. In addition, it is known that problem X is
in class PSPACE, as somebody have already developed an algorithm for X that is guaranteed to provide a solution
using a polynomial amount of space with the size of the input. Can it be the case that X is an NP-COMPLETE
problem? Justify your answer and, if your answer is “yes,” state what would you need to do to show that X is
NP-COMPLETE.
(d) (7 marks) Prove formally, via a suitable problem reduction, that the Exact 4SAT problem (i.e., determine the satisfi-
ability of a formula in conjunctive normal form. where each clause has exactly four literals) is NP-complete. Use the
knowledge that the Exact 6SAT problem (i.e., determine the satisfiability of a formula in conjunctive normal form
where each clause has exactly six literals) is NP-complete. An informal or incomplete argument will not constitute a
proof.
Exercise 3: Pumping Lemma Regularity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40 marks
(a) Complete the four missing requirements (i)-(iv) in the following statement:
Pumping Lemma: Let L be a regular language. Then, there exists an integer n 1 such that for every w2L with
jwj n, there exist strings x;y;z2 , such that:
i. (1 mark)
ii. (1 mark)
iii. (1 mark)
iv. (1 mark)
(b) (2 marks) Briefly explain in one or two sentences why the Pumping Lemma is useful and important.
(c) (10 marks) Emma’s Pumping Lemma Dilemma: For her job interview in a highly-regarded software company,
an ex-student of CT, Emma, has been asked to prove that L =fwawR jw is any string overfa;bgg, over alphabet
= fa;bg, is not a regular language. She was allowed to submit her proof the next day. That night, she finally
finished the proof, wrote it all down neatly, and went to bed. During the night, burglars came into her house with
their dog, and the dog chewed up her proof. In an attempt to cover their tracks, the burglars, who also happened to
have taken CT years before, tried to recreate the proof. They gathered all the shreds they could find, but on some of
them the ink had washed out from the dog’s saliva, and so they couldn’t read some parts of it. Can you help them
put the proof back together? For each shred they found, they rewrote it on a piece of paper. If they couldn’t rewrite
it, they wrote different interpretations of what they thought it should say onto different pieces of paper. Now they
have many pieces of paper, but they don’t know which of them are correct and in which order they need to go. Help
Emma’s burglars!
There is one big piece, that reads:
Version: September 20, 2018 Exercise 3 continues on the next page. . .
COSC1107/1105 - Computing Theory Assignment 2 Page 3 of 4
Here is my proof for your request during your interview. To prove that L =fwawRjw is any string overfa;bgg,
over alphabet =fa;bg, is not regular, I will appeal to the well-known Pumping Lemma, that I studied during
my Computing Theory course in 2018. If you are not familiar with it, you can check my lecturer Abhijeet
Anand’s slides here.
Here are the other pieces they’ve transcribed:
(a) Thus, w = xyz such thatjxyj k andjyj 1.
(b) Consider now i = 0. Then, xyiz = xy0z = xz = abk jabka, or xz = bk j+1abka.
(c) Then, it follows that w2L andjwj k.
(d) Consider now i = 2. Then, xyiz = xyyz = abkabjabka, or xyyz = abkbjabka.
(e) Now consider w = abbbabbba.
(f) Assume that L is regular. Then, there exists a k2N as per the Pumping Lemma.
(g) Thus we have a contradiction: our assumption (that L is regular) must be true and L is true.
(h) Consider now i = 2. Then, xyiz = xyyz = abbbbbbabbba. It is then clear that xyiz62L.
(i) So, it follows that x = a, y = bbb, and z = abbba. Clearly w = abbbabbba = xyz.
(j) Thus we have a contradiction: our assumption (that L is regular) must be false and L is not regular.
(k) Then, it follows that w2L andjwj= 9.
(l) So, it follows that y is of the form. abj for some 1 j k 1, or is of the form. bj for some 1 j k 1.
(m) Now consider w = abkabka.
(n) Clearly, either case implies, xyiz62L because the symmetry is lost.
(o) Now, because j n.
5. So, by the Pumping Lemma, .
6. Becausejxyj n, it must be the case that .
7. Now consider the word w0 = .
8. By the Pumping Lemma, it follows that w02L2.
9. However, .
10. So we reach a contradiction, and L2 cannot be regular.
11. Finally, due to we know that a language is regular if and only if it
can be recognised by a DFA. Therefore, since L2 is not regular, there is no DFA that recgonises language L2.
(e) (10 marks) Let L3 =f1n0k14njn 0;k > 0g. Prove that there is no DFA M3 for L3 such that L(M3) = L3.
(f) (4 marks) Let L4 =fa;bg nfwawRjw is any string overfa;bggbe a language over =fa;bg. Prove that there
is no DFA M4 such that L(M4) = L4. Your proof should be short and not use the Pumping Lemma.
End of Assignment 2
Version: September 20, 2018 Exercise 3 continues on the next page. . .
COSC1107/1105 - Computing Theory Assignment 2 Page 4 of 4
Question Points
Undecidability 35
Complexity 25
Pumping Lemma Regularity 40
Total: 100
Version: September 20, 2018
 

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!