Combinations
- To: mathgroup at smc.vnet.net
- Subject: [mg49672] Combinations
- From: Gregory Lypny <gregory.lypny at videotron.ca>
- Date: Tue, 27 Jul 2004 07:00:56 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hello everyone, Does Mathematica have a built-in function that will generate a simple list all possible combinations of a list of strings? For example, {a,b,c}, where the elements are strings, should give 3x3=27 triplets of "aaa", "aba", etc. I tried In[4]:=Outer[{a,b,c},{a,b,c},{a,b,c}] but I get {{{a, b, c}[a, a], {a, b, c}[a, b], { a, b, c}[a, c]}, {{a, b, c}[b, a], {a, b, c}[b, b], {a, b, c}[b, c]}, {{a, b, c}[c, a], {a, b, c}[c, b], {a, b, c}[c, c]}} which is going to be difficult to match with my data using BinCounts and the like. Regards, Greg
- Follow-Ups:
- Re: Combinations
- From: János <janos.lobb@yale.edu>
- Re: Combinations
- From: Ken Levasseur <klevasseur@mac.com>
- Re: Combinations
- From: Sseziwa Mukasa <mukasa@jeol.com>
- Re: Combinations