代写G5029 Limits of Computation BSc FINAL YEAR EXAMINATION May/June 2019 (A2)代做回归

G5029

BSc FINAL YEAR EXAMINATION

May/June 2019 (A2)

Limits of Computation

1. This question is about WHILE, its semantics, and other notions of effective computability.

(a) What does the judgment S ` σ1  → σ2  mean for a list of WHILE-statements S and stores σ1  and σ2 ?     [4 marks]

(b) Give  the   rule   that   defines   the   operational   semantics   of   WHILE- assignments, i.e. for the judgement X := E ` σ1   → σ2  define precisely what σ2  must be in terms of σ1 .                            [4 marks]

(c)  Regarding the semantics of WHILE, what does E ‘EI σ  denote exactly? [3 marks]

(d) Give the semantic equation for E ‘XI σ where X is a variable.     [3 marks]

(e) What is E ‘cons  X  nilI {X  : 「3}?   As  usual,「n」 ∈  D  denotes  the encoding of natural number n.  You do not have to show intermediate results.      [2 marks]

(f)  Give an example of a single WHILE-command C such that

C ` {X :「n」; Y :「0} → {X :「0」; Y :「n div 2}

where「n」 ∈  D denotes the encoding of  natural number n and div denotes integer division without remainder.     [7 marks]

(g) Assuming that we start counting variables from 0, give the program-as- data representation of the following WHILE-program:

prog  read  X  {

Z:= nil;

X:=  cons  Z  X;

if  X  { Y:=  cons  Y  X  }

}

write Y

[11 marks]

(h) Why is it important to have a computation model that supports programs-  as-data?       [6 marks]

(i)  List FOUR (different) notions of computation other than WHILE with which  one can compute the same functions on natural numbers as one can with WHILE.                          [4 marks]

(j) Assume L-data = S-data and an L-program p which has the following property:

pIL (d1 ; d2 ) = ‘d1IS (d2 )

where (d1 ; d2 ) denotes pairing in L.

i.  Describe  informally  what  program  p  does  (without  restating  the equation above in words).    [4 marks]

ii.  Besides  L-data  =  S-data,  what  other  implicit  assumption(s)  are necessary for p to be well defined by the above?   [2 marks]

2. This question is about semi-decidability, decidability, the recursion theorem, and reduction.

(a)  Let  A D.  Assume  there  exists  a  WHILE-program  p  such  that  the following holds:

‘pIWHILE (d) = true     if, and only if,     d ∈ A.

What property does A have according to the above?               [3 marks].

(b) Give an example of a set A that has the property of Question 2(a). [2 marks]

(c) Answer each question below with YES’ or ’NO’ . If your answer is ’YES’ provide ONE example of a problem (i.e. set) that has the given property combination.

i.  Is there a set that is finite and decidable?                  [2 marks]

ii.  Is there a set that is finite and undecidable?                        [2 marks]

iii.  Is there a set that is infinite and decidable?                         [2 marks]

iv.  Is there a set that is infinite and undecidable?                     [2 marks]

(d)  For the following sets A WHILE-data  state whether they are WHILE- decidable and explain your answer.  In cases where A is decidable this explanation should consist of a description of the decision procedure. Recall that「p」denotes the encoding of WHILE-program pin D.

i. A = {「p| p returns nil ifits input encodes a natural number } [5 marks]

ii.  A = {「p」|「p」= c} where c ∈ D is fixed.                              [5 marks]

(e) This question addresses the importance of effective problem reduction in computability theory.

i. What is the definition of an effective problem reduction A    rec   B between two problems A X and B Y?   [6 marks]

ii.  Consider  the  following  problems:    HALT  (as  given  in  lectures), HALT2  =  {「p」 |  ‘pIWHILE  (「p」)  ↓},  ODD  =  {「n」 |  n   ∈  N  is odd }, EVEN = {「n| n ∈ N is even }.

Which of the following statements are correct?  No explanation is required.

A. ODD    rec  EVEN

B.  EVEN    rec  ODD

C.  EVEN    rec  HALT

D.  HALT    rec  EVEN

E.  HALT    rec  HALT2

F.  HALT2    rec  HALT                                                             [6 marks]

iii.  Explain how the concept of reducibility is employed in computability and complexity theory. Hint: what kind of results can one prove with the help of (various forms of) reduction? [7 marks]

(f)  Explain  what  the   Kleene’s   Recursion  Theorem  tells   us  about  the semantics of programming languages.   [8 marks]

3. This question is about complexity.

(a)  Consider the statement:

P is the class of feasible problems.

where the term feasible problems” informally refers to problems that can be decided in an acceptable amount of time.

Answer the following questions in relation to this statement:

i.  Define P.                                                                                 [3 marks]

ii.  Explain why the statement does not (need to) refer to a particular class PL .               [6 marks]

iii. Give an example of a problem in P.                                      [2 marks]

iv.  By what name is this statement known?                              [2 marks]

v. Give ONE argument in favour of this statement.                  [3 marks]

vi. Give ONE argument against this statement.                        [3 marks]

(b)  For each of the following statements, state whether they are (known to be) true,  (known to be) false, or whether the answer is currently still unknown.  Accordingly, write as answer either true, false, or unknown, respectively.

For the true statements, and only for those, explain in one sentence why they are true (sometimes it may be best to cite a theorem or a result shown in the lectures).

i. There is a b such for all a ≥ 1 it holds that:

TIMEWH1 LE(a    n) = TIMEWH1 LE(a    b    n)

ii. NP is closed under complement

iii. The Satisability Problem (SAT) is in P.

iv. The Satisability Problem (SAT) is NP-complete.

v. The Halting Problem is in NP.

vi. The  complexity  class P is   robust   regarding  changes  of  the underlying computational model.

vii. The Prime Factorisation Problem is in P.

viii. Quantum computers can solve NP-complete problems in polynomial time.        [16 marks]

(c)  Discuss  the  approximability  (in  polynomial  time)  of  the Travelling Salesman Problem (TSP). Here TSP is considered in the optimisation problem version rather than as decision problem.  Address the general issue  of  approximability,   and  how  TSP   is  special   in  that  respect. Consider the situation for specific versions of TSP as well.  Define any complexity classes you introduce in your answer. Marks will be assigned based on the correctness of your answer and the coverage of the various aspects. [15 marks]



热门主题

课程名

omp9727 ddes9903 mgt253 fc021 int2067/int5051 bsb151 babs2202 mis2002s phya21 18-213 cege0012 math39512 math38032 mech5125 mdia1002 cisc102 07 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 efim20036 mn-3503 comp9414 math21112 fins5568 comp4337 bcpm000028 info6030 inft6800 bcpm0054 comp(2041|9044) 110.807 bma0092 cs365 math20212 ce335 math2010 ec3450 comm1170 cenv6141 ftec5580 ecmt1010 csci-ua.0480-003 econ12-200 ectb60h3f cs247—assignment ib3960 tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 econ7230 msinm014/msing014/msing014b math2014 math350-real eec180 stat141b econ2101 fit2004 comp643 bu1002 cm2030 mn7182sr ectb60h3s ib2d30 ohss7000 fit3175 econ20120/econ30320 acct7104 compsci 369 math226 127.241 info1110 37007 math137a mgt4701 comm1180 fc300 ectb60h3 llp120 bio99 econ7030 csse2310/csse7231 comm1190 125.330 110.309 csc3100 bu1007 comp 636 qbus3600 compx222 stat437 kit317 hw1 ag942 fit3139 115.213 ipa61006 econ214 envm7512 6010acc fit4005 fins5542 slsp5360m 119729 cs148 hld-4267-r comp4002/gam cava1001 or4023 cosc2758/cosc2938 cse140 fu010055 csci410 finc3017 comp9417 fsc60504 24309 bsys702 mgec61 cive9831m pubh5010 5bus1037 info90004 p6769 bsan3209 plana4310 caes1000 econ0060 ap/adms4540 ast101h5f plan6392 625.609.81 csmai21 fnce6012 misy262 ifb106tc csci910 502it comp603/ense600 4035 csca08 8iar101 bsd131 msci242l csci 4261 elec51020 blaw1002 ec3044 acct40115 csi2108–cryptographic 158225 7014mhr econ60822 ecn302 philo225-24a acst2001 fit9132 comp1117b ad654 comp3221 st332 cs170 econ0033 engr228-digital law-10027u fit5057 ve311 sle210 n1608 msim3101 badp2003 mth002 6012acc 072243a 3809ict amath 483 ifn556 cven4051 2024 comp9024 158.739-2024 comp 3023 ecs122a com63004 bms5021 comp1028
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图