The Gateway to Computer Science Excellence
+2 votes
353 views

Specify an adjacency-lists representation of the undirected graph given above.

in Graph Theory by Boss (30.1k points)
edited by | 353 views

1 Answer

+6 votes
Best answer

An adjacency list is an array $A$ of separate lists.

Each element of the array $A_{i}$ is a list, which contains all the vertices that are adjacent to vertex $i$.

$A_{1}\rightarrow2\rightarrow3\rightarrow5$

$A_{2}\rightarrow1\rightarrow3$

$A_{3}\rightarrow1\rightarrow2\rightarrow4\rightarrow5$

$A_{4}\rightarrow3\rightarrow5$

$A_{5}\rightarrow1\rightarrow3\rightarrow4$

by Boss (21.6k points)
selected by
Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,647 questions
56,458 answers
195,370 comments
100,256 users