Re: How do I create a such List?
- To: mathgroup at smc.vnet.net
- Subject: [mg36137] Re: How do I create a such List?
- From: Nevin Kapur <nevin at jhu.edu>
- Date: Fri, 23 Aug 2002 00:25:09 -0400 (EDT)
- Organization: Mathematical Sciences, The Johns Hopkins University
- References: <ak28gd$pmq$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
timreh719 at yahoo.com.tw (bryan) writes:
> Hi All:
> I want to solve this math problem: a/(b*c)+d/(e*f)+g/(h*i)=1 where
> a,b,c,,,,i are nature numbers range from 1~9 and all is different.
> So,I want to create a list which its element are all possible order of
> Range[9].
Select[ Permutations[ Range[9] ],
#[[1]]/(#[[2]]*#[[3]]) + #[[4]]/(#[[5]]*#[[6]]) +
#[[7]]/(#[[8]]*#[[9]]) == 1 &]
Of course your particular equation has a lot symmetry so there are
optimizations to make this run much faster.
-Nevin