Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In a distributed electronic conference application each participant has a replica of a shared whiteboard. Only one user at a time may write to the

In a distributed electronic conference application each participant has a replica of a shared whiteboard. Only one user at a time may write to the whiteboard, after which the user's update is propagated to all conference members. A dedicated process manages each whiteboard replica. Define and discuss a protocol that the replica managers could use to achieve this mutual exclusion. A service database is replicated within a widely distributed system to achieve high availability and low access latency. Within a hierarchy of replicas a set of top-level primary servers maintain strong consistency of their replicas. Describe how this strong consistency could be achieved.

provide answers to all

A linear time reduction from a language L1 to L2 is a reduction that can be computed by a deterministic Turing machine in time O(n). A class of languages C is closed under linear time reductions if whenever L2 C and L1 is linear-time reducible to L2, then L1 C. For each of the following complexity classes (a) to (d), say whether it is closed under linear time reductions whether it contains problems that are complete under linear time reductions Give full justification for your answers. (a) DSPACE(n 2 ) (b) L

Suppose that an SLR parser for this grammar is required. One stage on the way to constructing the parsing tables is to create the characteristic finite state machine (sometimes known as the LR(0) states).. Now, assuming that the parsing tables have been constructed, show what values will be placed on a stack and comment about internal state while an SLR parser using this grammar processes the input text x+x+x.

answer all que

Describe in detail both Prim's and Kruskal's algorithms for finding a minimum cost spanning tree of an undirected graph with edges labelled with positive costs, and explain why they are correct Compare the relative merits of the two algorithms. 6 Operating System Foundations Discuss approaches to process scheduling for the following systems. (a) A hard real-time system where all processes are defined statically and are periodic with known work-time per period. [4 marks] (b) A shared system which runs applications controlled interactively by users. [8 marks] (c) A network-attached, multimedia workstation. [8 marks] 7 Operating System Functions Why is it important for an operating system to schedule disc requests? [4 marks] Briefly describe each of the SSTF, SCAN and C-SCAN disc scheduling algorithms. Which problem with SSTF does SCAN seek to overcome? Which problem with SCAN does C-SCAN seek to overcome? [5 marks] Consider a Winchester-style hard disc with 100 cylinders, 4 double-sided platters and 25 sectors per track. The following is the (time-ordered) sequence of requests for disc sectors: { 3518, 1846, 8924, 6672, 1590, 4126, 107, 9750, 158, 6621, 446, 11 } The disc arm is currently at cylinder 10, moving towards 100. For each of SSTF, SCAN and C-SCAN, give the order in which the above requests would be serviced. [3 marks] Which factors do the above disc arm scheduling algorithms ignore? How could these be taken into account?

What is meant by the term flow control? [3 marks] What is meant by the term credit-based flow control? [4 marks] What is meant by start-stop (or XON-XOFF) flow control? [4 marks] A start-stop system is used on a 10 kbps link with a constant delay of 5 ms. How much buffer must a receiver keep in reserve for "stopping time" in order to prevent information loss? [3 marks] Which system is more appropriate to use across the Internet and why? [6 marks] 4 Computer Graphics and Image Processing Explain how a cathode ray tube (CRT) works, including details of how colour is achieved. [8 marks] Describe a run-length encoding scheme for encoding images whose pixels have eight-bit intensity values. [8 marks] Calculate the best possible compression ratio achievable with your scheme and describe the situation(s) in which this ratio would be achieved. [2 marks] Calculate the worst possible compression ratio achievable with your scheme and describe the situation(s) in which this ratio would be achieved.

Why are the following statements fallacies? (a) MIPS is an accurate measure for comparing performance among computers. (b) A benchmark is a typical program which accurately predicts the performance of all other applications. [5 marks] (c) Complex instruction set computers minimise the semantic gap between machine code and high-level languages, thereby making applications run more quickly (d) Data caches always improve processor throughput. 3 Digital Communication I Compare circuit switching and packet switching, paying attention to channel characteristics and resource efficiency. What is wave division multiplexing (WDM)? Is it more like circuit switching or packet switching and why? Wave length conversion is the process, either optical or optical-electronic-optical, of receiving a signal on one wavelength and transmitting on another. How does wave length conversion ease the problem of routing optical carriers in a network? [3 marks] "The huge capacity of WDM systems will mean that IP becomes redundant." Discuss.

: Write complete C++ program to ask the user to enter 4 integers. The program must use a function to find the LARGEST integer among them and print it on the screen. function that accepts three arguments: an array, the size of the array, and a number n. Assume that the array contains integers. The function should display all of the numbers in the array that are greater than the numbern.

Write program that receives a positive integer n from the user and then calculates the sum below by using a loop. Your program needs to ask the user to re-enter a different number if the user enters a non-positive one.

