Assignment for next week Graph algorithms

6 views
Skip to first unread message

Moin Mostakim

unread,
Mar 25, 2013, 12:09:08 AM3/25/13
to dashboard...@googlegroups.com
Dear All,

Try to check this. You also need to do the LCS along with greedy gas problem. 

Fill free to ask any queries you want to.

Thanking  You 

Moin Mostakim
Assignment on Graph Algorithms.docx

Fatema Zohora

unread,
Mar 25, 2013, 11:17:30 AM3/25/13
to dashboard...@googlegroups.com
due dates:
greedy problem, LCS, Dijkstra on :  31st March
Kruskal: 7th April 


Moin Mostakim

--
You received this message because you are subscribed to the Google Groups "Dashboardalgorithm" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dashboardalgori...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Fatema Zohora

unread,
Mar 31, 2013, 10:04:37 AM3/31/13
to dashboard...@googlegroups.com
Some of you had confusion regarding applying dijkstra on undirected graph. I said in theory class, in an undirected graph, an edge between node 'a' and node 'b' having cost K means, you can go from 'a' to 'b' using cost k and also from 'b' to 'a' using cost k. So that means, if you are using adjacency list while implementation, we have add 'b' into the link list associated with 'a' , and also add 'a' into the link list associated with 'b'. Again, if you are using adjacency matrix then set M[a,b]=20 and also M[b,a]=20 (this is just an example. in your code you will actually interpret a and b as node 0 and node 1. so the cells will be M[0][1]=20 and M[1][0]=20)  

After doing your code, test it with several examples on your own to be confirm whether your code is working perfectly. 
For set union,findset operations, you can take help from sahani (uploaded on moodle). This topic is also available in other books / web.

I have uploaded the specifications provided by Moin sir on moodle as well. I have done little modification. For dijkstra: print both min cost and the corresponding min cost path from source to all other nodes. 
Reply all
Reply to author
Forward
0 new messages