
- Graph Theory - Home
- Graph Theory - Introduction
- Graph Theory - History
- Graph Theory - Fundamentals
- Graph Theory - Applications
- Types of Graphs
- Graph Theory - Types of Graphs
- Graph Theory - Simple Graphs
- Graph Theory - Multi-graphs
- Graph Theory - Directed Graphs
- Graph Theory - Weighted Graphs
- Graph Theory - Bipartite Graphs
- Graph Theory - Complete Graphs
- Graph Theory - Subgraphs
- Graph Theory - Trees
- Graph Theory - Forests
- Graph Theory - Planar Graphs
- Graph Theory - Hypergraphs
- Graph Theory - Infinite Graphs
- Graph Theory - Random Graphs
- Graph Representation
- Graph Theory - Graph Representation
- Graph Theory - Adjacency Matrix
- Graph Theory - Adjacency List
- Graph Theory - Incidence Matrix
- Graph Theory - Edge List
- Graph Theory - Compact Representation
- Graph Theory - Incidence Structure
- Graph Theory - Matrix-Tree Theorem
- Graph Properties
- Graph Theory - Basic Properties
- Graph Theory - Coverings
- Graph Theory - Matchings
- Graph Theory - Independent Sets
- Graph Theory - Traversability
- Graph Theory Connectivity
- Graph Theory - Connectivity
- Graph Theory - Vertex Connectivity
- Graph Theory - Edge Connectivity
- Graph Theory - k-Connected Graphs
- Graph Theory - 2-Vertex-Connected Graphs
- Graph Theory - 2-Edge-Connected Graphs
- Graph Theory - Strongly Connected Graphs
- Graph Theory - Weakly Connected Graphs
- Graph Theory - Connectivity in Planar Graphs
- Graph Theory - Connectivity in Dynamic Graphs
- Special Graphs
- Graph Theory - Regular Graphs
- Graph Theory - Complete Bipartite Graphs
- Graph Theory - Chordal Graphs
- Graph Theory - Line Graphs
- Graph Theory - Complement Graphs
- Graph Theory - Graph Products
- Graph Theory - Petersen Graph
- Graph Theory - Cayley Graphs
- Graph Theory - De Bruijn Graphs
- Graph Algorithms
- Graph Theory - Graph Algorithms
- Graph Theory - Breadth-First Search
- Graph Theory - Depth-First Search (DFS)
- Graph Theory - Dijkstra's Algorithm
- Graph Theory - Bellman-Ford Algorithm
- Graph Theory - Floyd-Warshall Algorithm
- Graph Theory - Johnson's Algorithm
- Graph Theory - A* Search Algorithm
- Graph Theory - Kruskal's Algorithm
- Graph Theory - Prim's Algorithm
- Graph Theory - Borůvka's Algorithm
- Graph Theory - Ford-Fulkerson Algorithm
- Graph Theory - Edmonds-Karp Algorithm
- Graph Theory - Push-Relabel Algorithm
- Graph Theory - Dinic's Algorithm
- Graph Theory - Hopcroft-Karp Algorithm
- Graph Theory - Tarjan's Algorithm
- Graph Theory - Kosaraju's Algorithm
- Graph Theory - Karger's Algorithm
- Graph Coloring
- Graph Theory - Coloring
- Graph Theory - Edge Coloring
- Graph Theory - Total Coloring
- Graph Theory - Greedy Coloring
- Graph Theory - Four Color Theorem
- Graph Theory - Coloring Bipartite Graphs
- Graph Theory - List Coloring
- Advanced Topics of Graph Theory
- Graph Theory - Chromatic Number
- Graph Theory - Chromatic Polynomial
- Graph Theory - Graph Labeling
- Graph Theory - Planarity & Kuratowski's Theorem
- Graph Theory - Planarity Testing Algorithms
- Graph Theory - Graph Embedding
- Graph Theory - Graph Minors
- Graph Theory - Isomorphism
- Spectral Graph Theory
- Graph Theory - Graph Laplacians
- Graph Theory - Cheeger's Inequality
- Graph Theory - Graph Clustering
- Graph Theory - Graph Partitioning
- Graph Theory - Tree Decomposition
- Graph Theory - Treewidth
- Graph Theory - Branchwidth
- Graph Theory - Graph Drawings
- Graph Theory - Force-Directed Methods
- Graph Theory - Layered Graph Drawing
- Graph Theory - Orthogonal Graph Drawing
- Graph Theory - Examples
- Computational Complexity of Graph
- Graph Theory - Time Complexity
- Graph Theory - Space Complexity
- Graph Theory - NP-Complete Problems
- Graph Theory - Approximation Algorithms
- Graph Theory - Parallel & Distributed Algorithms
- Graph Theory - Algorithm Optimization
- Graphs in Computer Science
- Graph Theory - Data Structures for Graphs
- Graph Theory - Graph Implementations
- Graph Theory - Graph Databases
- Graph Theory - Query Languages
- Graph Algorithms in Machine Learning
- Graph Neural Networks
- Graph Theory - Link Prediction
- Graph-Based Clustering
- Graph Theory - PageRank Algorithm
- Graph Theory - HITS Algorithm
- Graph Theory - Social Network Analysis
- Graph Theory - Centrality Measures
- Graph Theory - Community Detection
- Graph Theory - Influence Maximization
- Graph Theory - Graph Compression
- Graph Theory Real-World Applications
- Graph Theory - Network Routing
- Graph Theory - Traffic Flow
- Graph Theory - Web Crawling Data Structures
- Graph Theory - Computer Vision
- Graph Theory - Recommendation Systems
- Graph Theory - Biological Networks
- Graph Theory - Social Networks
- Graph Theory - Smart Grids
- Graph Theory - Telecommunications
- Graph Theory - Knowledge Graphs
- Graph Theory - Game Theory
- Graph Theory - Urban Planning
- Graph Theory Useful Resources
- Graph Theory - Quick Guide
- Graph Theory - Useful Resources
- Graph Theory - Discussion
Graph Theory - Random Graphs
Random Graphs
A random graph is a graph made by connecting vertices (nodes) randomly. This means the connections between the nodes are determined randomly, based on certain rules or probabilities. Random graphs are used to study networks where the exact connections are not known beforehand, but follow some random pattern.
Some of the important characteristics of random graphs are −
- Probabilistic Connections: Edges between vertices are created based on a probability. For example, each pair of vertices might have an edge with probability "p".
- Variety of Models: There are different models for generating random graphs, such as the ErdsRnyi model, where each edge is included with a fixed probability, or the BarabsiAlbert model, which generates scale-free networks.
- Applications: Random graphs are used in network theory, biology, computer science, and social sciences to study properties of real-world networks, like robustness, connectivity, and the spread of information or diseases.

