MathGroup Archive 2011

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

Search the Archive

Re: Combinations and Counting

  • To: mathgroup at smc.vnet.net
  • Subject: [mg118917] Re: Combinations and Counting
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Mon, 16 May 2011 03:33:05 -0400 (EDT)

nmax = 4;

t = Table[Binomial[n, m], {n, nmax}, {m, n}];

t // Grid

t // Flatten // Column


Bob Hanlon

---- Dean Rosenthal <deanrosenthal at gmail.com> wrote: 

=============
What might be the most efficient way to write a little program that counted
combinations in the following way:

1 choose 1, 2 choose 1, 2 choose 2, 3 choose 1, 3 choose 2, 3 choose 3, 4
choose 1, 4 choose 2, 4 choose 3 ... continuing the pattern ...

So that I would be able to derive each subset in that order?  Invoking
"subsets" in the most rudimentary way *almost* gets me there, but I would
like to see the output of this series of combinations in this special order,
in column form, and be able to carry out my search much further.

Suggestions?

Thanks!

DR
-- 
Dean Rosenthal

cell: 646 733 6966
www.deanrosenthal.org
www.the-open-space.org



  • Prev by Date: Re: Combinations and Counting
  • Next by Date: Re: Combinations and Counting
  • Previous by thread: Re: Combinations and Counting
  • Next by thread: Re: Combinations and Counting