Question

Data Science

a) Show the main memory address format that allows us to map addresses from ma inmemon to cache Be sure to incluude the fields as vwell as their sizes

b) Compute the hit ratio for a program that loops 4 times from locations 0 to 6710 in memory.

c) Compute the effective access time for this program.

8) A direct-mapped cache consists of eight blocks. A byte-addressable main memory contains4K blocks of eight bytes each. Access time for the cache is 22 ns and the time required to filla cache slot from main memory is 300 ns (this time will allow us to determine the block is missing and bring it into cache). Assume a request is always started in parallel to both cache and to main memory (so if it is not found in cache, we do not have to add this cache search time to the memory access). If a block is missing from cache, the entire block is brought into the cache and the access is restarted. Initially, the cache is empty.

Verified

### Question 41127

Data Science

Given the start vertex s = a in the weighted directed graph below, use the following table to show the result of Dijkstra’s Algorithm (reference Section 8.4).(12 Points)

### Question 41126

Data Science

Briefly describe the two different ways to find a path given the start vertex and the end vertex in a graph. (6 Points)

### Question 41125

Data Science

Given a graph G=(V, E), what is its adjacent matrix and what is its incident matrix? (8Points)

### Question 41124

Data Science

Assume that an array has n elements. Prove that the complexity of the binary search isO(log. n). (10 Points)

### Question 41123

Data Science

Assume that an array has n elements. Prove that the complexity of the sequential search isO(n). (10 Points)

### Question 41122

Data Science

Assume that the elements in the integer array a are in ascending order. Complete the recursive binary search function below that returns the index of the target value t: (10Points)

### Question 41121

Data Science

a) What is a priority queue?A priority queue takes item's priority into account. When items in the queue are accessed, the item with the highest priority is accessed first.
. Answer the following questions: (12 Points)
b) What is a binary search tree?
c) What is a heap?

### Question 41120

Data Science

3. Complete the integer queue class defined below: (12 Points)

### Question 41119

Data Science

Complete the integer stack class defined below: (10 Points)

### Question 41118

Data Science

1. Assume that f(n) = 2n² + 3n +1. Figure out M, N>0, when n>N, |f(n)|<M|n²l, i.e.f(n)=O(n³). (10 Points)