Thread Rating:

Poll

25 votes (49.01%)
16 votes (31.37%)
7 votes (13.72%)
4 votes (7.84%)
12 votes (23.52%)
3 votes (5.88%)
6 votes (11.76%)
5 votes (9.8%)
12 votes (23.52%)
10 votes (19.6%)

51 members have voted

Wizard
Administrator
Wizard
  • Threads: 1534
  • Posts: 27709
Joined: Oct 14, 2009
August 25th, 2025 at 10:29:43 PM permalink
Quote: Ace2

Agree. The exact answer, which I posted on July-29, is:

[(6e^(1/6) - 7)/(e^(1/6) - 1)*(1 - 1/e^(1/6)) + 1/e^(1/6)]/(1 - 5/6*1/e^(1/6))

P.S. other people might care but aren’t capable of solving it
link to original post



Thank you! I will write up my solution in a PDF document shortly to share.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Wizard
Administrator
Wizard
  • Threads: 1534
  • Posts: 27709
Joined: Oct 14, 2009
August 26th, 2025 at 4:52:23 PM permalink
Here is my solution to the average time until the first Email or 4 rolled. It shows a simpler method that I previously described.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Wizard
Administrator
Wizard
  • Threads: 1534
  • Posts: 27709
Joined: Oct 14, 2009
August 27th, 2025 at 7:51:17 AM permalink
I may have asked this one before, but it's a classic.

It takes Alice and Bill 2 days to paint a house.
It takes Bill and Cindy 3 days to paint a house.
It takes Alice and Cindy 4 days to paint a house.

How long does it take if they all paint?
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
ChesterDog
ChesterDog
  • Threads: 9
  • Posts: 1852
Joined: Jul 26, 2010
August 27th, 2025 at 8:26:03 AM permalink
Quote: Wizard

I may have asked this one before, but it's a classic.

It takes Alice and Bill 2 days to paint a house.
It takes Bill and Cindy 3 days to paint a house.
It takes Alice and Cindy 4 days to paint a house.

How long does it take if they all paint?
link to original post




Solve this by putting the problem in terms of painting rates.

Let a, b, and c be the rates for Alice, Bill, and Cindy, respectively.

a + b = 1/2, which is a rate of 0.5 house / day.
b + c = 1/3
a + c = 1/4

Sum the three equations to get: 2a + 2b + 2c = 13/12

Then: a + b + c = 13/24 houses / day

1 / (13/24 houses/day) = 24/13 days/house = 1 11/13 days, or about 1 day, 20 hours, and 18 minutes.
Wizard
Administrator
Wizard
  • Threads: 1534
  • Posts: 27709
Joined: Oct 14, 2009
August 27th, 2025 at 8:41:23 AM permalink
Quote: ChesterDog

questions-and-answers/math/34502-easy-math-puzzles/104/#post962824]link to original post




Solve this by putting the problem in terms of painting rates.

Let a, b, and c be the rates for Alice, Bill, and Cindy, respectively.

a + b = 1/2, which is a rate of 0.5 house / day.
b + c = 1/3
a + c = 1/4

Sum the three equations to get: 2a + 2b + 2c = 13/12

Then: a + b + c = 13/24 houses / day

1 / (13/24 houses/day) = 24/13 days/house = 1 11/13 days, or about 1 day, 20 hours, and 18 minutes.

link to original post



I agree! Much simpler than how I did it.

For extra credit, how long would it take each individual person to paint the house?
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
ChesterDog
ChesterDog
  • Threads: 9
  • Posts: 1852
Joined: Jul 26, 2010
August 27th, 2025 at 10:00:17 AM permalink
Quote: Wizard

Quote: ChesterDog

questions-and-answers/math/34502-easy-math-puzzles/104/#post962824]link to original post




Solve this by putting the problem in terms of painting rates.

Let a, b, and c be the rates for Alice, Bill, and Cindy, respectively.

a + b = 1/2, which is a rate of 0.5 house / day.
b + c = 1/3
a + c = 1/4

Sum the three equations to get: 2a + 2b + 2c = 13/12

Then: a + b + c = 13/24 houses / day

1 / (13/24 houses/day) = 24/13 days/house = 1 11/13 days, or about 1 day, 20 hours, and 18 minutes.

link to original post



