### 25 horses puzzle - find minimum number of races.

Questions....

Given 25 Horses, each of them runs at different speeds.
one can race max 5 horses at a time.
there is no way to calculate the timings.
What is the minimum number of races needed to find out fastest 3 horses.

1. Divide 25 horses into 5 groups of 5 horses each. Race all groups. we will get 3 fastest from each of the groups.

2. now race fastest 5 horses from each race. this will give 1 fastest horse from all horses. elimiate the last two horses.

3. take 2nd and 3rd horse from last race, 2 and 3 from last from the group to which fastes horse belongs( it may possible that 3 fastes horses may be from same group). take the 2nd fasted horse from the group two which 2nd fastest horse belogs from race in last step.

4. do the race for horses selected in step 3, this will give 2nd and 3rd fastes horse.

IT will take minimum 7 races to find fastest 3 horses.

#### 1 comment:

Joe said...

http://www.programmerinterview.com/index.php/puzzles/25-horses-3-fastest-5-races-puzzle/

## My Blog List

• Edwin van der Sar meminta manajer Manchester United untuk segera membangkitkan motivasi para pemain. Manchester United mengundang perhatian dari para manta...
• Closer to the eye of the shooter, this is because Preview is quite literally applying a filter to each individual page of the PDF you are saving. the proce...
• INTRA NIFTY *f**u**t**u**r**e*S FOR 29.10.09 Hi Friends, Happy to meet you all again. I am going to post my 98% accuracy Nifty *f**u**t**u**r**e*s Intrad...
• Do It Yourself *P**r**o**j**e**c**t* : Menyelenggarakan Multipoint Video Conferencing Menggunakan Skype Gubernur Sulawesi Selatan Berkomunikasi dengan Ti...
• A: There is nothing like Virtual Constructor. The Constructor can’t be virtual as the constructor is a code which is responsible for creating an instance o...
• The application server is run by the Computer Administration Group at the Mechanical Engineering Departmentt. One of the objectives of this course is to...
• इंडिक ट्रांसलिटरेशन गूगल ट्रांसलिटरेशन इंग्लिश शब्दों को हिन्दी में टाइप करने में मदद करता है। इसकी खासियत है के आप कोई भी हिन्दी शब्द का इंग्लिश स्पेलिंग ...
• Demo Requirements This session requires 1 machine (called Server1 in this document). Minimum Hardware Requirements: Server1 *Processor* 400Mhz *Memory...
• IE App Compat VHD - Time bomb 4/2009 Posted: 02 Jan 2009 01:18 PM CST VPC Hard Disk Image for testing websites with different IE versions on Windows XP ...
• CRACK THE INTERVIEW *What Is .NET?* .NET is a powerful object-oriented computing platform designed by Microsoft. In addition to providing traditional soft...