About the title, I've read here that the answer is 11/18.
I've tried with a simple algorithm:
def cut(first_len:int) -> List[Union[float,float]]:
c1 = random.uniform(0,first_len)
return [c1, first_len-c1]
if name=='main':
max_val = 0
num_iter = 1000000
m_len = 1
for _ in range(num_iter):
#first random cut
cut_vals = cut(m_len)
# second random cut on the longest piece
max_cut2_vals = cut(max(cut_vals))
# get the max
m2 = max(max_cut2_vals)
max_val = max_val+m2
print(max_val/num_iter)
that returns 0.563, which is a bit lower than 11/18. I assume that I'm missing some fundamental property.
Can someone help me?
min(cut_vals)
probability to be on the shorter piece. – peterwhy Mar 25 '24 at 22:49