Write a program to represent a graph as an adjacency matrix


Write a program to represent a graph as an adjacency matrix.consider the vertices of the graph to Vi,i=1-----n.Input n=the number of vertices in the graph and a sequence of integer pairs i,j to indicate that there is an edge between Vi and Vj and do a breadth first search of all the vertices in the graph. The output should consist of (in order of vertex number) for each vertex (3 ints) vertex number, # of edges on the shortest path froom V1 to this vertex, immediate previous vertex on this shortest path.Your prgram should be able to determin that a vertex is unreachable and that information should be included in the output

Request for Solution File

Ask an Expert for Answer!!
Other Subject: Write a program to represent a graph as an adjacency matrix
Reference No:- TGS0598555

Expected delivery within 24 Hours