2016Unpublished venueRequires access

Topological Sort and Graph Traversals

Michel Rigo

Open publisher page 2 citations

Abstract

Trees are ubiquitous in computer science to manipulate various forms of data. A necessary condition for the existence of a topological sort is obviously that the digraph does not contain any cycle. This chapter considers different types of graph traversals: preorder traversal, postorder traversal and in-order traversal. Preorder traversal first output the root, then recursively proceed to a preorder traversal of each subtree rooted at the successors of the root respecting the given ordering of the successors. Postorder traversal first recursively proceed to a postorder traversal of the subtrees rooted at the ordered successors of the root, then output the root. For in-order traversal, we assume that we have a binary rooted tree. Proceed recursively to an in-order traversal of the subtree rooted at the first successor, then output the root, finally recursively proceed to an in-order traversal of the subtree rooted at the second successor of the root.

About this research paper

What this paper is about

Trees are ubiquitous in computer science to manipulate various forms of data. A necessary condition for the existence of a topological sort is obviously that the digraph does not contain any cycle. This chapter considers different types of graph traversals: preorder traversal, postorder traversal and in-order traversal. Preorder traversal first output the root, then recursively proceed to a preorder traversal of each subtree rooted at the successors of the root respecting the given ordering of the successors. Postorder traversal first recursively proceed to a postorder traversal of the subtrees rooted at the ordered successors of the root, then output the root. For in-order traversal, we assume that we have a binary rooted tree. Proceed recursively to an in-order traversal of the subtree rooted at the first successor, then output the root, finally recursively proceed to an in-order traversal of the subtree rooted at the second successor of the root.

Why it matters

OpenAlex reports 2 citations for this work. Citation counts describe recorded attention and do not establish research quality.

Key contribution

A contribution statement is not available in the OpenAlex record.

Method / approach

Method details are not available in the OpenAlex metadata.

Main findings

Findings are not separately available in the OpenAlex metadata.

Limitations

Limitations are not available in the OpenAlex metadata.

Applications

Application details are not available in the OpenAlex metadata.

Available abstract

Trees are ubiquitous in computer science to manipulate various forms of data. A necessary condition for the existence of a topological sort is obviously that the digraph does not contain any cycle. This chapter considers different types of graph traversals: preorder traversal, postorder traversal and in-order traversal. Preorder traversal first output the root, then recursively proceed to a preorder traversal of each subtree rooted at the successors of the root respecting the given ordering of the successors. Postorder traversal first recursively proceed to a postorder traversal of the subtrees rooted at the ordered successors of the root, then output the root. For in-order traversal, we assume that we have a binary rooted tree. Proceed recursively to an in-order traversal of the subtree rooted at the first successor, then output the root, finally recursively proceed to an in-order traversal of the subtree rooted at the second successor of the root.

Key concepts: Tree traversal, Preorder, Graph traversal, Successor cardinal, Root (linguistics), Binary tree, Tree (set theory), sort

Related papers

Back to paper searchBrowse research topicsOriginal source
Topological Sort and Graph Traversals — Research Paper | ScholarLens