Random graphs help in analyzing complex networks.
In a random graph, the quantities of nodes and arcs are random variables defined according to a given probabilistic model.
In this project we will explore properties of undirected random graphs in the Erdos Renyl model.
In this model, the number of nodes in a graph (we will mark it with V) is fixed and given in advance.
However, every edge between a pair of nodes will appear in the graph with probability P independently of the other edges, where P - is a parameter of the model.
Table of Contents
In the 1st part of this project, 4 main tasks are answered:
- Write a "build_random_graph" function that accepts V and P and returns a random graph with V nodes where each edge will appear in the graph with probability P (you must explain which representation you chose for graphs and why).
- Write a function called "diameter" that accepts a graph and returns its diameter (the implementation rationale must be explained).
- Write a function called "Is_Isolated" that receives a graph and returns 1 if the graph has at least one node without neighbors, otherwise the function returns 0.
- Write a function called "connectivity" that receives a graph and returns 1 if the graph is connected, otherwise the function returns 0.
In the 2nd part of the project we would like to test properties of random graphs with the help of simulation.
For each of the features listed above:
A list of 10 possible values for P must be selected - so that half of the P values are greater than the threshold and half of the values are smaller.
For each of the features, 500 random graphs should be generated for V=1000 and for each of the P's (Total 5000 for each property). You must count how many graphs satisfy the property and how many do not.
In this project you may find several subjects such as:
- Graph bindings.
- Graph diameter.
- An isolated node in a graph.
- Random graphs.
- Probability.
- Simulation.
- Threshold values.
- CSV files.
- Calculation algorithms on graphs.
- Community, Professional or Enterprise Edition
- VC++ 2017 latest v141 tools
- Visual C++ compilers and libraries for (ARM, ARM64)
- Windows XP support for C++
- Visual C++ ATL for (x86 and x64, ARM, ARM64)
- Windows 10 SDK
- Community, Professional or Enterprise Edition
- MSVC v142 - VS 2019 C++ (x64/x86, ARM, ARM64) build tools (Latest)
- C++ ATL for latest v142 build tools (x86 & x64, ARM, ARM64)
- Windows 10 SDK
- Community, Professional or Enterprise Edition
- MSVC v143 Buildtools (x64/x86, ARM, ARM64)
- C++ ATL for latest v143 build tools (x64/x86, ARM, ARM64)
- Windows 10 SDK
Follow these simple steps:
- Clone the repo
git clone https://github.com/RamMichaeli17/Erdos-Renyl-Model-for-generating-Random-Graphs.git
- Run the program
change the configuration to "Release" (x86 or x64) and press "Local Windows Debugger"
- Watch the results on the opened cmd window:
For more examples, please refer to the Documentation
Distributed under the MIT License. See LICENSE.txt
for more information.
We thank the following people who contributed to this project:
Ram Michaeli |
Gal Israeli |
Ram Michaeli - [email protected]
Project Link: https://github.com/RamMichaeli17/Erdos-Renyl-Model-for-generating-Random-Graphs