This project helps its users to investigate different properties of a desirable graph.
First of all, decide on how many graphs you are going to analyze. Right after you think of a number, type it in.
Secondly, give the program some information about a graph, i.e. how many vertices it's going to have.
Then, it's time to provide the vertices themselves: each line that you are going to fill with data is tied to a specific vertex [ meaning that the n-th line is the n-th vertex's parameters ]. Start the line with a number of connections [ adjacency ] this vertex has and then type all the vertices' indices that this vertex is connected to.
Repeat the process as many times as there are graphs and their vertices.
As the result, you will get the following properties checked and calculated:
-
Degree sequence
-
Connectivity number
-
Is bipartite?
-
Greedy coloring
-
LF [ Largest First ] coloring
-
Number of edges needed to complete the graph
Let's say you have this graph in mind:
![Screenshot 2024-05-30 at 5 31 15 PM](https://private-user-images.githubusercontent.com/106448156/335275756-1c528900-3a0a-4272-a55a-eaf4a88c7a14.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk2ODIyNDEsIm5iZiI6MTcxOTY4MTk0MSwicGF0aCI6Ii8xMDY0NDgxNTYvMzM1Mjc1NzU2LTFjNTI4OTAwLTNhMGEtNDI3Mi1hNTVhLWVhZjRhODhjN2ExNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyOVQxNzI1NDFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05MjUxYzg0MmNiZTA3YWZiNGE4OWJmOGI1NmY0MGQwYzQ1NTZjZWEyYWVjMWZlYzE3Y2RlMGM1MzhiMDVjM2E4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.TnEA_3KZIjTbwFX8Rfv-7G2ksWJK5Q7p_vIaFTHnX7s)
It is represented the following way:
1
6
4 2 3 4 5
1st vertex
2 1 5
2nd vertex
1 1
1 1
2 1 2
0
6th vertex doesn't have any neighbors
Note
After each step you have to press Enter
First input: How many graphs?
1
Second input: How many vertices in the graph?
6
Third input: Type in current vertex's properties
4 2 3 4 5
4
is a number of connections this vertex has.
The following 4 numbers 2 3 4 5
are the indices of vertices this vertex is connected to.
Repeat until finished with all 6 vertices
Output:
4 2 2 1 1 0
Degree sequence
2
Connectivity number
F
Is bipartite
1 2 2 2 3 1
Coloring [ greedy ]
1 2 2 2 3 1
Coloring [ largest first ]
10
Number of edges needed to complete the graph
The program always check all these 6 properties for you and always prints the results in this order.
This repository contains a folder called "tests" where you can find 4 different .in
files with various inputs, as well as corresponding .out
files with the correct outputs.