Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Sketch examples of the last purple-violation cases, providing example values in the nodes. For each case, sketch its decision, assuming every case occurs as a

Sketch examples of the last purple-violation cases, providing example values in the nodes. For each case, sketch its decision, assuming every case occurs as a sub-tree of a bigger tree. [5 marks] (c) Consider proscribing the two-three variant of a crimson-black tree in order that red nodes might also most effective lie at the left of a figure. (i) Discuss the impact this has on the search and insert overall performance. How does it effect the implementation? [5 marks] (ii) How does it have an effect on the worst-case prices of finding the minimum and most values in the tree? [3 marks] 10 CST0.2018.1.Eleven nine Algorithms The chaining collision-decision scheme for hash tables makes use of an array in which every detail is a related list. (a) For a hash desk that makes use of chaining to solve collisions with an array of duration m and n keys inserted, the average asymptotic complexity for seek and insert is O(1 + n m ). (i) Explain why search and insert are considered to be O(1) and not O(n) in practice. [2 marks] (ii) Give the worst-case complexities for seek and insert. State the elements that determine the overall performance located in practice. [5 marks] (b) An opportunity hash-desk implementation replaces the linked lists in each slot with pink-black timber. Discuss the advantages and disadvantages of this variation. [4 marks] (c) The linked lists may also get replaced via dynamically sized arrays. When complete, an array is improved by means of a aspect of okay. (i) Derive a potential to compute the amortised price of including an element to such an array using the capability method. On placing an element that triggers a selection, your ability should be zero just after the growth however before the insertion of the brand new detail. [3 marks] (ii) Use your potential to compute the amortised cost of including an element to the array. [3 marks] (iii) What factors might affect your choice of k when using the arrays in a hash table? [3 marks] eleven (TURN OVER) CST0.2018.1.12 10 Algorithms (a) Let dijkstra_path(g, a, b) be an implementation of Dijkstra's shortest route set of rules that returns the shortest course from node a to node b in a graph g. Prove that the implementation can adequately terminate whilst it first encounters node b. [5 marks] (b) Consider all paths in a graph from a to b, ordered from shortest to longest. Assuming p = dijkstra_path(g, a, b) is the first route in this collection, an set of rules to find the second direction considers deviations from the vertices of p. An set of rules to do that is given below. Feature second_path(Graph g, Vertex a, Vertex b): p = dijkstra_path(g,a,b) best_so_far = [] for i = 1 to len(p)-1: t = p[:i] # First i factors of p.C = g.Get_edge_weight(p[i], p[i+1]) g.Set_edge_weight(p[i], p[i+1], infinity) t.Append(dijkstra_path(g,p[i],b)) if (len(best_so_far) == 0 or value(t)

(d) For a pipelined processor implementation, why is it fantastic to have the source registers within the identical bit role independent of the practise format? [2 marks] (e) Why can there be many extra check in-to-sign in commands without a immediates than instructions with immediates? [3 marks] (f ) For a pipelined implementation of the RISC-V ISA, the sequential education execution model wishes to be preserved. Cases wherein the pipelined implementation might deviate from this sequential model are often called risks. For a easy pipelined implementation, what risks might exist and how might they be resolved? [8 marks] three (TURN OVER) CST1.2018.5.Four 3 Computer Design (a) A processor's predominant reminiscence is usually implemented the usage of DRAM. (i) Describe an ordinary DRAM cellular. [2 marks] (ii) Show, with the aid of a diagram, how DRAM is organised, making reference to devices, ranks, banks and arrays. [4 marks] (iii) Describe the distinction between an open-web page and closed-page row-buffer coverage and the forms of get admission to patterns they benefit. [2 marks] (b) The MOSI cache coherence protocol provides a brand new owned (O) country to the simple MSI protocol.When a cache maintaining a line in M state snoops a study request from another cache, it transitions to O nation and forwards the records to the requestor. Subsequent snoops for study requests also are fulfilled by this proprietor cache. An owned line is dirty and handiest one cache can preserve a line in O kingdom at any time. (i) Describe the difference between cache coherence and memory consistency. [2 marks] (ii) Draw a country transition diagram for the MOSI protocol, using a brand new motion Forward to indicate data being forwarded from one cache to another. [6 marks] (iii) Draw a desk displaying how the country of a line in a single cache limits the states the same line will have in a one-of-a-kind cache. [2 marks] (iv) Give benefits of including this extra owned state to the fundamental MSI protocol.

image text in transcribedimage text in transcribed
Problem # l 1 It} puts}. (Make sure you show your work. Not just the answers or the formulas without the computations, or you lose Ill pts.) Women make up 35 '14:. of the science and engineering workforce. In a random sample of twelve science and engineering employees, nd the following probabilities: a) Eaactl};r five {5} are women. b) That fewer than four [4) are women. c) That at most site [6) are women. d) At least three (3) are women 2. Problem 2. What is wrong with the following computation? 0 = 0+0+0+0+... = (1 - 1) + (1 -1) +(1+1)+ ... =1+ (-1+1) + (-1+1) + (-1+1)+ ... =1+0 +0+0+... = 1. The Italian mathematician Guidobaldo del Monte, friend of Galileo Galilei (father of modern science), thought that this proved the existence of God because something has been created out of nothing

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

Write the importance of mitochondria in a cell?

Answered: 1 week ago

Question

The cellular structure it synthesis the respiratory enzymes?

Answered: 1 week ago

Question

It is made up of lipoprotein?

Answered: 1 week ago