Here's a bootstrap approach I used to find the answer (python 3).
def num_pieces(num,lenght):
ot = list(range(1,lenght+1))[::-1]
nig = []
for i in range(lenght-1):
n = random.randint(1, num-ot[i])
nig.append(n)
num -= n
nig.append(num)
r = []
for i in nig:
r.append(i/10)
return r
res = []
n1 = 1000
n2 = int(n1/10)
for i in range(n1):
a = []
for i in range(n2):
r = num_pieces(10,3)
if r[0] > 0.5 or r[1] > 0.5 or r[2] > 0.5:
a.append(1)
else:
a.append(0)
res.append(sum(a)/n2)
pd.DataFrame(res).hist();
And here's the result
If my code is correct (I believe it is), the probability is about 50%
Question - I do not know how to solve this task using plain math. In other words - what is the math base under the bootstrap result?
UPDATE
After receiving those awesome answers below, I checked the code and fixed the num_pieces
generator. It worked incorrectly. All other code works just fine. So, here's the final solution
def get_random():
a = [random.random(), random.random()]
c = 1 - (max(a))
b = max(a) - min(a)
a = min(a)
return [a,b,c]
res = []
n1 = 1000
n2 = int(n1/10)
for i in range(n1):
a = []
for i in range(n2):
r = get_random()
if r[0] > 0.5 or r[1] > 0.5 or r[2] > 0.5:
a.append(1)
else:
a.append(0)
res.append(sum(a)/n2)
pd.DataFrame(res).hist();
The probability is 75% indeed. Thank you all for answering!