All Exams Test series for 1 year @ ₹349 only
Question

Maintaining a graph in memory by means of its adjacency matrix is known as

The correct answer is
Sequential Representation

Graph Representation Using Adjacency Matrix

Representing a graph in computer memory is crucial for performing various operations like searching, traversing, and analysis. A graph consists of vertices (nodes) and edges connecting them. There are several ways to store this information.

Understanding Adjacency Matrix Representation

One common method is the adjacency matrix. This approach uses a 2D array (or matrix), say A, where the size of the matrix is proportional to the number of vertices (V) in the graph. If the graph has V vertices, the adjacency matrix will be a V x V matrix.

  • For an unweighted graph, A[i][j] = 1 if there is an edge between vertex i and vertex j, and A[i][j] = 0 otherwise.
  • For a weighted graph, A[i][j] stores the weight of the edge between vertex i and vertex j. If no edge exists, it might store a special value like infinity or 0, depending on the implementation.

Adjacency Matrix as Sequential Representation

When we implement an adjacency matrix, we typically use a 2D array. In most programming languages, arrays are stored in contiguous blocks of memory. This means the entire matrix, representing the connections between all pairs of vertices, is laid out sequentially in memory. Therefore, maintaining a graph in memory using its adjacency matrix is known as Sequential Representation. This structure allows for quick lookup of whether an edge exists between two specific vertices (O(1) time complexity) but can consume significant memory (O(V^2)) especially for sparse graphs.

Evaluating Other Representation Options

  • Complete Representation: This term is too general and doesn't specifically describe the adjacency matrix method. While an adjacency matrix fully describes the graph's structure, "Complete Representation" isn't the standard terminology for this storage technique.
  • Linked Representation: This typically refers to the adjacency list method, where each vertex maintains a list (often a linked list) of its adjacent vertices. This is fundamentally different from the matrix-based approach and is not stored sequentially in a single 2D block.
  • Circular Representation: This term doesn't align with standard graph storage techniques like adjacency matrices or adjacency lists. It might relate to specific data structures but not the general concept of matrix representation.

In summary, the adjacency matrix, being a 2D array stored contiguously, exemplifies a Sequential Representation of a graph in memory.

Was this answer helpful?

Important Questions from Graph Theory

  1. The vertex in a graph with degree one is known as ______.

  2. Which of the following statement(s) is/are correct regarding about the undirected graph?

    I. Number of odd degree vertices is even.

    II. Sum of degrees of all vertices is even.

  3. A principal node is a

  4. Let G be a simple undirected planar graph on 10 vertices with 15 edges. If G is a connected graph, then the number of bounded faces in any embedding of G on plane is equal to_________.

  5. Let $G(V, E)$ be an undirected and unweighted graph with 100 vertices. Let $d(u, v)$ denote the number of edges in a shortest path between vertices $u$ and $v$ in $V$. Let the maximum value of $d(u, v)$, $u, v \in V$ such that $u \neq v$, be 30. Let T be any breadth-first-search tree of G. Which ONE of the given options is CORRECT for every such graph G?

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App