Regarding Island Matrix for proj 2

5 views
Skip to first unread message

Nithin Uppalapati

unread,
Feb 19, 2014, 12:40:44 AM2/19/14
to cs...@googlegroups.com
Any hint on how to find the island matrix given the adjacency matrix

I remember applying BFS with different label numbers to get the connected components in the graph. Is that what we need to do??


Thanks,
Nithin

Cheyenne Parsley

unread,
Feb 19, 2014, 12:54:22 AM2/19/14
to cs...@googlegroups.com
Nithin,

BFS could work. Ideally, the nodes are in order of connection, so it should be a simple if statement to see if the current node connects to a node that was already written into the matrix. If not, then it is in a new island, and should be given the next integer value

-Cheyenne


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



--
Cheyenne Parsley
LSCEE Teaching Assistant, Researcher
Statler College of Engineering, WVU
757 Engineering Sciences Building

Reply all
Reply to author
Forward
0 new messages