I agree! Much simpler than how I did it.

For extra credit, how long would it take each individual person to paint the house?
link to original post




1) a + b = 1/2
2) b + c = 1/3
3) a + c = 1/4

Subtracting 2) from 1) yields:
4) a - c = 1/6

Adding 3) and 4) yields:
2a = 5/12
a = 5/24 houses/day
1 / (5/24 houses/day) = 24/5 days/house = 4.8 days for Alice to paint a house, which is 4 days, 19 hours, and 12 minutes.

b = 1/2 - a = 1/2 - 5/24 = 7/24 houses/day
1 / (7/24 houses/day) = 24/7 days/house = 3 3/7 days for Bill to paint a house, which is about 3 days, 10 hours, and 17 minutes.

c = 1/4 - a = 1/4 - 5/24 = 1/24 houses/day
1 / (1/24 houses/day) = 24 days for Cindy to paint a house
ThatDonGuy
ThatDonGuy
  • Threads: 128
  • Posts: 7296
Joined: Jun 22, 2011
August 27th, 2025 at 6:31:03 PM permalink
Quote: Wizard

I may have asked this one before


Yes, you did, sort of; you used 3, 4, 5 instead of 2, 3, 4
ThatDonGuy
ThatDonGuy
  • Threads: 128
  • Posts: 7296
Joined: Jun 22, 2011
August 27th, 2025 at 6:33:26 PM permalink
Here's one (well, two) from me:

1 + 2 + 3 = 6
1 x 2 x 3 = 6 as well.

1. Given two positive numbers a and b, it is always possible to find a positive number c such that a + b + c = abc, except for what pairs (a, b)?

2. Are there any sets of three integers a, b, c besides 1, 2, 3 where a <= b <= c and a + b + c = abc?
SkinnyTony
SkinnyTony
  • Threads: 3
  • Posts: 103
Joined: Jul 22, 2025
August 27th, 2025 at 7:32:10 PM permalink
Quote: ThatDonGuy

Here's one (well, two) from me:

1 + 2 + 3 = 6
1 x 2 x 3 = 6 as well.

1. Given two positive numbers a and b, it is always possible to find a positive number c such that a + b + c = abc, except for what pairs (a, b)?

2. Are there any sets of three integers a, b, c besides 1, 2, 3 where a <= b <= c and a + b + c = abc?
link to original post



The answer for 1 is...

c exists for all pairs except when ab=1 (and never exists when ab=1)

Proof:

a+b+c = abc
a+b = (ab-1)c
c = (a+b)/(ab-1)

