Consider the following binary search algorithm (a classic divide and conquer algorithm) that searches for a value
Question:
Consider the following binary search algorithm (a classic divide and conquer algorithm) that searches for a value X in an sorted N-element array A and returns the index of matched entry:
Assume that you have Y cores on a multi-core processor to run Binary Search. Assuming that Y is much smaller than N, express the speedup factor you might expect to obtain for values of Y and N. Plot these on a graph.
Many computer applications involve searching through a set of data and sorting the data. A number of efficient searching and sorting algorithms have been devised in order to reduce the runtime of these tedious tasks. In this problem we will consider how best to parallelize these tasks.
Binary Search (A[0..N-1], X) { low = 0 high = N - 1 while (low <= high) { mid (low if (A[mid] > X) high else if (A[mid] < X) low = mid + 1 } else high) / 2 mid - 1 return mid // found } return -1 // not found
Step by Step Answer:
Heres a breakdown of the expected speedup factor and a plotted graph Speedup Factor Ideal Speedup In ...View the full answer
Computer Organization And Design The Hardware Software Interface
ISBN: 9780123747501
4th Revised Edition
Authors: David A. Patterson, John L. Hennessy
Students also viewed these Computer science questions
-
Many computer applications involve searching through a set of data and sorting the data. A number of efficient searching and sorting algorithms have been devised in order to reduce the runtime of...
-
Consider the following recursive mergesort algorithm (another classic divide and conquer algorithm). Mergesort was first described by John Von Neumann in 1945. The basic idea is to divide an unsorted...
-
Next, assume that Y is equal to N. How would this affect your conclusions in your previous answer? If you were tasked with obtaining the best speedup factor possible (i.e., strong scaling), explain...
-
A company estimates that the marginal cost (in dollar per item) of producing x items is 1.73 - 0.004x. if the cost of producing one item is $566, find the cost of producing 100 items. (Round your...
-
In 2003, Weyco, Inc., gave employees a 15-month advance warning of a new policy that went into effect on January 1, 2005. The policy prohibited employees from smoking, on or off the job. The company...
-
A regression analysis has produced the following analysis of variance table: a. Compute se and s2. b. Compute SST. c. Compute R2 and the adjusted coefficient of determination. Analysis of Variance...
-
Could you assume the responsibility of decision making? Yes / No
-
Solve the following linear programming problem graphically: Maximize profit = 4X + 6Y Subject to: X + 2Y 8 5X + 4Y 20 X,Y 0
-
Conduct the appropriate research and explain the ATOs requirements in relation to fringe benefits tax (FBT). 150180 words (Please note: Australian Taxation - Please type answer)
-
Assume that you have Y cores on a multi-core processor to run MergeSort. Assuming that Y is much smaller than length(m), express the speedup factor you might expect to obtain for values of Y and...
-
If on average we need to access memory once every 75 cycles, what is impact on our application? On a CC-NUMA system, the cost of accessing non-local memory can limit our ability to utilize...
-
Which value(s) must be excluded from the domain of these functions? a. f(x) = 1/x b. f(x) = x 1 c. f(x) = 3/2x 3 d. f(x) = 2 x 2
-
Adjusting Entries for Interest At December 31 of Year 1, Portland Corporation had two notes payable outstanding (notes 1 and 2). At December 31 of Year 2, Portland also had two notes payable...
-
We want to get an idea of the actual mass of 235U involved in powering a nuclear power plant. Assume that a single fission event releases 200 MeV of thermal energy. A 1,000 MWe electric power plant...
-
The following accounts appear in the ledger of Sheridan Ltd. after the books are closed at December 31 ( in thousands). Share Capital-Ordinary, no par, 1 stated value, 400,000 shares authorized;...
-
1. Let f(x) 223-9x2. (a) Find all critical points for f(x).
-
Sadie's ski shop sells ski and boots. Skis are sold for $300 per pair and have associated Variable Costs of $150 per pair. Boots are sold for $200 per pair with an associated Variable Expense of $65...
-
The efficiency of an engine is 0.21. For every 1.00 kJ of heat absorbed by the engine, how much (a) Net work is done by it and (b) Heat is released by it?
-
Define relevant costs and discuss: (1) whether all future costs are relevant for decision making and (2) whether variable costs are always relevant and fixed costs are always irrelevant
-
In the previous problem, we used the Poisson distribution to find the probability of generating x number of frames, in a certain period of time, in a pure or slotted Aloha network as p[x] = (e x...
-
Which of the following is a channelization protocol? a. ALOHA b. Token-passing c. CDMA
-
In the previous problem, we found that the probability of a station (in a G-station network) successfully sending a frame in a vulnerable time is P = e 2G for a pure Aloha and P = e G for a slotted...
-
Now the iMost Company is subject to capital rationing and can only afford to adopt one of the projects, the Profitability Index is as follows: Project Y = .73 Project Z = .64 Which project should the...
-
A partial trial balance of Lindy Corporation at December 31, 2020, follows: Dr. Cr. Supplies $7,700 Salaries and wages payable $5,200 Interest receivable 2,690 Prepaid insurance 113,400 Unearned rent...
-
: Star Caf Corporation sells home coffee roasters for an average of OMR 40, and which cost OMR 25. This is a cost-to-retail percentage of 75%. Star Cafes beginning inventory has a cost of OMR 50,000,...
Study smarter with the SolutionInn App