Autor Beitrag
Stundenplan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 128
Erhaltene Danke: 32

Win 7
Delphi 7 Pers., C# (VS 2010 Express)
BeitragVerfasst: So 22.11.09 19:53 
Hallo,
wie kann ich alle Möglichkeiten herausfinden, einen String zu mischen?
Also zum Beispiel:

ausblenden Quelltext
1:
2:
3:
aab
aba
baa
= 3 Möglichkeiten

Habs schon mit Fakultät versucht, das klappt aber nur, wenn jeder Buchstabe im String nur einmal vorkommt:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
abc
acb
bac
bca
cab
cba
= Length('abc')! = 3! = 6 Möglichkeiten
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: So 22.11.09 20:03 
ich glaub das hier sollte dir weiterhelfen: www.straschil.com/sk...torik_2006-12-08.pdf

lg elundril

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
turboPASCAL
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 193
Erhaltene Danke: 1

Win XP / Vischda
D6 PE / D2005 PE
BeitragVerfasst: Mo 23.11.09 00:01 
Das ganze heisst Permutation.
Ein Beispiel findet man hier: www.delphipraxis.net/post53652.html#53652

Einfacher gehts nicht.

_________________
Nein, ich bin nicht der turboPASCAL aus der DP, ich seh nur so aus... :P
Stundenplan Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 128
Erhaltene Danke: 32

Win 7
Delphi 7 Pers., C# (VS 2010 Express)
BeitragVerfasst: Fr 04.12.09 22:23 
Ach, Permutation heißt das Teil! :zwinker:
Wusst ich gar nicht! :mrgreen:
Da wäre auch noch: www.delphipraxis.net/post495405.html