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] Incastri - Gennaio 2011
Pages (3): « 1 [2] 3 »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
CowBoy
.arcimaestro.

User info:
Registered: May 2006
Posts: 294 (0.04 al dì)
Location: Milano
Corso: F49 - Informatica
Anno: Laureato F49
Time Online: 3 Days, 13:40:27 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ti do ragione asgar... purtroppo le strutture dati dei grafi scritte dall'ALGOTeam non sono molto chiare. Mancano i commenti e chiarimenti del caso. Personalmente ci ho messo un po a decifrare il tutto. Praticamente ogni vertice viene rappresentato da un intero che parte da 0, con numerazione crescente. La lista/file di input deve contenere i dati in formato [id vertice partenza] [id arco(id vertice al quale collego il vertice di partenza)] [costo/distanza].
Il codice inoltre richiede che l'input venga letto da un file, ma si può modificare per far sì che legga una lista o altro...

Penso che sarebbe di grande aiuto se un giorno chi ha scritto il codice, aggiungesse anche dei commenti o delle descrizioni.

__________________
.. ±·ø·±-`` MuSiC iS My LanGuAGe ´´-±·ø·± ..

26-12-2010 16:39
Click Here to See the Profile for CowBoy Click here to Send CowBoy a Private Message Find more posts by CowBoy Add CowBoy to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
asgar
.primate.

User info:
Registered: Jun 2009
Posts: 78 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 10:31:23 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

hum dijkstra non credo serva in ogni caso, basta visitare in ampiezza per trovare le catene

27-12-2010 22:02
Click Here to See the Profile for asgar Click here to Send asgar a Private Message Find more posts by asgar Add asgar to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
CowBoy
.arcimaestro.

User info:
Registered: May 2006
Posts: 294 (0.04 al dì)
Location: Milano
Corso: F49 - Informatica
Anno: Laureato F49
Time Online: 3 Days, 13:40:27 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Vero, la visita in ampiezza... ho fatto male a non frequentare quest'anno. Ho provato ad implementarla e funziona bene con i primi test.
Dijkstra basico con complessità O(n^2) mi funzionava bene ma quando ho cambiato implementazione usando gli 2-3heap per scendere a O(m+nlogn), il risultato finale era errato. Grazie asgar per questo suggerimento!

__________________
.. ±·ø·±-`` MuSiC iS My LanGuAGe ´´-±·ø·± ..

27-12-2010 23:28
Click Here to See the Profile for CowBoy Click here to Send CowBoy a Private Message Find more posts by CowBoy Add CowBoy to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
asgar
.primate.

User info:
Registered: Jun 2009
Posts: 78 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 10:31:23 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

mah per ora più che vedere il tempo di calcolo o lo spazio occupato cerco di farlo funzionare hehe.. in effetti il mio fra cicli e non cicli ci mette un sacco a calcolare le catene. però si può sempre risolvere aggiungendo qualche puntatore ai nodi del grafo quindi per ora non me ne preoccupo

28-12-2010 13:33
Click Here to See the Profile for asgar Click here to Send asgar a Private Message Find more posts by asgar Add asgar 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

Scusate ma voi usando i grafi come fate a ricavarvi il cammino più breve?

03-01-2011 20:23
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
CowBoy
.arcimaestro.

User info:
Registered: May 2006
Posts: 294 (0.04 al dì)
Location: Milano
Corso: F49 - Informatica
Anno: Laureato F49
Time Online: 3 Days, 13:40:27 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Come diceva asgar, facendo una ricerca bfs... oppure, se vuoi farti del male, usando dijkstra.

__________________
.. ±·ø·±-`` MuSiC iS My LanGuAGe ´´-±·ø·± ..

04-01-2011 17:06
Click Here to See the Profile for CowBoy Click here to Send CowBoy a Private Message Find more posts by CowBoy Add CowBoy to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
asgar
.primate.

User info:
Registered: Jun 2009
Posts: 78 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 10:31:23 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

qualcuno ha già fatto le sottostringhe massime o la cacofonia?

04-01-2011 19:00
Click Here to See the Profile for asgar Click here to Send asgar a Private Message Find more posts by asgar Add asgar 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 CowBoy
Come diceva asgar, facendo una ricerca bfs... oppure, se vuoi farti del male, usando dijkstra.

Si ma così viene esplorato il grafo...ma per mantenere traccia di tutti i cammini possibili per poter scegliere il più breve?

04-01-2011 20: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
Bomb
.simpatizzante.

User info:
Registered: Feb 2009
Posts: 14 (0.00 al dì)
Location: Venegono Superiore
Corso: Informatica
Anno: 3
Time Online: 4:35:59 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

li memo rizzi tutti e poi tieni quello che fa meno passi?
mah...mi sembra un po' dispendioso...però dijkstra lo è ancora di più...:mad

05-01-2011 13:54
Click Here to See the Profile for Bomb Click here to Send Bomb a Private Message Find more posts by Bomb Add Bomb to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
CowBoy
.arcimaestro.

User info:
Registered: May 2006
Posts: 294 (0.04 al dì)
Location: Milano
Corso: F49 - Informatica
Anno: Laureato F49
Time Online: 3 Days, 13:40:27 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by asgar
qualcuno ha già fatto le sottostringhe massime o la cacofonia?


