The adjacency list representation of a graph consists of n lists one for each vertex v_i, 1<=i<=n, which gives the vertices to which v_i is adjacent. The adjacency lists of a graph g may be computed in the Wolfram Language using AdjacencyList[g, #]& /@ VertexList[g] and a graph may be constructed from adjacency lists l using Graph[UndirectedEdge @@@ Union[ Sort /@ Flatten[ MapIndexed[{#, #2[[1]]}&, l, {2}], 1]]]