Date: Sat, 17 Sep 2005 23:14:13 -0400
Reply-To: Richard Ristow <email@example.com>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Richard Ristow <firstname.lastname@example.org>
Subject: Re: all combinations possible
Content-Type: text/plain; charset="us-ascii"; format=flowed
This doesn't answer the question, but perhaps will help clarify it.
At 04:40 PM 9/17/2005, Arnaldo Ferrari Nasi wrote:
>I have 8 or more alphanumeric figures, i.e. A B C D E E A F, I want
>all the combinations possible between them.
>A B C D E E A F
>B C D E E A F A
>C D E E A F A B
It looks like you're looking for the *permutations*; that is, all
possible orders for the symbols, including all symbols each time. It's
worth saying this, because in this context, "combinations" is a
technical term with a different meaning, and could confuse
>I think is simple... if you know how.
I don't know how simple it is. I think there are a number of standard
algorithms, but the only one I can think of off the top of my head is a
recursive algorithm -- the program calls itself -- and that's very
awkward to simulate in SPSS.
It would occur to me to Google for "permutation algorithm". Or, if
possible, to ask a computer science faculty member for an algorithm, or
You have some repeating elements, so it's not regular permutations,
it's permutations with certain elements indistinguishable. I don't know
how much that complicates the algorithms for enumerating them.