Graph Theory37 sections · 1633 units
Open in Course

Intro

Formal Definition

A Tree is a graph that satisfies three simple rules:

1.1. Connected: You can get from any node to any other node.

2.2. No cycles: There is exactly one path between any two nodes.

3.3. nn nodes means n1n-1 edges.

These three properties are connected. If you have any two of them, you get the third for free. For instance, if a graph is connected and has n1n-1 edges, it cannot have cycles. Trees are the simplest connected graphs. They form the foundation of many data structures and algorithms in computer science.

photo_۲۰۲۵-۱۲-۲۶_۰۱-۲۹-۴۴.jpg