-2

90 Kilograms of rocket fuel is necessary to propel 100 Kilograms of mass into Earth's orbit from sea level. However, this becomes tricky as, now the mass of the rocket is (100 + 90) = 190 Kilograms, inclusive of the original mass and the mass of the required fuel. This would now mean that we need an additional 81 KG of fuel to send the extra weight of the required fuel. Thus requiring 271 KG of total mass.

And the problem goes on and on forever, where we need to add additional fuel for the additional mass of the additional fuel. Seems like a O (∞) problem.

I am confused as to how to design a O(1) constant time algorithm to compute the rocket mass inorder to send M kg of mass. Also please let me know if there are other examples of O (∞).

ouflak
  • 2,458
  • 10
  • 44
  • 49
Stackm
  • 13
  • 2

1 Answers1

0

This is more of a math problem than it is a question about asymptotic notation.

Specifically, the math works out like this. You have an initial mass of m that you want to launch. You need to add .9m mass of fuel to move that to space. But that fuel itself requires .9(.9m) = (0.9)2m additional fuel, and that (0.9)2m fuel requires (0.9)3m additional fuel, etc. You therefore need to compute the quantity

m + 0.9m + (0.9)2m + (0.9)3m + (0.9)4m + …

= m · ((0.9)0 + (0.9)1 + (0.9)2 + (0.9)3 + (0.9)4 + …)

That bit in parentheses is the sum of an infinite geometric series. You can show via a variety of techniques (do a quick Google search for a few examples) that the sum works out to

1 / (1 - 0.9) = 1 / 0.1 = 10,

and so the total mass of the rocket will be 10m, of which 9m is fuel.

templatetypedef
  • 362,284
  • 104
  • 897
  • 1,065