This exists unless ab = 1 (you can't divide by 0). So clearly you can find c when ab is not 1.

If ab = 1 then we get

abc = a+b+c
c = a+b+c
a+b = 0

which is a contradiction (since a and b must be positive). So c never exists when ab=1
AnotherBill
AnotherBill
  • Threads: 1
  • Posts: 32
Joined: Jul 27, 2025
August 27th, 2025 at 11:03:49 PM permalink
Quote: gerback123

Find an approximation for the probability that W is less than 1845.
link to original post



I figured out how to solve this problem, but doing the calculations by hand takes too long, so I wrote code in Python to do it.

We can calculate occurrence of each possible sum for the die and the coin separately this way:
Die:
(x¹ + x² + x³ + x⁴)⁶⁰⁰

Coin:
(x⁰ + x¹)⁶⁰⁰

The obtained powers and their coefficients give the sum and the occurrence respectively. For example, for 600 tosses of the coin we get:
1·x⁶⁰⁰ + 600·x⁵⁹⁹ + 179700·x⁵⁹⁸ + 35820200·x⁵⁹⁷ ...

That means that there exist:
- 1 combination for the sum of 600,
- 600 combinations for the sum of 599,
- 179700 combinations for the sum of 598, and so on.

Then, we can just combine the above results to check their sums and calculate occurrences.

The final code:
import fractions as frac

die = [1, 2, 3, 4]
coin = [0, 1]

def CombCounter(obj):
counter = {s: 1 for s in obj} # {sum: number of combinations}
for _ in range(599):
prev = counter
counter = {}
for val in obj:
for s, n in prev.items():
Sum = s + val
counter[Sum] = counter.get(Sum, 0) + n
# for k, v in counter.items(): print(k, v)
return counter

die_combs = CombCounter(die)
coin_combs = CombCounter(coin)

n_combs = 0
n_all_combs = 0
for die_sum, die_n_combs in die_combs.items():
for coin_sum, coin_n_combs in coin_combs.items():
n_all_combs += die_n_combs * coin_n_combs
if die_sum + coin_sum < 1845:
n_combs += die_n_combs * coin_n_combs

p_exact = frac.Fraction(n_combs, n_all_combs)
p_approx = float(p_exact)
print('Exact probability:', p_exact, sep='\n')
print()
print('Approximate probability:', p_approx, sep='\n')

The result is:
Exact probability:
16629696692942443221311600805732571727882056503186445797071356619220143871973750380670420495722626540277141546853704453502562909306791685045031373467661131681245447148833330909962703142185937903212616044186346871542074272828072146756783959026590407852531117642742436997304638345486431845969028253743772232874927266087537986207158866084048753547876182678807964235979895578405803847502461039492476417081293332575410523848089271026552194744106232466060091481194107062426685104974467724051884406154898804316213028728752858074007202926320266624549/17862087144182552090100651130756164665976827862122256167423329247233898321830719666540870487544055009398369586776484355671625497973604947199022105534491506565630899537593179994034477830621111528653321226095994410794048389454474256755765855031213008497406701691127284482478696801343353279019313560663355819346556656789780042055905915034991279242393102960416490645747179216448162518823663813131314335790891510706123877326968206993303684221095374172364198108537519867527915452940344040267013916003084424614072759887985824821063642644988081209344

Approximate probability:
0.9310052380053759
Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise.
Wizard
Administrator
Wizard
  • Threads: 1534
  • Posts: 27709
Joined: Oct 14, 2009
Thanked by
ChesterDog
August 28th, 2025 at 8:06:27 PM permalink
Quote: ChesterDog




1) a + b = 1/2
2) b + c = 1/3
3) a + c = 1/4

Subtracting 2) from 1) yields:
4) a - c = 1/6

Adding 3) and 4) yields:
2a = 5/12
a = 5/24 houses/day
1 / (5/24 houses/day) = 24/5 days/house = 4.8 days for Alice to paint a house, which is 4 days, 19 hours, and 12 minutes.

b = 1/2 - a = 1/2 - 5/24 = 7/24 houses/day
1 / (7/24 houses/day) = 24/7 days/house = 3 3/7 days for Bill to paint a house, which is about 3 days, 10 hours, and 17 minutes.

c = 1/4 - a = 1/4 - 5/24 = 1/24 houses/day
1 / (1/24 houses/day) = 24 days for Cindy to paint a house

link to original post



I agree!
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Wizard
Administrator
Wizard
  • Threads: 1534
  • Posts: 27709
Joined: Oct 14, 2009
August 28th, 2025 at 8:07:40 PM permalink
Quote: ThatDonGuy

Yes, you did, sort of; you used 3, 4, 5 instead of 2, 3, 4
link to original post



It's such a good puzzle, it's worth repeating once in a while.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Ace2
Ace2
  • Threads: 32
  • Posts: 2792
Joined: Oct 2, 2017
August 28th, 2025 at 9:38:04 PM permalink
Quote: AnotherBill

Quote: gerback123

Find an approximation for the probability that W is less than 1845.
link to original post



I figured out how to solve this problem, but doing the calculations by hand takes too long, so I wrote code in Python to do it.

We can calculate occurrence of each possible sum for the die and the coin separately this way:
Die:
(x¹ + x² + x³ + x⁴)⁶⁰⁰

Coin:
(x⁰ + x¹)⁶⁰⁰

The obtained powers and their coefficients give the sum and the occurrence respectively. For example, for 600 tosses of the coin we get:
1·x⁶⁰⁰ + 600·x⁵⁹⁹ + 179700·x⁵⁹⁸ + 35820200·x⁵⁹⁷ ...

That means that there exist:
- 1 combination for the sum of 600,
- 600 combinations for the sum of 599,
- 179700 combinations for the sum of 598, and so on.

Then, we can just combine the above results to check their sums and calculate occurrences.

The final code:
import fractions as frac

die = [1, 2, 3, 4]
coin = [0, 1]

