Graph Theory37 sections · 1633 units
Open in Course

Intro

(The special constraint)

A functional graph is a directed graph where every node has exactly one outgoing edge. If you are at node ii, there is exactly one node f(i)f(i) you can move to. This constraint creates predictable structure. Starting from any node, you follow a path that eventually enters a cycle and stays there forever.

In this section, I'll show you how to exploit this structure to answer queries about paths and cycles in logarithmic time.

1770083039353-f7baw5ahayl.jpg