,,< Priority inversion can occur when threads of differing...

Question Answered step-by-step ,,< Priority inversion can occur when threads of differing... ,, 0 and any problem instance of size n, thealgorithm returns a solution with cost C such thatPr[C ? (1 ? 1/) · C?] ? 1/n · exp(?1/),where C?is the cost of the optimal solution. Can you use your algorithm toobtain a PTAS or FTPAS? Justify your answer. [6 marks](b) We consider the following optimisation problem. Given an undirected graphG = (V, E) with non-negative edge weights w : E ? R+, we are looking for anassignment of vertex weights x : V ? R such that: (i) for every edge {u, v} ? E,x(u) + x(v) ? w({u, v}), (ii)Pv?Vx(v) is as small as possible.(i) Design a 2-approximation algorithm for this problem. Also analyse therunning time and prove the upper bound on the approximation ratio.Note: For full marks, your algorithm should run in at most O(E2) time.Hint: One way to solve this question is to follow the approach used by thegreedy approximation algorithm for the VERTEX-COVER problem.[8 marks](ii) Can this problem be solved exactly in polynomial-time? Either describethe algorithm (including a justification of its correctness and why it ispolynomial time) or prove that the problem is hard via a suitable reduction. (a) Assume you have a randomised approximation algorithm for a maximisationproblem, and your algorithm achieves an approximation ratio of 2. What canyou deduce forE[C?/C],where C?is the cost of the optimal solution, C is the cost of the solution of theapproximation algorithm, and E[.] denotes the expectation? [4 marks](b) Consider the following optimisation problem on graphs: Given an undirected,edge-weighted graph G = (V, E, w) with w : E ? R+, we want to find a subsetS ? V such that w(S, V S) = Pe?E(S,V S) w(e) (the total sum of weights overall edges between S and V S) is maximised.(i) Design a polynomial-time approximation algorithm for this problem. Alsoanalyse its running time and prove an upper bound on the approximationratio. [8 marks](ii) Find a graph which matches your upper bound on the approximation ratiofrom Part (b)(i) as closely as possible. (iii) Consider now the following generalisation of the problem. Given an integerk ? 2, we want to partition V into disjoint subsets S1, S2, . . . , Sk so thatwe maximiseXki=1w(Si, V Si).Describe an extension of your algorithm in Part (b)(i). What approximation ratio can you prove for this algorithm? You create  startup that helps companies manage office space use to boost employeewellbeing while minimising the potential for workplace virus transmission.After an intense 9 months of building a prototype and trialling it with early customersyou demonstrate enough market traction to raise funding and hire a team of 15 peopleto support your growing customer base.You’ve just completed your first month of work with the new team in your new andlarger office space when the government announces a new 2-month lockdown whereyour staff must work from home.As workers are no longer going to be in offices at the same rate, sales slow down.Confident that this is just temporary you decide to put 5 employees on furlough, withgovernment support, until the lockdown is lifted.(a) Discuss what needs to be done to support your employees as you transition thebusiness to everyone working from home. [8 marks](b) Unfortunately, at the end of the initial lockdown period the government decidesto extend it by another month. Looking at your financial forecasts you do nothave enough funds to continue the business in its current form. Discuss whatoptions are available to you. (a) A superscalar processor may speculatively execute loads even when one or moreearlier stores have not yet computed their memory addresses. In practice, wewould need to restart execution from the speculative load if a memory-carrieddependency is subsequently detected.(i) With the help of some additional hardware it is possible to record whichloads cause such ordering violations. Briefly outline how this could be doneand how such a record could be used to help improve performance.[3 marks](ii) Describe why such a scheme may unnecessarily delay the issuing of a loadeven when the mechanism correctly recalls that the load has led to an orderviolation between a store and load in the past? [4 marks](b) Why might it also be advantageous for a superscalar processor to predict whethera particular load will hit or miss in the processor’s L1 data cache? [3 marks](c) You are asked to design hardware to run artificial neural network applications ina high-performance and energy-efficient manner. Such workloads can typicallymake good use of many multiply-accumulate (MAC) units operating in paralleland narrow datatypes. Your system is required to support a range of differentneural networks that vary considerably in the type of computations theyperform. You consider three approaches: (1) to use a multicore processor; (2)to design a single domain-specific accelerator; (3) to compose your design fromtwo or more domain-specific accelerators where each is specialised for differenttypes of neural network.(i) What are the advantages and disadvantages of each approach? [6 marks](ii) Describe one possible way of organising the multicore processor and apossible choice for the architecture(s) of its individual cores. Briefly justifyyour design decisions. (a) Compute the local alignment between the following sequences: GATTACA,TATACG with the following rules: match score = +5, mismatch = ?3, gappenalty = ?4 and discuss how the alignment depends on the choices of matchscores, mismatch and gap penalty. [5 marks](b) Discuss how a local alignment algorithm allows identification of internal sequenceduplications. [3 marks](c) Define the UPGMA algorithm and state and justify its complexity. What is theoutput of the algorithm given the distance matrix of the species X1, X2, X3, X4below?species X1 X2 X3X2 2X3 4 4X4 6 6 6[4 marks](d) Discuss a method to perform random access in DNA-based storage memory.[4 marks](e) Discuss with one example the complexity of the Gillespie algorithm and commenton the main differences with respect to a deterministic approach(a) Compute the nearest neighbour phylogeny from the four species (B,M,H,O)distance matrix.B M H OB 0 5 6 4M 5 0 3 2H 6 3 0 2O 4 2 2 0[6 marks](b) Can we always build a phylogenetic tree from a distance matrix? [2 marks](c) Derive the Burrows-Wheeler (BWT) transform of the string ‘TAGTATA’. Howcan the transform be reversed? Comment on the use of BWT for a genomesequence that has many repeated substrings. [4 marks](d) Three analysis techinques for gene expression data (microarray) are hierarchicalclustering, k-means and Markov clustering. Describe the structure of a set ofexperimental results that could be analysed by all three techniques and statewhat each form of analysis might identify and any additional inputs required.[4 marks](e) Discuss how a Hidden Markov Model can be used to identify different geneparts and how many sequences might be needed to compute reliable transitionprobabilities.(a) Some VLIW processors exploit fine-grain multithreading and SIMD executionunits.(i) What benefits could adding support for fine-grain multithreading to aVLIW processor provide? [4 marks](ii) Why might a simple round-robin thread schedule be inefficient and howcould we improve the schedule? [2 marks](iii) Assuming the VLIW processor has taken full advantage of fine-grainmultithreading with a simple round-robin thread schedule, what changesto the processor might an optimised thread schedule require to ensureprograms continue to execute correctly? [4 marks](iv) Why might it be useful to include SIMD functional units when a VLIWprocessor can already specify independent operations to be executed inparallel? [4 marks](b) Some VLIW processors support variable-length bundles of independent instructions.(i) Why is this a useful feature and how could it be supported? [2 marks](ii) What costs would be incurred and additional logic needed to support thisfeature?(a) In the context of automated detection and interpretation of affective expressionsusing FACS (Facial Action Coding System), define the following concepts:(i) facial muscle action unit (AU)(ii) action descriptor (AD)(iii) valence(iv) arousal(v) “Pan-Am smile”(vi) cross-cultural universal [6 marks](b) Gabor wavelets offer a unifying framework for many tasks in computer vision,including edge detection, finding facial features, and pattern matching. Thecomplex wavelet components (upper row) are parameterised to approximate theconvolution kernels for computing 1st and 2nd derivatives (lower row, givenas functions of x but rotatable in images f(x, y) into functions of y as well):Explain how Gabor wavelets can estimate the gradient vector field ?~ f(x, y) inedge detection, extracting both edge strength and edge direction. Also describehow they can be used in a demodulation network to localise facial features.Identify one application of Gabor wavelets in pattern matching. [5 marks](c) What can we learn from the perceptual experiments of the Swedishpsychologist Johansson, involving sparse dot patterns such as shownon the right? How might his findings be useful in computer visionfor data fusion, integration of motion cues in object recognition, andgeneral aspects of scene understanding?[4 marks](d) Biological neurones are notoriously noisy, are apparently random in theirconnections and their firing patterns, and sluggish, with maximum firing ratesaround 100 Hz. Yet biological vision systems are wonderfully capable. Is therereally any need for computer vision systems to use double precision arithmeticand GHz clock speeds? Give three examples of tasks in machine vision whoseexecution appears to require double precision arithmetic and high FLOPS, andfor each example, explain this contrast with biological solutions.(a) Consider the following two alternative definitions of a MAC function, whichreceives as input an (n · L)-bit long message of the form M = M1kM2k . . . kMLwith Mi ? {0, 1}n and a private key K ? {0, 1}n picked uniformly at random,returning a tag T ? {0, 1}n. Show how neither definition provides the securityproperty of existential unforgeability.(i) Let F be an n-bit to n-bit pseudo-random function. Return the messagetag T = FK(M1) ? FK(M2) ? · · · ? FK(ML). [4 marks](ii) Let F be a (2n)-bit to n-bit pseudo-random function. Return the messagetag T = FK(h1ikM1) ? FK(h2ikM2) ? · · · ? FK(hLikML). [6 marks][Notation: k = concatenation of bit strings, ? = bit-wise XOR, hii = n-bitbinary representation of non-negative integer i.](b) Your colleague proposes to construct an authenticated encryption scheme thatencrypts a plain-text message M by first calculating the message authenticationcode CMACK(M) = T, and then forms the ciphertext by encrypting MkT usingCFB mode with initial vector IV = EK(T), using the same key and blockcipherEK. Does this construction offer CCA security? Why or why not? [5 marks](c) Given a block cipher EK with n-bit block size, where n ? 64 is a power of two,how can you use EK to construct a strong pseudo-random permutation for n A spy elects to use a self-synchronizing scrambler to encode his secret message.Explain why this will not give him any privacy and why his self-synchronisingapproach would be better used by a communications engineer. [5 marks](b) With the assistance of annotated diagrams explain CSMA/CD and CSMA/CA.In your explanation, note the physical constraints on packets and networks thatthese approaches impose. [10 marks](c) Consider the network buffer sizing formula B = 2T × C(i) Explain this formula. [2 marks](ii) Discuss the network architecture and traffic assumptions made in the useof this formula.  : Write  complete java program that prompts the user for their name and two numbers. a program that will ask the user to enter your name and your class section Here are four options for improving web page performance.Option 1: HTTP Caching with a Forward ProxyOption 2: CDN using DNSOption 3: CDN using anycastOption 4: CDN based on rewriting HTML URLsYou have been asked to help reduce the costs for networking in the University.(a) The University pays its service provider networks’r’us, based on the bandwidth ituses; bandwidth use is dominated by students downloading external web pages.Which, if any, of the above four options would reduce the bandwidth usage?Explain your choice. [4 marks](b) The delivery of online courses has become a tremendous success – but this hasled to a significant increase in network costs for the University.You must select one of the options above to minimize load on the servers.Compare the operation of each option and justify a selection that provides thefinest granularity of control over load to the content-servers and a selection thatwill serve each customer from the closest CDN server. [12 marks](c) You have looked up the IP address of your favourite search engine on theUniversity network and noticed the answer is different from that given to yourfriend when he did the lookup in Newfoundland, Canada.For each option above, indicate why it might, or might not, be used by yourfavourite search engine to improve web page performance. [4 marks]6CST.2013.5.76 Computer Networking(a) Considering either TCP/IP or UDP/IP, write a description of how server-port,client-port, source-port and destination-port relate to each other. You may wishto give examples and use diagrams as appropriate. [4 marks](b) What is a routing-loop? Include a diagram in your answer. [4 marks](c) Describe a mechanism that prevents routing-loops in Ethernet networks.[4 marks](d) (i) Describe and, with the aid of an example, illustrate the IP Time-To-Live(TTL) mechanism for minimising the impact of routing-loops. [2 marks](ii) Assuming, in part (d)(i), a perfect implementation, describe a disadvantageof the approach including the symptoms that might be experienced in anetwork subject to this disadvantage, and a test that may identify theproblem. [2 marks](e) Explain the technical and architectural argument behind the decision in IPv6to retain header TTL but not a header checksum. [2 marks](f ) Explain why there is ambiguity about handling packets with TTL values of 1and give a practical solution. Here are four options for improving web page performance.Option 1: HTTP Caching with a Forward ProxyOption 2: CDN using DNSOption 3: CDN using anycastOption 4: CDN based on rewriting HTML URLsYou have been asked to help reduce the costs for networking in the University.(a) The University pays its service provider networks’r’us, based on the bandwidth ituses; bandwidth use is dominated by students downloading external web pages.Which, if any, of the above four options would reduce the bandwidth usage?Explain your choice. [4 marks](b) The delivery of online courses has become a tremendous success – but this hasled to a significant increase in network costs for the University.You must select one of the options above to minimize load on the servers.Compare the operation of each option and justify a selection that provides thefinest granularity of control over load to the content-servers and a selection thatwill serve each customer from the closest CDN server. [12 marks](c) You have looked up the IP address of your favourite search engine on theUniversity network and noticed the answer is different from that given to yourfriend when he did the lookup in Newfoundland, Canada.For each option above, indicate why it might, or might not, be used by yourfavourite search engine to improve web page performance. [4 marks]6CST.2013.5.76 Computer Networking(a) Considering either TCP/IP or UDP/IP, write a description of how server-port,client-port, source-port and destination-port relate to each other. You may wishto give examples and use diagrams as appropriate. [4 marks](b) What is a routing-loop? Include a diagram in your answer. [4 marks](c) Describe a mechanism that prevents routing-loops in Ethernet networks.[4 marks](d) (i) Describe and, with the aid of an example, illustrate the IP Time-To-Live(TTL) mechanism for minimising the impact of routing-loops. [2 marks](ii) Assuming, in part (d)(i), a perfect implementation, describe a disadvantageof the approach including the symptoms that might be experienced in anetwork subject to this disadvantage, and a test that may identify theproblem. [2 marks](e) Explain the technical and architectural argument behind the decision in IPv6to retain header TTL but not a header checksum. [2 marks](f ) Explain why there is ambiguity about handling packets with TTL values of 1and give a practical solution.   Computer Science Engineering & Technology C++ Programming COMPUTER S CS201 Share QuestionEmailCopy link Comments (0)