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:
  • Why are ALL microwave ovens rectangular shaped?
  • Need Opinion about university, Engineering Student?
  • Ok well i wanna know wat this would be classified as?
  • What is the function in refrigerator?
  • What does 1 cubic foot of water weigh?
  • How many CO2 emissions per fuel ton burned?
  • Different between chemical and mechaical engineers?
  • Capactiance of tuning capacitor?
  • Engineering + MBA whats my scope?