Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to calculate a union

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104533] Re: How to calculate a union
  • From: Ramiro <ramiro.barrantes at gmail.com>
  • Date: Tue, 3 Nov 2009 02:54:57 -0500 (EST)
  • References: <hcgmv6$d16$1@smc.vnet.net> <hcjiph$ji9$1@smc.vnet.net>

Hi,

Thanks so much for this, I was thinking how one could calculate it.
Yes, if n=273 you get some serious amounts of numbers that I need to
add.  I don't think that it is even possible to store such large
amounts.  The thing is, for each possible k-tuple, say {1,3,4,8,9,273}
I can calculate the corresponding probability very easily, and I then
need to add all the probabilities of all the k-tuples and add/subtract
as necessary for a grand number that would correspond to the
probability of the union, the entire calculation is trivial, but there
are just too many numbers!!!  For n=273, the number of 140-tuples are
699577983584109258531043307610450240451701311502431378368296040472451355165796880

Any suggestions?

Ramiro

On Nov 1, 4:01 am, ADL <alberto.dilu... at tiscali.it> wrote:
> I do not know why Export seems to behave as you say, but you can
> compute in advance the number of terms in each file with this formula:
>
> filelengths = Reverse@CoefficientList[Expand[(x + 1)^n], x]
>
> where the first value (always 1) is for index 0, and so on.
> The total Total[filelengths] is of course equal to 2^n.
>
> With this, you might compute in advance the memory required for your
> operation and establish when it is too much.
>
> ADL
>
> On Oct 31, 7:54 am, Ramiro <ramiro.barran... at gmail.com> wrote:
>
> > Hi,
>
> > I am trying to compute the probability of a union, the formula
> > requires to sum and subtract all possible combinations of
> > intersections for all pairs, triplets, etc.  When n is big, getting
> > all the terms is a challenge.
> > ...
>
>



  • Prev by Date: Re: How to calculate a union
  • Next by Date: Characteristic Function of Pareto distribution
  • Previous by thread: Re: Re: How to calculate a union
  • Next by thread: Re: Re: How to calculate a union