anilpacaci / streaming-graph-partitioning

Experimental Setup for Performance Analysis of Streaming Algorithms
Apache License 2.0
30 stars 4 forks source link

1st Week Programming Exercizes #8

Closed anilpacaci closed 7 years ago

anilpacaci commented 7 years ago

Since you have some idea about the streaming graph partitioning algorithms, now we will implement the first algorithm LDG in simple settings.

Write a Java program that get 3 input parameters

  1. Input file
  2. Number of partitions (k)
  3. Partition balance slack parameters (0..1)

Your program should parse the input file, read it line by line (meaning vertex by vertex) and make on-the-fly placement decisions according to Linear Deterministic Greedy strategy described in original paper. It should output a text file where each line consists of two integers, vertex ID and the partition ID. In addition, your program should output final edge-cut ratio and total # of vertices for each k partition. You can use the cit-HepTh network from datasets folder, which is already available in adjacency list format (requires no pre-processing)