Mary works in the Big Data Analysis Group at Amazon. She develops algorithms for
ID: 3665165 • Letter: M
Question
Mary works in the Big Data Analysis Group at Amazon. She develops algorithms for presenting customers with suggestions for what they might like to purchase. She has tested a system using a subset of available data consisting of the buying habits of 1000 customers. Her algorithm requires the solution of a linear system of equations about same size as the number of customers. The 1000 customer database thus required the solution of a 1000 x 1000 matrix. She used Gaussian Elimination and it took 1 microsecond. a. If she were to generate a solution for every Amazon customer, how long would it take if she used the same program and computer? Neglect memory limitations and focus on number of flops (floating point operations). Use the reported number of customers in 2014: 244 million. b. Should Mary suggest to her boss that they implement her algorithm?
Explanation / Answer
Some brief motivation: There are several research paper on optimizing gaussian elimination techniques. The fastest and most optimized is given by Jack Edmonds in 1967. The algorithm is a variation of original gaussian elimination. It runs in O(n4) time, where n is number of rows or number of columns. So Mary's implementation would be atmost as good as Edmonds proposed algorithm which runs in O(n4) time.
Here, in this question n = 1000, and execution time is 106 Seconds. which suggests that Mary's algorithms time complexity is O(n2). Now, if the number of customers are 244 Million. then n= 244*106 ~ 108 . So the execution time will be 108*2 = 1016 sec = 317097919.837 years.
Since, her algorithm is very slow and takes years, she would not suggest her boss to implement the algorithm.