I see this Question in a diploma in computer science Exam in Algorithm , and i need help to solve it :

Algorithm A1 takes n^2 days to solve a problem of size n .
Algorithm A2 takes 2^n seconds on the same problem .
Detrmine how large of a problem instance is required before algirithm A1 becomes faster than algorithm A2 .
How much time do the two aldorithms take on that instance ?

Recommended Answers

All 3 Replies

Is this asking "Solve for n"?

It looks like a mathematical solution is v. hard, so maybe in a C.S. context it's asking for a numerical solution (approximation) using some kind of iterative approach?

ps: It looks like there are two positive real solutions, approx 0.0035 and 25.7

commented: It's pretty interesting there are two positive solutions. That's math for you. +15
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.