All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Pennies, Dimes, and Quarters (Posted on 2009-02-17) Difficulty: 2 of 5
In my left pocket I have a mix of pennies (1 cent) and quarters (25 cents). In my right pocket I have a bunch of dimes (10 cents). The number of coins in each pocket is the same, so is the cash value. What is the smallest (nonzero) number of coins I can have?

What if I had coins of x cents and z cents in my left pocket and coins of y cents in my right pocket - is there some quantitiy of coins I can have so that each pocket has the same number of coins and same cash value? (The value of the coins are positive integers x > y > z.)

See The Solution Submitted by Brian Smith    
Rating: 2.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Solution | Comment 4 of 10 |
(In reply to part 1 -- computer solution by Charlie)

If the numbers of each denomination are denoted by the capital version of the letters representing the denominations, then:

xX + zZ = yY = y(X+Z)

(x - y)X = (y - z)Z

This can be reduced by the factor GCD((x-y),(y-z))

So X = (y - z)/GCD((x-y),(y-z))
   Z = (x - y)/GCD((x-y),(y-z))
   Y = X + Z
  
In the case x=25, y=10, z=1:

X = 9/3 = 3
Z = 15/3 = 5
Y = 3 + 5 = 8

X+Y+Z = 16


  Posted by Charlie on 2009-02-17 12:52:44
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 (2)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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