FoundationsDiscrete Mathematics
Graph Theory
Summary of basic graph theory
Graph Theory (Quick Summary)
Data structure that represents relationships between points (Nodes) and lines (Edges)
1. Types of Graphs
- Directed Graph (Digraph): Graphs with directions (e.g., Followers on Twitter)
- Undirected Graph: Graphs without directions (e.g., Friends on Facebook)
- Weighted Graph: Graphs with weights on edges (e.g., Google Maps routes with distances)
2. Important Terminology
- Degree: Number of edges connected to that node
- Path: A sequence of connected nodes
- Cycle: A Path that starts and ends at the same node
- Connected Graph: A path exists between every pair of nodes
3. Trees
- A Tree is a connected Undirected Graph with no Cycle
- Branches out continuously from a Root Node (Used in Directory structures, DOM tree)
4. Applications
- Finding Shortest Paths
- Internet networks (Network Topology)
- Friend or product recommendation systems