def CombCounter(obj):
counter = {s: 1 for s in obj} # {sum: number of combinations}
for _ in range(599):
prev = counter
counter = {}
for val in obj:
for s, n in prev.items():
Sum = s + val
counter[Sum] = counter.get(Sum, 0) + n
# for k, v in counter.items(): print(k, v)
return counter

die_combs = CombCounter(die)
coin_combs = CombCounter(coin)

n_combs = 0
n_all_combs = 0
for die_sum, die_n_combs in die_combs.items():
for coin_sum, coin_n_combs in coin_combs.items():
n_all_combs += die_n_combs * coin_n_combs
if die_sum + coin_sum < 1845:
n_combs += die_n_combs * coin_n_combs

p_exact = frac.Fraction(n_combs, n_all_combs)
p_approx = float(p_exact)
print('Exact probability:', p_exact, sep='\n')
print()
print('Approximate probability:', p_approx, sep='\n')

The result is:
Exact probability:
16629696692942443221311600805732571727882056503186445797071356619220143871973750380670420495722626540277141546853704453502562909306791685045031373467661131681245447148833330909962703142185937903212616044186346871542074272828072146756783959026590407852531117642742436997304638345486431845969028253743772232874927266087537986207158866084048753547876182678807964235979895578405803847502461039492476417081293332575410523848089271026552194744106232466060091481194107062426685104974467724051884406154898804316213028728752858074007202926320266624549/17862087144182552090100651130756164665976827862122256167423329247233898321830719666540870487544055009398369586776484355671625497973604947199022105534491506565630899537593179994034477830621111528653321226095994410794048389454474256755765855031213008497406701691127284482478696801343353279019313560663355819346556656789780042055905915034991279242393102960416490645747179216448162518823663813131314335790891510706123877326968206993303684221095374172364198108537519867527915452940344040267013916003084424614072759887985824821063642644988081209344

Approximate probability:
0.9310052380053759

link to original post

The expected value and standard deviation per trial is 3 and 1.5^5 respectively. For 600 trials it’s 1800 and 30. Using a z-table, the chance of finishing below (1844.5 - 1800) / 30 SDs above the mean is 0.93101
It’s all about making that GTA
AnotherBill
AnotherBill
  • Threads: 1
  • Posts: 32
Joined: Jul 27, 2025
August 29th, 2025 at 2:50:43 AM permalink
Quote: Ace2

The expected value and standard deviation per trial is 3 and 1.5^5 respectively. For 600 trials it’s 1800 and 30. Using a z-table, the chance of finishing below (1844.5 - 1800) / 30 SDs above the mean is 0.93101
link to original post



Wow! Interesting solution, though, I don't quite understand probability math. Where does 1.5⁵ come from? A spreadsheet gives ≈1.2247 for a StD for a population (1, 2, 2, 3, 3, 4, 4, 5).
Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise.
ThatDonGuy
ThatDonGuy
  • Threads: 128
  • Posts: 7296
Joined: Jun 22, 2011
August 29th, 2025 at 8:14:13 AM permalink
Quote: SkinnyTony

Quote: ThatDonGuy

Here's one (well, two) from me:

1 + 2 + 3 = 6
1 x 2 x 3 = 6 as well.

1. Given two positive numbers a and b, it is always possible to find a positive number c such that a + b + c = abc, except for what pairs (a, b)?

2. Are there any sets of three integers a, b, c besides 1, 2, 3 where a <= b <= c and a + b + c = abc?
link to original post



The answer for 1 is...

c exists for all pairs except when ab=1 (and never exists when ab=1)

Proof:

a+b+c = abc
a+b = (ab-1)c
c = (a+b)/(ab-1)

