Keras Reinforcement Learning Projects
by Giuseppe Ciaburro, Sudharsan Ravichandiran, Suriyadeepan Ramamoorthy
Adjacency lists
Adjacency lists are a mode of graph representation in memory. It is probably the most immediate representation to think about and the simplest to implement, even if in general not the most efficient in terms of occupied space.
Let's analyze a simple graph; next to each vertex is its list of adjacencies. The idea of representation is simply that a list is associated with every Vi vertex, containing all the Vj vertices so that there is an edge from Vi to Vj.
Assuming all pairs of the type (Vi, L), where L is the adjacency list of the Vi vertex, are stored, we obtain a unique description of the graph. Alternatively, if you decide to sort adjacency lists, you do not need to explicitly store the vertexes as well.
Let's look at ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access