Newsgroup: it.comp.lang.visual-basic
Titolo: Algoritmo di Goedel [godelizzazione]

Salve a tutti.
Mi sto cimentando da due giorni
nel calcolo della godelizzazione di una parola.
Ho provato in molte maniere,e alla fine credo di aver capito.
Se voglio venire a capo della godelizzazione della parola
"zuzzurellone", non ci sono tipi di dati che tengano.
Ho bisogno di stringhe.
Qualcuno qui ha mai avuto a che fare con l'algoritmo di  goedel?
Qualcuno di voi sa come calcolare un elevazione a potenza che
accetti due stringhe in entrata e restituisce una stringa in uscita?
Dove posso documentarmi?
Lo riporto qui per completezza:
"Guardiamo al messaggio "aba":
Goedelizzare "aba" vuol dire assegnamo alla prima lettera il primo numero 
primo,elevato alla potenza corrispondente alla posizione della lettera 
nell'alfabeto.Moltiplichiamo tutto.
Il messaggio "aba" quindi viene cosi' codificato
A = 2^1    B =3^2    C=7^1
quindi
(2^1) * (3^2) * (7^1)
quindi
2 * 9* 7
Totale: 126.
Possiamo scrivere 126 al opsto di "aba" "
Il problema della mia richiesta sta nel fatto che
la godelizzazione di "ciao" č una cifra come
76980256548569640!!!
-- 
WWW.AKUMA.SPLINDER.COM
§§-Blog, funny, fashion-§§

 
Prova a cercare con google, tempo fa avevo visto una dll che eseguiva 
operazioni con gandi interi partendo da stringhe .. se la ritrovo te la 
invio .. ora non riesco a ricordarmi :(
-- 
                                  [CapoBecchino]
| --------------------------------------------- |
| hotmail/msn: capobecchino [@] hotmail [.] com |
| yahoo: capo_becchino [@] yahoo [.] it         |
| icq: 217325174                                |
| --------------------------------------------- |
!!! OFFERTA IRRIPETIBILE !!!
Muori oggi avrai uno sconto del 50%.

sarebbe magnifico...
credo di aver imparato gran parte di google a memoria...
fammi sapere..

 fammi sapere..
Scarica il vecchio progettino di termopilucco:
http://www.unbelsito.com/vb/lameparser0.3.zip
aggiungi una form con un command e scrivi:
Dim myParser As parser
Dim espressione As String
Set myParser = New parser
espressione = "(2^32) * (4^48) * (5^67) * (7^49)"
MsgBox myParser.valutaEspressione(espressione)
Set myParser = Nothing
Luca
-- 
questo articolo e` stato inviato via web dal servizio gratuito 
http://www.newsland.it/news
 segnala gli abusi ad 
ab...@newsland.it

My god....
è fantastico!!!!!!!!
Ti tengo informato !

MA DAIIIIIIIII!
MA VIENIIIIIIII!
Passero' il resto della mia vita a studiare questo codice !!
Non ci capisco una mazza (PER ADESSO),
ma con cqlcoli umani ( a mente ) sembra funzionare, (tipo
2^2,3^3...roba simile....)
elevando a potenza 255 (255^ 255) sembra funzionare....
ERGO
TermoPilucco è il mio genio preferito :)
ps:
non riesco davvero a concepire come si possano
fare operazioni matematiche con/su stringhe...
lo vedo un po' come voler mischiare acqua e fuoco...
ma se questi sono i risultati ( 4 righe di numeri! ) .... Mi devo
informare...
grazie a tutti.
Siete una miniera

Rilancio:
   Set myParser = New parser
   'cinquemila molptiplicato per se stesso 5000 volte
   espressione = "(5000^5000)"
   MsgBox myParser.valutaEspressione(espressione)
   Set myParser = Nothing
Ci mette un po'.
ma non dà nessun errore! (7 righe di numeri in una messagebox!!! )
quanto vorrei imparare a fare anche io cose del genere..:)
grazie! senza di voi, non ci sarei mai arrivato :)

Akuma_from_Work ha scritto:
[...]
Se devi usarlo in modo intensivo ti conviene cercare qualcosa scritto da
matematici.
Loro studiano tutte le possibili scorciatoie (meno cicli e calcoli più
semplici per ottenere lo stesso risultato) e, soprattutto, hai la garanzia
che non sbagliano i calcoli :)
Luca_


luca_ ha scritto:
[...]
Ah, occhio che la msgbox tronca le stringhe dopo un po' di caratteri:
5000^5000 fa un po' più di sette righe di numeri e ovviamente finisce con
molti zeri:
707981126104817289238561515869405755294754851033943135872983022354636725918978852356936617178209419490878973452563965339183820773988031459112609583574024772414640097195739733597493258292593911533504739129562268204071543557621957154167022936179401953583027498888113205291131968782470891300838597837767141120435864584992782498977697188157361872430827823292296401471764360281247533822455313413766682060553932420574517776301414054626770797641835849797451428751644466181183703726412427157095230416888725385040703660226592153367059978408638148558513504111695621640692451932474392591862086414819185411626773791894994406168428507759246036924025777055357634896392169028549036674103917910390123122026237318112696017863462920301988823600406575146406640220049422091896369590598171407466964728135904684855753117832489846993604759914783064078886140089964789897656050101227066192624846386331984057164665045089924494201539625270697001187881367962390678914347793862826506105520522644312446025531144551458101186353863369680344655638936659243461237047173113997323419240412309234484733099352710874923612021267465043711970047164802814255606911894738040841457737462769926351765921497218350718784849752154228451165042072134597327525335997948231177086940097213446082140059915107029942268346321886596896076937508927199012560894227229861170835063193275562021655101536236330392392560284269833080850069225364145744041774719178688107329684429743622501012856814212179621956483521095295256072246433804673641098169442421756072664412572756068078247510287091884049267578536219177944311892558255695997942118063005962081586901411245274525575806516139720891453293660077291681544869718136317960388216759144498700593953034024139135735103124006507920130411563051290739875984048739020488326068529205350781977646815046055443486981291399460529094566305794525629146876693677088044738908686804347196497790461267195461802633892093576728372128157045527262052597588192804596934693965313703514210025054163635229941466228182104869570346515078168365869381882109967945590741197592442263451236363750258092727874023979540960114272841323821052516941436134247701517169999814769839532764839776626052019008163918462618920729243597086790637140819874056907380954653357507380280101201406554851578811603612887346184819892410309790807676958393749413603843527609157765970918264120001431829968288711129314171016323604872104191715752072056076969875014335371143311436121427942641176783819806495788793449586107462432457828935820874523018002326573371792275015803915053481566654356918630304140682380843674161521948022693397290784975190390781275867052374659946411526516709716741457509930231987396218492078717684129372785516243421194962533072587730083679557809072920867899262695422115745849378702041873836208484588138353404200282814583321829273357782799351140151928133046956866681416868222010377328757665786112914048811034184468356702964021329974343241021330927039341751619321874202115674346757441157374401525357918166344453300419680167601865115273735906123647023740700358389324813508748499074050587298089643054453078889240301136311191957019220390199646507831381734309940864311750332699027888526776401931414364779827948392399653273629534302153643623085259212876401132505810189856324361229541420581892390594980665389051201415304966659892733421858023871180673239243966746682739082260675890364646350652746356173110434511970494688017873356301443418837517927867506014065709373192775928693374280563902320031056203237259164457017960626894481634963085525669157505035400390625000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000


che spettacolo :)
...mi hai fatto notare che la msgbox si ferma alla stringa
"936659243" :)
ecco perchè ho cannato il numero di righe :)

Ora che ci penso...
c'e' un motivo per il quale 5000^5000
(cito da te) "finisce con molti zeri" ?
Vuol dire che il risultato non è esatto?
Oppure fa esattamente quella cifra con quel numero di zeri?

Akuma_from_Work ha scritto:

Sui numeri interi la classe, a meno di bug non noti, da' sempre il
risultato esatto.
5000^5000 ha tanti zeri perchè equivale a (5 x 1000)^(5000)=(5^5000) x
(1000^5000)
e 1000^5000 è 1000 moltiplicato per se stesso cinquemila volte, per cui ha
un po' di zeri :)
luca_


mmhh, mi piacerebbe poter conoscere la pronuncia di questo numerone :)
Cioè 1000 è mille.
1.000.000 è un milione
5000^5000 è....
Siamo nell'ordine dei googol forse :)
A proposito: per i curiosi lancio l'amo:
Google è simile a Googol no?
Vi invito a leggere :    
http://www.calshop.biz/googolplex.html
;) Saluti e grazie perl'immenso aiuto :)