Moto Hell - The Motorola Modding Community
November 21, 2024, 09:01:00 am *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: The forum is no longer active and registration is disabled; however you can still fetch everything as guest.
 
   Home   Help Facebook Search Calendar Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: The mint of England  (Read 4264 times)
Exploited
Administrator
Ultimate modder
*****

Karma: 109
Offline Offline

Posts: 5153



View Profile WWW
« on: October 08, 2007, 11:43:52 am »

We have a problem in the mint of England (the monetary holder bank).

Suddenly they decieded that they must release new hard cash (monets). The rule was that every cash sum from 1 to 20 must be paid with one or maximum 2 monets without need for change (no returning of odd money)! What is the minimal number of different hard cash (monets) that they can release and still follow the rules?
Logged

Joka X
MH Official Spammer
PHD modder
***

Karma: 26
Offline Offline

Posts: 2743



View Profile
« Reply #1 on: October 08, 2007, 10:48:09 pm »

Math again? :'( :'( :'(
Logged
motomaniacs
Guest
« Reply #2 on: October 10, 2007, 08:43:41 pm »

i thinks so Wink
Logged
Exploited
Administrator
Ultimate modder
*****

Karma: 109
Offline Offline

Posts: 5153



View Profile WWW
« Reply #3 on: October 24, 2007, 09:48:01 am »

Solution:
With one coin we can pay 2 sums (for example 1=1 and 1+1=2). Just a note here that we must have coin 1 for sure!
With two coins we can pay 4 sums
With three coins we can pay 9 sums
With four coins we can pay 18 sums - still not sufficient, because we have 20 sums
=> we must have at least 5 coins. We will assume for a moment that we will need 5 coins total - let's name them A, B, C, D and E (and we have A<B<C<D<E)

Every sum must be presented on one way only (so we can minimize the number of the coins). A=1 => we do not need a coin with amount 2, because A+A=1+1=2. However we need a coin 3 => B=3.
The ready sums are 1+1=2, 1=1, 3=3, 1+3=4 and 3+3=6 => we have a missing sum of 5 => we need a coing C=5, but we have a duplicate here, becase 3+3=6 and 1+5=6 => 5 coins total is not enough...

We will try to continue with adding a 6th coin F (F>E)
the coins 1,3 and 5 can pay the sums of 1,2,3,4,5,6 - unfortunately they cannot pay the sum 7 => our fourth coin D=7

The coins 1,3,5 and 7 can make 1,2,3,4,5,6,7,8, but they cannot pay 9 => the next coin E=9
1,3,5,7 and 9 can pay almost everything (as we suspected), but not all - they cannot make 20... => our final 6th coin will be F=10

All coins are 1,3,5,7,9 and 10... Case solved
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Design By Forum Hosting
Powered by SMF 1.1.21 | SMF © 2015, Simple Machines