1

If I had a directed graph G with 3 different types of edge weights (edge weight = 1, 2, or 3). Could I run a topological sort algorithm that returns a sorted version of the vertices/edges in weighted order? So the returned list of vertices contains all vertices connected to an edge of weight 1, then an edge of weight 2, and finally the last group of vertices are connected to an edge of weight 3?

My goal of running a version of a topological sort on a graph like this is to find as many vertices as possible that fit the walk pattern of only edge weight 1, then only edge weight 2, and finally only edge weight 3.

A person
  • 109
  • 1
  • 6

0 Answers0