Undirected graph and adjacency matrix, Data Structure & Algorithms


Q. Consider the specification written below of a graph G

V(G ) = {1,2,3,4}

E(G ) = {(1,2), (1,3), (3,3), (3,4), (4,1)}

(i)        Draw the undirected graph.

(ii)       Also draw its adjacency matrix.                                           

 

Ans:

V(G) = {1,2,3,4}

E(G) = {(1,2),(1,3),(3,3,),(3,4),(4,1)}

(i). The undirected graph is shown as follows:-

 

 

909_Undirected graph.png

 

 

(ii) The adjacency matrix is written as follows:-

 

 

942_Adjacency matrix2.png

Posted Date: 7/10/2012 6:08:55 AM | Location : United States







Related Discussions:- Undirected graph and adjacency matrix, Assignment Help, Ask Question on Undirected graph and adjacency matrix, Get Answer, Expert's Help, Undirected graph and adjacency matrix Discussions

Write discussion on Undirected graph and adjacency matrix
Your posts are moderated
Related Questions
Write steps for algorithm for In-order Traversal This process when implemented iteratively also needs a stack and a Boolean to prevent the execution from traversing any portion

Give an algorithm to find both the maximum and minimum of 380 distinct numbers that uses at most 568 comparisons.

A full binary tree with n leaves have:- 2n -1 nodes.

Q. What is the smallest value of n such that an algorithm whose running time is 100n2 runs faster than an algorithm whose running time is 2n on the same machine.    A n

what is queues? how it work? and why it used? i want an assignment on queue .....

write a algorithsm in c to perform push and pop operations stastic implementation using array ?

What is Algorithm A finite sequence of steps for accomplishing some computational task. An algorithm should Have steps which are simple and definite enough to be done

Limitation of Binary Search: - (i)  The complexity of Binary search is O (log2 n). The complexity is similar irrespective of the position of the element, even if it is not pres

Construct a B+ tree for the following keys, starting with an empty tree.  Each node in the tree can hold a maximum of 2 entries (i.e., order d = 1). Start with an empty root nod

need c++ algorithmic software program to derive one numerical outcome from 10 levels of variables with 135 combinations cross computed