Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ANSWER GIVING STEPS Explain; How do you identify an overflow condition when you add two numbers in 1's complement form? 5.7 Explain the procedure for

ANSWER GIVING STEPS

Explain; How do you identify an overflow condition when you add two numbers in 1's complement form? 5.7 Explain the procedure for adding two numbers in 1's complement form. As an example, convert +38 and 24 to 8-bit 1's complement form and add them. Convert your result back to decimal and confirm that your answer is correct. 5.8 If you see a 2's complement number whose value is 11111110 2 , what rough estimate can you make about the number? 5.9 How do you change the sign of an integer stored in 2's complement form? As an example, the 8-bit representation for the value 19 is 000100112 . What is the 2's complement representation for 19? 5.10 How do you detect overflow when adding two numbers in 2's complement form? 5.11 Explain the procedure for adding two numbers in 2's complement form. As an example, convert +38 and 24 to 8-bit 2's complement form and add them. Convert your result back to decimal and confirm that your answer is correct.

If False M N = N for all -terms M and N and with True 6= False. [4 marks] (c) Define Curry's fixed point combinator Y and prove its fixed point property. [3 marks] (d) Consider the following two properties of a -term M: (I) there exist -terms A and B with M A = True and M B = False (II) for all -terms N, either M N = True or M N = False. Prove that M cannot have both properties (I) and (II). [Hint: if M has property (I), consider M (Y (x. If (M x) B A)).] [4 marks] (e) Deduce that there is no -term E such that for all -terms M and N E M N = ( True if M = N False otherwise [3 marks] 7 (TURN OVER) CST1.2019.6.8 7 Foundations of Data Science (a) Let X1, . . . , Xn be independent binary random variables, P(Xi = 1) = , P(Xi = 0) = 1 , for some unknown parameter . Using Uniform[0, 1] as the prior distribution for , find the posterior distribution. [Note: For your answer, and in answer to parts (b) and (d), give either a named distribution with its parameters, or a normalised density function.] [3 marks] I have collected a dataset of images, and employed an Amazon Mechanical Turk worker to label them. The labels are binary, nice or nasty. To assess how accurate the worker is, I first picked 30 validation images at random, found the true label myself, and compared the worker's label. The worker was correct on 25 and incorrect on 5. (b) Let be the probability that the worker labels an image incorrectly. Using Beta(0.1, 0.5) as the prior distribution for , find the posterior. [3 marks] I next ask the worker to label a new test image, and they tell me the image is nice. Let z {nice, nasty} be the true label, and let the prior distribution for z be Pr(nice) = 0.1, Pr(nasty) = 0.9. (c) For both z = nice and z = nasty, find P

worker says nice | z, . Hence find the posterior distribution of (z, ). Your answer may be left as an un-normalised density function. [5 marks] (d) Find the posterior distribution of z. [5 marks] My colleague has more grant money and she can employ 3 workers to rate each image. On a test set of 30 images, she found that they all agreed on 15 images, worker 1 was the odd one out on 8 of the images, worker 2 was the odd one out on 4, and worker 3 was the odd one out on 3. (e) Let i be the probability that worker i labels an image incorrectly. Find the posterior distribution of (1, 2, 3). Your answer may be left as an un-normalised density function. [4 marks] Hint. The Beta(, ) distribution has mean /( + ) and density Pr(x) = + 1 1

x 1 (1 x) 1 , Artificial Intelligence Evil Robot has been kidnapped by experimental psychologists, who are forcing him to solve problems involving the stacking of blocks. For example, given the start state on the left, he is asked to re-arrange the blocks into the state shown on the right. = B D D C B A C A You are to help him solve these problems by designing a system using planning graphs. A block can only be moved if it does not have another block on top of it. Only one block can be placed directly on top of another, although stacks of multiple blocks are allowed. (a) Explain how this problem can be represented as a planning problem, such that it can be analyzed using a planning graph. Describe how state should be represented, and how actions should be represented, giving a specific example relevant to the stated problem in each case. [5 marks] (b) Using the start state in the diagram above, draw the initial planning graph for the problem, including the initial state level, the first action level, and the state level resulting from the first action level. Do not add any mutex links at this stage. [4 marks] (c) Define an inconsistent effects mutex and an interfering actions mutex. Add to your diagram for Part (b) a single example of each, or explain why this is not possible. [4 marks] (d) Define a competing for preconditions mutex. By adding a small number of actions to the second action level of your planning graph, give a single example of such a mutex, or explain why this is not possible. [2 marks] (e) How many more action levels would you expect to need before a valid plan could be extracted to solve the problem stated? Explain your answer. [2 marks] (f ) Give two examples of the difficulties that might arise if we also wish to include long blocks as follows: B E B D D A C A = E C In each case explain why it might be difficult to address such an extension using planning graphs. [3 marks] 2 CST1.2019.6.3 2 Artificial Intelligence (a) Describe the state-variable representation for planning by discussing the following, giving specific examples of each concept: (i) Rigid relations and state variables. [2 marks] (ii) Actions. [2 marks] (iii) The representation of state. [2 marks] (iv) Goals and solutions. [2 marks] (b) Your boss has suggested using heuristic search to solve a planning problem expressed in the state-variable representation. Explain how this might be achieved. You do not need to suggest a specific heuristic at this stage. [3 marks] (c) Comment on whether or not heuristic search is a good approach to solving planning problems in the state-variable representation, compared with the alternative of using a constraint satisfaction solver. [5 marks] (d) Suggest an admissible heuristic that could be used when applying A? search to solving a planning problem in the state-variable representation. Show that it is admissible. [4 marks] 3 (TURN OVER) CST1.2019.6.4 3 Complexity Theory A Boolean formula is said to be satisfiable if there is an assignment : V {true, false} of values to the variables of that makes it true. A quantified Boolean formula is an expression that is (i) either a Boolean formula; or (ii) X where is a quantified Boolean formula and X is variable; or (iii) X where is a quantified Boolean formula and X is variable. We say that a quantified Boolean formula is satisfied by an assignment : V {true, false} if either is a Boolean formula that is made true by ; or is X and either [X/true] or [X/false] make true; or is X and both [X/true] and [X/false] make true. Here, [X/v] denotes the assignment that is the same as for all variables apart from X, and it maps X to the truth value v. We write QBF for the decision problem of determining whether a given quantified Boolean formula is satisfiable. In answering the questions below, you may assume the NP-completeness of any standard problem, as long as you state your assumptions clearly. (a) Show that QBF is NP-hard. [4 marks] (b) Show that QBF is co-NP-hard. [6 marks] (c) Show that QBF is in PSpace. [6 marks] (d) Is QBF NP-complete? Why or why not? [4 marks] 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Communications and Networking

Authors: Behrouz A. Forouzan

5th edition

73376221, 978-0073376226

More Books

Students also viewed these Computer Network questions

Question

What would the franchisee do differently now?

Answered: 1 week ago

Question

I figured it out! Thank you fim 000 firnate 1413iso astmena

Answered: 1 week ago

Question

45. How does network authentication work and why is it useful?

Answered: 1 week ago

Question

40. Compare and contrast IPSec tunnel mode and IPSec transfer mode.

Answered: 1 week ago