What are the differences between profit and loss and cash flow statements? What are the differences between debt and equity finance? [5 marks] What is an option and how might it be valued? [5 marks] Comment on the current prices of high-tech stocks. [5 marks] 6 Comparative Programming Languages Outline how you would implement complex numbers in C++. Your implementation should attempt to make complex numbers look as if they were built into the language by allowing new complex numbers to be declared, initialised, assigned and operated on by the normal arithmetic operators. [13 marks] Discuss to what extent a good C++ compiler could implement your version of complex numbers as efficiently as if they had been a primitive type in the language. [7 marks] 7 Compiler Construction Give brief description of the main features of either Lex and Yacc or the corresponding Java tools JLex and Cup. [5 + 5 marks] Illustrate their use by outlining how you would construct a parser for expressions composed of identifiers, integers, unary minus and binary operators +, , and /. Your parser is expected to create parse tree in a format of your choice representing the expression that is presented to it. If it helps, you may assume that expressions will be terminated by writing a semicolon after them.

Consider the following problem to be solved using a Prolog program: Given a closed planar polygon chain represented as a list of n vertices [v(x1,y1), v(x2,y2), . . . , v(xn,yn)] compute the area of the enclosed polygon, and the orientation of the chain. The area is computed by the line integral 1/2 R x dyy dx where the integral is over the polygon chain. A nave solution is given by the following program, which defines the predicate area. The goal area(Chain,Area) succeeds when Chain is the list of vertices, and the magnitude of Area is the area of the polygon bounded by the chain. The sign of Area is positive if the orientation of the polygon is anticlockwise and negative if it is clockwise: area([X],0). area([v(X1,Y1),v(X2,Y2)|VS],Area):- area([v(X2,Y2)|VS],Temp), Area is Temp + (X1 * Y2 - Y1 * X2) / 2. Explain how vertices are processed by this procedure. Why does this program execute inefficiently? Write lternative definition that is tail-recursive and makes use of accumulator variables Explain why your alternative definition executes more efficiently.

Give precise definitions of polynomial time reductions and NP-completeness. [2 marks each] Consider the following two decision problems on undirected graphs. 3-node-colourability: the collection of graphs G = (V, E) for which there is a mapping : V {r, g, b} such that if (u, v) E, then (u) 6= (v). 3-edge-colourability: the collection of graphs G = (V, E) for which there is a mapping : E {r, g, b} such that if (u, v),(u, v0 ) E, with v 6= v 0 , then (u, v) 6= (u, v0 ). Show that there is a polynomial time reduction from 3-edge-colourability to 3-node-colourability. [8 marks] The problem 3-edge-colourability is known to be NP-complete. Using this information, for each of the following statements, state whether or not it is true. In each case, give complete justification for your answer. (a) There is a polynomial time reduction from 3-node-colourability to 3-edgecolourability. [3 marks] (b) 3-node-colourability is NP-complete. [3 marks] (c) 3-edge-colourability is in PSPACE.

Consider the following definitions of the functionals foldl and foldr: fun foldl f e [] = e | foldl f e (h::t) = foldl f (f(h,e)) t; fun foldr f e [] = e | foldr f e (h::t) = f(h, foldr f e t); What is the type of foldl? [2 marks] What is the type of the expression foldr op/? [2 marks] For each of the following functions, write an ML definition using one of the functionals foldl or foldr. (a) product: (real list) -> real, which given a list of real numbers gives their product. (b) exists: ('a -> bool) -> ('a list) -> bool, which given a predicate p and a list l determines whether there is any element of l satisfying p. (c) length: ('a list) -> int which determines the length of a list. [9 marks] Prove, by induction on lists, that for all lists of integers l, the following identity is true: foldl op+ 0 l = foldr op+ 0 l

Explain the Bayesian approach to solving problems in computer vision. Explain the notion of an Inverse Problem and how computer vision can be regarded thereby in a formal sense as inverse graphics. Write down Bayes' rule in general form, and explain the interpretation of its terms as: probability of the image, given the object probability of the object, given the image What is the role of the "prior?" Discuss and illustrate the Bayesian approach in terms of 3D surface reconstruction, given the reflectance data in an image

What is meant by a functional dependency between sets of attributes in a relational database 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, recording their positions periodically. Amber signs flash when overall traffic flow drops below some threshold, and vehicles within the controlled area may be fined for lack of progress. The owner of each vehicle has an account with the Department of Transport; owners can transfer funds to ensure that their account is in credit. Once credit is exhausted the level of fine increases by a factor 3, and a summons is sent by mail to the vehicle owner's registered address. In order to maintain proper accounts it is essential to keep an accurate record of each monitored offence. You are employed to design the relational database that will enforce the scheme, including provision for vehicle and driver registration, monitoring of vehicle offences and management of vehicle accounts. Describe the schema you propose, stating clearly any assumptions that you make. You need not discuss the calculation of the fines due. [12 marks] Outline the flow of information through the database. To what extent does the application require real-time transaction programming?

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

Auditing and Assurance services an integrated approach

Authors: Alvin a. arens, Randal j. elder, Mark s. Beasley

14th Edition

133081605, 132575957, 9780133081602, 978-0132575959

More Books

Students also viewed these Computer Network questions