Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #2439

Formatting Question

From Dean Rosenthal <deanrosenthal@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Formatting Question
Date 2011-05-17 11:46 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <iqtn60$iiq$1@smc.vnet.net> (permalink)

Show all headers | View raw


Hello Mathgroup:

Quick formatting question for my little program:

Table[Print["Number of combinations of ", n, " choose ", k, " = ",
  Binomial[n, k]], {n, 4}, {k, n}]; Table[
 Print["Combinations of ", n, " choose ", k, " = ",
  Subsets[Range[n], {k}]], {n, 4}, {k, n}];
Table[Print["Permutations of combinations of ", n, " choose ", k, " = ",
   Permutations[Range[n], {k}]], {n, 4}, {k, n}];

--

Is it possible to give the output like this, in this order:


Number of combinations of 1 choose 1 = 1

Combinations of 1 choose 1 = {{1}}

Permutations of combinations of 1 choose 1 = {{1}}


Number of combinations of 2 choose 1 = 2

Combinations of 2 choose 1 = {{1}, {2}}

Permutations of combinations of 2 choose 1 = {{1}, {2}}


etc.


Also, how is it possible to count the number of permutations, for example?
 As the counts of combinations grow, the number of permutations and
resulting combinations grow.


Thanks!


Dean

-- 
Dean Rosenthal

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

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Formatting Question Dean Rosenthal <deanrosenthal@gmail.com> - 2011-05-17 11:46 +0000

csiph-web