- No of processes in the graph
- IDs of the processes
- Connectivity matrix of the graph
Three such input files (for three graphs) are created:
- connectivity.txt
- connectivity2.txt
- connectivity3.txt
Note: To generate more input files use the generator code
These files can be read one after the other to get the leaders of those graphs.
After giving the file to be taken as input in the code, we can compile and run the code by executing the following commands in the command prompt.
Compile: javac -d out -sourcepath src src/pxp180031/Main.java
Run: java -cp out pxp180031.Main