Graph

Definition. A graph is a finite set of nodes together with a set of edges, each edge joining two nodes. In a directed graph each edge has a direction, from one node to another; in an undirected graph it does not, and two nodes joined by an edge are adjacent. A path from ss to tt is a sequence of nodes beginning at ss and ending at tt in which each consecutive pair is joined by an edge, and a cycle is a path from a node back to itself.

A graph is encoded as a string by listing its nodes and then the pairs that are edges, so a graph on mm nodes has an encoding of length polynomial in mm. Defined in Lecture 9 for PATHPATH; the problems of Lectures 10 and 11, such as CLIQUECLIQUE and VERTEX-COVERVERTEX\text{-}COVER, are stated in the same vocabulary.

Updated
Copyright © 2026 Jared Coleman. All rights reserved.