Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose that the target virtual machine is stack-oriented and that the stack elements are integer values, and addresses can be stored as integers. Explain which

Suppose that the target virtual machine is stack-oriented and that the stack elements are integer values, and addresses can be stored as integers. Explain which other features are required in such a virtual machine. Invent a simple language of instructions for such a machine and show how it would be used to implement each of the expressions. [10 marks] (c) (c) Assume MLreadint and MLwriteint are primitives with side effects for inputoutput and consider the ML expression add1 of type int: let val x = MLreadint() in MLwriteint(x+1); x end (i) Give an equivalent expression which uses the IO monad instead of side-effects, and state its type. [3 marks] Jot java program to find if a particular element is present in a multi-dimensional array. a Java program to find the shortest distance using Travelling Salesman Problem (Dynamic Programming Algorithm). (b) To what value should the Examiners lower the threshold mark for a First overall to ensure that approximately one-third of the candidates gain Firsts? [5 marks] (c) What is the probability that a candidate obtains or exceeds this lower threshold? [1 mark] (d) Suppose the candidates were assessed more conventionally (on perceived ability) but still awarded integer marks in the range 1 to 6 for each subject. 5 [TURN OVER CST.2000.4.6 8 Computation Theory Let N be the natural numbers {0, 1, 2 . . . What is meant by each of the following statements? The subset S N is recursive. The subset S N is recursively enumerable. [5 marks] How would you extend the definition of recursive enumeration to sets of computable functions? [3 marks] A sequence of natural numbers is a total function s : N N. The sequence is recursive if and only if s is computable. A finite sequence of natural numbers is specified by a pair (l, x), where l N is the number of elements, and x : [1, l] N is a function that defines those elements. The case l = 0 defines the null sequence. In each of the following cases, establish whether the set defined is recursively enumerable: (a) the set of all recursive subsets of N [5 marks] (b) the set of all recursive sequences of natural numbers [2 marks] (c) Consider a binary symmetric communication channel, whose input source is the alphabet X = {0, 1} with probabilities {0.5, 0.5}; whose output alphabet is Y = {0, 1}; and whose channel matrix is 1 1 where is the probability of transmission error. (i) What is the entropy of the source, H(X)? [1 mark] (ii) What is the probability distribution of the outputs, p(Y ), and the entropy of this output distribution, H(Y )? [3 marks] (iii) What is the joint probability distribution for the source and the output, p(X, Y ), and what is the joint entropy, H(X, Y )? [3 marks] (iv) What is the mutual information of this channel, I(X; Y )? [2 marks] (v) How many values are there for for which the mutual information of this channel is maximal? What are those values, and what then is the capacity of such a channel in bits? [3 marks] (vi) For what value of is the capacity of this channel minimal? What is the channel capacity in that case? [2 marks]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

It seems like your question contains a mix of different topics and unrelated questions Ill address each part separately StackOriented Virtual Machine ... 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

Operating Systems Internals and Design Principles

Authors: William Stallings

8th edition

133805913, 978-0133805918

More Books

Students also viewed these Programming questions

Question

Define Decision making

Answered: 1 week ago

Question

What are the major social responsibilities of business managers ?

Answered: 1 week ago

Question

What are the skills of management ?

Answered: 1 week ago

Question

List and briefly define five file organizations.

Answered: 1 week ago