Three coins for the fair king [duplicate]
This question already has an answer here:
Eight coins for the fair king
6 answers
Based on the question Eight coins for the fair king:
I saw a comment saying "There isn't a good solution known even with three coins in all cases".
So the challenge here is to try to solve the same problem placed above, except with only 3 coins.
The rules are:
You must create 3 coins of different value, no more.
Any sum of money must be paid with only 3 coins. This sum should be paid without giving change.
You must set N such that no price is allowed to be greater than N.
I've tried to solve it myself and the best combination I could get to was
Coins of
1
,2
and5
, which can get me to a maximum of N = 12.
The highest number that follows the rules wins, and if there's proof that it's definitely the highest answer possible, it gets the tick.
Note: You may only use up to 3 coins to pay every amount, rather than 8.
mathematics combinatorics optimization open-ended
marked as duplicate by Glorfindel, Chowzen, athin, JonMark Perry, n_palum yesterday
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
Eight coins for the fair king
6 answers
Based on the question Eight coins for the fair king:
I saw a comment saying "There isn't a good solution known even with three coins in all cases".
So the challenge here is to try to solve the same problem placed above, except with only 3 coins.
The rules are:
You must create 3 coins of different value, no more.
Any sum of money must be paid with only 3 coins. This sum should be paid without giving change.
You must set N such that no price is allowed to be greater than N.
I've tried to solve it myself and the best combination I could get to was
Coins of
1
,2
and5
, which can get me to a maximum of N = 12.
The highest number that follows the rules wins, and if there's proof that it's definitely the highest answer possible, it gets the tick.
Note: You may only use up to 3 coins to pay every amount, rather than 8.
mathematics combinatorics optimization open-ended
marked as duplicate by Glorfindel, Chowzen, athin, JonMark Perry, n_palum yesterday
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
4
Can you repeat the context of the original problem here? Relying on a link to maintain that context isn't the best idea.
– THiebert
2 days ago
It's different in the way that this one is simple enough that you can solve it without using a computer, so it does change a bit on the dynamics of the problem.
– S. M.
2 days ago
@THiebert Added the rules from the original post.
– S. M.
yesterday
add a comment |
This question already has an answer here:
Eight coins for the fair king
6 answers
Based on the question Eight coins for the fair king:
I saw a comment saying "There isn't a good solution known even with three coins in all cases".
So the challenge here is to try to solve the same problem placed above, except with only 3 coins.
The rules are:
You must create 3 coins of different value, no more.
Any sum of money must be paid with only 3 coins. This sum should be paid without giving change.
You must set N such that no price is allowed to be greater than N.
I've tried to solve it myself and the best combination I could get to was
Coins of
1
,2
and5
, which can get me to a maximum of N = 12.
The highest number that follows the rules wins, and if there's proof that it's definitely the highest answer possible, it gets the tick.
Note: You may only use up to 3 coins to pay every amount, rather than 8.
mathematics combinatorics optimization open-ended
This question already has an answer here:
Eight coins for the fair king
6 answers
Based on the question Eight coins for the fair king:
I saw a comment saying "There isn't a good solution known even with three coins in all cases".
So the challenge here is to try to solve the same problem placed above, except with only 3 coins.
The rules are:
You must create 3 coins of different value, no more.
Any sum of money must be paid with only 3 coins. This sum should be paid without giving change.
You must set N such that no price is allowed to be greater than N.
I've tried to solve it myself and the best combination I could get to was
Coins of
1
,2
and5
, which can get me to a maximum of N = 12.
The highest number that follows the rules wins, and if there's proof that it's definitely the highest answer possible, it gets the tick.
Note: You may only use up to 3 coins to pay every amount, rather than 8.
This question already has an answer here:
Eight coins for the fair king
6 answers
mathematics combinatorics optimization open-ended
mathematics combinatorics optimization open-ended
edited yesterday
asked 2 days ago
S. M.
933419
933419
marked as duplicate by Glorfindel, Chowzen, athin, JonMark Perry, n_palum yesterday
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Glorfindel, Chowzen, athin, JonMark Perry, n_palum yesterday
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
4
Can you repeat the context of the original problem here? Relying on a link to maintain that context isn't the best idea.
– THiebert
2 days ago
It's different in the way that this one is simple enough that you can solve it without using a computer, so it does change a bit on the dynamics of the problem.
– S. M.
2 days ago
@THiebert Added the rules from the original post.
– S. M.
yesterday
add a comment |
4
Can you repeat the context of the original problem here? Relying on a link to maintain that context isn't the best idea.
– THiebert
2 days ago
It's different in the way that this one is simple enough that you can solve it without using a computer, so it does change a bit on the dynamics of the problem.
– S. M.
2 days ago
@THiebert Added the rules from the original post.
– S. M.
yesterday
4
4
Can you repeat the context of the original problem here? Relying on a link to maintain that context isn't the best idea.
– THiebert
2 days ago
Can you repeat the context of the original problem here? Relying on a link to maintain that context isn't the best idea.
– THiebert
2 days ago
It's different in the way that this one is simple enough that you can solve it without using a computer, so it does change a bit on the dynamics of the problem.
– S. M.
2 days ago
It's different in the way that this one is simple enough that you can solve it without using a computer, so it does change a bit on the dynamics of the problem.
– S. M.
2 days ago
@THiebert Added the rules from the original post.
– S. M.
yesterday
@THiebert Added the rules from the original post.
– S. M.
yesterday
add a comment |
3 Answers
3
active
oldest
votes
Fact 1:
There must be a $1 coin
Fact 2:
2nd-value coin <=4, else would overflow
Proof:
Exhaustion...
Maximizing possibilities:
Notation: (x,y,z) : highest possible value
Possibility 1: (1,2,?)
(1,2,3):9
(1,2,4):10
(1,2,5):12(@S.M. in question)
(1,2,6):10
(1,2,7):11
(1,2,8+):7
For (1,2,?), (1,2,5):12=greatest
Possibility 2: (1,3,?)
(1,3,4):12
(1,3,5):11
(1,3,6):10
(1,3,7):11
(1,3,8):12
(1,3,9+):7
For (1,3,?), (1,3,8):12=greatest
Possibility 3: (1,4,?)
(1,4,5):15(Credits to @M)
(1,4,6):13
(1,4,7):9
(1,4,8+):6
For (1,4,?), (1,4,5):15=greatest
Overall:
(1,4,5):15=greatest
This is basically a properly organized version of the scribbles I made trying to figure it out (plus you found an extra answer). The explanation is very straight-forward and seems correct, so I'll attribute it a tick.
– S. M.
2 days ago
1
thanks a lot +1 to question! @S.M.
– Omega Krypton
2 days ago
Man, there was a lot I didn't see either, my bad. xD Still think it's the best explained answer and with further edits will get to the best answer.
– S. M.
2 days ago
1
Fact 3 is not a true statement. 1,2,7 can generate all values up to 11 (not the best, but still...).
– asgallant
2 days ago
Edited, thanks!
– Omega Krypton
2 days ago
add a comment |
Anders Kaseorg's answer on the 8/8 list has the most optimal N/N answers up to N = 7 in a spoiler. And he has...
{1, 4, 5}
With a little enumeration, it's easy to see that you can use that set to get up to...
15.
EDIT
It's actually pretty simple to reason this out without brute forcing it (too much).
Say you have three denominations of coins - A, B, and C. Then clearly one of them has to be worth #1, or else you can't pay for things that are worth #1. So let's let A be worth #1. Now, assuming that C is the most valuable form of coinage, the most you can pay is #3C.
However, what if you want to pay #3C-1? We can safely assume that you'd have to use either 2C+A or 2C+B. But if you can use A, then C would have to be worth #2, which you can rule out with some quick figuring ({1,2,3} can get you #9, which {1, 1 < n < 2, 2} can't). So you're left with B being C-1.
As a result, you only need to check triples of the form {1, N, N+1}, where N can be at most 4.
New contributor
"The most you can pay is 3C". What if i choose {A,B,D} with D > C, but i can't pay 3D-1. The most i can pay is 3D-2 > 3C, which still makes it a better solution? The answer is correct, but the logic at the end is flawed
– Tibos
22 hours ago
add a comment |
This is a little bit (read: a lot bit) of trickery, but
I can get up to 44 with coins of -1, 1, 10. The -1 helps because it allows you to get a units digit of 6 through 9.
I can't prove this is optimal, but it's a start (and I'm not sure if this is even good for the kingdom to have this type of coin :P)
I do think he means it as 3/3 problem, not a 3/8 problem
– Thomas Blue
2 days ago
Yes, I mean it as a 3/3 problem, I'll specify it in the post just in case :p Very out-of-the-box answer though!
– S. M.
2 days ago
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
Fact 1:
There must be a $1 coin
Fact 2:
2nd-value coin <=4, else would overflow
Proof:
Exhaustion...
Maximizing possibilities:
Notation: (x,y,z) : highest possible value
Possibility 1: (1,2,?)
(1,2,3):9
(1,2,4):10
(1,2,5):12(@S.M. in question)
(1,2,6):10
(1,2,7):11
(1,2,8+):7
For (1,2,?), (1,2,5):12=greatest
Possibility 2: (1,3,?)
(1,3,4):12
(1,3,5):11
(1,3,6):10
(1,3,7):11
(1,3,8):12
(1,3,9+):7
For (1,3,?), (1,3,8):12=greatest
Possibility 3: (1,4,?)
(1,4,5):15(Credits to @M)
(1,4,6):13
(1,4,7):9
(1,4,8+):6
For (1,4,?), (1,4,5):15=greatest
Overall:
(1,4,5):15=greatest
This is basically a properly organized version of the scribbles I made trying to figure it out (plus you found an extra answer). The explanation is very straight-forward and seems correct, so I'll attribute it a tick.
– S. M.
2 days ago
1
thanks a lot +1 to question! @S.M.
– Omega Krypton
2 days ago
Man, there was a lot I didn't see either, my bad. xD Still think it's the best explained answer and with further edits will get to the best answer.
– S. M.
2 days ago
1
Fact 3 is not a true statement. 1,2,7 can generate all values up to 11 (not the best, but still...).
– asgallant
2 days ago
Edited, thanks!
– Omega Krypton
2 days ago
add a comment |
Fact 1:
There must be a $1 coin
Fact 2:
2nd-value coin <=4, else would overflow
Proof:
Exhaustion...
Maximizing possibilities:
Notation: (x,y,z) : highest possible value
Possibility 1: (1,2,?)
(1,2,3):9
(1,2,4):10
(1,2,5):12(@S.M. in question)
(1,2,6):10
(1,2,7):11
(1,2,8+):7
For (1,2,?), (1,2,5):12=greatest
Possibility 2: (1,3,?)
(1,3,4):12
(1,3,5):11
(1,3,6):10
(1,3,7):11
(1,3,8):12
(1,3,9+):7
For (1,3,?), (1,3,8):12=greatest
Possibility 3: (1,4,?)
(1,4,5):15(Credits to @M)
(1,4,6):13
(1,4,7):9
(1,4,8+):6
For (1,4,?), (1,4,5):15=greatest
Overall:
(1,4,5):15=greatest
This is basically a properly organized version of the scribbles I made trying to figure it out (plus you found an extra answer). The explanation is very straight-forward and seems correct, so I'll attribute it a tick.
– S. M.
2 days ago
1
thanks a lot +1 to question! @S.M.
– Omega Krypton
2 days ago
Man, there was a lot I didn't see either, my bad. xD Still think it's the best explained answer and with further edits will get to the best answer.
– S. M.
2 days ago
1
Fact 3 is not a true statement. 1,2,7 can generate all values up to 11 (not the best, but still...).
– asgallant
2 days ago
Edited, thanks!
– Omega Krypton
2 days ago
add a comment |
Fact 1:
There must be a $1 coin
Fact 2:
2nd-value coin <=4, else would overflow
Proof:
Exhaustion...
Maximizing possibilities:
Notation: (x,y,z) : highest possible value
Possibility 1: (1,2,?)
(1,2,3):9
(1,2,4):10
(1,2,5):12(@S.M. in question)
(1,2,6):10
(1,2,7):11
(1,2,8+):7
For (1,2,?), (1,2,5):12=greatest
Possibility 2: (1,3,?)
(1,3,4):12
(1,3,5):11
(1,3,6):10
(1,3,7):11
(1,3,8):12
(1,3,9+):7
For (1,3,?), (1,3,8):12=greatest
Possibility 3: (1,4,?)
(1,4,5):15(Credits to @M)
(1,4,6):13
(1,4,7):9
(1,4,8+):6
For (1,4,?), (1,4,5):15=greatest
Overall:
(1,4,5):15=greatest
Fact 1:
There must be a $1 coin
Fact 2:
2nd-value coin <=4, else would overflow
Proof:
Exhaustion...
Maximizing possibilities:
Notation: (x,y,z) : highest possible value
Possibility 1: (1,2,?)
(1,2,3):9
(1,2,4):10
(1,2,5):12(@S.M. in question)
(1,2,6):10
(1,2,7):11
(1,2,8+):7
For (1,2,?), (1,2,5):12=greatest
Possibility 2: (1,3,?)
(1,3,4):12
(1,3,5):11
(1,3,6):10
(1,3,7):11
(1,3,8):12
(1,3,9+):7
For (1,3,?), (1,3,8):12=greatest
Possibility 3: (1,4,?)
(1,4,5):15(Credits to @M)
(1,4,6):13
(1,4,7):9
(1,4,8+):6
For (1,4,?), (1,4,5):15=greatest
Overall:
(1,4,5):15=greatest
edited 2 days ago
answered 2 days ago
Omega Krypton
2,1561225
2,1561225
This is basically a properly organized version of the scribbles I made trying to figure it out (plus you found an extra answer). The explanation is very straight-forward and seems correct, so I'll attribute it a tick.
– S. M.
2 days ago
1
thanks a lot +1 to question! @S.M.
– Omega Krypton
2 days ago
Man, there was a lot I didn't see either, my bad. xD Still think it's the best explained answer and with further edits will get to the best answer.
– S. M.
2 days ago
1
Fact 3 is not a true statement. 1,2,7 can generate all values up to 11 (not the best, but still...).
– asgallant
2 days ago
Edited, thanks!
– Omega Krypton
2 days ago
add a comment |
This is basically a properly organized version of the scribbles I made trying to figure it out (plus you found an extra answer). The explanation is very straight-forward and seems correct, so I'll attribute it a tick.
– S. M.
2 days ago
1
thanks a lot +1 to question! @S.M.
– Omega Krypton
2 days ago
Man, there was a lot I didn't see either, my bad. xD Still think it's the best explained answer and with further edits will get to the best answer.
– S. M.
2 days ago
1
Fact 3 is not a true statement. 1,2,7 can generate all values up to 11 (not the best, but still...).
– asgallant
2 days ago
Edited, thanks!
– Omega Krypton
2 days ago
This is basically a properly organized version of the scribbles I made trying to figure it out (plus you found an extra answer). The explanation is very straight-forward and seems correct, so I'll attribute it a tick.
– S. M.
2 days ago
This is basically a properly organized version of the scribbles I made trying to figure it out (plus you found an extra answer). The explanation is very straight-forward and seems correct, so I'll attribute it a tick.
– S. M.
2 days ago
1
1
thanks a lot +1 to question! @S.M.
– Omega Krypton
2 days ago
thanks a lot +1 to question! @S.M.
– Omega Krypton
2 days ago
Man, there was a lot I didn't see either, my bad. xD Still think it's the best explained answer and with further edits will get to the best answer.
– S. M.
2 days ago
Man, there was a lot I didn't see either, my bad. xD Still think it's the best explained answer and with further edits will get to the best answer.
– S. M.
2 days ago
1
1
Fact 3 is not a true statement. 1,2,7 can generate all values up to 11 (not the best, but still...).
– asgallant
2 days ago
Fact 3 is not a true statement. 1,2,7 can generate all values up to 11 (not the best, but still...).
– asgallant
2 days ago
Edited, thanks!
– Omega Krypton
2 days ago
Edited, thanks!
– Omega Krypton
2 days ago
add a comment |
Anders Kaseorg's answer on the 8/8 list has the most optimal N/N answers up to N = 7 in a spoiler. And he has...
{1, 4, 5}
With a little enumeration, it's easy to see that you can use that set to get up to...
15.
EDIT
It's actually pretty simple to reason this out without brute forcing it (too much).
Say you have three denominations of coins - A, B, and C. Then clearly one of them has to be worth #1, or else you can't pay for things that are worth #1. So let's let A be worth #1. Now, assuming that C is the most valuable form of coinage, the most you can pay is #3C.
However, what if you want to pay #3C-1? We can safely assume that you'd have to use either 2C+A or 2C+B. But if you can use A, then C would have to be worth #2, which you can rule out with some quick figuring ({1,2,3} can get you #9, which {1, 1 < n < 2, 2} can't). So you're left with B being C-1.
As a result, you only need to check triples of the form {1, N, N+1}, where N can be at most 4.
New contributor
"The most you can pay is 3C". What if i choose {A,B,D} with D > C, but i can't pay 3D-1. The most i can pay is 3D-2 > 3C, which still makes it a better solution? The answer is correct, but the logic at the end is flawed
– Tibos
22 hours ago
add a comment |
Anders Kaseorg's answer on the 8/8 list has the most optimal N/N answers up to N = 7 in a spoiler. And he has...
{1, 4, 5}
With a little enumeration, it's easy to see that you can use that set to get up to...
15.
EDIT
It's actually pretty simple to reason this out without brute forcing it (too much).
Say you have three denominations of coins - A, B, and C. Then clearly one of them has to be worth #1, or else you can't pay for things that are worth #1. So let's let A be worth #1. Now, assuming that C is the most valuable form of coinage, the most you can pay is #3C.
However, what if you want to pay #3C-1? We can safely assume that you'd have to use either 2C+A or 2C+B. But if you can use A, then C would have to be worth #2, which you can rule out with some quick figuring ({1,2,3} can get you #9, which {1, 1 < n < 2, 2} can't). So you're left with B being C-1.
As a result, you only need to check triples of the form {1, N, N+1}, where N can be at most 4.
New contributor
"The most you can pay is 3C". What if i choose {A,B,D} with D > C, but i can't pay 3D-1. The most i can pay is 3D-2 > 3C, which still makes it a better solution? The answer is correct, but the logic at the end is flawed
– Tibos
22 hours ago
add a comment |
Anders Kaseorg's answer on the 8/8 list has the most optimal N/N answers up to N = 7 in a spoiler. And he has...
{1, 4, 5}
With a little enumeration, it's easy to see that you can use that set to get up to...
15.
EDIT
It's actually pretty simple to reason this out without brute forcing it (too much).
Say you have three denominations of coins - A, B, and C. Then clearly one of them has to be worth #1, or else you can't pay for things that are worth #1. So let's let A be worth #1. Now, assuming that C is the most valuable form of coinage, the most you can pay is #3C.
However, what if you want to pay #3C-1? We can safely assume that you'd have to use either 2C+A or 2C+B. But if you can use A, then C would have to be worth #2, which you can rule out with some quick figuring ({1,2,3} can get you #9, which {1, 1 < n < 2, 2} can't). So you're left with B being C-1.
As a result, you only need to check triples of the form {1, N, N+1}, where N can be at most 4.
New contributor
Anders Kaseorg's answer on the 8/8 list has the most optimal N/N answers up to N = 7 in a spoiler. And he has...
{1, 4, 5}
With a little enumeration, it's easy to see that you can use that set to get up to...
15.
EDIT
It's actually pretty simple to reason this out without brute forcing it (too much).
Say you have three denominations of coins - A, B, and C. Then clearly one of them has to be worth #1, or else you can't pay for things that are worth #1. So let's let A be worth #1. Now, assuming that C is the most valuable form of coinage, the most you can pay is #3C.
However, what if you want to pay #3C-1? We can safely assume that you'd have to use either 2C+A or 2C+B. But if you can use A, then C would have to be worth #2, which you can rule out with some quick figuring ({1,2,3} can get you #9, which {1, 1 < n < 2, 2} can't). So you're left with B being C-1.
As a result, you only need to check triples of the form {1, N, N+1}, where N can be at most 4.
New contributor
edited 2 days ago
New contributor
answered 2 days ago
M Dirr
612
612
New contributor
New contributor
"The most you can pay is 3C". What if i choose {A,B,D} with D > C, but i can't pay 3D-1. The most i can pay is 3D-2 > 3C, which still makes it a better solution? The answer is correct, but the logic at the end is flawed
– Tibos
22 hours ago
add a comment |
"The most you can pay is 3C". What if i choose {A,B,D} with D > C, but i can't pay 3D-1. The most i can pay is 3D-2 > 3C, which still makes it a better solution? The answer is correct, but the logic at the end is flawed
– Tibos
22 hours ago
"The most you can pay is 3C". What if i choose {A,B,D} with D > C, but i can't pay 3D-1. The most i can pay is 3D-2 > 3C, which still makes it a better solution? The answer is correct, but the logic at the end is flawed
– Tibos
22 hours ago
"The most you can pay is 3C". What if i choose {A,B,D} with D > C, but i can't pay 3D-1. The most i can pay is 3D-2 > 3C, which still makes it a better solution? The answer is correct, but the logic at the end is flawed
– Tibos
22 hours ago
add a comment |
This is a little bit (read: a lot bit) of trickery, but
I can get up to 44 with coins of -1, 1, 10. The -1 helps because it allows you to get a units digit of 6 through 9.
I can't prove this is optimal, but it's a start (and I'm not sure if this is even good for the kingdom to have this type of coin :P)
I do think he means it as 3/3 problem, not a 3/8 problem
– Thomas Blue
2 days ago
Yes, I mean it as a 3/3 problem, I'll specify it in the post just in case :p Very out-of-the-box answer though!
– S. M.
2 days ago
add a comment |
This is a little bit (read: a lot bit) of trickery, but
I can get up to 44 with coins of -1, 1, 10. The -1 helps because it allows you to get a units digit of 6 through 9.
I can't prove this is optimal, but it's a start (and I'm not sure if this is even good for the kingdom to have this type of coin :P)
I do think he means it as 3/3 problem, not a 3/8 problem
– Thomas Blue
2 days ago
Yes, I mean it as a 3/3 problem, I'll specify it in the post just in case :p Very out-of-the-box answer though!
– S. M.
2 days ago
add a comment |
This is a little bit (read: a lot bit) of trickery, but
I can get up to 44 with coins of -1, 1, 10. The -1 helps because it allows you to get a units digit of 6 through 9.
I can't prove this is optimal, but it's a start (and I'm not sure if this is even good for the kingdom to have this type of coin :P)
This is a little bit (read: a lot bit) of trickery, but
I can get up to 44 with coins of -1, 1, 10. The -1 helps because it allows you to get a units digit of 6 through 9.
I can't prove this is optimal, but it's a start (and I'm not sure if this is even good for the kingdom to have this type of coin :P)
answered 2 days ago
Excited Raichu
5,5782860
5,5782860
I do think he means it as 3/3 problem, not a 3/8 problem
– Thomas Blue
2 days ago
Yes, I mean it as a 3/3 problem, I'll specify it in the post just in case :p Very out-of-the-box answer though!
– S. M.
2 days ago
add a comment |
I do think he means it as 3/3 problem, not a 3/8 problem
– Thomas Blue
2 days ago
Yes, I mean it as a 3/3 problem, I'll specify it in the post just in case :p Very out-of-the-box answer though!
– S. M.
2 days ago
I do think he means it as 3/3 problem, not a 3/8 problem
– Thomas Blue
2 days ago
I do think he means it as 3/3 problem, not a 3/8 problem
– Thomas Blue
2 days ago
Yes, I mean it as a 3/3 problem, I'll specify it in the post just in case :p Very out-of-the-box answer though!
– S. M.
2 days ago
Yes, I mean it as a 3/3 problem, I'll specify it in the post just in case :p Very out-of-the-box answer though!
– S. M.
2 days ago
add a comment |
4
Can you repeat the context of the original problem here? Relying on a link to maintain that context isn't the best idea.
– THiebert
2 days ago
It's different in the way that this one is simple enough that you can solve it without using a computer, so it does change a bit on the dynamics of the problem.
– S. M.
2 days ago
@THiebert Added the rules from the original post.
– S. M.
yesterday