Java program assignment question
java program to read the input parameter file and output the sub graph files: The program will take the input that is in the input parameter file and it will generate the input data files. These input data files ( contains the sub graph info) . Each line in the these data files will correspond to a node id, and the ids of the other nodes to which it is connected. ( the connectivity degree will be a range of nodes).
input:The program will take the input that is in the input parameter file ( input parameter file contains as follows:
1.Make the size of the overall graph and the size of each of the graphs customizable via an input parameter in an input file.
2.That is, you specify the graph size, sub graph size, number of sub graphs ,random number(to generate different graphs with edges and nodes)etc as inputs in the input parameter file.(working with 1000 number of nodes).
3.Your input file generator reads from the input parameter file and then generates the necessary sub graph files
4. in the input parameter file, please mention "Connectivity" (degree)as a parameter that you can control.
5.Please also include a random number as input so that our graphs are not always the same for testing purposes. That is, the number of nodes in the graph, the connectivity between the nodes etc should be different in each set of the files that get generated
6. Graph connectivity should be a range. For each node in the graph you randomly choose the number of edges. The range can be specified as input in the input parameter file.).
step 1.You have an input file that contains input parameters like Graph Size (number of nodes), the number of sub graphs, the node connectivity range, random number etc. There might potentially be other parameters. These parameters are specified manually by us before each experiment run into this input file.
step 2. write a program that takes reads the parameter info listed above from this input file, and then generates a number of output files. Each of the output files corresponds to a sub graph. Each line in the output file consists of a node ID and the ids of the other nodes that it is connected to.
Some more brief:
Java program will need to basically read the input file, create/maintain an internal data structure like a tree or graph or an array and then you create the graph in main memory. Then you start traversing that graph a node at a time and output the data into the output files mentioned in point 2 above. (step 2) You will have to do steps 1 and 2 two times. Once for Time T1, and once again for Time T2. So, you will have 2 files for each of the sub graphs.
- Assignment Help
- Homework Help
- Writing Help
- Academic Writing Assistance
- Editing Services
- Plagiarism Checker Online
- Research Writing Help