 A polytree (or directed tree or oriented tree or singly connected network) is a directed acyclic graph (DAG) whose underlying undirected graph is a tree.A polyforest (or directed forest or oriented forest) is a directed acyclic graph whose underlying undirected graph is a forest.The various kinds of data structures referred to as trees in computer science have underlying graphs that are trees in graph theory, although such data structures are generally rooted trees.