Example A- 2 
Over the class of all graphs, we cannot enumerate pairs of nodes at distance 2
with constant delay unless the Boolean Matrix Multiplication problem can be
solved in quadratic time [1]}. However, over the class of graphs of degree \(d\) , there is
a simple constant delay enumeration algorithm. During the preprocessing phase, we
associate to each node the list of all its neighbors at distance 2. This can be done in
time linear in the size of the database as in Example B- REF . We then color in blue all
nodes having a non empty list and make sure each blue node points to the next
blue node (according to the linear order on the domain). This also can be
done in time linear in the size of the database and concludes the preprocessing
phase. The enumeration phase now goes through all blue nodes \(x\)  using the
pointer structure and, for each of them, outputs all pairs \((x,y)\)  where \(y\)  is
in the list associated to \(x\) .

