"Proposal 1. Though I share the view by Elen of the Roads that the first things to present readers are the problem and the counter-intuitive solution, this is exactly the purpose of the lead section, and the math should still be presented in the article's body. By analogy with WP:WEIGHT I would present the material to the reader in order of complexity increase, so that the solutions involving less logical operations or iterations are placed on top of more complex material. 

 That said, I would suggest to move the current lead section  into a first named section, which I would call ""Background""; in the lead section I would overview the problem and state the solution in the first paragraph. In the second paragraph I would provide the brief descriptions of the solutions, as general as possible. The proposal 1 should be implemented in sections 2 and onward. —  • "