WORHP Kata of August 2023: Tsiolkovsky rocket equation ⌚ 2023-08-01A kata (in the context of programming) is a small training unit to practise coding. In this series of WORHP Katas we present standard problems of optimization which you can use to get familiar with optimization (and our optimization software WORHP).
Kata: The Tsiolkovsky rocket equation computes the maximum change of velocity of a rocket:
This equation also applies for rockets with more stages, for which the velocity gains in all stages are added.
Here is our optimization problem: The stages of an -stage rocket have the masses , where (in arbitrary units) and each consists of 90% of propellant. After burning the first stage (and gaining the velocity) the hull of the first stage is pushed away, and the second stage is ignited, etc. The payload is , and the effective exhaust velocity of all stages is the same.
What is the maximum change of velocity which a 2-stage or 3-stage rocket can gain?
A solution will be provided with the next WORHP Kata.
Solution of last WORHP Kata: If is a solution to the queens puzzle, these constraints have to be fulfilled:
|exactly one queen in each column:|
|exactly one queen in each row:|
|not more than one queen on each downward diagonal/subdiagonal:|
|not more than one queen on each upward diagonal/subdiagonal:|