MathGroup Archive 1997

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

Search the Archive

Re: combinatorics problem

  • To: mathgroup at
  • Subject: [mg7569] Re: [mg7514] combinatorics problem
  • From: daiyanh at (Daitaro Hagihara)
  • Date: Sun, 15 Jun 1997 16:32:51 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Your case is confirmed on my version 2.2.  Though it's not my experience,
I came up with a workaround, i.e., by transforming the set before Union.


--> {{1, 2, 3, 4}, {1, 2, 4, 3}}

It's clearer to see.  You can optimize and improve the code as necessary.
I'm not quite all that sure as to how Union behaves against a supplied
test function after fooling around with it.  It's extremely complicated,
I guess.  The answer to the last question for the case of n=4 is, thus,
--> {{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}},
that is 3 ways out of possible 4!=24 choices.  From other experiments for
different n, I get (n-1)!/2 for n>2.  The aftermath is, divide n! by n
(invariant under shifts) and by 2 (invariant under reversal).

Daitaro Hagihara

  • Prev by Date: Re: List plot with + possible?
  • Next by Date: Re: Creating table with multiple lists
  • Previous by thread: Re: combinatorics problem
  • Next by thread: Re: combinatorics problem