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


Groups > comp.soft-sys.math.mathematica > #2458 > unrolled thread

Re: Formatting Question

Started byMurray Eisenberg <murray@math.umass.edu>
First post2011-05-18 11:18 +0000
Last post2011-05-18 11:18 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Re: Formatting Question Murray Eisenberg <murray@math.umass.edu> - 2011-05-18 11:18 +0000

#2458 — Re: Formatting Question

FromMurray Eisenberg <murray@math.umass.edu>
Date2011-05-18 11:18 +0000
SubjectRe: Formatting Question
Message-ID<ir09te$24f$1@smc.vnet.net>
Of course such output is possible. But that kind of output is very 
"retrograde". The sort of thing one saw while using a teletype machine 
for input.

On 5/17/2011 7:46 AM, Dean Rosenthal wrote:
> 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
>

-- 
Murray Eisenberg                     murray@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web