Bifalgorithm post · Brisk · Chapter 1

How do subtrees demonstrate the recursive nature of trees?

How do subtrees demonstrate the recursive nature of trees? (Brisk · Chapter 1) — "Finally, much of what gives trees their expressive power is their recursive n…

Ideas in this flowchart

  • La naturaleza recursiva da a los árboles gran parte de su poder expresivo.
  • Un árbol está formado por otros árboles más pequeños.
  • En el ejemplo, el árbol original tiene a A como raíz.
  • Los dos hijos de A son árboles por derecho propio.
  • F forma un árbol de un solo nodo y es un subárbol.
  • B y sus descendientes forman otro árbol de cuatro nodos.
  • La raíz cambia según el subárbol considerado: A es la raíz original, B la del segundo subárbol y C la de otro subárbol.
  • Todo subárbol cumple todas las propiedades de los árboles.
  • Por tanto, todo lo dicho sobre los árboles también se aplica a los subárboles.
Feed/

How do subtrees demonstrate the recursive nature of trees?

Channel

Brisk

1 page

"Finally, much of what gives trees their expressive power is their recursive nature. This means that a tree is made up of other (smaller) trees. Consider our example. It is a tree with a root of A. But the two children of A are each trees in their own right! F itself is a tree with only one node. B and its descendants make another tree with four nodes. We consider these two trees to be subtrees of the original tree. The notion of “root” shifts somewhat as we consider subtrees — A is the root of the original tree, but B is the root of the second subtree. When we consider B’s children, we see that there is yet another subtree, which is rooted at C. And so on. It’s easy to see that any subtree fulfills all the properties of trees, and so everything we’ve said above applies also to it."

Flowchart preview
Series cover
👍
0
0 comments0 shares

Sign in to view and post comments.