Re: NthPermutation: how to change output format?
- To: mathgroup at smc.vnet.net
- Subject: [mg49831] Re: NthPermutation: how to change output format?
- From: "Steve Luttrell" <steve_usenet at _removemefirst_luttrell.org.uk>
- Date: Tue, 3 Aug 2004 01:11:03 -0400 (EDT)
- References: <cejsat$cpo$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
This does what you want:
<< DiscreteMath`Combinatorica`
perm=NthPermutation[500, {a, b, c, d, e, 1, 2, 3}]
{a,b,2,c,3,e,d,1}
StringJoin[Map[ToString,perm]]
ab2c3ed1
Steve Luttrell
"BV" <dont at bug.me> wrote in message news:cejsat$cpo$1 at smc.vnet.net...
> Result of a calculation {a, b, 2, c, 3, e, d, 1} needs to be printed out
> immediately as ab2c3ed1 (without commas and parentheses)
>
> How is this done?
>
>
> For example, when this is typed:
>
> << DiscreteMath`Combinatorica`
> NthPermutation[500, {a, b, c, d, e, 1, 2, 3}]
>
> result is:
> {a, b, 2, c, 3, e, d, 1}
>
> How do I get directly:
>
> ab2c3ed1
>
> without commas and parentheses?
>