This exists unless ab = 1 (you can't divide by 0). So clearly you can find c when ab is not 1.

If ab = 1 then we get

abc = a+b+c
c = a+b+c
a+b = 0

which is a contradiction (since a and b must be positive). So c never exists when ab=1

link to original post



The solution to #1 is correct.


In all cases, (a, b) represent the numbers a and b, and n and k are positive integers

(1, 1) has no solutions as 2 + c = c

(1, 2): 1 + 2 + c = 2c
c = 3
(1, 2, 3) is a solution

(1, 3): 1 + 3 + c = 3c
c = 2, but b = 3 > c

(1, 3 + n): 1 + 3 + n + c = (3 + n) c
4 + n = (2 + n) c
c = (4 + n) / (2 + n) = 1 + 2 / (2 + n), which is not an integer when n is a positive integer

(2, 2): 2 + 2 + c = 4c
c = 4/3, which is not an integer

(2, 3): 2 + 3 + c = 6c
c = 1, but b = 3 > c

(2, 3 + n): 2 + 3 + n + c = (6 + 2n) c
5 + n = (5 + 2n) c
c = (5 + 2n) / (5 + n) = 1 + n / (5 + n), which is not an integer when n is a positive integer

(3, 3): 6 + c = 9c
c = 3/4, which is not an integer

(3, 3 + n): 6 + n + c = (9 + 3n) c
6 + n = (8 + 3n) c
c = (8 + 3n) / (6 + n) = 1 + (2n + 2) / (6 + n) < 1 + (2n + 12) / (6 + n), so c < a

(3 + k, 3 + k + n): 6 + 2k + n + c = (9 + k^2 + 6k + 3n + nk) c
6 + 2k + n = (8 + k^2 + 6k + 3n + nk) c
c = (8 + k^2 + 6k + 3n + nk) / (6 + 2k + n)
b = 3 + k + n = (6 + 2k + n)(3 + k + n) / (3 + k + n)
= (18 + 8k + 2k^2 + 6n + 2kn) / (3 + k + n)
= c + (10 + k^2 + 2k + 3n + nk) / (3 + k + n) > c, so c < b

Therefore, (1, 2, 3) is the only solution in positive integers

Ace2
Ace2
  • Threads: 32
  • Posts: 2792
Joined: Oct 2, 2017
August 29th, 2025 at 9:36:52 AM permalink
Quote: AnotherBill

Quote: Ace2

The expected value and standard deviation per trial is 3 and 1.5^5 respectively. For 600 trials it’s 1800 and 30. Using a z-table, the chance of finishing below (1844.5 - 1800) / 30 SDs above the mean is 0.93101
link to original post



Wow! Interesting solution, though, I don't quite understand probability math. Where does 1.5⁵ come from? A spreadsheet gives ≈1.2247 for a StD for a population (1, 2, 2, 3, 3, 4, 4, 5).
link to original post


1.5^.5 =1.2247
It’s all about making that GTA
AnotherBill
AnotherBill
  • Threads: 1
  • Posts: 32
Joined: Jul 27, 2025
August 29th, 2025 at 10:52:45 AM permalink
Quote: Ace2

Quote: AnotherBill

Quote: Ace2

The expected value and standard deviation per trial is 3 and 1.5^5 respectively. For 600 trials it’s 1800 and 30. Using a z-table, the chance of finishing below (1844.5 - 1800) / 30 SDs above the mean is 0.93101
link to original post



Wow! Interesting solution, though, I don't quite understand probability math. Where does 1.5⁵ come from? A spreadsheet gives ≈1.2247 for a StD for a population (1, 2, 2, 3, 3, 4, 4, 5).
link to original post


1.5^.5 =1.2247
link to original post



Ah! Thank you for the explanation! You just missed the decimal point in you original post.
Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise.
SkinnyTony
SkinnyTony
  • Threads: 3
  • Posts: 103
Joined: Jul 22, 2025
Thanked by
AnotherBill
August 29th, 2025 at 1:28:32 PM permalink
Quote: AnotherBill

Quote: Ace2

Quote: AnotherBill

Quote: Ace2

The expected value and standard deviation per trial is 3 and 1.5^5 respectively. For 600 trials it’s 1800 and 30. Using a z-table, the chance of finishing below (1844.5 - 1800) / 30 SDs above the mean is 0.93101
link to original post



Wow! Interesting solution, though, I don't quite understand probability math. Where does 1.5⁵ come from? A spreadsheet gives ≈1.2247 for a StD for a population (1, 2, 2, 3, 3, 4, 4, 5).
link to original post


1.5^.5 =1.2247
link to original post



Ah! Thank you for the explanation! You just missed the decimal point in you original post.
link to original post



FWIW you don't need a spreadsheet, or even a calculator, to figure this out.

To find variance, you look at each number, and take the distance from the average. Then you square those distances, and take the average of what you have left.

So in this case we start with 1,2,2,3,3,4,4,5

The average is 3, so we want to take the distance between each number and 3. We get:

2,1,1,0,0,1,1,2

Squaring each number we get:

4,1,1,0,0,1,1,4

And the average of those is 1.5 (there are 8 numbers and they add to 12). So the variance is 1.5

And then standard deviation is just the square root of variance, hence, sqrt(1.5). Taking that square root is the only step we really need a calculator for.
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 3103
Joined: Jun 17, 2011
September 2nd, 2025 at 6:31:30 AM permalink
Sometimes I see puzzles on facebook; some can be interesting and others just stupid. So here's a couple -
note I don't know the answer to the first one (second part) and found the solution to the second online..
(i) You have a stick which is 100cm long and randomly cut it into two pieces. What is the average length of the shorter piece.
The answer to this is relatively obvious; but I had actually misread the question and assumed you made two cuts. At this stage I have no idea what the answer to this is (except I might run a simulation sometime).
(ii) Which is bigger 2100! or 2100! ?
(iii) Nice property of 1/998001.
AnotherBill
AnotherBill
  • Threads: 1
  • Posts: 32
Joined: Jul 27, 2025
September 2nd, 2025 at 7:59:45 AM permalink
Quote: charliepatrick

Sometimes I see puzzles on facebook; some can be interesting and others just stupid. So here's a couple -
note I don't know the answer to the first one (second part) and found the solution to the second online..
(i) You have a stick which is 100cm long and randomly cut it into two pieces. What is the average length of the shorter piece.
The answer to this is relatively obvious; but I had actually misread the question and assumed you made two cuts. At this stage I have no idea what the answer to this is (except I might run a simulation sometime).
(ii) Which is bigger 2100! or 2100! ?
(iii) Nice property of 1/998001.
link to original post



(i) Minimal length is 0 cm, maximum length is 50 cm. Thus, the average length is the average of those two is 25 cm.

(ii) 2100! = ( ... (((21)2)3)4 ... )100
(2100)! = 1·2·3·4· ... ·2100
Since, 2n > n, 2100! > (2100)!

(iii) What is "nice property"?
Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise.
Wizard
Administrator
Wizard
  • Threads: 1534
  • Posts: 27709
Joined: Oct 14, 2009
September 9th, 2025 at 9:09:49 AM permalink
This one is an old classic that has probably been asked before.

There are 100 people and 100 closed doors. Both the doors and people are numbered 1 to 100. When a person stops at a door, they will reverse it (in other words if it's open they close it and if it's closed they open it). Each person will stop at every door that is evenly divisible by his own number. For example, person 5 will stop at doors 5, 10, 15, ... 95, 100. After everyone has had their turn, which doors will be open?
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Wizard
Administrator
Wizard
  • Threads: 1534
  • Posts: 27709
Joined: Oct 14, 2009
September 9th, 2025 at 9:17:27 AM permalink
Quote: charliepatrick

(i) You have a stick which is 100cm long and randomly cut it into two pieces. What is the average length of the shorter piece.
The answer to this is relatively obvious; but I had actually misread the question and assumed you made two cuts. At this stage I have no idea what the answer to this is (except I might run a simulation sometime).
link to original post




I get 100/8 = 12.5 cm.

Solution available upon request. It's a clever mix of geometry and calculus (assuming I'm even right).


