Challenge Riddles and Puzzles: Extend the following to a valid equation

  • Thread starter fresh_42
  • Start date
  • Featured

fresh_42

Mentor
Insights Author
2018 Award
10,408
7,100
20. The king gives the convicted one last chance to save his life. The prisoner receives 50 white and 50 black balls, which he may arbitrarily distribute to two identical-looking vessels. The next day he has to randomly pick a vessel and draw a ball out of it. He will be executed at black, pardoned for white.

How must the prisoner distribute the balls so that his chances to survive are as high as possible?
 
1,063
176
15. What is the smallest prime which includes all ten digits exactly once?
There are of course some 'cheating' answers e.g. 1,023,457,98623 = 1,808,433,654,72110 which is prime (probably not the smallest such prime though).

Or to take the radix cheat further, how about 2134567890?
 
32,709
8,572
How must the prisoner distribute the balls so that his chances to survive are as high as possible?
(1 white) and (49 white 50 black).
Proof that it is optimal: More than 50% in a vessel requires more white than black there which forces less than 50% in the other one. 49/99 is the closest you can get to 50% winning chance if you have fewer white than black balls, and 100% winning chance is clearly optimal for the other vessel. This strategy is optimal if one vessel has fewer than 50% winning chance. This strategy also beats 50% in both, therefore it must be optimal overall.
 
  • Like
Reactions: BvU

fresh_42

Mentor
Insights Author
2018 Award
10,408
7,100
Correct, with an overall chance of almost ##3/4##.

21. Which are the numbers (as symbols) ##n_0,\ldots ,n_9## such that the following statement is true:
'This sentence contains ##n_0## times the ##0##, ##n_1## times the ##1##, ##n_2## times the ##2, \ldots ## and ##n_9## times the ##9##'?

