Graph theory is a branch of mathematics that studies the properties and relationships of graphs. A graph is a collection of points, known as vertices, connected by lines, which are referred to as edges. In our exercise, each person is treated as a vertex, and an edge represents an acquaintance relationship between a pair of people. Understanding this, we translate the problem of finding shared acquaintances into a graph problem.
- Vertices: Each vertex denotes a person in the group.
- Edges: If two people know each other, an edge connects their respective vertices.
- Degree: The number of edges connected to a vertex. It represents the number of acquaintances a person has.
In our case, the degree of each vertex varies from 1 to n-1, making the study of vertex degrees crucial in solving the problem. Graph theory provides a visual and structured way to comprehend complex relationship networks, like those involving people and their acquaintances.