# Sleep math: red clay blue clay

1 min read8th Mar 20219 comments

# 24

To me, going to bed often feels more like a tiresome deprivation from life than a welcome rest, or a painless detour through oblivion to morning. When I lack patience for it, I like to think about math puzzles. Other purposeful lines of thought keep me awake or lose me, but math leads me happily into a world of abstraction, from which the trip to dreamland comes naturally.

(It doesn’t always work. Once I was still awake after seemingly solving two Putnam problems, which is about as well as I did in the actual Putnam contest.)

A good puzzle for this purpose should be easy to play with in one’s head. For me, that means it should be amenable to simple visualization, and shouldn’t have the kind of description you have to look at multiple times. A handful of blobs is a great subject matter; an infinite arrangement of algebra is not.

Recently I’ve been going to sleep thinking about the following puzzle. I got several nights of agreeable sleep out of it, but now I think I have a good solution, which I’ll probably post in future.

Suppose that you have 1 kg of red clay that is 100 degrees and 1 kg of blue clay that is 0 degrees. You can divide and recombine clay freely. If two pieces of clay come into contact, temperature immediately equilibrates—if you put the 1kg of red clay next to 0.5 kg of blue clay, all the clay will immediately become 66 degrees. Other than that the temperature of the clay doesn’t change (i.e. no exchange with air or your hands, no radiation, etc.). Your goal is to end up with all of the blue clay in a single clump that is as hot as possible. How hot can you make it? (Equivalently: how cold can you make the red clay?)

HT Chelsea Voss via Paul Christiano

Clue: it’s more than 50 degrees.

# 24

New Comment
9 comments, sorted by Click to highlight new comments since:

Divide both clay blocks into n pieces

For each piece of blue, equalize it with each piece of red in turn, from coldest to warmest

The first red piece will be 100*(1/2^n)
The last red piece will  be 50

The best I've done in my head is to get red down to a bit below 25, at 5x5, but a spreadsheet I just rolled up says blue passes above 90 at 32x32

I may have made an error of course, but breaking down the 3x3 case (and expressing T and fractions of 100)
B1 1/2, 3/4, 7/8
B2 1/4, 1/2, 11/16
B3 1/8, 5/16, 1/2

R1 1/2, 1/4, 1/8
R2 3/4, 1/2, 5/16
R3 7/8, 11/16, 1/2

And recombining gets us R 5/16, B 11/16

As far as I can tell, you can push the temperature of blue arbitrarily close to 100, and the temperature of red arbitrarily close to 0. Am I missing something, as this seems substantially better than the other answers

Your notation is confusing but I achieved a similar result.

