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 > Progetto Febbraio
Pages (8): « 1 2 3 [4] 5 6 7 8 »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
Guccio
.fedelissimo.

User info:
Registered: May 2009
Posts: 59 (0.01 al dì)
Location: Milano
Corso: Informatica
Anno: Terzo
Time Online: 9:28:59 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Non riesco a trovarlo...posteresti il link?

03-02-2011 11:47
Click Here to See the Profile for Guccio Click here to Send Guccio a Private Message Find more posts by Guccio Add Guccio to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Alessio
.precettore.

User info:
Registered: Nov 2007
Posts: 83 (0.01 al dì)
Location:
Corso: Informatica
Anno: 3
Time Online: 1 Day, 7:50:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ciao a tutti, ho una domanda da fare in merito alla funzione Festa. Il dubbio è su come vengono formati i gruppi: secondo quale calcolo/criterio un senatore riesce a soddisfare due o più donne? Oppure come può una donna essere soddisfatta da più uomini?

Perché tutto sarebbe lineare e chiaro se ogni uomo sceglie una SOLA donna.

03-02-2011 16:33
Click Here to See the Profile for Alessio Click here to Send Alessio a Private Message Find more posts by Alessio Add Alessio to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Chobeat
.illuminato.

User info:
Registered: Sep 2007
Posts: 241 (0.04 al dì)
Location: Alessandria
Corso: Informatica
Anno: 1
Time Online: 1 Day, 6:13:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

quella è la funzione per il 28 febbraio.

In realtà è molto più facile così se ragioni come abbiamo fatto noi. L'idea è di avere le n triple (uomo, donna, affinità) con l'affinità migliore e da queste costruire un grafo. Fatto questo, fai un algoritmo che si gira tutti i gruppetti del grafo e vede come stanno raggruppati.

03-02-2011 16:39
Click Here to See the Profile for Chobeat Click here to Send Chobeat a Private Message Find more posts by Chobeat Add Chobeat to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Alessio
.precettore.

User info:
Registered: Nov 2007
Posts: 83 (0.01 al dì)
Location:
Corso: Informatica
Anno: 3
Time Online: 1 Day, 7:50:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

scusami non mi è ancora chiaro ... la funzione festa (giorno, n) fa parte delle funzioni da implementare x entrambi gli appelli.
Nel testo si legge testualmente:

"La fi lantropia talvolta puo richiedere una certa privacy e quindi benefattore e bene ciata si appartano,
ma non necessariamente a coppie. Infatti, secondo la regola descritta, puo benissimo succedere che un
senatore (particolarmente generoso) aiuti piu di una popolana, o che una popolana (particolarmente in
dicolta) si faccia aiutare da piu di un benefattore."

Dunque quel che ho capito io è questo: io devo trovare per ogni senatore qual'è la donna più affine a lui. Da questa cosa risulterebbe che ogni uomo sceglie solo una donna ma può capitare che due uomini scelgano la stessa donna (in quanto è la più affine per entrambi). Fin qui mi sembra ok. Il problema nasce dall'esempio che riporta la prof nel testo. Infatti si vede che Tarquinio è in coppia sia con Tullia che con Messalina!! Come può essere possibile?

03-02-2011 17:12
Click Here to See the Profile for Alessio Click here to Send Alessio a Private Message Find more posts by Alessio Add Alessio to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Chobeat
.illuminato.

User info:
Registered: Sep 2007
Posts: 241 (0.04 al dì)
Location: Alessandria
Corso: Informatica
Anno: 1
Time Online: 1 Day, 6:13:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

