## What is a tree in theory of computation?

A computation tree is a representation for the computation steps of a non-deterministic Turing machine on a specified input. A computation tree is a rooted tree of nodes and edges. Each node in the tree represents a single computational state, while each edge represents a transition to the next possible computation.

**What are trees used for CS?**

Trees can be used to store data that has an inherent hierarchical structure. For example, an operating system may use a tree for directories, files and folders in its file management system. They are dynamic, which means that it is easy to add and delete nodes.

**How do trees work computer science?**

In a tree, there are no cycles, which means that there is only one possible path between any two nodes. Connected means that there is a path from any node to any other node, and there is no node, or set of nodes, that is disconnected from the others. Undirected means that there is no direction associated with an edge.

### Where are trees used?

Suffix Tree : For quick pattern searching in a fixed text. Spanning Trees and shortest path trees are used in routers and bridges respectively in computer networks. As a workflow for compositing digital images for visual effects.

**What is traversal in computer science?**

Traversing a data structure means: “visiting” or “touching” the elements of the structure, and doing something with the data. (Traversing is also sometimes called iterating over the data structure)

**What do you mean by derivation tree?**

Derivation tree is a graphical representation for the derivation of the given production rules for a given CFG. It is the simple way to show how the derivation can be done to obtain some string from a given set of production rules. The derivation tree is also called a parse tree. The deepest sub-tree traversed first.