It isn't really notation so much as a recording of the 3 states each of the pieces goes through (each piece is equilibrated n times for when the other block is split into n pieces, so I record the state of the piece after each of it's equilibrations), expressed as how much of the maximum temperature the piece has (I suppose it would have been cleaner if I'd included the implicit initial states of 0 for the blue pieces, and 1 for the red pieces)

Edit: As others have pointed out, this is not the best strategy.

___________________________

Nice problem! The best strategy seems to be to mix the red clay with the blue clay in small infinitesimal steps. Every bit of red clay then becomes as cold as possible, meaning that as much energy as possible is transferred to the blue clay.

Here's what we get with two steps:

• Mix 1/2 red at 100 degrees + 1 blue at 0 degrees => 33.33 degrees.
• Now remove the red clay, and add the other half.
• 1/2 red at 100 degrees + 1 blue at 33.33 degrees => 55.55 degrees.

Now let's compute this with  steps. So at each step we add a  fraction of the red clay to the blue clay, then remove it. Let the temperature of the blue clay after  steps be .

Initial:

Adding a  piece of red clay to the blue clay:

To simplify our expression, let  be the ratio: .

Unrolling our definition gives a geometric series:

Replacing the geometric series with its sum:

Simplifying,

So .

Now . As  approaches infinity, it's well-known that this approaches .

Final temperature:

= 63.2 degrees.

As a final note, the LaTeX support for LessWrong is the best I've seen anywhere. My thanks to the team!

100(1-1/e) = 63.2°

Feed the red clay past the blue clay a little at a time.

Do you know Lewis Carroll's Pillow Problems?

Lbh pna trg O neovgenevyl pybfr gb 100.

Cebbs ol vaqhpgvba. Fhccbfr fbzr cebprqher pna trg O gb 100-K, naq N gb K. Gura gurer vf n cebprqher gung jvyy trg N gb K-(K/20)^2. Ercrng rabhtu gvzrf gb trg O neovgenevyl pybfr gb 100.

Gur cebprqher: gnxr unys bs O naq unys bs N naq qb gur bevtvany cebprqher. Gura gnxr guvf unys bs N naq pbzovar jvgu gur bgure unys bs O, gura gnxr gur bgure unys bs N (ng 100) naq pbzovar jvgu gur 2aq unys bs O ol hfvat gur bevtvany cebprqher, gura zvk gur Nf naq Of gbtrgure frcnengryl.

Erfhygf ng rnpu fgrc:

1. Unys bs O: 100-K. Unys bs N: K
2. 2aq unys bs O: K/2. 1fg unys bs N: K/2
3. 2aq unys bs O: K/2 + (100-K)*(100-K/2)/100 2aq unys bs N: K/2 + K(100-K/2)/100
4. Nirentr bs Nf: K/2 + K(100-K/2)/200 K-(K/20)^2

Jr pna gura cyht va K=50 naq frr jurer jr trg: K=43.75 K=38.96 K=35.17 K=32.08

Guvf shapgvba znl gnxr n ybat gvzr gb trg gb mreb ohg vs lbh vgrengr ybat rabhtu vg unf gb trg gurer, gurer'f ab bgure cbvagf nybat gur jnl vg pbhyq fgbc ng.

Haven't fully verified this.

Treat the blue clay (mass 1, temperature T) as a single lump. Feed it infinitesimal lumps of red clay (mass , temperature ). After each infinitesimal feeding, the temperature of the blue clay changes by

(Final equality comes from series expansion).

Then you can integrate:

i.e.

The final solution is:

.

It's worth saying that this is the most efficient way to transfer energy from red to blue because each feeding step is thermodynamically reversible.

Can't you do better by splitting both blocks up, and doing equilibrating each piece of blue with each piece of red, in turn? By not dividing blue, you are leaving the red pieces a lot warmer than necessary

Having checked this, you're totally correct.

Here's a short Python program that checks this empirically.

import numpy as np

n = 100

b = np.zeros(n)
r = np.ones(n)

for ib in range(n):
for ir in range(n):
old_b = b[ib]
old_r = r[ir]
new_b = new_r = np.mean([old_b,old_r])
r[ir] = new_r
b[ib] = new_b

print(np.mean(b))

A graph of the scaling of the max blue temperature with respect to number of divisions is here:

https://imgur.com/a/r4hdaJD

When T is 1000 you can get the blue to 0.98 of what red was initially... so I imagine in the infinite limit you can get all the way there.

This seemed weird to me, so I looked at the final temperature distribution of all of the  blue blobs, as  increases.  I've plotted them here (blue lines have  being small; red lines have  being big). You can see that as the number of blobs becomes very big, the fraction which have temperature less than 1 falls... (i.e. knee of graph moves to the right...)
The passage describes a math puzzle involving two lumps of clay (one red and one blue) of equal mass but different temperatures. The goal is to maximize the temperature of the blue clay by dividing and recombining the clay lumps, with the constraint that temperature equilibrates when two pieces of clay come into contact. The passage also mentions that the solution is more than 50 degrees.

**Content Structure:**
- The passage introduces a math puzzle.
- It provides the initial conditions and the goal of the puzzle.
- It hints that the solution is more than 50 degrees.

**Analysis:**
single_question

the passage contains a single mathematical question (how hot can you make the blue clay?) but does not provide an answer to it. the solution is hinted at (more than 50 degrees) but not explicitly stated.
Given a text passage, determine:
    1. If it contains a mathematical question (including word problems or calculations)
    2. If an answer to that mathematical question is provided in the text

First, describe the content structure you found in 1-2 sentences.

Then provide your analysis in the following format:
TYPE: <one of the following values>
- NO_QUESTION
- SINGLE_QUESTION
- SINGLE_QUESTION_WITH_ANSWER
- MULTIPLE_QUESTIONS
- MULTIPLE_QUESTIONS_WITH_ANSWERS
system
# Sleep math: red clay blue clay

1 min read8th Mar 20219 comments

# 24

To me, going to bed often feels more like a tiresome deprivation from life than a welcome rest, or a painless detour through oblivion to morning. When I lack patience for it, I like to think about math puzzles. Other purposeful lines of thought keep me awake or lose me, but math leads me happily into a world of abstraction, from which the trip to dreamland comes naturally.

(It doesn’t always work. Once I was still awake after seemingly solving two Putnam problems, which is about as well as I did in the actual Putnam contest.)

A good puzzle for this purpose should be easy to play with in one’s head. For me, that means it should be amenable to simple visualization, and shouldn’t have the kind of description you have to look at multiple times. A handful of blobs is a great subject matter; an infinite arrangement of algebra is not.

Recently I’ve been going to sleep thinking about the following puzzle. I got several nights of agreeable sleep out of it, but now I think I have a good solution, which I’ll probably post in future.

Suppose that you have 1 kg of red clay that is 100 degrees and 1 kg of blue clay that is 0 degrees. You can divide and recombine clay freely. If two pieces of clay come into contact, temperature immediately equilibrates—if you put the 1kg of red clay next to 0.5 kg of blue clay, all the clay will immediately become 66 degrees. Other than that the temperature of the clay doesn’t change (i.e. no exchange with air or your hands, no radiation, etc.). Your goal is to end up with all of the blue clay in a single clump that is as hot as possible. How hot can you make it? (Equivalently: how cold can you make the red clay?)

HT Chelsea Voss via Paul Christiano

Clue: it’s more than 50 degrees.

# 24

New Comment
9 comments, sorted by Click to highlight new comments since:

Divide both clay blocks into n pieces

For each piece of blue, equalize it with each piece of red in turn, from coldest to warmest

The first red piece will be 100*(1/2^n)
The last red piece will  be 50

The best I've done in my head is to get red down to a bit below 25, at 5x5, but a spreadsheet I just rolled up says blue passes above 90 at 32x32

I may have made an error of course, but breaking down the 3x3 case (and expressing T and fractions of 100)
B1 1/2, 3/4, 7/8
B2 1/4, 1/2, 11/16
B3 1/8, 5/16, 1/2

R1 1/2, 1/4, 1/8
R2 3/4, 1/2, 5/16
R3 7/8, 11/16, 1/2

And recombining gets us R 5/16, B 11/16

As far as I can tell, you can push the temperature of blue arbitrarily close to 100, and the temperature of red arbitrarily close to 0. Am I missing something, as this seems substantially better than the other answers

Your notation is confusing but I achieved a similar result.

It isn't really notation so much as a recording of the 3 states each of the pieces goes through (each piece is equilibrated n times for when the other block is split into n pieces, so I record the state of the piece after each of it's equilibrations), expressed as how much of the maximum temperature the piece has (I suppose it would have been cleaner if I'd included the implicit initial states of 0 for the blue pieces, and 1 for the red pieces)

Edit: As others have pointed out, this is not the best strategy.

___________________________

Nice problem! The best strategy seems to be to mix the red clay with the blue clay in small infinitesimal steps. Every bit of red clay then becomes as cold as possible, meaning that as much energy as possible is transferred to the blue clay.

Here's what we get with two steps:

• Mix 1/2 red at 100 degrees + 1 blue at 0 degrees => 33.33 degrees.
• Now remove the red clay, and add the other half.
• 1/2 red at 100 degrees + 1 blue at 33.33 degrees => 55.55 degrees.

Now let's compute this with  steps. So at each step we add a  fraction of the red clay to the blue clay, then remove it. Let the temperature of the blue clay after  steps be .

Initial:

Adding a  piece of red clay to the blue clay:

To simplify our expression, let  be the ratio: .

Unrolling our definition gives a geometric series:

Replacing the geometric series with its sum:

Simplifying,

So .

Now . As  approaches infinity, it's well-known that this approaches .

Final temperature:

= 63.2 degrees.

As a final note, the LaTeX support for LessWrong is the best I've seen anywhere. My thanks to the team!

100(1-1/e) = 63.2°

Feed the red clay past the blue clay a little at a time.

Do you know Lewis Carroll's Pillow Problems?

Lbh pna trg O neovgenevyl pybfr gb 100.

Cebbs ol vaqhpgvba. Fhccbfr fbzr cebprqher pna trg O gb 100-K, naq N gb K. Gura gurer vf n cebprqher gung jvyy trg N gb K-(K/20)^2. Ercrng rabhtu gvzrf gb trg O neovgenevyl pybfr gb 100.

Gur cebprqher: gnxr unys bs O naq unys bs N naq qb gur bevtvany cebprqher. Gura gnxr guvf unys bs N naq pbzovar jvgu gur bgure unys bs O, gura gnxr gur bgure unys bs N (ng 100) naq pbzovar jvgu gur 2aq unys bs O ol hfvat gur bevtvany cebprqher, gura zvk gur Nf naq Of gbtrgure frcnengryl.

Erfhygf ng rnpu fgrc:

1. Unys bs O: 100-K. Unys bs N: K
2. 2aq unys bs O: K/2. 1fg unys bs N: K/2
3. 2aq unys bs O: K/2 + (100-K)*(100-K/2)/100 2aq unys bs N: K/2 + K(100-K/2)/100
4. Nirentr bs Nf: K/2 + K(100-K/2)/200 K-(K/20)^2

Jr pna gura cyht va K=50 naq frr jurer jr trg: K=43.75 K=38.96 K=35.17 K=32.08

Guvf shapgvba znl gnxr n ybat gvzr gb trg gb mreb ohg vs lbh vgrengr ybat rabhtu vg unf gb trg gurer, gurer'f ab bgure cbvagf nybat gur jnl vg pbhyq fgbc ng.

Haven't fully verified this.

Treat the blue clay (mass 1, temperature T) as a single lump. Feed it infinitesimal lumps of red clay (mass , temperature ). After each infinitesimal feeding, the temperature of the blue clay changes by

(Final equality comes from series expansion).

Then you can integrate:

i.e.

The final solution is:

.

It's worth saying that this is the most efficient way to transfer energy from red to blue because each feeding step is thermodynamically reversible.

Can't you do better by splitting both blocks up, and doing equilibrating each piece of blue with each piece of red, in turn? By not dividing blue, you are leaving the red pieces a lot warmer than necessary

Having checked this, you're totally correct.

Here's a short Python program that checks this empirically.

import numpy as np

n = 100

b = np.zeros(n)
r = np.ones(n)

for ib in range(n):
for ir in range(n):
old_b = b[ib]
old_r = r[ir]
new_b = new_r = np.mean([old_b,old_r])
r[ir] = new_r
b[ib] = new_b

print(np.mean(b))

A graph of the scaling of the max blue temperature with respect to number of divisions is here:

https://imgur.com/a/r4hdaJD

When T is 1000 you can get the blue to 0.98 of what red was initially... so I imagine in the infinite limit you can get all the way there.

This seemed weird to me, so I looked at the final temperature distribution of all of the  blue blobs, as  increases.  I've plotted them here (blue lines have  being small; red lines have  being big). You can see that as the number of blobs becomes very big, the fraction which have temperature less than 1 falls... (i.e. knee of graph moves to the right...)
user
The passage describes a math puzzle involving two lumps of clay (one red and one blue) of equal mass but different temperatures. The goal is to maximize the temperature of the blue clay by dividing and recombining the clay lumps, with the constraint that temperature equilibrates when two pieces of clay come into contact. The passage also mentions that the solution is more than 50 degrees.

**Content Structure:**
- The passage introduces a math puzzle.
- It provides the initial conditions and the goal of the puzzle.
- It hints that the solution is more than 50 degrees.

**Analysis:**
TYPE: SINGLE_QUESTION

The passage contains a single mathematical question (how hot can you make the blue clay?) but does not provide an answer to it. The solution is hinted at (more than 50 degrees) but not explicitly stated.