This repo contains an implementation to Erdős–Rényi model to test it out as a class assignment.
We will use graphs with 1000 nodes and check the graph's characteristics :
- connectivity
- diameter
- isolated vertex
- Write a function to build a random graph with a given connectivity probability - p (0-1)
- Using a adjacency list to represent the graph
- Impelment functions for each characteristic
- Impelment bfs - breadth first seach algorithm to find the diameter
- Run on 500 Graph's with different connectivity chances and look for conclusions.
- Make sure program runs in less than 3-4 hours depends on hardware
- To check connectivity we'll define Threshold = lnv(v)/v if the threshold is less than p - the graph should be connected.
- To check diameter we'll define Threshold = sqrt(2lnv(v)/v) if the threshold is less than p - the graph's diameter should be 2.
- To check isolated vertex we'll define Threshold = lnv(v)/v if the threshold is less than p - the graph should not have a isolated vertex .