Answer the following Questions. (a) Consider an unreliable message…

Question Answered step-by-step Answer the following Questions. (a) Consider an unreliable message… Answer the following Questions.(a) Consider an unreliable message service where messages of a fixed size are sent between known endpoints. Outline the minimum set of additional features offered by a reliable byte-stream delivery service. [3 marks] (b) A researcher notes that the message service, fritter, resembles a datagram service. It is prone to delivery delays of up to 1 second, message re-ordering and message loss. Fritter permits a 140-byte message to be relayed between any two users and each message is delivered without data-corruption. You are asked to implement a Stop-and-wait ARQ to provide a unidirectional reliable byte-stream delivery service between two fritter users. Assume this is the only service between the two fritter users. (i) Provide a labelled diagram illustrating the format for a fritter message that could be used by a reliable, byte-stream, delivery service. Justify your answer.b) We don’t actually know the number of new infections xt on date t: we only know the number of new positive test results, yt . We anticipate yt ? ?dow(t)xt , where dow(t) gives the day of the week for date t. We would like to estimate not only ? but also ?Mon, …, ?Sun from the dataset (y1, . . . , yT ). (i) Propose a probability model for Yt+1 in terms of yt . [5 marks] (ii) Explain briefly how to estimate the parameters of your model. In your answer, you should consider whether or not the parameters are identifiable. [6 marks] CST1.2021.6.9 8 Data Science (a) In a COVID vaccine trial, n0 subjects were given a placebo and n1 were given the vaccine; x0 of the placebo subjects developed the disease and x1 of the vaccinated subjects. Considering the probability model Xk ? Binomial(nk, pk), the vaccine efficacy is defined to be e = 1 ? p1/p0. (i) State the maximum likelihood estimators for p0 and p1. Give a formula for the maximum likelihood estimator for e.With modern technology, many pieces of equipment which we would describe as a’computer’ actually contain multiple hardware components, each performing fetchexecute cycles. However not all of these are always intended to be ‘seen’ by theprogrammer as part of the programming model. Define or explain the following:(a) The term microprocessor. [3 marks](b) The term programming model. [3 marks](c) The effects (or lack of them) on the programming model of havingmicroprocessors imbedded in peripheral devices of a computer. [6 marks](d) A programming model of an overt multiprocessor machine. [6 marks](e) What type of system in production today is likely to have exactly onemicroprocessor inside?: Write  Java program that reads a 1D array of integers from standard input and returns it.a program that reads digits and composes them into integers.What is meant by a functional dependency between sets of attributes in a relationaldatabase schema? What conditions must be satisfied for a relation to be in Boyce-Codd Normal Form (BCNF)? [4 marks]The Department of Transport is implementing plans to tax traffic congestion. From 2002, cars will carry approved radio-control units which at first will be used only to monitor vehicle movement. In controlled areas sensors identify all vehicles, Both suspend e and quote e yield an unevaluated representation of e as a value for later evaluation by force and eval respectively. Sketch two programs (differing only in whether they use suspend and force or quote and eval) which give different results. [Note: Answers using side-effecting operators can only gain partial marks.] [4 marks] (c) A library defines a generic class Foo in a Java-like language. A user’s program declares a class C and subclasses it as class D, creating variables fc and fd of types Foo and Foo respectively. (i) Construct a declaration of Foo along with a program of the above form containing the assignment fc=fd which, if this statement were legal, would be the cause of a later run-time error when executed. [5 marks] (ii) How might the language syntax be changed to optionally express that the above assignment is to be allowed, indicating any compensating restrictions required for the declaration of Foo or fc to avoid run-time errors. [3 marks] (iii) How do Java arrays of type T[] fit in with your answer to Part (c)(i)? [2 marks](a) Explain what is meant by a monad in a programming language, giving the two fundamental operations of a monad along with their types. [3 marks] (b) Consider the use of a monad for input-output. For the purposes of this question, take the IO monad as including two operations readint and writeint which respectively read integers from stdin and write integers to stdout. Give the types of these operators. [2 marks] (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 Computer Science Engineering & Technology C++ Programming COM 3622111 Share QuestionEmailCopy link Comments (0)