In the capitol city WhatThe, in the newly formed country of Techstonia… the newly appointed government leaders are trying to figure out the currency situation. They have decided that the smallest denomination of paper money will be worth 1 byte = 100 bits. They have further concluded that cent pieces are to much of a pain so the lowest denomination of coins available will be worth 10 bits. Therefore, obviously, all items being purchased must be a multiple of 10 bits… and likely to cover all possibilities - 10, 20, 30…etc.
Originally they thought they would just mint 9 coins to cover all of the possibilities between bytes… but have concluded that this is just to many coins. They want to be more efficient. They have decided that they want to mint only 4 coins to cover all possibilities most efficiently.
They have asked you as their expert on all things monetary… to advise them as to what the values of the 4 coins should be, keeping in mind that they are looking for the 4 coins that will cover the most possible combinations.
So… what are they?
why 4 coins? i'd go with 10, 20, 50. just 3..
never needing more than 3 coins in hand to cover any price between 1 note… shrugs.
if you want a 4th coin, i'd go for 70. now needing max 2 coins in hand for any price between 1 note.
never needing more than 3 coins in hand to cover any price between 1 note… shrugs.
if you want a 4th coin, i'd go for 70. now needing max 2 coins in hand for any price between 1 note.
The task wasn't worded well. In the search for the most efficient coinage… they would like you to choose the 4 coins that cover the most possibilites… without doubling up (using two of the same coin).
unless I have misunderstood the question, u wouldnt need to double up as at 100 bit u would have a 1 byte note.
10 bits = 1x 10
20 bits= 1x 20
30 bits= 1x 10 and 1x 20
40 bits = 1x 40
50 bits= 1x 50
60 bits= 1x 10 and 1 x 50
70 bits= 1x 50 and 1x 20
80 bits= 1x 50 and 1x 20 and 1x 10
90 bits= 1x 50 and 1x 40
100 bits = 1 byte note.
110 bits = 1 byte note and 1x 10 bit coin
and so forth.
The answer is 10, 20, 30 and 50. (The Fibonacci Sequence)
Here is how all the possibilities work out, from 10 to 100 :
10 bit coin
20 bit coin
30 bit coin
40 = 10 + 30
50 bit coin
60 = 50 + 10
70 = 50 + 20
80 = 50 + 30
90 = 50 + 30 + 10
100 = 50 + 30 + 20 or 1 Byte note.
No coin used more than once in any given combination.
still not sure i'm understanding tomk, you only need to go as high as the first note, so lots of combinations work, 10,20,40,70 for instance without using the same coin twice.
chrissy got there first..
edit, 10,20,40,80 would probably be the highest without using a note and let you get all the way to 150 without doubling up.
Yeah, terry's is the one.
In terms of efficiency, it's the same as 10, 20, 30 and 50 up until 100. Up to 200 it's more efficient by using 2 less coins, and then it extends up to 240 without doubling up. To get to 250 Bits, you have to use the 10 twice.
10,20,40,80 would probably be the highest without using a note and let you get all the way to 150 without doubling up.
The newly appointed leaders of Techstonia have ruled… that Terry1966 has indeed provided the combination that they are going to use.
It is fortunate that you all have arrived at an equitable solution so fast. I have been put under house arrest by the Exalted Techstonian Timekeeper for the title of this topic. They are so pleased with the solution that they have commuted my sentence if I agree to change the page on my calender.