Home > Net >  How many more operations can 1000 times faster computer perform on a task with T(n)=log₂(n)
How many more operations can 1000 times faster computer perform on a task with T(n)=log₂(n)

Time:08-29

Lets say we have an algorithm with with time complexity T(n)=log₂(n). In a time T we can solve problem of size n1. How much bigger problem can we solve in the same time T on a 1000 times faster computer (duration time of 1 operation is 1000 faster).

For example if we have a problem T(n) = n³, we can solve 10*n1 problems on a 1000 times faster computer.

n2³ = 1000*n1³,
n2 = ³√(1000)*n1,
n2 = 10*n1,

But I can't wrap my head around how to calculate logarithmic function.

CodePudding user response:

Using the same approach:

log(n2) = 1000 log(n1)

Using log formula:

M * log(a) = log(a^M)

the above becomes:

log(n2) = log(n1^1000)

so i guess (n1^1000) operations

CodePudding user response:

log(m) = 1000 log(n)

can be written

m= n^1000

(whatever the base).

So for any value of n, m will exceed the capacity of existing computers.

  • Related