About 122 results
Open links in new tab
  1. Directed Graphs - Princeton University

    Jan 14, 2020 · A directed graph (or digraph) is a set of vertices and a collection of directed edges that each connects an ordered pair of vertices. We say that a directed edge points from the …

  2. Depth-first search in digraphs Same method as for undirected graphs. ・Every undirected graph is a digraph (with edges in both directions).・DFS is a digraph algorithm. DFS (to visit a vertex …

  3. Shortest Paths - Princeton University

    Jan 10, 2025 · Given a weighted line-graph (undirected connected graph, all vertices of degree 2, except two endpoints which have degree 1), devise an algorithm that preprocesses the graph …

  4. Undirected Graphs - Princeton University

    Apr 16, 2019 · Given a graph G, design an algorithm to find the shortest path (number of edges) between s and every other vertex in the complement graph G'. The complement graph …

  5. 4. Graphs - Princeton University

    Aug 26, 2016 · 4.1 Undirected Graphs introduces the graph data type, including depth-first search and breadth-first search. 4.2 Directed Graphs introduces the digraph data type, including …

  6. Minimum Spanning Trees - Princeton University

    Jan 10, 2025 · If a graph is not connected, we can adapt our algorithms to compute the MSTs of each of its connected components, collectively known as a minimum spanning forest.

  7. Digraph.java - Princeton University

    Oct 29, 2025 · Below is the syntax highlighted version of Digraph.java from §4.2 Directed Graphs.

  8. Directed graphs Digraph. Set of vertices connected pairwise by directed edges. outdegree = 4 indegree = 2 0

  9. DirectedDFS.java - Princeton University

    Oct 29, 2025 · Below is the syntax highlighted version of DirectedDFS.java from §4.2 Directed Graphs.

  10. Digraph (Algorithms 4/e) - Princeton University

    The Digraph class represents a directed graph of vertices named 0 through V - 1. It supports the following two primary operations: add an edge to the digraph, iterate over all of the vertices …