Question:
This is a classic puzzle which can look simple.
Given 25 horses, find the best 3 horses with minimum number of races. Each race can have only 5 horses. You don't have a timer.
Now the challange is how we can do it in 7 races.
Given 25 horses, find the best 3 horses with minimum number of races. Each race can have only 5 horses. You don't have a timer.
Now the challange is how we can do it in 7 races.
Solution
We will have 5 races with all 25 horses
Let the results be
a1,a2,a3,a4,a5
b1,b2,b3,b4,b5
c1,c2,c3,c4,c5
d1,d2,d3,d4,d5
e1,e2,e3,e4,e5
Let the results be
a1,a2,a3,a4,a5
b1,b2,b3,b4,b5
c1,c2,c3,c4,c5
d1,d2,d3,d4,d5
e1,e2,e3,e4,e5
Where a1 faster than a2 , a2 faster than a3 etc and
We need to consider only the following set of horses
a1,a2,a3,
b1,b2,b3,
c1,c2,c3,
d1,d2,d3,
e1,e2,e3,
b1,b2,b3,
c1,c2,c3,
d1,d2,d3,
e1,e2,e3,
Race 6
We race a1,b1,c1,d1 abd e1
Let speed(a1)>speed(b1)>speed(c1)>speed(d1)>speed(e1)
We race a1,b1,c1,d1 abd e1
Let speed(a1)>speed(b1)>speed(c1)>speed(d1)>speed(e1)
We get a1 as the fastest horse
We can ignore d1,d2,d3,e1,e2 and e3
We can ignore d1,d2,d3,e1,e2 and e3
a2,a3,
b1,b2,b3,
c1,c2,c3,
b1,b2,b3,
c1,c2,c3,
Race 7
Race a2,a3,b1,b2 and c1
The first and second will be second and third of the whole set
The first and second will be second and third of the whole set
No comments:
Post a Comment