Note: updated 9:38 AM PST
Last edited by: Wizard on Sep 9, 2025
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 3103
Joined: Jun 17, 2011
September 9th, 2025 at 11:32:44 AM permalink
^ I've finally got round to running a simulation and it gets a slightly different answer
Parms: sh:100000000 Time:19:30:6:626
Overall Result: T: 1111178163.0952969 Avg: 11.111781630952969
Parms: sh:100000000 Time:19:30:33:225
So I'm guessing it's 11 1/9! I wonder whether it's 100/N2
AnotherBill
AnotherBill
  • Threads: 1
  • Posts: 32
Joined: Jul 27, 2025
September 9th, 2025 at 12:00:58 PM permalink
Quote: Wizard

This one is an old classic that has probably been asked before.

There are 100 people and 100 closed doors. Both the doors and people are numbered 1 to 100. When a person stops at a door, they will reverse it (in other words if it's open they close it and if it's closed they open it). Each person will stop at every door that is evenly divisible by his own number. For example, person 5 will stop at doors 5, 10, 15, ... 95, 100. After everyone has had their turn, which doors will be open?
link to original post



Is it the Sieve of Eratosthenes?
Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise.
unJon
unJon
  • Threads: 17
  • Posts: 5003
Joined: Jul 1, 2018
September 9th, 2025 at 12:10:24 PM permalink
Quote: AnotherBill

