dd2 Posted October 4, 2006 Report Share Posted October 4, 2006 Varbuut izklusaas nedaudz divains topikx, iistaa vieta "OFFtopic"sadallaa, Ir viens jautaajums, Kaads zin ir kautkur dabuunams kaads skripts, vai kaadaa maajaslapaa, kaada proga, funkcija, ar kuras paliidziibu buutu iespeejams noskaitllot un ieguut visus variantus,- cik iepeejami varianti sataadiit no teiksim 5 simboliem, kuri sataav no a-z (tikai mazie) , ieguustot visus variantus, !;) Link to comment Share on other sites More sharing options...
v3rb0 Posted October 4, 2006 Report Share Posted October 4, 2006 pāris cikli, ifs un lieta darīta. Link to comment Share on other sites More sharing options...
dd2 Posted October 4, 2006 Author Report Share Posted October 4, 2006 (edited) varbuut nedaudz smalkaak? Kautaa nepieeleca , kas un kaa;) Edited October 4, 2006 by dd2 Link to comment Share on other sites More sharing options...
GedroX Posted October 5, 2006 Report Share Posted October 5, 2006 Elementāra kombinatorika. Tikai definē skaidrāk savu jautājumu, citādi jautājuma daļa ..cik iepeejami varianti sataadiit no teiksim 5 simboliem, kuri sataav no a-z.. man vispār nepielec. Tu domā cik ir 5-burtu vārdu, kas sastāv no burtiem a-z? Link to comment Share on other sites More sharing options...
Delfins Posted October 5, 2006 Report Share Posted October 5, 2006 (edited) Nu ja, ka kombinatorika. Vēl jādefinē, vai var atkārtoties simboli. Sīkāk: http://en.wikipedia.org/wiki/Permutation http://en.wikipedia.org/wiki/Combination http://en.wikipedia.org/wiki/Permutations_and_combinations un citi linki, kas tur ir... guglē papilns būs piemēru. PS: esceru, ka tas nebūs kārtējais md5-cracker projekts... Edited October 5, 2006 by Delfins Link to comment Share on other sites More sharing options...
dd2 Posted October 5, 2006 Author Report Share Posted October 5, 2006 (edited) Nu ja lakam nepareizi kautko sarakstiiju, Pastaastiissu savaadaak, kaa domaaju! Es mekleeju, kaadu progu ficcu , skriptu... ar kura paliidziibu peimeeram noraadot uz simboliem "abcde" un tikai mazajiem , bez "Capslock;)" tas man atrastu un vizuaali uzraadiitu visus iepeejamos variantus, kurs iespeejams izveidot no ssiem 5 simboliem, nu ,piemeeram, kaadi vaardi sanaktu no ssiem simboliem- abced, baced, cabed, ... Bet ne skaitliski, peec formulas. "PS: esceru, ka tas nebūs kārtējais md5-cracker projekts... " Nee! Edited October 5, 2006 by dd2 Link to comment Share on other sites More sharing options...
v3rb0 Posted October 5, 2006 Report Share Posted October 5, 2006 tā ir ņemšanās ar cikliem, reku piemērs kā saliekas visi varianti. dots: abc a ab ac abc - rezultats acb - rezultats b ba bc bac - rezultāts bca - rezultāts c ca cb cab - rezultāts cba - rezultāts Link to comment Share on other sites More sharing options...
dd2 Posted October 5, 2006 Author Report Share Posted October 5, 2006 "v3rb0" Ar kaadu skriptu to taisiiji, nezinu itka jaunu uz 3 simboliem nebutu gruuti , bet uz 5 , takaa par daudz, lai manuaali ar roku rakstiitu , varbuut kaadi ieteikumi? Link to comment Share on other sites More sharing options...
Delfins Posted October 5, 2006 Report Share Posted October 5, 2006 http://www.merriampark.com/comb.htm#Source PS: tik jānokompilē. Link to comment Share on other sites More sharing options...
dd2 Posted October 5, 2006 Author Report Share Posted October 5, 2006 http://www.merriampark.com/comb.htm#Source PS: tik jānokompilē. labs:) Link to comment Share on other sites More sharing options...
GedroX Posted October 5, 2006 Report Share Posted October 5, 2006 <?php function doIt($str, $left) { if (!$left) { return Array($str); } $imax = strlen($left); $array = Array(); for ($i = 0; $i < $imax; $i++) { $array = array_merge($array, doIt($str . $left{$i}, substr($left, 0, $i) . substr($left, $i + 1))); } return $array; } print_r(doIt('', 'abcde')); ?> Link to comment Share on other sites More sharing options...
Recommended Posts