Lotto - Joker

Ioannis Theodossis lycofron at yahoo.com
Wed Oct 3 11:57:01 EEST 2001


Loipon, anakefalaiwnontas:

Estw mia omada syndyasmwn n arithmwn ana p (sthn periptvsh toy lotto
exoume 49 ana 6 vgainei peripou 14 ekatomyria syndyasmoi).

[0][0] Pws tha paragoume tous syndyasmoys.
[0][1] Pws tha dialexoume tous syndyasmoys ekeinous pou ikanopoioun
kapoia dika mas krithria (athroisma, synexomena kai o,ti allo mas
katevei)
[0][2] Meta apo ayto to filtrarisma pws tha vroume to optimal synolo
syndyasmwn poy mas exasfalizei pws efoson oi arithmoi pou klhrwthoyn
einai mesa stous epilegmenous [0] kai ikanopoioun ola ta krithria tou
[1] tha exoume opwsdhpote sthlh me 1 mono sfalma (metablhto) h 2
(dis-metavlhto).

Ta provlhmata me ta yparxonta programmata einai pws 
[1][0] apo thn epoxh twn oktabitwn mexri shmera o xronos paragwghs toy
systhmatos soy otan exeis ftiaxei tous orous pou theleis exei parameinei
statheros: mia aiwniothta kai mia mera
[1][1] an deis ston ypno soy enan teleiws koyfo oro (theleis na
apokleiseis oles tis sthles poy exoyn athroisma, leme twra 666, 1253 kai
737) den mporeis na ton enswmatwseis.

Ta provlhmata pou mporoyme na synanthsoyme:
->[0][0] An anaparasthsoyme kathe sthlh ws 6 bytes gia na kanoume
allocate oles tis sthles theloume >80MB an prosthesoume kai merika bytes
pou na kratane epipleon plhrofories (stats ths sthlhs kai logical
deletion) pername ta 100MB. An fysika epinohseis mia sympiesh twn data
(6 times [1..49] tis apothikeyeis se 34 h 42 bit) xaneis se performance
ektos ki an anakateyteis me assembly :-)
->[0][1] && ->[1][1] To programma prepei na ylopoihthei se ena montelo
pou na epitrepei prosthafairesh leitoyrgiwn (twra object na to pw...;)
->[0][2] 

>> O sigoyros tropos poy dinei to kalytero apotelesma, einai enas recursive algorithmos,
>> o opoios pernei mia stili. thn elegxei me tis ypoloipes.. briskei oti yparxoyn (px) 3
>> me diafora se 1 mono simeio kai dokimazei to apotelesma poy exei , kratontas kathe mia 
>> apo tis 4 paromies stiles...
>> me apla logia (xontra xontra)
>> 
>> check()
>> {       
>>         loscore=MAX;
>> 
>>         gia kathe_stili:
>>                 bres paromoies:
>>                         gia kathe_paromoia:
>>                                 krata mono_tin_mia; // ayto ginetai gia oles tis paromoies
>>                                 score=check();
>>                                 if (score<loscore) { loscore=score; store_it; }
>> }
>> 
>> kati tetoio omos einai yperbolika argo kai apaitei kai arketi mnimi

Apo oti katalava xekinaei ena dentro opou otan exeis 14M sthles oi
pithanoi syndyasmoi einai kati ligotero apo gugol. H mhpws kaneis cut to
recursion se kapoio level; Deyteron, poly syndyasmoi tha einai
isodynamoi metajy toys. Mporei o computer na ypologisei mono toys
monadikoys syndyasmous? (Xlwmo to kovo...)

Teleytaio, alla shmantiko, h adeia enos tetoiou programmatos tha prepei
na problepei ypoxrewtikh dwrea se kapoio LUG sthn perptwsh kerdwn :-)

Eyxaristw gia thn ypomonh sas.

Ioannis Theodossis

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




More information about the Linux-greek-users mailing list