代写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]



热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图