## Why was the introduction of European firearms in Japan It…

Question Why was the introduction of European firearms in Japan It… Image transcription textWhy was the introduction of European firearms in Japan It corresponded with the warring states period of newfeudalism successful?… Show more Arts & Humanities English Share QuestionEmailCopy link This question was created from Copy_of_Rebeca_Arevalo_Torres_-_Chapter_1_-_Week_3_SAQ Comments (0)

## Do you edit assisgnements. Happy to pay for expert assistance. It…

Question Answered step-by-step Do you edit assisgnements. Happy to pay for expert assistance. It… Do you edit assisgnements. Happy to pay for expert assistance. It is my work. Arts & Humanities Religious Studies Christianity PSYCHOL 4204 Share QuestionEmailCopy link Comments (0)

## (a) Suppose that (D, v) is a poset which is chain-complete but does…

QuestionAnswered step-by-step(a) Suppose that (D, v) is a poset which is chain-complete but does…(a) Suppose that (D, v) is a poset which is chain-complete but does not have a least element, and that f : D ? D is a continuous function. (i) Give an example of such (D, v) and f for which f has no fixed point. [1 mark] (ii) If d ? D satisfies d v f(d), prove that there is a least element e ? D satisfying d v e = f(e). [Hint: consider the method used to prove Tarski’s fixed point theorem.] [7 marks] (b) (i) Define the notion of contextual equivalence for the language PCF. (You need not describe the syntax and semantics of PCF.) [2 marks] (ii) State the compositionality, soundness and adequacy properties of the denotational semantics of PCF. Explain why they imply that any two closed PCF terms of the same type with equal denotations are contextually equivalent. [8 marks] (iii) Give, without proof, an example of two contextually equivalent PCF terms that have unequal denotation. [2 marks]Explain why the Church-Rosser theorem implies that there are ?-terms that are not equal to each other. [2 marks] Suppose the following reduction rule is added to the ?-calculus: ?xy.x ? ?xy.y Show that in the resulting calculus, all terms are equal. [3 marks] Let A = ?xy.y(xxy) and ? = AA. Show that ? is a fixed-point combinator. [3 marks] Assume an encoding of lists where [a1, . . . , am] is represented Use the fixed-point combinator ? to obtain a ?-term rev such that: rev[a1, . . . , am] = [am, . . . , a1] You may assume a ?-term representation of the booleans and of ordered pairs, but you should define any other terms you require. [12 marks](a) (i) A variable-length, uniquely decodable code that has the prefix property and whose N binary code word lengths ar must satisfy what condition with these code word lengths? (Give an expression for the condition, and its name, but do not attempt to prove it.) [3 marks] (ii) Construct an efficient, uniquely decodable binary code, having the prefix property and having the shortest possible average code length per symbol, for an alphabet whose five letters appear with these probabilities: Letters the shortest possible code length per symbol? Demonstrate numerically that your code satisfies this optimality condition. [3 marks] (b) (i) Explain how autocorrelation can remove noise from a signal that is buried in noise, recovering a clean signal. For what kinds of signals, and for what kinds of noise, will this work best, and why? What class of signals can be recovered perfectly by autocorrelation? Begin your answer by writing down the integral that defines the autocorrelation of a signal f(x). [3 marks] (ii) Some sources of noise are additive (the noise is just superimposed onto the signal), but other sources of noise are multiplicative in their effect on the signal. For which type would the autocorrelation clean-up strategy be more effective, and why? In the case of additive noise where noise and signal occupy different frequency bands, what other strategy could allow recovery of a clean signal? [3 marks] (c) (i) If a continuous signal f(t) is modulated by multiplying it with a complex exponential wave exp(i?t) whose frequency is ?, what happens to the Fourier spectrum of the signal? Name a very important practical application of this principle, and explain why modulation is a useful operation. How can demodulation then recover the original signal? [3 marks] (ii) Which part of the 2D Fourier Transform of an image, the amplitude spectrum or the phase spectrum, is indispensable in order for the image to be intelligible? Describe a demonstration that proves this. [2 marks](a) Suppose that women who live beyond the age of 80 outnumber men in the same age group by three to one. How much information, in bits, is gained by learning that a person who lives beyond 80 is male? [2 marks] (b) Consider n discrete random variables, named X1, X2, . . . , Xn, of which Xi has entropy H(Xi), the largest being H(XL). What is the upper bound on the joint entropy H(X1, X2, . . . , Xn) of all these random variables, and under what condition will this upper bound be reached? What is the lower bound on the joint entropy H(X1, X2, . . . , Xn)? [3 marks] (c) If discrete symbols from an alphabet S having entropy H(S) are encoded into blocks of length n symbols, we derive a new alphabet of symbol blocks S n . If the occurrence of symbols is independent, then what is the entropy H(S n ) of this new alphabet of symbol blocks? [2 marks] (d) Consider an asymmetric communication channel whose input source is the binary alphabet X = {0, 1} with probabilities {0.5, 0.5} and whose outputs Y are also this binary alphabet {0, 1}, but with asymmetric error probabilities. Thus an input 0 is flipped with probability ?, but an input 1 is flipped with probability ?, giving this channel matrix p(yk|xj ): 1 ? ? ? ? 1 ? ? (i) Give the probabilities of both outputs, p(Y = 0) and p(Y = 1). [2 marks] (ii) Give all the values of (?, ?) that would maximise the capacity of this channel, and state what that capacity then would be. [3 marks] (iii) Give all the values of (?, ?) that would minimise the capacity of this channel, and state what that capacity then would be. [3 marks] (e) In order for a variable length code having N codewords with bit lengths {n1, n2, n3, · · · , nN } to satisfy the prefix property, what condition must be satisfied? (Express the condition, but do not try to prove it.) [1 mark] (f ) The information in continuous signals which are strictly bandlimited (lowpass or bandpass) is quantised, in that such continuous signals can be completely represented by a finite set of discrete samples. Describe two theorems about how discrete samples suffice for exact reconstruction of continuous bandlimited signals, even at all the points between the sampled values. [4 mark(a) A two state Markov process emitsthe letters {A, B, C, D, E} with theprobabilities shown for each state.Changes of state can occur whensome of the symbols are generated,as indicated by the arrows.4.2 Information sources with memoryWe will wish to consider sources with memory, so we also consider Markovprocesses. Our four event process (a symbol is generated on each edge) isshown graphically together with a two state Markov process for the alphabetfA, B, C, D, Eg in gure 17. We can then solve for the state occupancy usingow equations (this example is trivial).Figure 17: Graphs representing memoryless source and two state Markov processIn general then we may dene any nite state process with states fS 1; S2; : : :Sng,with transition probabilities pi(j) being the probability of moving from state Sito state Sj (with the emission of some symbol). First we can dene the entropyof each state in the normal manner:Hi = Xjpi(j) log2 pi(j)and then the entropy of the system to be the sum of these individual stateentropy values weighted with the state occupancy (calculated from the owequations):H = XiPiHi= XiXjPipi(j) log pi(j) (45)Clearly for a single state, we have the entropy of the memoryless source.4.3 The Source Coding theoremOften we wish to eciently represent the symbols generated by some source.We shall consider encoding the symbols as binary digits.19(i) What are the state occupancy probabilities? [1 mark](ii) What is the probability of the letter string AD being emitted? [1 mark](iii) What is the entropy of State 1, what is the entropy of State 2, and what isthe overall entropy of this symbol generating process? [5 marks](b) A fair coin is secretly flipped until the first head occurs. Let X denote thenumber of flips required. The flipper will truthfully answer any “yes-no”questions about his experiment, and we wish to discover thereby the value of Xas efficiently as possible.(i) What is the most efficient possible sequence of such questions? Justify youranswer. [2 marks](ii) On average, how many questions should we need to ask? Justify youranswer. [2 marks](iii) Relate the sequence of questions to the bits in a uniquely decodable prefixcode for X. [1 mark](c) Define complex Gabor wavelets, restricting yourself to one-dimensional functionsif you wish, and list four key properties that make such wavelets useful forencoding and compressing information, as well as for pattern recognition.Explain how their self-Fourier property and their closure under multiplication(i.e. the product of any two of them is yet again a Gabor wavelet) gives themalso closure under convolution. Mention one disadvantage of such wavelets forreconstructing data from their projection coefficients. [8 mark(a) Consider an alphabet of 5 symbols whose probabilities are as follows: A B C D E 1 16 1 4 1 8 1 16 1 2 One of these symbols has been selected at random and you need to discover which symbol it is by asking ‘yes/no’ questions that will be truthfully answered. (i) What would be the most efficient sequence of such questions that you could ask in order to discover the selected symbol? [2 marks] (ii) By what principle can you claim that each of your proposed questions in the sequence is maximally informative? [2 marks] (iii) On average, how many such questions will need to be asked before the symbol is discovered? What is the entropy of the symbol set? [2 marks] (iv) Construct a uniquely decodable prefix code for the symbols. Explain why it is uniquely decodable and why it has the prefix property. [2 marks] (v) Relate the bits in the code words forming your prefix code to the ‘yes/no’ questions that you proposed in (i). [2 marks] (b) Explain how the bits in an IrisCode are set by phase sequencing. Discuss how quantisation of the complex plane into phase quadrants sets each pair of bits; why it is beneficial for quadrant codes to form a Gray Code; how much entropy is thereby typically extracted from iris images; and why such bit sequences enable extremely efficient identity searches and matching. [5 marks] (c) Consider a noisy analog communication channel of bandwidth ? = 1 MHz, which is perturbed by additive white Gaussian noise whose total spectral power is N0? = 1. Continuous signals are transmitted across such a channel, with average transmitted power P = 1,000. Give a numerical estimate for the channel capacity, in bits per second, of this noisy channel. Then, for a channel having the same bandwidth ? but whose signal-to-noise ratio P N0? is four times better, repeat your numerical estimate of capacity in bits per second. [5 marks]Continuous MathematicsThe complex form of the Fourier series is:f(x) =+?Xk=??ckei2?kxwhere ck is a complex number and ck = c??k.(a) Prove that the complex coeffiffifficient, ck, encodes the amplitude and phasecoeffiffifficients, Ak and ?k, in the alternative form:f(x) =+?Xk=0Ak cos(2?kx ? ?k)[10 marks](b) What is special about the case k = 0? [2 marks](c) Explain how the coeffiffifficients, ck, of the Fourier series of the periodic function,f(x):f(x) = f(x + T), ?xcan be obtained from the Fourier transform, FL(?), of the related function,fL(x):fL(x) = f(x), ?T2 6 x < T20,otherwise[8 marks]2 Concurrent SystemsAn interprocess communication environment is based on synchronous messagepassing. A server is to be designed to support a moderate number of simultaneousclient requests.Clients send a request message to the server, continue in parallel with serveroperation, then wait for the server's reply message.Discuss the design of the server's interaction with the clients. Include any problemsyou foresee and discuss alternative solutions to them. [20 marks]2CST.2001.4.33 Further Java(a) Describe how mutual-exclusion locks provided by the synchronized keywordcan be used to control access to shared data structures. In particular youshould be clear about the behaviour of concurrent invocations of difffferentsynchronized methods on the same object, or of the same synchronized methodon difffferent objects. [6 marks](b) Consider the following class defifinition:class Example implements Runnable {public static Object o = new Object();int count = 0;public void run() {while (true) {synchronized (o) {count ++;}}}}Show how to start two threads, each executing this run method. [2 marks](c) When this program is executed, only one of the count fifields is found toincrement, even though threads are scheduled preemptively. Why might thisbe? [2 marks](d) Defifine a new class FairLock. Each instance should support two methods, lockand unlock, which acquire and release a mutual exclusion lock such that callsto unlock never block the caller, but will allow the longest-waiting blockedthread to acquire the lock. The lock should be recursive, meaning that thethread holding the lock may make multiple calls to lock without blocking.The lock is released only when a matched number of unlock operations havebeen made.You may wish to make use of the fact the Thread.currentThread() returnsthe instance of Thread that is currently executing. [10 marks]3[TURN OVERCST.2001.4.44 Compiler ConstructionConsider the following grammar giving the concrete syntax of a language:E ? idC ? E = E;C ? {B}C ? C repeatwhile EC ? if E then CC ? if E then C else CB ? B CB ? CS ? C eofwhere C repeatwhile E has the same meaning as do C while E in C or Java.(a) List the terminals and non-terminals of this grammar and explain thesignifificance of S. [3 marks](b) Identify any ambiguities in the above grammar and rewrite it to remove them,ensuring that your new grammar generates exactly the same set of strings.[4 marks](c) Specify a suitable abstract syntax, for example by giving a type declarationin a programming language of your choice, which might be used to hold parsetrees for this language. [3 marks](d) Give either a recursive descent parser or a characteristic fifinite state machine(e.g. for SLR(1)) with associated parser for your grammar. Your parser neednot return a parse treeit suffiffiffices for your parser either to accept or to rejectthe input string. [10 marks]4CST.2001.4.55 Data Structures and Algorithms(a) Outline how you would determine whether the next line segment turns left orright during the Graham scan phase of the standard method of computing theconvex hull of a set of points in a plane. [5 marks](b) Describe in detail an effiffifficient algorithm to determine how often the substringABRACADABRA occurs in a vector of 106 characters. Your algorithm should beas effiffifficient as possible. [10 marks](c) Roughly estimate how many character comparisons would be made when youralgorithm for part (b) is applied to a vector containing 106 characters uniformlydistributed from the 26 letters A to Z. [5 marks]6 ECAD(a) When designing clocked circuits there are times when asynchronous inputshave to be sampled which may result in metastable behaviour in state holdingelements. How might metastability be avoided when sampling asynchronousinputs? [5 marks](b) An optical shaft encoder (e.g. used on the internal rollers of a mechanicalmouse) consists of a disk with an evenly spaced alternating transparent andopaque grating around the circumference. Two optical sensors are positionedsuch that when one sensor is at the middle of an opaque region, the otheris at the edge. Consequently, the following Gray code sequence is produced,depending upon the direction of rotation:positive rotationnegative rotation A shaft decoder module is required to convert the Gray code into an 8-bitposition. The 8-bit position should be incremented every time the inputchanges from one state to another in a positive direction (e.g. from 00 to01, or from 10 to 00). Similarly, the 8-bit position should be decrementedevery time the input changes from one state to another in a negative direction(e.g. from 00 to 10, or from 01 to 00).Write d comment a Verilog module which performs the function of a shaftdecoder. [15 marks]5[TURN OVERCST.2001.4.67 Operating System Functions(a) In the context of virtual memory management:(i) What is demand paging? How is it implemented? [4 marks](ii) What is meant by temporal locality of reference? [2 marks](iii) How does the assumption of temporal locality of reference inflfluence pagereplacement decisions? Illustrate your answer by brieflfly describing anappropriate page replacement algorithm or algorithms. [3 marks](iv) What is meant by spatial locality of reference? [2 marks](v) In what ways does the assumption of spatial locality of reference inflfluencethe design of the virtual memory system? [3 marks](b) A student suggests that the virtual memory system should really deal with"objects" or "procedures" rather than with pages. Make arguments both forand against this suggestion. [4 and 2 marks respectively].6CST.2001.4.78 Computation Theory(a) Defifine precisely what is meant by the following:(i) f(x1, x2, . . . xn) is a Primitive Recursive (PR) function of arity n.[5 marks](ii) f(x1, x2, . . . xn) is a Total Recursive (TR) function of arity n. [3 marks](b) Ackermann's function is defifined by the following recursive scheme:f(0, y) = S(y) = y + 1f(x + 1, 0) = f(x, 1)f(x + 1, y + 1) = f(x, f(x + 1, y))For fifixed n defifinegn(y) = f(n, y).Show that for all n, y ? N,gn+1(y) = gn(y+1)(1),where h(k)(z) is the result of k repeated applications of the function h to initialargument z. [4 marks](c) Hence or otherwise show that for all n ? N, gn(y) is a PR function. [4 marks](d) Deduce that Ackermann's function f(x, y) is a TR function. [3 marks](e) Is Ackermann's function PR? [1 mark]7[TURN OVERCST.2001.4.89 Numerical Analysis I(a) What is meant by a symmetric positive defifinite matrix ? [3 marks](b) Verify that A = 2 11 2 is positive defifinite. [4 marks](c) The Choleski factorisation A = LDLT is to be applied to the solution ofAx = b, where b = 11 . It is found thatL = 1121 , D = 232 .The next step in the method is to solve Ly = b to get y = 112. Form theupper triangular system of equations needed to complete the solution.[4 marks](d) Solve these equations. [2 marks](e) What is meant by the order of convergence of an iterative process? [1 mark](f ) State the Newton-Raphson formula for solving f(x) = 0 for scalar x. What isthe order of convergence of this method? [2 marks](g) This method is used to solve f(x) = x2 ? 4 = 0 using IEEE Double Precisionwith a certain starting value x0. It is found that the third iterate x3 ' 2.0006,and x4 ' 2.00000009. Very roughly, how many signifificant decimal digits ofaccuracy would you expect in x5? Explain your answer. [4 marks]8CST.2001.4.910 Computer Graphics and Image Processing(a) Describe an algorithm to draw a straight line using only integer arithmetic.You may assume that the line is in the fifirst octant, that the line starts andends at integer co-ordinates, and that the function setpixel(x, y) turns on thepixel at location (x, y). [8 marks](b) Describe Douglas and P¨ucker's algorithm for removing superflfluous points froma line chain. [10 marks](c) Under what circumstances would it be sensible to employ Douglas and P¨ucker'salgorithm? [2 marks](a) State what is meant by a directed graph and a strongly connected component.Illustrate your description by giving an example of such a graph with 8 verticesand 12 edges that has three strongly connected components. [5 marks](b) Describe, in detail, an algorithm to perform a depth-fifirst search over such agraph. Your algorithm should attach the discovery and fifinishing times to eachvertex and leave a representation of the depth-fifirst spanning tree embeddedwithin the graph. [5 marks](c) Describe an O(n) algorithm to discover all the strongly connected componentsof a given directed graph and explain why it is correct. You may fifind it usefulto use the concept of the forefather ?(v) of a vertex v which is the vertex, u,with highest fifinishing time for which there exists a (possibly zero length) pathfrom v to u. [10 marks]2 Computer Design(a) What is a data cache and what properties of data access does it exploit?[5 marks](b) What is a direct mapped cache and under what conditions will it exhibit poorperformance? [5 marks](c) Under what circumstances might a word of data in main memory besimultaneously held in two separate fifirst-level cache lines? [5 marks](d) A translation look aside buffffer is a specialised cache. What does it typicallystore and why is it often a factor of 1000 smaller than a data cache? [5 marks]2CST.2001.6.33 Digital Communication I(a) Defifine the terms circuit and packet in the context of communication systems.[5 marks](b) What sort of guarantee does circuit switching provide? [5 marks](c) What advantages does packet switching provide over circuit switching?[5 marks](d) Which of frequency division multiplexing, time division multiplexing and codedivision multiplexing lend themselves to circuit switching? Which to packetswitching? Explain why or why not in each case. [5 marks]4 Computer Graphics and Image Processing(a) Describe the z-buffffer polygon scan conversion algorithm. [10 marks](b) In ray tracing, once we have determined where a ray strikes an object, theillumination at the intersection point can be calculated using the formula:I = Iaka +XiIikd(Li · N) +XiIiks(Ri · V)nExplain what real effffect each of the three terms is trying to model and explainwhat each of the following symbols means, within the context of this formula:I, Ia, i, Ii , ka, kd, ks,Li, N, Ri, V, n[10 marks]3[TURN OVERCST.2001.6.4SECTION B5 Comparative Programming Languages(a) Brieflfly explain the concept of coroutines as used in BCPL and outlinethe effffect of the library functions createco(f, size), deleteco(ctpr),callco(cptr, val) and cowait(val). [10 marks](b) Outline how you would design a coroutine to merge, in increasing order, twoinfifinite streams of increasing integers supplied by two other coroutines.[5 marks](c) Brieflfly outline how you would implement an analogous merging mechanism inan object-oriented language, such as Java, that does not provide a coroutinemechanism. [5 marks]6 Compiler Construction(a) Describe one possible structure (e.g. ELF) of an object fifile. Illustrate youranswer by considering the form of object fifile which might result from thefollowing C program.int a = 1, b = -1;extern int g(int);extern int c;int f() { return g(a-b) + c; }It is not necessary to consider the exact instruction sequence, just issuesconcerning its interaction with the object fifile format. [10 marks](b) Describe how a linker takes a sequence of such programs and produces anexecutable fifile. [4 marks](c) Compare and contrast static and dynamic linking in a system using your objectfifile format. [6 marks]4CST.2001.6.57 Prolog for Artifificial IntelligenceA weighted binary tree can be defifined using compound terms in the following way.A node of the tree is represented by the term n(V, L, R), where V stands for thevalue of the node, and L and R stand for the left and right branches, respectively.A terminal node has the R and L components instantiated to the null list.Given an input tree T, write a Prolog program that constructs a tree of the sameshape as T, but in which the value of each node has been set to the value of themaximum value node in T.[Note: Maximum marks are available only for programs that perform this task inone recursive descent of the input tree, and which use no more than four clauses.][20 marks]5[TURN OVERCST.2001.6.68 DatabasesThe environmental agency is setting up an SQL database to monitor long-termtrends in the climate. Data are collected from observatories of a number of difffferentkinds.Flood risk is of particular concern. Each water authority measures river levels andrates of flflow hourly at major points, and records reservoir levels daily.In addition, the agency maintains weather stations both inland and at sea. Theserecord precipitation (rainfall etc.), temperature, sunshine, air pressure and wind.Values of new precipitation, temperature, pressure, and wind speed and directionare taken hourly; gusts of over 60 m.p.h. are noted whenever they occur.Maximum and minimum temperature and pressure, the total number of hours ofsunshine and the total precipitation are recorded daily. Inland stations can begrouped by water authority.By default these primary data will be relegated to archive after 2 years. Selectedinformation is retained permanently in a data warehouse. This serves two purposes.First, it holds monthly summary data consisting of the maximum (and minimumas appropriate) day value for each statistic, together with the monthly totals ofsunshine and precipitation. The warehouse also keeps detailed information relatingto periods of extreme weather from the relevant observatories, with one or morekeywords describing the nature of the incident (flflood, blizzard, hurricane etc.) andan optional comment.Write notes to assist in the design of the schema for the relational data warehouse,including any diagrams that you fifind helpful. Explain how your design will enablemeteorologists to fifind relevant past records, noting any assumptions that you makeabout the nature of the data.[You should not go into unnecessary detail about the structure of the primarydatabase. You may assume that expert meteorologists will select the data for thewarehouse.][20 marks]6CST.2001.6.7SECTION C9 Semantics of Programming LanguagesWrite short notes on four of the following fifive topics.(a) The relationship between three forms of operational semantics of the Languageof Commands (LC) given by an evaluation relation h P, si ? hV, s0 i a transition relation h P, si ? hP0 , s0 i a transition relation between the confifigurationsh c, r, si of theSMC-machine(b) The notion of semantic equivalence of LC phrases and its congruence property.(c) Call-by-name and call-by-value rules for evaluating function applications in theLanguage of Functions and Procedures (LFP) and the relationship between theevaluation relations for LFP based upon each of them.(d) The notion of bisimilarity of two confifigurations in a labelled transition system.(e) The rules defifining the possible labelled transitions of parallel composition(P1|P2) and restriction (? c . P) in the Language of Communicating Processes(LCP).[5 marks each]7[TURN OVERCST.2001.6.810 Foundations of Functional ProgrammingThe following are some concepts that have flflourished in the context of functionalprogramming but which have (so far) been less heavily used in main-streamlanguages even when they have been available:(a) polymorphic types(b) type reconstruction(c) higher-order functions(d) lazy evaluation(e) continuationsFor each case give a brief explanation of the facility referred to, suggest acircumstance in which it might be useful and comment on how immediately relevantto non-functional languages it seems.[4 marks per part]8CST.2001.6.911 Logic and Proof(a) In the context of clause-based proof methods, defifine the notion of pure literaland describe what should be done if the set of clauses contains pure literals.[3 marks](b) Use the Davis-Putnam method to discover whether the following set of clausesis satisfifiable. If they are satisfifiable, show a satisfying interpretation.{P, R} {¬P, ¬R} {P, ¬Q} {¬Q, R} {¬P, Q, R}[6 marks](c) The three-fifingered inhabitants of the planet Triterra build base-3 computers.A Triterran named Randal Tryant has found a way of verifying base-3combinational logic. His Ordered Ternary Decision Diagrams (OTDDs) arethe same as a technology used on planet Earth except that all variables andexpressions range over the values 0, 1 and 2 instead of just 0 and 1.(i) Describe how a full ternary decision tree can be reduced to an OTDDwithout regard for effiffifficiency. [2 marks](ii) Sketch an effiffifficient algorithm to convert a ternary expression directly to anOTDD without constructing the full decision tree. For a typical ternaryconnective use modulo-3 multiplication, written as ?. [6 marks](iii) Demonstrate your algorithm by applying it to the ternary expression((i ? i) ? j) ? 2. [3 marks]9[TURN OVERCST.2001.6.1012 Complexity Theory(a) Show that any language that can be accepted by a nondeterministic machinein time f(n) can also be decided by a deterministic machine in space O(f(n)).[4 marks](b) Show that any language that can be accepted by a nondeterministic machinein space f(n) can also be decided by a deterministic machine in timeO(c(f(n)+log n) ), for some constant c. [6 marks](c) Explain what the above results tell us about the inclusion relationships amongthe complexity classes:NL, co-NL, P, NP, PSPACE and NPSPACE[4 marks](d) It has been proved that the graph reachability problem is in co-NL. Whatfurther inclusions can you derive among the above complexity classes usingthis fact? Explain your answer. [6 marks]Describe an O(n log(n)) algorithm based on a variation of merge sort to fifind theclosest pair of a given set of points lying in a plane. You may assume that the setof points is given as a linked list of (x, y) coordinates. [8 marks]Carefully prove that your algorithm can never take longer than O(n log(n)).[6 marks]Modify, with explanation, your algorithm to fifind the pair of points with minimumManhattan distance. The Manhattan distance between points (x1, y1) and (x2, y2)is |x1 ? x2| + |y1 ? y2|. [6 marks]1[TURN OVERCST.2000.6.22 Computer DesignWhy are the following statements fallacies?(a) MIPS is an accurate measure for comparing performance among computers.[5 marks](b) A benchmark is a typical program which accurately predicts the performanceof all other applications. [5 marks](c) Complex instruction set computers minimise the semantic gap betweenmachine code and high-level languages, thereby making applications run morequickly. [5 marks](d) Data caches always improve processor throughput. [5 marks]3 Digital Communication ICompare circuit switching and packet switching, paying attention to channelcharacteristics and resource effiffifficiency. [7 marks]What is wave division multiplexing (WDM)? Is it more like circuit switching orpacket switching and why? [7 marks]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 anetwork? [3 marks]"The huge capacity of WDM systems will mean that IP becomes redundant."Discuss. [3 marks]2CST.2000.6.34 Computer Graphics and Image ProcessingGive an algorithm for drawing the part of a circle which lies in the fifirst octant.Assume that the circle has integer radius and is centered at the origin. Assumethat you have a function setpixel(x, y) which turns on pixel (x, y). [10 marks]Derive a matrix, or a product of matrices, to perform a clockwise 2D rotation ofarbitrary angle, ?, about an arbitrary point, (xc, yc). [4 marks]Provide an algorithm to ascertain whether the Bezier curve defifined by P1P2P3P4lies within some tolerance, , of the straight line segment, P1P4, which joins theBezier curve's end points. Your algorithm must return false if the Bezier curve isoutside the tolerance; it must return true if the curve is well inside the tolerance;it may return either true or false if the curve is inside, but not well inside, thetolerance. [6 marks]SECTION B5 Comparative Programming LanguagesGive a brief summary of the main syntactic constructs found in the programminglanguage Smalltalk. Other languages often have the conditional constructsif-then-else and while. Show how these two constructs can be defifined in Smalltalk.[8 marks]Illustrate the use of Smalltalk by showing how you would defifine a method tocompute the factorial of an integer. [8 marks]Although Smalltalk was originally designed to be an interpretive language, modernimplementations are dramatically more effiffifficient. Brieflfly outline what techniquesmight have been used to make this improvement. [4 marks]3[TURN OVERCST.2000.6.46 Compiler ConstructionDescribe how a parse tree can be translated into a sequence of assembly languageinstructions based on a pattern matching graph derived from a set of tree rewritingrules where each rule has a cost and a corresponding fragment of code. Illustrateyour answer using the following rules:Ri = Kk LDI Ri,Kk Cost 2Ri = add(Ri,Kk) ADDI Ri,Kk Cost 3Ri = add(Ri,Rj) ADD Ri,Rj Cost 3Ri = add(Ri,add(Rj,Kk)) ADD Ri,Rj,Kk Cost 4applied to the following parse tree:add(K1,add(add(K2,add(K3,K4)),add(K5,K6)))[15 marks]Discuss the advantages and disadvantages of this approach to code generation.[5 marks]7 Prolog for Artifificial IntelligenceOne of the regulations of the International Rugby Board (IRB) states that for aplayer to be eligible to play for a given country, the player's father or mother orgrandfather or grandmother must have been born in that country. Assume thatthere is a complete genealogical database consisting of Prolog clauses of the formperson(P, B,

## 40. McBlahBlah, LLP (MBB) is auditing the Year 1 financial records…

Question Answered step-by-step 40. McBlahBlah, LLP (MBB) is auditing the Year 1 financial records… 40. McBlahBlah, LLP (MBB) is auditing the Year 1 financial records of Coming Up With Names Is Really Difficult, Ya’ll (CUWNIRDY), LLC, a publicly-traded manufacturing company. CUWNIRDY has a December 31 year-end. MBB performed its year-end audit during January and February of Year 2. The financial statements were scheduled to be issued on March 20, Year 2. The date of the audit report is March 15, Year 2. On March 17, Year 2, MBB was informed that there was a warehouse fire that destroyed 75% of CUWNIRDY’s inventory, which represented about 10% of total assets. CUWNIRDY added a note to the financial statements disclosing this fact. MBB was able to read the note and confirm the figures with the insurance adjuster on March 18. A) How does the above affect the audit report date? (1 point)B) Explain. (1 point) Business Accounting ACC 336 Share QuestionEmailCopy link Comments (0)

## A 45 year old obese female is newly diagnosed with Type II…

Question A 45 year old obese female is newly diagnosed with Type II… A 45 year old obese female is newly diagnosed with Type II diabetes. She does not want to begin insulin despite having a HgbA1C of 8.5. Consider the cultural, legal and ethical principles that apply to this case. Detail a treatment plan that considers the multifactorial considerations. Specifically discuss ethical principles. Health Science Science Nursing Share QuestionEmailCopy link Comments (0)