Solution Found!
How much time does an algorithm take to solve a problem of
Chapter 3, Problem 18E(choose chapter or problem)
How much time does an algorithm take to solve a problem of size n if this algorithm uses 2n2 + 2n operations, each requiring 10?9 seconds, with these values of n?a) 10________________b) 20________________c) 50________________d) 100
Questions & Answers
QUESTION:
How much time does an algorithm take to solve a problem of size n if this algorithm uses 2n2 + 2n operations, each requiring 10?9 seconds, with these values of n?a) 10________________b) 20________________c) 50________________d) 100
ANSWER:Solution:Step1Given thatAlgorithm uses 2n2 + 2n operations, each requiring 109 seconds.Step2To find We have to find how much time does an algorithm take to solve a problem of size n.Step3By using the given So, time taken by an algorithm to solve a problem of size n is a) 10When n =10Time taken by an algorithm to solve