This repository contains the python code to convert one form of graph representation to another such as Adjacency list to adjacency matrix and vice versa
#Approach In this task our target is to convert one graph representation to another (here I have considered for undirected graph representation)- 1. .Adjacency matrix to Incidence matrix 2. Adjacency list to adjacency matrix 3. Adjacency matrix to adjacency list 4. Adjacency list to incidence matrix 5. Incidence matrix to adjacency matrix 6. Incidence matrix to adjacency list This assignment is implemented using python programming language and can be executed on any platform. To run the program, we need to just choose the suitable option to transform the result from on form to another representation form as input to the programme already provided. For basic understanding refer below definations - 1. Adjacency list - An adjacency list represents a graph as an array of linked list and can be represented as - 1->2->3->4 2->3 3->2->4 2. Adjacency matrix - The unoriented incidence matrix (or simply incidence matrix) of an undirected graph is a n × m matrix B, where n and m are the numbers of vertices and edges respectively, such that Bi,j = 1 if the vertex vi and edge ej are incident and 0 otherwise. adjacency matrix allows representing a graph with a V × V matrix M = [f(i, j)] where each element f(i, j) contains the attributes of the edge (i, j) and can be represented as - 0 0 0 1 0 1 0 1 1 0 0 0 1 0 1 0 3. Incidence matrix - The incidence matrix of an undirected graph is a n × m matrix B, where n and m are the numbers of vertices and edges respectively, such that Bi,j = 1 if the vertex v_i and edge e_j are incident and 0 otherwise and can be represented as 1 1 1 0 0 0 1 0 0 1 1 0 0 1 0 1 0 1