Navigation: Main Page » Computer / Recreational / Science / Society / Television
 
Web N-N-A.com
         
Science Groups Forum Index  »  Math - Symbolic Math  »  Help
Page 1 of 1    
Author Message
Guest
Posted: Sat Mar 24, 2007 12:08 pm
Dear Sir/Madam

I want to write the following c program but i dont an idea where to
start. Can anyone please help to write this program?

list of vertices and edges:
vertices {1, 2, 3, 4, 5}
edges {(1, 3), (2, 1), (3, 2), (3, 5), (4, 2), (5, 1)}

In the adjacency matrix, a 1 in entry ij means there is an edge from
vertex i to vertex j.

Write a program that converts an adjacency matrix to a list of edges
to an adjacency matrix using the function modeled below:
matrix -> adjacency_to_edges -> edge_list

edge_list -> edges_to_adjacency -> matrix

you may assume that the vertices will be numberd from 1 to n.
Remeber that your matrix subscripts will be one less than the
corresponding vertex numbers. Allow up to 8 vertices i.e, declare an
adjacency matrix to be 8x8 and an edge_list matrix to be 64x2.
 
Page 1 of 1       All times are GMT
The time now is Wed Mar 10, 2010 3:19 pm