8.1 Eliminating a Single Vertex
Assuming that the graph is represented by a list of vertices and a list of edges , Algorithm 16 eliminates vertex from . It assumes the buffer provides communication with the edge list.
adjacency_list() |
for all vertices adjacent to |
for all vertices adjacent to |
if and find() is |
link() |
find() |
unlink() |
find() |
unlink() |
The operation adjacency_list creates an adjacency list from and . In Section 4, Algorithms 1 and Algorithm 3 were presented to solve this problem. New edges created during vertex elimination are arbitrarily inserted at the beginning of the edge list. For the current purposes, the insertion point is irrelevant.