Usa un algoritmo chiamato "La sotto sequenza comune massima"(LCS - Longest common subsequence/substring)... ci sono vari modi di implementarlo. Il peggiore è quello ricorsivo(tempo esponenziale). Quello dinamico scende a O(n*m)... se proprio vuoi strafare ci sono alcune tecniche per renderlo ancora più veloce.

Ciao!

__________________
.. ±·ø·±-`` MuSiC iS My LanGuAGe ´´-±·ø·± ..

05-01-2011 15:18
Click Here to See the Profile for CowBoy Click here to Send CowBoy a Private Message Find more posts by CowBoy Add CowBoy to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
CowBoy
.arcimaestro.

User info:
Registered: May 2006
Posts: 294 (0.04 al dì)
Location: Milano
Corso: F49 - Informatica
Anno: Laureato F49
Time Online: 3 Days, 13:40:27 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Output errato

... up

__________________
.. ±·ø·±-`` MuSiC iS My LanGuAGe ´´-±·ø·± ..

06-01-2011 21:54
Click Here to See the Profile for CowBoy Click here to Send CowBoy a Private Message Find more posts by CowBoy Add CowBoy to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
asgar
.primate.

User info:
Registered: Jun 2009
Posts: 78 (0.01 al dì)
Location:
Corso:
Anno:
Time Online: 10:31:23 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by CowBoy
Usa un algoritmo chiamato "La sotto sequenza comune massima"(LCS - Longest common subsequence/substring)... ci sono vari modi di implementarlo. Il peggiore è quello ricorsivo(tempo esponenziale). Quello dinamico scende a O(n*m)... se proprio vuoi strafare ci sono alcune tecniche per renderlo ancora più veloce.

Ciao!

mm non avevo visto il post.. ne ho fatto uno io che dipende dalla lunghezza delle due stringhe quindi credo dell'ordine di n*m, credo terrò quello, grazie cmq :)

06-01-2011 22:27
Click Here to See the Profile for asgar Click here to Send asgar a Private Message Find more posts by asgar Add asgar to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
CowBoy
.arcimaestro.

User info:
Registered: May 2006
Posts: 294 (0.04 al dì)
Location: Milano
Corso: F49 - Informatica
Anno: Laureato F49
Time Online: 3 Days, 13:40:27 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Direi che ormai dovrei esserci... se qualcuno ha preparato file per testare il codice, posti pure qualche esempio per vedere se ci sono comportamenti anomali e sistemarli...

__________________
.. ±·ø·±-`` MuSiC iS My LanGuAGe ´´-±·ø·± ..

07-01-2011 20:23
Click Here to See the Profile for CowBoy Click here to Send CowBoy a Private Message Find more posts by CowBoy Add CowBoy to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
CowBoy
.arcimaestro.

User info:
Registered: May 2006
Posts: 294 (0.04 al dì)
Location: Milano
Corso: F49 - Informatica
Anno: Laureato F49
Time Online: 3 Days, 13:40:27 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ATTENZIONE!!! Leggete il seguente avviso:

7 gennaio 2011
La traccia del progetto "incastri", valida per l'appello di gennaio, presenta un errore all'interno dell'esempio conclusivo. L'istruzione "m gatto topo" deve essere ignorata in quando non esistono tessere con nome "gatto" quindi la riga di output "to" non va stampata.

http://lonati.dsi.unimi.it/algo/1011/?page=avvisi

__________________
.. ±·ø·±-`` MuSiC iS My LanGuAGe ´´-±·ø·± ..

Last edited by CowBoy on 12-01-2011 at 14:26

12-01-2011 14:19
Click Here to See the Profile for CowBoy Click here to Send CowBoy a Private Message Find more posts by CowBoy Add CowBoy to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
xSharKMaNx
un gioco della follia

User info:
Registered: Sep 2007
Posts: 1477 (0.22 al dì)
Location:
Corso: F49
Anno: Laureato
Time Online: 10 Days, 17:15:29 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ciao a tutti,
volevo chiedere a chi ha frequentato il lab di algo con la Prof. Lonati come si è trovato.

Vedendo le sue slide sul JLI devo dire che sono fatte davvero bene.

Per la teoria cosa state utilizzando come materiale?

Grazie a tutti

__________________
Perché, mentre il manganello può sostituire il dialogo, le parole non perderanno mai il loro potere; perché esse sono il mezzo per giungere al significato, e per coloro che vorranno ascoltare, all'affermazione della verità. E la verità è che c'è qualcosa di terribilmente marcio in questo paese. (V)

I popoli non dovrebbero aver paura dei propri governi, sono i governi che dovrebbero aver paura dei popoli. (T.J)

12-01-2011 14:48
Click Here to See the Profile for xSharKMaNx Click here to Send xSharKMaNx a Private Message Find more posts by xSharKMaNx Add xSharKMaNx to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 08:21.    Post New Thread    Post A Reply
Pages (3): « 1 [2] 3 »   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.155 seconds (76.30% PHP - 23.70% MySQL) con 24 query.