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 1981 retrospective study published in the prestigious New England Journal of Medicine looked at the use of cigars, pipes, cigarettes, alcohol, tea, and coffee by patients with pancreatic cancer and...
-
Using the data in question 4, Department Xs contribution to overhead as a percentage of sales is a. 20%. c. 12%. e. 32%. b. 30%. d. 48%. Data From Question 4 A company operates three retail...
-
Lexington Corporations weekly payroll of $24,000 included F.I.C.A. taxes withheld of $1,836, federal taxes withheld of $2,990, state taxes withheld of $920, and insurance premiums withheld of $250....
-
TheOnlyWizKid, Montclair State University Download and connect to the raw data Market Caps of S_P500 Companies 2008-2015.xls on Canvas>Files> Tableau Data Files using Tableau. The Excel file lists...
-
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...
-
Go to Yahoo Finance Website at ca.finance.yahoo.com. In February 2010, a Japanese investor bought 2,000 shares of Magna International, Inc. (MG.TO), for $60 through his Toronto-based broker. What is...
-
Bubble Co. has $10 million in assets that are financed 60 percent by equity and 40 percent by debt. The interest rate on debt is 7 percent while the opportunity cost of equity capital is estimated to...
-
Suppose you are considering taking consumer loan from bank for one year. Usually, for short-term loans, the bank offers 12 percent interest that compounds annually. Your credit application has been...
-
When r, the annual interest (or discount) rate, increases, what happens to the present value of a perpetuity? Why?
-
What is the fundamental interest equation that underlies the calculation of the approximate cost-of-credit formula?
-
Grays Accounting pays Rita Flores $ 95,400 per year. Assume that Grays accountants are expected to work a total of 8,000 direct labor hours in 2016. Grays estimated total indirect costs are $168,000...
-
Keswick Conference Center and Catering is a conference center and restaurant facility that hosts more than 300 national and international events each year attended by 50,000 professionals. Due to...
-
Explain the buyers position in a typical negotiation for a business. Explain the sellers position. What tips would you offer a buyer about to begin negotiating the purchase of a business?
-
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...
-
SWOT ANALYSIS for Southwest Airlines product: larger seats for passengers not just a swot analysis on southwest airlines, itself develop a SWOT analysis for my company. The SWOT analysis should...
-
A 55.0 kg skier with an initial speed of 14.0 m/s coasts up a 2.50 m high rise as shown in the following figure. 44 = ? KE f Vi 2.5 m 35 Find her final speed at the top (in m/s), given that the...
-
A charge 5.02 nC is placed at the origin of an xy-coordinate system, and a charge -2.05 nC is placed on the positive x-axis at x=4.00 cm. A third particle, of charge 6.04 nC is now placed at the...
Study smarter with the SolutionInn App