Permutations & Computer capacity
- To: mathgroup at smc.vnet.net
- Subject: [mg16902] Permutations & Computer capacity
- From: "Francisco Gutierrez" <rpena at impsat.net.co>
- Date: Tue, 6 Apr 1999 01:27:31 -0400
- Sender: owner-wri-mathgroup at wolfram.com
I developed a notebook to evaluate the Shapley value (votation power) of =
a
list of parties in a committee. A list to be evaluated looks like:
{{partyA, 5}, {partyB, 8}...{partyn, X}}
Everything works ok but...disgracefully producing the Shapley value impli=
es
working with permutations. This means making n! evaluations (n the lengt=
h
of the list).
And when I have a list of more than 8-9 parties, the program gets stuck.
Now, 9! is not such a big number.
I thought that perhaps my programming was not efficient enough, so I made
the following try:
Range[12]
Permutations[%]
After a couple of minutes, I got the answer "Exiting-out of memory"
I have a Pentium II with 128 RAM, 4 free gigas in hard disk and a 300 and
something processor (my platform is windows 95).
Is there something wrong with my computer? Is there a way to overcome thi=
s
limitation?
Many thanks
Francisco Gutierrez