Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi A - F > Algoritmi e strutture dati > Hashing doppio
Pages (2): [1] 2 »   Last Thread   Next Thread
Author
Thread    Post New Thread    Post A Reply
Cic
.fedelissimo.

User info:
Registered: Jul 2009
Posts: 44 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 16:21:01: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Hashing doppio

Ciao ragazzi, qualcuno potrebbe aiutarmi a capire come si svolge l'esercizio numero 3, che si trova qui? http://pighizzini.di.unimi.it/algor...sp16gen2017.pdf

28-01-2017 10:56
Click Here to See the Profile for Cic Click here to Send Cic a Private Message Find more posts by Cic Add Cic to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Cronovirus
dsy core staff

User info:
Registered: Jun 2012
Posts: 471 (0.11 al dì)
Location:
Corso: Magistrale in Informatica
Anno: 2
Time Online: 4 Days, 2:45:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

C'è qualcosa in particolare che non ti torna oppure non riesci proprio a cominciare?

28-01-2017 11:14
Click Here to See the Profile for Cronovirus Click here to Send Cronovirus a Private Message Find more posts by Cronovirus Add Cronovirus to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Cic
.fedelissimo.

User info:
Registered: Jul 2009
Posts: 44 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 16:21:01: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Non riesco proprio a farlo. Ho visto pure sul libro, ma non capisco come procedere :(

28-01-2017 11:45
Click Here to See the Profile for Cic Click here to Send Cic a Private Message Find more posts by Cic Add Cic to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Cronovirus
dsy core staff

User info:
Registered: Jun 2012
Posts: 471 (0.11 al dì)
Location:
Corso: Magistrale in Informatica
Anno: 2
Time Online: 4 Days, 2:45:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ok.. Sarò abbastanza breve, se poi qualcosa non è chiaro dimmi pure.

c(leone,0) = h(leone) = 8. La entry è libera quindi scrivi "leone" nella casella 8.

c(gazzella,0) = h(gazzella) = 6. La entry numero 6 è libera quindi scrivilo li.

c(giaguaro,0) = h(giaguaro) = 6. La entry numero 6 non è libera quindi calcola
c(giaguaro,1) = 1. La entry 1 è libera quindi scrivilo.

c(gorilla,0) = 6 è occupata allora c(gorilla,1)= 7 è libera etc....

28-01-2017 12:02
Click Here to See the Profile for Cronovirus Click here to Send Cronovirus a Private Message Find more posts by Cronovirus Add Cronovirus to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Cic
.fedelissimo.

User info:
Registered: Jul 2009
Posts: 44 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 16:21:01: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ok, grazie mille! :)

28-01-2017 12:25
Click Here to See the Profile for Cic Click here to Send Cic a Private Message Find more posts by Cic Add Cic to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Cic
.fedelissimo.

User info:
Registered: Jul 2009
Posts: 44 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 16:21:01: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ciao Cronovirus, scusami se ti disturbo ancora, ma perché gufo fa alla casella 12 e bisonte alla 0? E non rispettivamente alla 9 e alla 2?

28-01-2017 14:46
Click Here to See the Profile for Cic Click here to Send Cic a Private Message Find more posts by Cic Add Cic to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Cronovirus
dsy core staff

User info:
Registered: Jun 2012
Posts: 471 (0.11 al dì)
Location:
Corso: Magistrale in Informatica
Anno: 2
Time Online: 4 Days, 2:45:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

immagino che hai sbagliato a fare i conti.. infatti

c(gufo,0) = 6 che è occupata,
c(gufo,1) = 1 che è occupata,
c(gufo,2) = 12 che è libera

Per mandare gufo nella 9 devi avere i = 9 :P

28-01-2017 17:30
Click Here to See the Profile for Cronovirus Click here to Send Cronovirus a Private Message Find more posts by Cronovirus Add Cronovirus to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Cic
.fedelissimo.

User info:
Registered: Jul 2009
Posts: 44 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 16:21:01: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Innanzitutto grazie ancora per la risposta, ma non mi torno proprio bisonte. Perché faccio così(che sarà sicuramente sbagliato):

C(bisone, 0)=C(bisonte)=1 che è occupata da giaguaro. A questo punto, dato che la 2 sarebbe libera, visto che coniglio non è ancora stato scritto, perché bisonte va alla 0 e non alla 2?

