Graph Types
Overview
There are many types of graphs. But some are more important than others in computer science.
In the animation above and in the descriptions below, we'll be more descriptive about the main and most useful graph types in computer science.
Undirected Graph - In an undirected graph, the connections between vertices are two-way. Each edge establishes a mutual relationship between two vertices, allowing information, influence, or interactions to flow bidirectionally. Think of it as a network where friends can communicate with each other, and the relationship is mutual.
Connected Graph - A connected graph ensures that every vertex is part of a continuous network. There are no isolated islands of vertices; instead, there is a clear path between any two vertices. It's like being in a city or a country with great infrastructure - you know you can go anywhere you want and there are no unreachable zones.
Directed Graph (Digraph) - In a directed graph, edges have a direction, creating a one-way relationship between vertices. Like a system of one-way streets, where traffic flows in specific directions, representing asymmetrical connections between entities.
Weighted Graph - A weighted graph assigns numerical values (weights) to its edges, representing some measurement like distance, cost, or importance. These weights reflect the significance or effort required to move from one vertex to another. In a map, weight could be the exact distance for a road or how busy the traffic is.
Null Graph - graph without edges, only vertices Trivial Graph - graph with a single vertex and no edges Disconnected Graph - graph in which we have at least 2 vertices that are not part of any path Regular Graph - graph in which every vertex has same amount (degree) of neighbours Complete Graph - every two vertices are connected by a single (unique) edge
And mentions of other graph types:
Cycle Graph, Cyclic Graph, Acyclic Graph, Finite Graph, Infinite Graph, Bipartite Graph, Planar Graph, Simple Graph, Multi Graph, Pseudo Graph, Euler Graph, Hamiltonian Graph