Different ways to make £2

T

toasty

I've just been speaking to my brother, he asked me how many ways did I think there were to make 20p from coins.. (he's a teacher)

I guessed at 40 different ways, it turns out there are actually 41, so I was pretty close :)


So to take a simpler example, there are 4 ways to make 5p
5 x 1p
2 x 2p and 1 x 1p
1 x 2p and 3 x 1p
1 x 5p


So, my question is:
How many ways are there to make £2 from the coins 1p, 2p, 5p, 10p, 20p, 50p, £1 and £2?

You can either try to guess, or work it out...

BTW, there are 4563 ways to make £1 - so you are looking at quite a big number..

I've had a look around and I don't think the answer is on the internet - so you can't cheat. :(

I know the answer, first one to get it right gets the honour of choosing the next maths based question.
:D
 
Sponsored Links
For each of the 4563 ways of making one pound, there are 4563 ways of making the other pound so the answer must be at least 4563 squared - plus one more for using a £2 coin.

Even that isn't the end of it because there are combinations outside of this. Example: 50p + 20p + 20p + 5p + 2p + 2p + 2p is not included in the ways of making £1. All the ways of making £1-01p and 99p must be counted as well.
 
@Spacecat, I agree with your logic entirely, that is exactly how I saw it too.

When I said earlier that I had the answer, I don't actually have it yet the perl script is still running!!!

But like you, I expect the answer to be around about the 21,000,000 mark. (4563^2)

The only thing not considered is that there will be an element of repetition in your argument, i.e making the first £1 as a £1 coin and the second as 2 x 50p can be done two ways, so you won't quite get the 4563^2 combinations.
 
Sponsored Links
making the first £1 as a £1 coin and the second as 2 x 50p can be done two ways, so you won't quite get the 4563^2 combinations.

Oops! I forgot about the repetitions. :oops: :oops: :oops: Each combination comes up twice so it's half of 4563 squared + 1 for the £2 coin.

After that you have to count all the combinations that can't be split into two piles of £1 each. Actually, I don't think there'll be a lot of these - but I might be wrong ---
 
Well, the results are in....

73682 combinations to make £200

I suppose the combinations are much more than we first though.

Ah well, and interesting exercise I suppose. :D
 
Well, the results are in....

Try this...........!!

my $target = 200;
my @coins = (1,2,5,10,20,50,100,200);
my @ways = (1);

for $coin (@coins) {
$ways[$_] += $ways[$_-$coin] for $coin..$target;
}

print "Answer to PE31 = $ways[$target]";
 
@trazor, that's amazingly quick! Your perl is 100 times better than mine.

I don't claim to understand it though!!

Makes mine look pretty amatuerish:

$a=1 ;
$b=2 ;
$c=5 ;
$d=10 ;
$e=20 ;
$f=50 ;
$g=100 ;
$h=200 ;

$make=200 ;

for ( $k=0; $k<=$make; $k++ ) #1p
{
for ( $l=0; $l<=($make/$b); $l++ ) #2p
{
for ( $m=0; $m<=($make/$c); $m++ ) #5p
{
for ( $n=0; $n<=($make/$d); $n++ ) #10p
{
for ( $o=0; $o<=($make/$e); $o++ ) #20p
{
for ( $p=0; $p<=($make/$f); $p++ ) #50p
{
for ( $q=0; $q<=($make/$g); $q++ ) #£1
{
for ( $r=0; $r<=($make/$h); $r++ ) #£2
{
$s=$k*$a ;
$t=$l*$b ;
$u=$m*$c ;
$v=$n*$d ;
$w=$o*$e ;
$x=$p*$f ;
$y=$q*$g ;
$z=$r*$h ;

$total=$s+$t+$u+$v+$w+$x+$y+$z ;
if ( $total == $make )
{
print $k . "x1p " . $l . "x2p " . $m . "x5p " . $n . "x10p " . $o . "x20p " . $p . "x50p " . $q . "x£1 " . $r . "x£2 \n" ;
$i++ ;
}
}
}
}
}
}
}
}
}

print "\n" ;
print $i . " combinations to make " . $make ."p" ;
 
OK now do it in pre decimal £ s d for 2 Guineas using farthings , ha`pennies , pennies , thrup`ney bits , tanners , shillings ,florins ,half-crowns .Ten-Bob notes , One pound notes. Without a calculator :LOL:
 
Sponsored Links
Back
Top