Generating Random Graphs
Random graphs are generated using various algorithms. The major challenge is to model randomness while preserving certain properties of real-world networks. Following are methods for generating random graphs −
Random Graph Generation with G(n, p)
The most basic way to generate a random graph is by creating an ErdsRnyi random graph (G(n, p)) where n is the number of vertices, and p is the probability of each edge being present.
Algorithm
Following are the basic steps to generate random graph by creating an ErdsRnyi random graph −
- Initialize a graph with n vertices and no edges.
- For each pair of vertices, generate a random number.
- If the number is less than p, add an edge between the two vertices.
- Repeat the process until all edges are evaluated.
Random Regular Graph Generation
To generate a random regular graph, you need to ensure that each vertex has the same degree. This is done by randomly pairing vertices and connecting them while ensuring that the degree constraint is satisfied.
Algorithm
Following are the basic steps to generate random regular graph −
- Start with n vertices.
- Assign a degree d to each vertex.
- Randomly pair the vertices and add edges.
- If any vertex exceeds its degree constraint, reassign the edges.
Types of Random Graphs
Random graphs can be categorized based on the random processes used to generate them. Following are the primary types of random graphs −
Erdoan-Rnyi Random Graphs
The Erdoan-Rnyi random graph, denoted by G(n, p), is one of the most well-known types of random graphs. It is a graph with n vertices, where each pair of vertices is connected by an edge with probability p, independently of the other edges.
This means that for any pair of vertices, there is a probability p that an edge exists between them, and a probability 1-p that no edge exists.
Following are the properties of G(n, p) Graphs −
- Degree Distribution: The degree of each vertex in G(n, p) follows a binomial distribution, and for large n, it can be approximated by a Poisson distribution.
- Connectivity: As the edge probability p increases, the graph becomes more connected. When p reaches a critical threshold, the graph almost surely becomes connected.
- Phase Transition: A significant property of G(n, p) graphs is the phase transition where the graph abruptly changes from being disconnected to being connected as p crosses a critical threshold.