(And don't force me to phrase it without backdoors, you know what I mean.)
 

DavidSnider

Gold Member
442
92
Correct, with an overall chance of almost ##3/4##.

21. Which are the numbers (as symbols) ##n_0,\ldots ,n_9## such that the following statement is true:
'This sentence contains ##n_0## times the ##0##, ##n_1## times the ##1##, ##n_2## times the ##2, \ldots ## and ##n_9## times the ##9##'?

(And don't force me to phrase it without backdoors, you know what I mean.)
I don't think I understand what this is asking. "This sentence contains n0 times the 0". "The" 0?
 

fresh_42

Mentor
Insights Author
2018 Award
10,408
7,100
'This sentence contains 1 times the 0 and 2 times 1.' is true. The question is: how do we have to chose the ##n_i## that the sentence with all digits is true.
 

DavidSnider

Gold Member
442
92
'This sentence contains 1 times the 0 and 2 times 1.' is true. The question is: how do we have to chose the ##n_i## that the sentence with all digits is true.
11,10,9,8,7,6,5,4,3,2 -> 0, 10, 18, 24, 28, 30, 30, 28, 24, 18
 

fresh_42

Mentor
Insights Author
2018 Award
10,408
7,100
11,10,9,8,7,6,5,4,3,2 -> 0, 10, 18, 24, 28, 30, 30, 28, 24, 18
What do you mean by this? We need a vector ##\vec{n} \in \mathbb{Z}^{10}## such that

'This sentence contains ##n_0## times ##0##, ##n_1## times ##1##, ##n_2## times ##2## … and ##n_9## times ##9##.'

is true. This implies that ##n_i \leq 11## is an upper bound. But actually no component is greater than nine, so ##\vec{n} \in \{\,1,2,\ldots,9\,\}^{10}##.
 
32,709
8,572
11,10,9,8,7,6,5,4,3,2 -> 0, 10, 18, 24, 28, 30, 30, 28, 24, 18
That would need e.g. 11 zeros in the sentence "This sentence has 11 times '0', 10 times '1', ...", but the sentence with your numbers plugged in doesn't have that many (it just has 2).
Maybe it is clearer if we add "digit"?

"This sentence contains n0 times the digit '0', n1 times the digit '1', ..."
 

DavidSnider

Gold Member
442
92
That would need e.g. 11 zeros in the sentence "This sentence has 11 times '0', 10 times '1', ...", but the sentence with your numbers plugged in doesn't have that many (it just has 2).
Maybe it is clearer if we add "digit"?

"This sentence contains n0 times the digit '0', n1 times the digit '1', ..."
Ahh I see. "This sentence contains n0 occurances of '0', n1 occurances of '1', "
 

DavidSnider

Gold Member
442
92
Correct, with an overall chance of almost ##3/4##.

21. Which are the numbers (as symbols) ##n_0,\ldots ,n_9## such that the following statement is true:
'This sentence contains ##n_0## times the ##0##, ##n_1## times the ##1##, ##n_2## times the ##2, \ldots ## and ##n_9## times the ##9##'?

(And don't force me to phrase it without backdoors, you know what I mean.)
1732111211
'This sentence contains
1 times the '0'
7 times the '1'
3 times the '2'
2 times the '3',
1 times the '4',
1 times the '5',
1 times the '6',
2 times the '7',
1 times the '8',
1 times the '9'
 

fresh_42

Mentor
Insights Author
2018 Award
10,408
7,100
22. There are enough beads in three colors to make bracelets with 6 pearls each. Not all three colors need to be used, i.e. there are e.g. also bracelets with six pearls of the same color. Such a bracelet has no beginning and no end. How many different bracelets are there?

243265
 
956
162
I solved it with brute force with Mathematica:
There are 92 distinct necklaces to within rotation and reflection symmetry. Without including those symmetries, there are 729.
I will attempt to work it out by hand in my next post.
 
956
162
Here is my more explicit solution:
For one kind of bead, we get solutions of form rrrrrr, gggggg, bbbbb: 3 solutions.

For two kinds of bead, we get solutions like 5 r's 1 g and similar for gr, rb, br, gb, bg, 4r's 2g's, and 3r's 3g's and similar for rb, gb.

rrrrrg - 1 - 6
rrrrgg rrrgrg rrgrrg - 3 - 18
rrrggg rrgrgg rgrgrg - 3 - 9
For 2 different kinds of beads, 33, for at most 2, 36.

rrrrgb rrrgrb rrgrrb - 3 - 9
rrrggb rrgrgb rgrrgb grrrgb rrggrb rgrgrb - 6 - 36
rrggbb - 1 - 1
rgrgbb rggrbb - 2 - 6
rgrbgb - 1 - 3
rgbrgb - 1 - 1
For 3 different kinds of beads, 56, for at most 3, 92.

I could try to derive some general formula.
 
32,709
8,572
Alternative counting method:
Notation: XYZ are colors where multiple letters can be the same color, xyz are distinct (but unspecified) colors.

Group by symmetry.
  • 60 degree symmetry: 3 bracelets (the uni-color ones)
  • 120 degree symmetry but no 180 degree symmetry: 3 (xyxyxy)
  • 180 degree symmetry: 3*3*3 options for three beads in fixed order. 3 options are unicolor and counted before, leaving 24. As XYZ=YZX=ZXY we divide by 3 to get 8. In addition xyz=zyx from mirror symmetry, which only matters if all three colors are used, reducing the number by 1. Cross-check: Truly different options are xxy (3*2 options for the colors) and xyz (1 option). In total: 7
  • Mirror symmetry across two beads but no rotation symmetry: We are free to choose 4 beads (2 on the symmetry axis, two outside , 34=81 options. Again 3 are unicolor, 6 have 120 degree symmetry (xyxy) and 6 have 180 degree symmetry (xyyx), leaving 66. We double-counted (XYZA=AZYX), leaving 33 truly different options.
  • Mirror symmetry through edges: We are free to choose 3 beads (27 options) and subtract unicolor (3) and 180 degree symmetry (6, xyx), leaving 18. By avoiding the 180 degree symmetry we also avoid a double mirror symmetry. Again we double-counted so we get 9. Cross check: 3 from xyz-zyx, 6 from xxy-yxx. Fits -> 9.
  • No symmetry. If we ignore symmetries there are 36=729 options. In general 12 options lead to the same bracelet so we have to divide - but we have to take care of the symmetric cases separately. We subtract 3 for the unicolor bracelets (just one orientation), 3*2=6 for the 120 degree symmetry (two orientations), 33-3=24 for the 180 degree symmetry (but not unicolor), 33*6=198 for the first mirror symmetry, 9*6=54 for the second symmetry, leaving 444 options. Divide by 12 and we get 37 options.

    Overall sum: 3+3+7+33+9+37=92.
    Annotated quote matching the groups to the previous solution:
    rrrrrr, gggggg, bbbbb - 3, unicolor
    rrrrrg - 1 - 6 - mirror symmetry through beads
    rrrrgg rrrgrg rrgrrg - 3 - 18 - mirror symmetry through edge, mirror symmetry through beads, 180 degree symmetry (6 each)
    rrrggg rrgrgg rgrgrg - 3 - 9 - mirror symmetry through beads, no symmetry, 120 degree symmetry (3 each)
    For 2 different kinds of beads, 33, for at most 2, 36.

    rrrrgb rrrgrb rrgrrb - 3 - 9 - no symmetry, no symmetry, mirror symmetry through beads (3 each)
    rrrggb rrgrgb rgrrgb grrrgb rrggrb rgrgrb - 6 - 36 - no symmetry, no symmetry, no symmetry, mirror symmetry through beads, no symmetry, mirror symmetry through beads (6 each)
    rrggbb - 1 - 1 - no symmetry
    rgrgbb rggrbb - 2 - 6 - no symmetry, mirror symmetry through edge
    rgrbgb - 1 - 3 - mirror symmetry through beads
    rgbrgb - 1 - 1 - 180 degree symmetry
 

Demystifier

Science Advisor
Insights Author
2018 Award
9,735
2,779
1. Extend the following to a valid equation, using only mathematical symbols!

Example: ##1\; 2\; 3 \;=\; 1 \longrightarrow - (1 \cdot 2) + 3 = 1##. Solutions are of course not unique.

##9\;9\;9\;=\;6##
##8\;8\;8\;=\;6##
##7\;7\;7\;=\;6##
##6\;6\;6\;=\;6##
##5\;5\;5\;=\;6##
##4\;4\;4\;=\;6##
##3\;3\;3\;=\;6##
##2\;2\;2\;=\;6##
##1\;1\;1\;=\;6##
##0\;0\;0\;=\;6##
The easiest way to solve all such problems is to use the successor function ##S## of Peano arithmetic. For instance, the first one can be solved as
$$9-9+9=S(S(S(6)))$$
and the last one
$$S(S(0))+S(S(0))+S(S(0))=6$$
 
32,709
8,572
If you accept mathematical functions like that, you can also use the Heaviside step function and make it even simpler. ##H(9)H(9)H(9)=H(6)##. Works for all combinations of positive integers.
 

fresh_42

Mentor
Insights Author
2018 Award
10,408
7,100
23. John wants to buy sweets for his party. He has $100 to spend. A box Belgian pralines costs $7, chips cost $3, and for 50 cents he gets a chocolate bar. What does he have to buy, if he wants at least one of each and spend the whole $100 to buy exactly 100 pieces in total?
 
Last edited:
32,709
8,572
Is this missing something? There are many options that are trivial to find.
 
956
162
  • Box of pralines: $7
  • Bag of chips: $3
  • Chocolate bar: $0.50
They must all add up to $100, and one should buy at least one of each.

I will estimate the minimum number of items purchased using a "greedy" algorithm. First, the minimum purchases, one of each: $7 + $3 + $0.50 = $10.50, giving $89.50 left over. One can have at most 12 boxes of pralines, costing $84 and giving $5.50 left over. One can have at most one bag of chips, giving $2.50 left over. One can have 5 chocolate bars, costing $2.50, with $0.00 left over.

Thus, one should purchase 13 boxes of pralines, 2 bags of chips, and 6 chocolate bars.

Relaxing that minimum-number constraint means that the solution is no longer unique, since
  • 1 box of pralines = 2 bags of chips + 2 chocolate bars
  • 3 boxes of pralines = 7 bags of chips
  • 1 box of pralines = 14 chocolate bars
  • 1 bag of chips = 6 chocolate bars
 

fresh_42

Mentor
Insights Author
2018 Award
10,408
7,100
  • Box of pralines: $7
  • Bag of chips: $3
  • Chocolate bar: $0.50
They must all add up to $100, and one should buy at least one of each.

I will estimate the minimum number of items purchased using a "greedy" algorithm. First, the minimum purchases, one of each: $7 + $3 + $0.50 = $10.50, giving $89.50 left over. One can have at most 12 boxes of pralines, costing $84 and giving $5.50 left over. One can have at most one bag of chips, giving $2.50 left over. One can have 5 chocolate bars, costing $2.50, with $0.00 left over.

Thus, one should purchase 13 boxes of pralines, 2 bags of chips, and 6 chocolate bars.

Relaxing that minimum-number constraint means that the solution is no longer unique, since
  • 1 box of pralines = 2 bags of chips + 2 chocolate bars
  • 3 boxes of pralines = 7 bags of chips
  • 1 box of pralines = 14 chocolate bars
  • 1 bag of chips = 6 chocolate bars
Sorry, I had forgotten the condition of 100 pieces in total.
 

kith

Science Advisor
1,257
376
23. John wants to buy sweets for his party. He has $100 to spend. A box Belgian pralines costs $7, chips cost $3, and for 50 cents he gets a chocolate bar. What does he have to buy, if he wants at least one of each and spend the whole $100 to buy exactly 100 pieces in total?
Let [itex]n_p[/itex], [itex]n_c[/itex] and [itex]n_b[/itex] be the number of boxes of Belgian pralines, of chips and of chocolate bars.

The two conditions can be expressed as a system of linear equations
[tex]
7 n_p + 3 n_c + 0.5 n_b = 100\\
n_p + n_c + n_b = 100
[/tex]
Substracting the second line from two times the first leads to
[tex]
13n_p + 5n_c = 100
[/tex]
Since [itex]n_c[/itex] needs to be a natural number, [itex]13⋅n_p[/itex] needs to be divisible by 5. This is only possible if [itex]n_p[/itex] is equal to 5 (or 0 but this is ruled out by having at least one of the different sweets*). Putting it into the equation yields [itex]n_c[/itex] and using the second equation from above yields [itex]n_b[/itex]:
[tex]
n_p = 5, n_c = 7, n_b = 100-5-7 = 88\\
[/tex]
*Initially, I wrongly included [itex]n_p=0[/itex] as a valid solution
 
Last edited:

Want to reply to this thread?

"Riddles and Puzzles: Extend the following to a valid equation" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving

Hot Threads

Top