top of page
Inaugurated by IN-SPACe
ISRO Registered Space Tutor

S3-SA5-0397

What is an Adjacency List?

Grade Level:

Class 10

AI/ML, Data Science, Physics, Economics, Cryptography, Computer Science, Engineering

Definition
What is it?

An Adjacency List is a way to show connections between different items or points in a graph. Imagine a map where cities are points and roads are connections; an Adjacency List tells you exactly which roads leave from each city.

Simple Example
Quick Example

Think about your friends in school. If you are 'Point A', your Adjacency List would simply be a list of all your friends' names. If your friend 'Point B' has their own list, it would show all their friends. It's like a 'who is friends with whom' list for everyone.

Worked Example
Step-by-Step

Let's say we have 4 cities: Delhi (D), Mumbai (M), Chennai (C), and Kolkata (K). The roads connect: D-M, D-K, M-C, K-C.

Step 1: List all the cities (vertices).
Cities: D, M, C, K.

Step 2: For each city, list all the cities it is directly connected to.

Step 3: For Delhi (D), it has a road to Mumbai (M) and Kolkata (K).

Step 4: For Mumbai (M), it has a road to Delhi (D) and Chennai (C).

Step 5: For Chennai (C), it has a road to Mumbai (M) and Kolkata (K).

Step 6: For Kolkata (K), it has a road to Delhi (D) and Chennai (C).

Answer:
Delhi: [Mumbai, Kolkata]
Mumbai: [Delhi, Chennai]
Chennai: [Mumbai, Kolkata]
Kolkata: [Delhi, Chennai]

Why It Matters

Adjacency Lists are super important for understanding how things are connected, from social media networks to delivery routes. They help computer scientists build efficient algorithms for navigation apps, data scientists analyze relationships in large datasets, and even engineers design complex systems. Learning this helps you think like a problem-solver in the digital world!

Common Mistakes

MISTAKE: Listing connections that are not direct (e.g., if A connects to B, and B connects to C, listing A connects to C). | CORRECTION: Only list DIRECT connections from a vertex. If there's no direct edge, it shouldn't be in the list.

MISTAKE: Forgetting to list a connection if the graph is undirected (e.g., if A connects to B, but only listing B in A's list and not A in B's list). | CORRECTION: If a connection goes both ways (like a two-way road), make sure both vertices list each other.

MISTAKE: Confusing an Adjacency List with an Adjacency Matrix. | CORRECTION: An Adjacency List uses actual lists for each vertex, while an Adjacency Matrix uses a table of 0s and 1s to show connections.

Practice Questions
Try It Yourself

QUESTION: Imagine your school bus route. If your stop is 'Stop A', and the bus goes directly to 'Stop B' and then 'Stop C', what would be the adjacency list for 'Stop A' (assuming it's a one-way route)? | ANSWER: Stop A: [Stop B]

QUESTION: Consider a small social media group with friends: Alia, Bimal, Chitra, Dinesh. Connections: Alia-Bimal, Bimal-Chitra, Chitra-Dinesh, Dinesh-Alia. Write the Adjacency List for Bimal. | ANSWER: Bimal: [Alia, Chitra]

QUESTION: Draw a graph with 5 vertices (V1, V2, V3, V4, V5) and the following undirected edges: (V1, V2), (V1, V3), (V2, V4), (V3, V5), (V4, V5). Now, write the complete Adjacency List for this graph. | ANSWER: V1: [V2, V3]
V2: [V1, V4]
V3: [V1, V5]
V4: [V2, V5]
V5: [V3, V4]

MCQ
Quick Quiz

Which of the following best describes an Adjacency List for a vertex?

A list of all vertices in the graph

A list of vertices directly connected to it

A list of all possible paths from it

A list of its properties or attributes

The Correct Answer Is:

B

An Adjacency List for a specific vertex only includes the vertices it is directly connected to. It does not list all vertices, all paths, or properties.

Real World Connection
In the Real World

When you use Google Maps or Ola/Uber to find the shortest route for an auto-rickshaw, the app uses concepts like Adjacency Lists. Each intersection or landmark is a 'vertex', and the roads connecting them are 'edges'. The app quickly checks the Adjacency List for each point to find the best path, helping you reach your destination faster.

Key Vocabulary
Key Terms

GRAPH: A collection of points (vertices) and lines (edges) connecting them. | VERTEX (NODE): A point or item in a graph. | EDGE: A connection between two vertices. | UNDIRECTED GRAPH: A graph where connections go both ways. | DIRECTED GRAPH: A graph where connections go only one way.

What's Next
What to Learn Next

Now that you understand Adjacency Lists, try learning about 'Adjacency Matrices'. This is another common way to represent graphs, and understanding both will give you a strong foundation for more advanced topics like graph traversal algorithms, which are used everywhere from social networks to computer games. Keep up the great work!

bottom of page