Example of Bipertite graphs
Examples of Bipartite Graphs
A bipartite graph is a graph whose vertices can be divided into two disjoint sets and such that every edge connects a vertex in to a vertex in . No two vertices within the same set are adjacent.
Example 1: Simple Bipartite Graph
Consider a graph with the following sets:
- Set = {A, B, C}
- Set = {1, 2, 3}
- Edges: (A,1), (A,2), (B,2), (B,3), (C,1), (C,3)
Graph Representation
Here, edges only exist between elements in and , making it bipartite.
Example 2: Real-Life Application - Job Assignment
- Workers:
- Tasks:
- Edges represent possible assignments (who can do which task):
Graph Representation
Since edges only go between workers and tasks, this is a bipartite graph.
Example 3: Even Cycle Graph
A cycle graph is bipartite if is even.
For example, with vertices (A, B, C, D) and edges (A-B, B-C, C-D, D-A):
Graph Representation
- Set 1: {A, C}
- Set 2: {B, D}
- Since edges only connect vertices from different sets, this is bipartite.
Non-Bipartite Example
A triangle (cycle ) is not bipartite because it’s impossible to divide vertices into two sets without two vertices of the same set being connected.
Bipartite graphs are widely used in network flow, matchmaking, scheduling, and database systems.
Comments
Post a Comment