Talk:Adjacency list

From Wikipedia, the free encyclopedia
Jump to: navigation, search
WikiProject Mathematics (Rated Start-class, Mid-importance)
WikiProject Mathematics
This article is within the scope of WikiProject Mathematics, a collaborative effort to improve the coverage of Mathematics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Mathematics rating:
Start Class
Mid Importance
 Field: Discrete mathematics
WikiProject Computer science (Rated C-class, Mid-importance)
WikiProject icon This article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
C-Class article C  This article has been rated as C-Class on the project's quality scale.
 Mid  This article has been rated as Mid-importance on the project's importance scale.
 

The link to "Incidence Lists" takes you to the same page as "Adjacency Lists". http://en.wikipedia.org/wiki/Incidence_list

The article makes the claim: " Besides the space tradeoff, the different data structures also facilitate different operations. It's easy to find all vertices adjacent to a given vertex in an adjacency list representation; you simply read its adjacency list. With an adjacency matrix you must instead scan over an entire row, taking O(n) time. If you, instead, want to know if two given vertices have an edge between them, this can be determined at once with an adjacency matrix, while requiring time proportional to the minimum degree of the vertices with the adjacency list. "

But this is not shown to be true by Designing Fast Graph Data Structures: An Experimental Approach http://citeseer.ist.psu.edu/358648.html In this paper it is shown that a bit packed adjacency matrix is the most proforment data structure. This section should be updated to reflect this. —Preceding unsigned comment added by Wikiwikimoore (talkcontribs) 21:48, 19 December 2007 (UTC)

Regarding " If you, instead, want to know if two given vertices have an edge between them, this can be determined at once with an adjacency matrix, while requiring time proportional to the minimum degree of the vertices with the adjacency list. " I don't understand the second half of this statement, and would appreciate a citation or clarification. One might index an adjacency list to achieve O(1) or O(log N) lookup performance, where N is the total number of edges. It would take longer than a simple matrix lookup, but it need not be linear in anything.

If you pack the bits in an adjacency matrix or index the edges in an adjacency list, you don't have an adjacency matrix or an adjacency list any more, you have something else. It doesn't contradict what's written here if that something else turns out to have different performance than the structures that are actually discussed here. —David Eppstein (talk) 05:47, 27 October 2011 (UTC)

Shouldn't the analyzed time of the operations be in terms of V and E (vertices and edges) in the graph? For example, looking at all the adjacent vertices to a vertex in an adjacency matrix is O(V). Either way, I don't think N as used in the article currently is defined anywhere.