DAY 2 JUNE | GRAPH CSE 103
SLIDE -1
Path and simple path:
✅ Example: A → B → C → D is a simple path.
❌ A → B → A → C is not a simple path (A is repeated).
In a Directed Graph
There are two types of degrees:
-
In-degree: Number of edges coming into the vertex.
-
Out-degree: Number of edges going out from the vertex.
Number of edges in a complete graph:
If a complete graph has n vertices, then the number of edges is:
Vertices and Edges
This is a directed graph (also called a digraph) where:
-
Nodes (like A, B, C...) are vertices.
-
Arrows between them are directed edges (they show direction).
🔹 Adjacent
-
Two vertices are adjacent if there is an edge directly connecting them.
-
Example: If there's an arrow from A → B, then A is adjacent to B.
🔹 Successor
-
If A → B, then B is the successor of A.
-
Means: from A, you can go directly to B.
🔹 Predecessor
-
If A → B, then A is the predecessor of B.
-
Means: B can be reached directly from A.
What is a Bipartite Graph (in simple words)?
A bipartite graph is a graph where:
You can split all the nodes into two groups so that edges only connect nodes from different groups, never within the same group.
Use 2 colors:
-
Try to color the graph with 2 colors (say Red & Blue) so that no two connected nodes have the same color.
-
If you can do this → the graph is bipartite.
A COMPLETE BIPARTITE GRAPH :
Number of edges in K<sub>m,n</sub>:
Comments
Post a Comment