MathGroup Archive 2004

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

Search the Archive

Re: NthPermutation: how to change output format?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg49817] Re: [mg49807] NthPermutation: how to change output format?
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Tue, 3 Aug 2004 01:10:49 -0400 (EDT)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

Needs["DiscreteMath`Combinatorica`"];

concat[x_List] := StringJoin[ToString /@ x];

NthPermutation[500, {a,b,c,d,e,1,2,3}] // concat

ab2c3ed1


Bob Hanlon

> 
> From: BV <dont at bug.me>
To: mathgroup at smc.vnet.net
> Date: 2004/08/01 Sun PM 06:48:39 EDT
> To: mathgroup at smc.vnet.net
> Subject: [mg49817] [mg49807] NthPermutation: how to change output format?
> 
> 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?
> 
> 


  • Prev by Date: Re: How to code Conjugate Gradient Method
  • Next by Date: Re: NthPermutation: how to change output format?
  • Previous by thread: Re: NthPermutation: how to change output format?
  • Next by thread: Re: NthPermutation: how to change output format?