You are the head of a division of a big Silicon Valley company and have assigned
ID: 650363 • Letter: Y
Question
You are the head of a division of a big Silicon Valley company and have assigned one of your engineers, Jim, the job of devising an algorithm to sort through an English text of n words and convert it into an Esperanto document.
Jim comes up with an algorithm which takes 2n2+ 2n bit operations to handle an input text with n words.
Suppose the computers in your business can handle one bit operation every nanosecond (1 nanosecond =10-9 seconds).
How many DAYS would it take Jim's algorithm to convert a text with 50 words on these computers?
Explanation / Answer
Given:
Jim comes up with an algorithm which takes 2n2+ 2n bit operations to handle an input text with n words.
If it handles, One bit operation every nanosecond
Then, (1 nanosecond =10-9 seconds).
Answer:
ANS( num_cmp( 1224 ) );
ANS( num_cmp( (2*50**2+2**50)/1000000000/60/60/24 ));
$multiple = new_multiple_choice();
$multiple -> qa
"For an input text of (100) words, the statement that best describes the performance of Jim's algorithm is:",
"His algorithm would take more than (40) trillion years to run." );
100 words= 40 Trillion Years
50 words= 20 Trillion years
To calculate in Days,
50 words = 20Trillion*365 (since, 1year= 365days)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.