Gilbert's Random Graphs
Gilbert's Random Graphs, also known as the ErdsRnyi model, is a type of random graph where each possible edge between a pair of vertices is included in the graph with a fixed probability. This model is named after mathematicians Paul Erds and Alfrd Rnyi, who introduced it, and Edgar Gilbert, who independently studied a similar model.
The major characteristics of Gilbert's random graphs are −
- Fixed Probability: Each edge is added independently with a fixed probability "p". This means for each pair of vertices, there is a chance "p" that an edge will connect them.
- Randomness: The structure of the graph is highly random, with no predetermined pattern for which edges will be included.

Random Regular Graphs
A random regular graph is a graph where each vertex has the same degree, and the edges are placed randomly, subject to the condition that all vertices must have the same degree.
The major properties of random regular graphs are −
- Degree Sequence: The degree sequence of a random regular graph is fixed for all vertices.
- Clustering Coefficient: Random regular graphs often have clustering coefficients that are different from those of random graphs.

Small-World Graphs
Small-world networks are random graphs where most vertices are not neighbors, but there are small paths connecting most pairs of vertices. These graphs are designed to mimic real-world networks such as social networks, the internet, and neural networks.
Following are the properties of small-world networks −
- Short Path Lengths: Despite a low average degree, small-world networks have relatively short paths between most vertices, making them efficient in terms of communication or spread of information.
- High Clustering Coefficient: Small-world graphs displays a high degree of clustering, meaning that vertices tend to form tightly connected groups.

Properties of Random Graphs
Random graphs have various properties that can be analyzed statistically. The most important properties are as follows −
Degree Distribution
In random graphs like G(n, p), the degree distribution is binomial for small n, but it approaches a Poisson distribution as n becomes large. The degree distribution of random regular graphs is uniform, as every vertex has the same degree.
Giant Component
In large random graphs, there is a giant connected component that contains a significant fraction of the vertices. The size of this giant component depends on the edge probability p or degree of vertices in the graph.
Clustering Coefficient
The clustering coefficient measures how connected the neighbors of a given vertex are. In many random graphs, the clustering coefficient is low, especially in G(n, p) graphs. In contrast, small-world networks have a high clustering coefficient.
Diameter
The diameter of a graph is the length of the longest shortest path between any two vertices. In large random graphs, the diameter tends to be small (often logarithmic in size), especially for ErdsRnyi graphs.
Average Path Length
The average path length is the average number of edges in the shortest path between any two vertices in the graph. Random graphs typically have small average path lengths, even when the graph is large.
Challenges in Random Graph Theory
Random graphs offer valuable understandings, but they also come with several challenges, they are −
Scaling Up
As the number of vertices grows, the complexity of analyzing random graphs increases. This requires new algorithms and techniques to handle large-scale random graph data.
Realistic Network Models
Random graphs are useful, but they don't always match real-world networks, which often have patterns like groups and clusters. To fix this, more advanced models like small-world and scale-free networks are used.
Algorithmic Complexity
Generating and analyzing random graphs, especially large ones, can use a lot of resources. Efficient algorithms are needed to handle large graphs in real situations.