Re: Permutations & Computer capacity
- To: mathgroup at smc.vnet.net
- Subject: [mg17014] Re: [mg16902] Permutations & Computer capacity
- From: Robert Pratt <rpratt at math.unc.edu>
- Date: Sat, 10 Apr 1999 02:13:42 -0400
- Sender: owner-wri-mathgroup at wolfram.com
See the Mathematica Journal, Winter 1997, for a method that uses generating functions to avoid explicit construction of all the permutations in computing voting power. Rob Pratt Department of Mathematics The University of North Carolina at Chapel Hill CB# 3250, 331 Phillips Hall Chapel Hill, NC 27599-3250 rpratt at math.unc.edu http://www.math.unc.edu/Grads/rpratt/ On Tue, 6 Apr 1999, Francisco Gutierrez wrote: > 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