perché un uomo si sceglie tutte le donne che vuole ("puo benissimo succedere che un
senatore (particolarmente generoso) aiuti piu di una popolana"

03-02-2011 18:13
Click Here to See the Profile for Chobeat Click here to Send Chobeat a Private Message Find more posts by Chobeat Add Chobeat to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Alessio
.precettore.

User info:
Registered: Nov 2007
Posts: 83 (0.01 al dì)
Location:
Corso: Informatica
Anno: 3
Time Online: 1 Day, 7:50:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

però a questo punto se un senatore si sceglie tutte le donne che vuole si avrebbe che io in modo arbitrario dico che il senatore1 si sceglie 3 donne, il senatore2 ne sceglie 4 ecc... Così facendo avrei un output che non coinciderebbe più con quello fornito dalla prof. Infatti nel progetto non c'è nessuna funzione che definisca quante donne vengono scelte da ciascun senatore. Non so se mi sono spiegato bene ...

03-02-2011 18:27
Click Here to See the Profile for Alessio Click here to Send Alessio a Private Message Find more posts by Alessio Add Alessio to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Guccio
.fedelissimo.

User info:
Registered: May 2009
Posts: 59 (0.01 al dì)
Location: Milano
Corso: Informatica
Anno: Terzo
Time Online: 9:28:59 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Sto leggendo l'implementazione dell'RB-tree dall'algoteam, e mi sono inbattuto in questo prototipo:

void inord(rbnode *p, rbnode *nil, void (*op)(rbnode *))

che parametro sarebbe "void (*op)(rbnode *)"??? :| è la prima volta che leggo una cosa del genere

03-02-2011 18:34
Click Here to See the Profile for Guccio Click here to Send Guccio a Private Message Find more posts by Guccio Add Guccio to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
zandrek
.fedelissimo.

User info:
Registered: Oct 2003
Posts: 59 (0.01 al dì)
Location: Milano
Corso: Informatica
Anno:
Time Online: 21:43:33 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

puntatore a funzione,e quella funzione punta a void .... ha "spiegato" ste robe l'ultimo giorno di lezione....
scusa se non ti scrivo di più ma non è molto chiaro nemmeno a me...

04-02-2011 07:22
Click Here to See the Profile for zandrek Click here to Send zandrek a Private Message Find more posts by zandrek Add zandrek to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Chobeat
.illuminato.

User info:
Registered: Sep 2007
Posts: 241 (0.04 al dì)
Location: Alessandria
Corso: Informatica
Anno: 1
Time Online: 1 Day, 6:13:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

allora avevo ragione...

04-02-2011 07:40
Click Here to See the Profile for Chobeat Click here to Send Chobeat a Private Message Find more posts by Chobeat Add Chobeat to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Panz90
.novellino.

User info:
Registered: Feb 2011
Posts: 4 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 4:35:48 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Modifico la domanda...
Per fare festa vi scorrete tutto l'albero tenendo già conto del giorno e salvate le affinità migliori?
Grazie.

Last edited by Panz90 on 05-02-2011 at 12:04

04-02-2011 10:22
Click Here to See the Profile for Panz90 Click here to Send Panz90 a Private Message Find more posts by Panz90 Add Panz90 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Chobeat
.illuminato.

User info:
Registered: Sep 2007
Posts: 241 (0.04 al dì)
Location: Alessandria
Corso: Informatica
Anno: 1
Time Online: 1 Day, 6:13:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

io salvo tutte le affinità in un albero binario(quindi ordinato) e poi prendo le N migliori con cui costruisco il grafo.

06-02-2011 09:49
Click Here to See the Profile for Chobeat Click here to Send Chobeat a Private Message Find more posts by Chobeat Add Chobeat to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Panz90
.novellino.

User info:
Registered: Feb 2011
Posts: 4 (0.00 al dì)
Location:
Corso:
Anno:
Time Online: 4:35:48 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Si idem, però una volta che hai le affinità migliori per festa non basta? Poi si fanno dei calcoli per stanze etc, no? Il grafo è per festa?

06-02-2011 11:58
Click Here to See the Profile for Panz90 Click here to Send Panz90 a Private Message Find more posts by Panz90 Add Panz90 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Guccio
.fedelissimo.

User info:
Registered: May 2009
Posts: 59 (0.01 al dì)
Location: Milano
Corso: Informatica
Anno: Terzo
Time Online: 9:28:59 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by figo1987
salve qualcuno ha pensato alla complessità della funzione festa? io non riesco a scendere sotto a O(n^2)...


Bè sei riuscito a scendere sotto O(n^2)?

06-02-2011 23:15
Click Here to See the Profile for Guccio Click here to Send Guccio a Private Message Find more posts by Guccio Add Guccio to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
figo1987
.amico.

User info:
Registered: Jan 2009
Posts: 32 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 9:25:24 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

si pero' non funziona ancora bene... forse c'è un errore se poi funziona vi dico...

06-02-2011 23:22
Click Here to See the Profile for figo1987 Click here to Send figo1987 a Private Message Find more posts by figo1987 Add figo1987 to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Guccio
.fedelissimo.

User info:
Registered: May 2009
Posts: 59 (0.01 al dì)
Location: Milano
Corso: Informatica
Anno: Terzo
Time Online: 9:28:59 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

E come hai fatto a scendere sotto O(n^2)? la lista di uscita del bfs dove l'hai memorizzata?

07-02-2011 10:45
Click Here to See the Profile for Guccio Click here to Send Guccio a Private Message Find more posts by Guccio Add Guccio to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 10:02.    Post New Thread    Post A Reply
Pages (8): « 1 2 3 [4] 5 6 7 8 »   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.134 seconds (69.71% PHP - 30.29% MySQL) con 24 query.