0% found this document useful (0 votes)
45 views3 pages

Graph Theory Notes

The document provides an overview of graph theory, defining graphs, their types, representations, and key concepts such as vertex degree, cycles, and connectivity. It also discusses planar graphs, graph coloring, and traversal methods like BFS and DFS, along with trees and their properties. Examples are included to illustrate each concept, making the material accessible for understanding graph structures and their applications.

Uploaded by

Sumit Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views3 pages

Graph Theory Notes

The document provides an overview of graph theory, defining graphs, their types, representations, and key concepts such as vertex degree, cycles, and connectivity. It also discusses planar graphs, graph coloring, and traversal methods like BFS and DFS, along with trees and their properties. Examples are included to illustrate each concept, making the material accessible for understanding graph structures and their applications.

Uploaded by

Sumit Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Graph Theory Notes

5.1. Graphs:

- Definition: A graph G = (V, E) consists of a set of vertices V and edges E connecting them.

Example: A network of cities connected by roads.

- Types: Directed, Undirected, Weighted, Unweighted, Cyclic, Acyclic, etc.

Example: Social networks represent directed graphs where A follows B.

- Representation:

1. Adjacency List: Uses lists for each vertex storing adjacent vertices.

Example: {A: [B, C], B: [A, C], C: [A, B]}

2. Adjacency Matrix: Uses a 2D matrix where A[i][j] = 1 if edge exists.

3. Incidence Matrix: Represents the relation between vertices and edges.

- Degree of Vertex: Number of edges incident to a vertex.

Example: A node with 3 connections has a degree of 3.

- Handshaking Theorem: Sum of all vertex degrees = 2 * number of edges.

Example: In a graph with 4 edges, the sum of degrees = 8.

- Cycle: A path where the start and end vertices are the same.

Example: Triangle ABC in a graph.

- Wheel Graph: A cycle with an additional central vertex connected to all others.

Example: A bicycle wheel structure.

- Regular Graph: A graph where all vertices have the same degree.

- Bipartite Graph: Graph where vertices can be divided into two independent sets.

Example: A job assignment problem.

5.2. Connectivity in Graphs:

- Path and Circuit: A sequence of edges connecting vertices.


Example: A path from A to D through B and C.

- Complete Graph: A graph where every pair of vertices is connected.

- Weakly and Strongly Connected Graph:

- Weakly Connected: Undirected edges make the graph connected.

- Strongly Connected: Directed paths exist between every pair of vertices.

- Euler Graph: A graph containing an Eulerian circuit.

Example: A graph where all vertices have even degrees.

- Hamilton Graph: A graph containing a Hamiltonian cycle.

Example: A traveling salesman problem.

5.3. Planar Graphs and Graph Coloring:

- Planar Graph: A graph that can be drawn without edge crossings.

Example: A road network with bridges.

- Graph Coloring: Assigning colors to vertices ensuring no two adjacent vertices share the same

color.

Example: Map coloring in geographical regions.

5.4. Graph Traversal:

- BFS (Breadth-First Search): Explores neighbors level by level.

Example: Shortest path finding in unweighted graphs.

- DFS (Depth-First Search): Explores deep paths before backtracking.

Example: Solving mazes.

5.5. Trees:

- Definition: A connected graph with no cycles.

- M-ary Tree: A tree where each node has at most M children.

Example: A ternary tree has 3 children per node.


- Binary Tree: A tree where each node has at most 2 children.

- Depth of Tree: The longest path from root to leaf.

Example: A tree with maximum 3 edges has depth 3.

- Applications: Used in hierarchical data storage, file systems, etc.

- Tree Traversals:

- Pre-order: Root -> Left -> Right.

- In-order: Left -> Root -> Right.

- Post-order: Left -> Right -> Root.

Example: Traversing an expression tree in different orders.

You might also like