All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info
Home > Algorithms
An algorithm is a sequence of steps to be followed to accomplish a certain task. Often used in computer programming, they can become interesting puzzles because even though there can be many ways to accomplish something, one may be better than another.
Difficulty: 3 of 5 Latest: Savings Bonds
Years ago, U.S. Savings Bonds were sold via payroll deductions. Say a bond worth $25 at maturity was sold for $18.75. You could have a certain amount deducted each pay period and when you built up enough in your bond account to pay the purchase price, you'd get a savings bond, and you might still have an amount left over in you account to go toward you next bond.

Say you had started with 3.75 taken out each pay period. After five such deductions you'd have exactly enough to buy an 18.75 bond. But suppose at some time when you happened to have 7.50 built up in your account you decided you wanted to get bonds more frequently and shifted to having 6.25 taken out each pay period so you'd get a bond every three pay periods. Next pay period you'd have 13.75 in your account, then next time you'd have $20, which is enough to get a bond and have 1.25 left over in your account, followed by a balance of 7.50 the next time, and this cycle would repeat forever, with your balance never going below 1.25. That 1.25 that hangs around in your balance is not helping you get your bond any sooner.

Devise an algorithm or formula so you can determine if such "dead money" is in a person's account, and how large that perpetually low balance is, based on a bond purchase price, the current balance, and the amount deducted each period, so that that lowest balance in the cycle can be refunded to the employee and the cycle will include a zero balance at some point.

Make sure your method allows for the fact that it may take a while before the balance goes to zero. The number given above were chosen to be simple, but allow for deduction amounts that may bear no simple relation to the purchase price.

(Solution Posted, 2 Comments) Submitted on 2025-04-01 by Charlie   
Page 2 of 8   << prev next >>    
Difficulty: 3 of 5Tautonymic number counting | Rating: 5.00
Posted on 2022-09-04 by K Sengupta (Solution Posted, 2 Comments)
Difficulty: 3 of 5Half Integer Base Baffle | Rating: 5.00
Posted on 2022-07-29 by K Sengupta (Solution Posted, 2 Comments)
Difficulty: 3 of 5Lexicographic Listing | Rating: 4.00
Posted on 2022-05-29 by K Sengupta (No Solution Yet, 3 Comments)
Difficulty: 3 of 5Fifth Thursdays and Sundays | Rating: 5.00
Posted on 2022-05-17 by K Sengupta (No Solution Yet, 1 Comments)
Difficulty: 4 of 5Roman Square Root Resolution | Rating: 3.00
Posted on 2022-05-15 by K Sengupta (Solution Posted, 6 Comments)
Difficulty: 3 of 5Divisible by 13 | Rating: 5.00
Posted on 2022-04-15 by K Sengupta (Solution Posted, 11 Comments)
Difficulty: 3 of 5Golden Ratio Gradation | Rating: 5.00
Posted on 2022-01-27 by K Sengupta (Solution Posted, 4 Comments)
Difficulty: 2 of 5Decimal Division Decision | Rating: 4.00
Posted on 2021-12-05 by K Sengupta (Solution Posted, 1 Comments)
Difficulty: 3 of 5Two Probability Distributions | Rating: 5.00
Posted on 2021-06-21 by Charlie (Solution Posted, 2 Comments)
Difficulty: 3 of 5Linked List Deleted |
Posted on 2021-05-31 by Danish Ahmed Khan (No Solution Yet, 1 Comments)
Difficulty: 3 of 5Two Towers Hanoi | Rating: 3.00
Posted on 2020-05-27 by Brian Smith (No Solution Yet, 4 Comments)
Difficulty: 5 of 5Crossword puzzles | Rating: 5.00
Posted on 2019-05-21 by Math Man (No Solution Yet, 10 Comments)
Difficulty: 4 of 5Unique decimal primes |
Posted on 2017-11-24 by Ady TZIDON (No Solution Yet, 1 Comments)
Difficulty: 3 of 5Leaving a maximal result |
Posted on 2017-08-25 by Ady TZIDON (No Solution Yet, 3 Comments)
Difficulty: 4 of 5Marbles in boxes |
Posted on 2017-08-16 by Ady TZIDON (No Solution Yet, 5 Comments)
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2025 by Animus Pactum Consulting. All rights reserved. Privacy Information