I need it in JAVAx Objects: Electronic health records (EHRs) in a nationwide service. Policy: The owner
Question:
I need it in JAVAx
Objects: Electronic health records (EHRs) in a nationwide service. Policy: The owner (patient) may read from its own EHR. A qualified and employed doctor may read and write the EHR of a patient registered with him/her. (iv) Object: The solution to online coursework. Policy: The coursework setter has read and access. A candidate has no access until after the marks have been published. [8 marks each] 4 CST.2004.13.5 5 Computer Graphics and Image Processing (a) Explain why display devices appear to be able to reproduce (almost) all the colours of the spectrum using only red, green and blue light. [4 marks] (b) Describe an algorithm (other than thresholding) which will convert a greyscale image (8 bits per pixel) to a bi-level black and white image (1 bit per pixel), with the same number of pixels, while retaining as much detail as possible. [8 marks] (c) Explain what specular and diffuse reflection are in the real world. State and explain equations for calculating approximations to both in a computer. [8 marks] 6 [TURN OVER CST.2006.13.6 7 Compiler Construction (a) Explain the differences (illustrating each with a small program) between (i) static and dynamic binding (scoping); [4 marks] (ii) static and dynamic typing. [2 marks] (b) Java is sometimes said to be "dynamically typed" in that a variable whose type is (class) C can be assigned a value of (class) D provided that D extends C; conversely a variable of type D can be assigned a value of type C using a cast. By considering storage layouts, explain why the former assignment is always valid and the latter sometimes invalid. [4 marks] (c) A new programming language has the notion of "statically scoped exceptions" in which the program exception foo; void f() { try { void g() { raise foo; } try { g(); } except (foo) { C2 } } except (foo) { C1 } } would execute C1 rather than C2 as the former was in scope at the raise point. By analogy with statically scoped variables, or otherwise, explain how such exceptions might be implemented on a stack. [10 marks] 6 CST.2004.13.7 8 Artificial Intelligence In the following, N is a feedforward neural network architecture taking a vector x T = ( x1 x2 xn ) of n inputs. The complete collection of weights for the network is denoted w and the output produced by the network when applied to input x using weights w is denoted N(w, x). The number of outputs is arbitrary. We have a sequence s of m labelled training examples s = ((x1, l1),(x2, l2), . . . ,(xm, lm)) where the li denote vectors of desired outputs. Let E(w; (xi , li)) denote some measure of the error that N makes when applied to the ith labelled training example. Assuming that each node in the network computes a weighted summation of its inputs, followed by an activation function, such that the node j in the network computes a function g w (j) 0 + X k i=1 w (j) i input(i) ! of its k inputs, where g is some activation function, derive in full the backpropagation algorithm for calculating the gradient E w = E w1 E w2 E wW T for the ith labelled example, where w1, .
(a) A Riemann integral over [a, b] is defined by Z b a f(x) dx = limn 0 Xn i=1 (i i1)f(xi) . Explain the terms Riemann sum and mesh norm. [4 marks] (b) Consider the quadrature rule Qf = 3h 8 [f(a) + 3f(a + h) + 3f(a + 2h) + f(a + 3h)] 3f (4)()h 5 80 . If [a, b] = [1, 1] find 0, 1, . . . , 4 and hence show that this is a Riemann sum. [3 marks] (c) Suppose R is a rule that integrates constants exactly over [1, 1], and that f(x) is bounded and Riemann-integrable over [a, b]. Write down a formula for the composite rule (n R)f and prove that limn (n R)f = Z b a f(x) dx [6 marks] (d) What is the formula for (n Q)f over [a, b]? [4 marks] (e) Which polynomials are integrated exactly by Qf? Which monomials are integrated exactly by the product rule (Q Q)F when applied to a function of x and y? [3 marks] 9 [TURN OVER CST.2004.13.10 10 Introduction to Functional Programming (a) Define a polymorphic datatype 'a tree to represent binary trees. [1 mark] (b) A breadth-first traversal of a tree walks over all the nodes at each level before proceeding to the next level. For example the breadth-first traversal of the tree: 1 2 3 4 5 6 7 visits the nodes in the order 1, 2, 3, 4, 5, 6, 7. Define a function breadth: 'a tree -> 'a list such that breadth(t) returns the nodes of tree t in breadth-first order. [10 marks] (c) Define a polymorphic datatype 'a seq to represent lazy lists. [1 mark] (d) Define a polymorphic datatype 'a ltree to represent lazy binary trees. [3 marks] (e) Define a function inorder of type 'a ltree -> 'a seq that traverses a lazy tree in-order, returning the nodes in a lazy list. (You should define any auxiliary functions you may use.) [5 marks] 10 CST.2004.13.11 11 Natural Language Processing (a) Give brief definitions of the following terms: (i) referring expression; (ii) cataphora; (iii) pleonastic pronoun. [6 marks] (b) Describe the Lappin and Leass algorithm for pronoun resolution, illustrating its operation on the text below. Exact weights for salience factors are not required. Owners love the new hybrid cars.
(iii) Objects: Electronic health records (EHRs) in a nationwide service. Policy: The owner (patient) may read from its own EHR. A qualified and employed doctor may read and write the EHR of a patient registered with him/her. (iv) Object: The solution to online coursework. Policy: The coursework setter has read and access. A candidate has no access until after the marks have been published. [8 marks each] 4 CST.2004.13.5 5 Computer Graphics and Image Processing (a) Explain why display devices appear to be able to reproduce (almost) all the colours of the spectrum using only red, green and blue light. [4 marks] (b) Describe an algorithm (other than thresholding) which will convert a greyscale image (8 bits per pixel) to a bi-level black and white image (1 bit per pixel), with the same number of pixels, while retaining as much detail as possible. [8 marks] (c) Explain what specular and diffuse reflection are in the real world. State and explain equations for calculating approximations to both in a computer. [8 marks] 5 [TURN OVER CST.2006.14.6 6 Compiler Construction (a) Explain the differences (illustrating each with a small program) between (i) static and dynamic binding (scoping); [4 marks] (ii) static and dynamic typing. [2 marks] (b) Java is sometimes said to be "dynamically typed" in that a variable whose type is (class) C can be assigned a value of (class) D provided that D extends C; conversely a variable of type D can be assigned a value of type C using a cast. By considering storage layouts, explain why the former assignment is always valid and the latter sometimes invalid. [4 marks] (c) A new programming language has the notion of "statically scoped exceptions" in which the program exception foo; void f() { try { void g() { raise foo; } try { g(); } except (foo) { C2 } } except (foo) { C1 } } would execute C1 rather than C2 as the former was in scope at the raise point. By analogy with statically scoped variables, or otherwise, explain how such exceptions might be implemented on a stack. [10 marks] 6 CST.2004.13.7 7 Artificial Intelligence In the following, N is a feedforward neural network architecture taking a vector x T = ( x1 x2 xn ) of n inputs. The complete collection of weights for the network is denoted w and the output produced by the network when applied to input x using weights w is denoted N(w, x). The number of outputs is arbitrary. We have a sequence s of m labelled training examples s = ((x1, l1),(x2, l2), . . . ,(xm, lm)) where the li denote vectors of desired outputs. Let E(w; (xi , li)) denote some measure of the error that N makes when applied to the ith labelled training example. Assuming that each node in the network computes a weighted summation of its inputs, followed by an activation function, such that the node j in the network computes a function g w (j) 0 + X k i=1 w (j) i input(i) ! of its k inputs, where g is some activation function, derive in full the backpropagation algorithm for calculating the gradient E w = E w1 E w2 E wW T for the ith labelled example, where w1, . . . , wW denotes the complete collection of W weights in the network. [20 marks] 7 [TURN OVER CST.2004.13.8 8 Databases (a) Define the operators of the core relational algebra. [5 marks] (b) Let R be a relation with schema (A1, . . . , An, B1, . . . , Bm) and S be a relation with schema (B1, . . . , Bm). The quotient of R and S, written R S, is the set of tuples t over attributes (A1, . . . , An) such that for every tuple s in S, the tuple ts (i.e. the concatenation of tuples t and s) is a member of R. Define the quotient operator using the operators of the core relational algebra. [8 marks] (c) The core relational algebra can be extended with a duplicate elimination operator, and a grouping operator. (i) Define carefully these two operators. [3 marks] (ii) Assuming the grouping operator, show how the duplicate elimination operator is, in fact, unnecessary. [2 marks] (iii) Can the grouping operator be used to define the projection operator? Justify your answer. [2 marks] 8 CST.2004.13.9 9 Numerical Analysis II
They all say that they have much better fuel economy than conventional vehicles. And it seems that the performance of hybrid cars matches all expectations. [14 marks] 11 CST.2004.13.12 12 Complexity Theory (a) Define a one-way function. [4 marks] (b) Explain why the existence of one-way functions would imply that P6=NP. [7 marks] (c) Recall that Reach is the problem of deciding, given a graph G a source vertex s and a target vertex t, whether G contains a path from s to t; and Sat is the problem of deciding whether a given Boolean formula is satisfiable. For each of the following statements, state whether it is true or false and justify your answer. (i) If Reach is NP-complete then P=NP. [3 marks] (ii) If Reach is NP-complete then NP6=PSPACE. [3 marks] (iii) If Sat is PSPACE-complete then NP=PSPACE. (f ) Summarize any issues connected with left-or right-cooperative administrators in the two methods (in executing the parser and in developing the apparatus) you illustrated to some degree (e).
2 Hosts 50/1/1 S0/1/0 R11 R22 GOM S2 PC2 GO11 50/1/1 NW:10.10.100.0/24 50/170 Network P: 15 Hosts Network Q: 10 Hosts Network Z: 2 Hosts Network Y: 2 Hosts 50/110 50/1/1 R3 G0/1 Network R: 4 Hosts 53 PC3 Part 1: Design the VLSM Address Scheme Divide the 10.10.100.0/24 network based on the number of hosts per subnet and complete the Subnet Table. You will subnet the network address 10.10.100.0/24. The network has the following requirements: Network P (LAN) requires 15 Usable host IP addresses. (Use the third available subnet) Network Q (LAN) requires 10 Usable host IP addresses. (Use the next available subnet) Network R (LAN) requires 4 Usable host IP addresses. (Use the next available subnet) Network X (WAN) requires 2 Usable host IP addresses. (Use the next available subnet) Network Y (WAN) requires 2 Usable host IP addresses. (Use the next available subnet) Network Z (WAN) requires 2 Usable host IP addresses. (Use the next available subnet) Subnet Table: Subnet Description Network Address First Host Address Second Host Address Last Host Address Broadcast Address Subnet Mask Network P Network Network R Network X NA Network Y NA Network Z NA Part 2: Complete the Addressing Table Document the addressing scheme and complete the addressing table. a. Assign the Last host IP address from Network P subnet to G0/1 interface of Ri. b. Assign the First host IP address from Network P subnet to Sl. c. Assign the Second host IP address from Network P subnet to PCI. d. Assign the Last host IP address from Network Q subnet to GO/1 interface of R2. e. Assign the First host IP address from Network Q subnet to S2. f. Assign the Second host IP address from Network Q subnet to PC2. g. Assign the Last host IP address from Network R subnet to G0/1 interface of R3. h. Assign the First host IP address from Network R subnet to S3. i. Assign the Second host IP address from Network R subnet to PC3. j. Assign the First host IP address from Network X subnet to S0/1/0 interface of Ri. k. Assign the Last host IP address from Network X subnet to S0/1/1 interface of R2. 1. Assign the First host IP address from Network Y subnet to S0/1/0 interface of R2. m. Assign the Last host IP address from Network Y subnet to S0/1/1 interface of R3. n. Assign the First host IP address from Network Z subnet to S0/1/0 interface of R3. 0. Assign the Last host IP address from Network Z subnet to S0/1/1 interface of Ri. (iii)
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill