Introduction to Graph Theory · Problem 4.5

Digraphs and multidigraphs — Darij Grinberg

Mathematics — Graph Theory · digraph-toposort-acyclic

Problem

Let D=(V,A)D = (V, A) be a simple digraph that has no cycles. If v=(v1,v2,…,vn)\mathbf{v} = (v_1, v_2, \ldots, v_n) is a list of vertices of DD (not necessarily a walk!), then a back-cut of v\mathbf{v} shall mean an arc a∈Aa \in A whose source is viv_i and whose target is vjv_j for some i,j∈{1,2,…,n}i, j \in \{1, 2, \ldots, n\} satisfying i>ji > j. (Colloquially speaking, a back-cut of v\mathbf{v} is an arc of DD that leads from some vertex of v\mathbf{v} to some earlier vertex of v\mathbf{v}.) A list v=(v1,v2,…,vn)\mathbf{v} = (v_1, v_2, \ldots, v_n) of vertices of DD is said to be a toposort of DD if it contains each vertex of DD exactly once and has no back-cuts. Prove the following: (a) The digraph DD has at least one toposort. (b) If DD has only one toposort, then this toposort is a Hamiltonian path of DD. Here, a Hamiltonian path in DD means a walk of DD that contains each vertex of DD exactly once. [Example: For example, the digraph 3⟶2↗4 and 2↘13 \longrightarrow 2 \nearrow 4 \text{ and } 2 \searrow 1 has two toposorts: (3,2,1,4)(3, 2, 1, 4) and (3,2,4,1)(3, 2, 4, 1).]

Browse the problem library