29-01-2017 11:23
Click Here to See the Profile for Cic Click here to Send Cic a Private Message Find more posts by Cic Add Cic to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Cic
.fedelissimo.

User info:
Registered: Jul 2009
Posts: 44 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 16:21:01: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Alla fine credo di aver capito comunque.

30-01-2017 10:18
Click Here to See the Profile for Cic Click here to Send Cic a Private Message Find more posts by Cic Add Cic to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Cronovirus
dsy core staff

User info:
Registered: Jun 2012
Posts: 471 (0.11 al dì)
Location:
Corso: Magistrale in Informatica
Anno: 2
Time Online: 4 Days, 2:45:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Scusami.. ma quanto fa

c(bisonte,2) e c(bisonte,3)?

30-01-2017 12:00
Click Here to See the Profile for Cronovirus Click here to Send Cronovirus a Private Message Find more posts by Cronovirus Add Cronovirus to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Cic
.fedelissimo.

User info:
Registered: Jul 2009
Posts: 44 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 16:21:01: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Non si calcola così? : C(bisonte, 2)=2*(1+(4)) mod 16=0. Dove 1=h(k) e 4=g(k).

30-01-2017 13:26
Click Here to See the Profile for Cic Click here to Send Cic a Private Message Find more posts by Cic Add Cic to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Cronovirus
dsy core staff

User info:
Registered: Jun 2012
Posts: 471 (0.11 al dì)
Location:
Corso: Magistrale in Informatica
Anno: 2
Time Online: 4 Days, 2:45:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Io direi invece

c(bisonte,2) = ( h(bisonte) + 2* (1 + g(bisonte) ) ) mod 16 = ( 1 + 2 * ( 1 + 4) ) mod 16 = 11 mod 16 = 11

c(bisonte, 3) = ( h(bisonte) + 3* (1 + g(bisonte) ) ) mod 16 = (1 + 3 * (1 + 4) ) mod 16 = 16 mod 16 = 0

30-01-2017 13:53
Click Here to See the Profile for Cronovirus Click here to Send Cronovirus a Private Message Find more posts by Cronovirus Add Cronovirus to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Cic
.fedelissimo.

User info:
Registered: Jul 2009
Posts: 44 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 16:21:01: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Si vede che sbagliavo allora, perché io facevo che poi il risultato lo dividevo per 16, calcolavo il resto e poi lo sottraevo al numero ottenuto da 11/16. Così:

C(bisonte, 2)=1+2(1+4)=11 mod 16

poi 11/16=0,68 quindi prendo solo 0, poi trovo il resto facendo 0*16 e a questo punto ho 0-0.

Credo di aver fatto un po' di confusione con le operazioni di resto XD

Last edited by Cic on 30-01-2017 at 14:09

30-01-2017 14:01
Click Here to See the Profile for Cic Click here to Send Cic a Private Message Find more posts by Cic Add Cic to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Cic
.fedelissimo.

User info:
Registered: Jul 2009
Posts: 44 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 16:21:01: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ok, ci sono. Riporto 2 esempi.

C(bisonte, 0)=1 occupata.
C(bisonte, 1)=1+1(1+4)=6 mod 16 occupata.
C(bisonte, 2)=1+2(1+4)=11 mod 16occupata.
C(bisonte, 3)=1+3(1+4)=16 mod 16 e quindi 16/16=1, di conseguenza 16-16*1=0 che è una posizione libera.

Così è corretto no?

30-01-2017 14:22
Click Here to See the Profile for Cic Click here to Send Cic a Private Message Find more posts by Cic Add Cic to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Cronovirus
dsy core staff

User info:
Registered: Jun 2012
Posts: 471 (0.11 al dì)
Location:
Corso: Magistrale in Informatica
Anno: 2
Time Online: 4 Days, 2:45:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

direi di sì, leggiti questo al massimo https://it.wikipedia.org/wiki/Operazione_modulo

30-01-2017 14:33
Click Here to See the Profile for Cronovirus Click here to Send Cronovirus a Private Message Find more posts by Cronovirus Add Cronovirus to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 01:26.    Post New Thread    Post A Reply
Pages (2): [1] 2 »   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.044 seconds (78.68% PHP - 21.32% MySQL) con 23 query.