Math
摘要
This chapter pertains to 28 mathematical problems, which are elucidated through a series of examples and subsequently implemented in Python. The enumerated list of these problems is presented below: 1. Computing the execution order in Josephus problem. 2. Reaching the point (0,0) in the lattice path. 3. Generating a sorted list of integers for the Brussel choice problem: 4. Finding the inverse of collatz conjecture. 5. Counting the possible corners. 6. Nearest s-gonal for an integer n. 7. Finding the fulcrum position of physical weights. 8. Computing the total number of blocks required to build a pyramid of spheres. 9. Grouping the identical coins based on some conditions. 10. Computing the median of the triple medians. 11. Smallest seven-zero. 12. Converting and Evaluating Mathematical Expressions from Postfix to Infix Notation. 13. Reaching the stable state in the Bulgarian solitaire. 14. Computing the area of the rectangular towers in the Manhattan Skyline. 15. Cutting the rectangular into the squares. 16. Eliminating the corners in the two-dimensional grid. 17. Computing Last row of the Leibniz Triangle. 18. Reaching to a goal based on Collatzy distance. 19. Equaling the summation of two squares with n. 20. The summation of three numbers with a goal number. 21. Finding perfect power. 22. Lunar multiplication of integers. 23. n-th term of recaman sequence. 24. n-th term of Van Eck sequence. 25. Generating Non-Consecutive Fibonacci Sums Based on Zeckendorf’s Theorem. 26. Finding the k-th Fibonacci word. 27. Finding the most point line in a two-dimensional grid. 28. Checking if a centrifuge is balanced.