Quote: Wizard

This one is an old classic that has probably been asked before.

There are 100 people and 100 closed doors. Both the doors and people are numbered 1 to 100. When a person stops at a door, they will reverse it (in other words if it's open they close it and if it's closed they open it). Each person will stop at every door that is evenly divisible by his own number. For example, person 5 will stop at doors 5, 10, 15, ... 95, 100. After everyone has had their turn, which doors will be open?
link to original post



Is it the Sieve of Eratosthenes?
link to original post



No I think it is
perfect squares, which are the only numbers that have an odd number of factors.
The race is not always to the swift, nor the battle to the strong; but that is the way to bet.
AnotherBill
AnotherBill
  • Threads: 1
  • Posts: 32
Joined: Jul 27, 2025
September 9th, 2025 at 12:13:41 PM permalink
Quote: unJon

No I think it is

perfect squares, which are the only numbers that have an odd number of factors.

link to original post



Agree.
Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise.
ThatDonGuy
ThatDonGuy
  • Threads: 128
  • Posts: 7296
Joined: Jun 22, 2011
September 9th, 2025 at 12:20:06 PM permalink
Quote: Wizard

This one is an old classic that has probably been asked before.

There are 100 people and 100 closed doors. Both the doors and people are numbered 1 to 100. When a person stops at a door, they will reverse it (in other words if it's open they close it and if it's closed they open it). Each person will stop at every door that is evenly divisible by his own number. For example, person 5 will stop at doors 5, 10, 15, ... 95, 100. After everyone has had their turn, which doors will be open?
link to original post


Associated problem: what if there are 100 doors but only 50 people, whose numbers are 1, 3, 5, ..., 99?
Last edited by: ThatDonGuy on Sep 9, 2025
Wizard
Administrator
Wizard
  • Threads: 1534
  • Posts: 27709
Joined: Oct 14, 2009
Thanked by
charliepatrick
September 9th, 2025 at 12:47:05 PM permalink

I now get 100/9.

I previously made an error when the first cut was within the middle third of the stick.

I plan to write up a solution.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
KevinAA
KevinAA
  • Threads: 19
  • Posts: 376
Joined: Jul 6, 2017
September 9th, 2025 at 3:09:46 PM permalink
delete
Wizard
Administrator
Wizard
  • Threads: 1534
  • Posts: 27709
Joined: Oct 14, 2009
September 9th, 2025 at 5:14:23 PM permalink
Here is my solution(PDF) to the stick problem. I changed the length to 1.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
GM
GM
  • Threads: 0
  • Posts: 54
Joined: Jun 16, 2021
September 10th, 2025 at 2:52:40 PM permalink
Quote: charliepatrick

^ I've finally got round to running a simulation and it gets a slightly different answer

Parms: sh:100000000 Time:19:30:6:626
Overall Result: T: 1111178163.0952969 Avg: 11.111781630952969
Parms: sh:100000000 Time:19:30:33:225
So I'm guessing it's 11 1/9! I wonder whether it's 100/N2

link to original post


I have also done simulations and they support the claim that if you cut a stick of length 1 into N pieces (the points where the stick is cut are, of course, independent random variables uniformly distributed in [0,1]), then the expected length of the shortest piece is 1/N2. If N=3 and the two points are x and y, then the length of the shortest piece is min(x,y,1-x,1-y,|x-y|), and then you have to integrate it from x=0 to 1 and from y=0 to 1, this is essentially the Wizard's solution. I just got a computer to integrate it and it gave 1/9. The computer was also able to do N=4 and gave 1/16, but N=5 took too long, so I stopped it.

For something more challenging, prove the formula the expected length of the shortest piece for arbitrary N. After this, find a formula for the expected length of the k-th shortest piece or the k-th longest piece for arbitrary N and prove it. Based on my simulations, I have a conjecture for the expected length of the 2nd shortest piece, but anything beyond that is a mystery.
  • Jump to: