## Abstract

The Depth First Search (DFS) algorithm is one of the basic techniques that is used in a very large variety of graph algorithms. Most applications of the DFS involve the construction of a depth‐first spanning tree (DFS tree). In this paper, we give a complete characterization of all the graphs in which every spanning tree is a DFS tree. These graphs are called Total‐DFS‐Graphs. We prove that Total‐DFS‐Graphs are closed under minors. It follows by the work of Robertson and Seymour on graph minors that there is a finite set of forbidden minors of these graphs and that there is a polynomial algorithm for their recognition. We also provide explicit characterizations of these graphs in terms of forbidden minors and forbidden topological minors. The complete characterization implies explicit linear algorithm for their recognition. In some problems the degree of some vertices in the DFS tree obtained in a certain run are crucial and therefore we also consider the following problem: Let G = (V,E) be a connected undirected graph where |V| = n and let d ϵ N^{n} be a degree sequence upper bound vector. Is there any DFS tree T with degree sequence d_{T} that violates d (i.e., d_{T} ≤ d, which means: E j such that d_{T}(j) > d(j))? We show that this problem is NP‐complete even for the case where we restrict the degree of only on specific vertex to be less than or equal to k for a fixed k ≥ 2 (i.e., d = (n ‐ 1, ⃛, n ‐ 1, k, n ‐ 1, ⃛, n ‐ 1)). 0 1995 John Wiley & Sons, Inc.

Original language | English |
---|---|

Pages (from-to) | 535-547 |

Number of pages | 13 |

Journal | Journal of Graph Theory |

Volume | 19 |

Issue number | 4 |

DOIs | |

State | Published - 1 Jan 1995 |

## ASJC Scopus subject areas

- Geometry and Topology
- Discrete Mathematics and Combinatorics