permutation
- Posted by tone.skoda at siol.net May 30, 2002
- 562 views
This is a multi-part message in MIME format. ------=_NextPart_000_0005_01C207E2.3CC45BA0 charset="iso-8859-2" How can I get only unique results from Permutation()? For example, if I use Permutation ({3,1,1,1,0,0}, 6, i) I will get a lot = of results which will be equal to each other. I know I can save all results in a sequence and use find () (or binary = search) to find out if such sequence was already returned from = Permutation(), but is there any faster way? ------=_NextPart_000_0005_01C207E2.3CC45BA0 Content-Type: text/html; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-2"> <META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>How can I get only unique results from=20 Permutation()?</FONT></DIV> <DIV><FONT face=3DArial size=3D2>For example, if I use Permutation = ({3,1,1,1,0,0},=20 6, i) I will get a lot of results which will be equal to each=20 other.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>I know I can save all results in a = sequence=20 and use find () (or binary search) to find out if such sequence was = already=20 returned from Permutation(), but is there any faster=20 ------=_NextPart_000_0005_01C207E2.3CC45BA0--