H
Hendrik Maryns
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message
Hi all,
In the thread ?Strategy or Iterator? (which should have been Command or
Iterator), I came up with a class which computes all possible
permutations of an array, one after another. Now I found 4 possible
algorithms to do this, on
http://www.cut-the-knot.org/do_you_know/AllPerm.shtml and
http://www.cut-the-knot.org/Curriculum/Combinatorics/JohnsonTrotter.shtml.
I was just wondering: is there any advantage of one above the other?
Probably not, as they all have to do n! calculations anyway...
Thanks, H.
(Please point me to the right place if I should ask this somewhere else.)
--
Hendrik Maryns
==================
www.lieverleven.be
http://aouw.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFECE5Me+7xMGD3itQRAmpaAJ4oO1a0kDWOKn5hKHdYOYj++fcpQQCfdk9O
eND9SVRkC0uaGNeBDVOJ3Ao=
=RgWM
-----END PGP SIGNATURE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message
Hi all,
In the thread ?Strategy or Iterator? (which should have been Command or
Iterator), I came up with a class which computes all possible
permutations of an array, one after another. Now I found 4 possible
algorithms to do this, on
http://www.cut-the-knot.org/do_you_know/AllPerm.shtml and
http://www.cut-the-knot.org/Curriculum/Combinatorics/JohnsonTrotter.shtml.
I was just wondering: is there any advantage of one above the other?
Probably not, as they all have to do n! calculations anyway...
Thanks, H.
(Please point me to the right place if I should ask this somewhere else.)
--
Hendrik Maryns
==================
www.lieverleven.be
http://aouw.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFECE5Me+7xMGD3itQRAmpaAJ4oO1a0kDWOKn5hKHdYOYj++fcpQQCfdk9O
eND9SVRkC0uaGNeBDVOJ3Ao=
=RgWM
-----END PGP SIGNATURE-----