Undirected graph and adjacency matrix, Data Structure & Algorithms

Assignment Help:


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


Related Discussions:- Undirected graph and adjacency matrix

Linked lists, representation of links list in memory

representation of links list in memory

Linked list, write an algorithm for multiplication of two sparse matrices u...

write an algorithm for multiplication of two sparse matrices using Linked Lists

Time converstion, how to convert 12 hour format into 24 hour format using c...

how to convert 12 hour format into 24 hour format using c program

Boar corloring, Board coloring , C/C++ Programming

Board coloring , C/C++ Programming

Algorithm to build a binary tree , Q. Give the algorithm to build a binary ...

Q. Give the algorithm to build a binary tree where the yields of preorder and post order traversal are given to us.

Memory mapping, lower triangular matrix and upper triangular matrix

lower triangular matrix and upper triangular matrix

Adjacency matrix, Q. Give the adjacency matrix for the graph drawn below:  ...

Q. Give the adjacency matrix for the graph drawn below:                                                 Ans: Adjacency matrix for the graph given to us

Linear node is given by means of pointer, A linear collection of data eleme...

A linear collection of data elements where the linear node is given by means of pointer is known as Linked list

Data communication, #question.explain different types of errors in data tra...

#question.explain different types of errors in data transmission.

Determine the importance of array, Determine the importance of array Ar...

Determine the importance of array Arrays are significant since they allow many values to be stored in a single data structure whereas providing very fast access to each value.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd