Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #2458
| From | Murray Eisenberg <murray@math.umass.edu> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Formatting Question |
| Date | 2011-05-18 11:18 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <ir09te$24f$1@smc.vnet.net> (permalink) |
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
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread
Re: Formatting Question Murray Eisenberg <murray@math.umass.edu> - 2011-05-18 11:18 +0000
csiph-web