Horse Race Puzzle
- To: mathgroup at smc.vnet.net
- Subject: [mg9162] Horse Race Puzzle
- From: Seth Chandler <SChandler at Central.UH.Edu>
- Date: Thu, 16 Oct 1997 03:38:02 -0400
- Organization: University of Houston
- Sender: owner-wri-mathgroup at wolfram.com
Here's a mathematics problem that might be well suited to some elegant
Mathematica programming.
N horses enter a race. Given the possibility of ties, how many different
finishes to the horse race exist. Write a Mathematica program that
shows all the possibilities.
By way of example: here is the solution (13) by brute force for N=3. The
horses are creatively named a, b and c. The expression {{b,c},a}
denotes a finish in which b and c tie for first and a comes in next.
{a, b, c}, {a, c, b}, {b, a, c}, {b, c, a}, {c, b, a}, {c, a, b},
{a,{b,c}}, {{b,c},a}, {b,{a,c}},
{{a,c},b},{{c,{a,b}},{{a,b},c},{{a,b,c}}
P.S. I have a solution to the problem, I think, but it seems unduly
complex and relies on the package DiscreteMath`Combinatorica`
Seth J. Chandler
Associate Professor of Law
University of Houston Law Center