In computer algorithm space complexity 2n approx. equal to n where n is very large...how????
Answer:
Well it depends on the meaning of "approximately equal". 2n is approximately equal to n if we define
"f(n) is approximately equal to g(n)" iff lim f(n)/g(n) = constant > 0 as n approaches infinity.
Actually a more accurate phrase is that 2n has the "same order" as n.
You are confused because you are thinking of the traditional meaning of "approximately equal" as |f(n) - g(n)| < constant as n approaches infinity.
Because the algorithm of 2n complexity and that of n complexity are both linear in nature. Although it will always take 2n twice as long to run as n this is insignificant when compared to the running time of say n^2 as n becomes large.
The answers post by the user, for information only, FunQA.com does not guarantee the right.
More Questions and Answers: