Skip to content

Commit e136188

Browse files
Modernize README with badges, banner, and brew install
1 parent 4669830 commit e136188

File tree

3 files changed

+194
-60
lines changed

3 files changed

+194
-60
lines changed

README.md

Lines changed: 77 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,112 @@
1-
# Dynamic (Weighted) Independent Set [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
1+
# DynWMIS — Dynamic Maximum (Weight) Independent Set
22

3-
A dynamic graph algorithm is a data structure that supports edge insertions, deletions, and problem specific queries. While extensive research exists on dynamic algorithms for graph problems solvable in polynomial time, most of these algorithms have not been implemented or empirically evaluated. The open source framework addresses the NP-complete maximum weight as well as the maximum cardinality independent set problem in a dynamic setting, applicable to areas like dynamic map-labeling and vehicle routing. Specifically we introduce a novel local search technique called optimal neighborhood exploration. This technique creates independent subproblems that are solved to optimality, leading to improved overall solutions. Through numerous experiments, we assess the effectiveness of our approach and compare it with other state-of-the-art dynamic solvers. Our algorithm features a parameter, the subproblem size, that balances running time and solution quality.
3+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4+
[![C++17](https://img.shields.io/badge/C++-17-blue.svg)](https://en.cppreference.com/w/cpp/17)
5+
[![CMake](https://img.shields.io/badge/build-CMake-blue)](https://cmake.org/)
6+
[![Linux](https://img.shields.io/badge/platform-Linux-blue)](https://github.com/DynGraphLab/DynWMIS)
7+
[![macOS](https://img.shields.io/badge/platform-macOS-blue)](https://github.com/DynGraphLab/DynWMIS)
8+
[![Homebrew](https://img.shields.io/badge/homebrew-available-orange)](https://github.com/DynGraphLab/homebrew-dyngraphlab)
9+
[![GitHub Stars](https://img.shields.io/github/stars/DynGraphLab/DynWMIS)](https://github.com/DynGraphLab/DynWMIS/stargazers)
10+
[![GitHub Issues](https://img.shields.io/github/issues/DynGraphLab/DynWMIS)](https://github.com/DynGraphLab/DynWMIS/issues)
11+
[![GitHub Last Commit](https://img.shields.io/github/last-commit/DynGraphLab/DynWMIS)](https://github.com/DynGraphLab/DynWMIS/commits)
12+
[![arXiv](https://img.shields.io/badge/arXiv-2407.06912-b31b1b)](https://arxiv.org/abs/2407.06912)
13+
[![Heidelberg University](https://img.shields.io/badge/Heidelberg-University-c1002a)](https://www.uni-heidelberg.de)
414

5-
Installation Notes
6-
=====
7-
## Downloading:
8-
You can download the project with the following command line:
15+
<p align="center">
16+
<img src="./img/dynwmis-banner.png" alt="DynWMIS Banner" width="600"/>
17+
</p>
918

10-
```console
11-
git clone https://github.com/DynGraphLab/DynWMIS
12-
```
13-
14-
## Compiling:
15-
Just type in the main directory of the project:
16-
```console
17-
./compile_withcmake.sh
18-
```
19-
In this case, all binaries, libraries and headers are in the folder ./deploy/
19+
Part of the [DynGraphLab &mdash; Dynamic Graph Algorithms](https://github.com/DynGraphLab) open source framework. Developed at the [Algorithm Engineering Group, Heidelberg University](https://ae.ifi.uni-heidelberg.de).
2020

21-
Note that this script detects the amount of available cores on your machine and uses all of them for the compilation process. If you don't want that, set the variable NCORES to the number of cores that you would like to use for compilation.
22-
23-
Alternatively use the standard cmake build process:
24-
```console
25-
mkdir build
26-
cd build
27-
cmake ../ -DCMAKE_BUILD_TYPE=Release
28-
make
29-
cd ..
30-
```
31-
In this case, the binaries, libraries and headers are in the folder ./build
21+
## Description
3222

23+
A fully dynamic algorithm for the NP-complete maximum weight and maximum cardinality independent set problem. We introduce *optimal neighborhood exploration*, a novel local search technique that creates independent subproblems solved to optimality, leading to improved overall solutions. Applications include dynamic map labeling and vehicle routing.
3324

25+
The algorithm features a parameter (subproblem size) that balances running time and solution quality.
3426

35-
Graph Format
36-
=====
37-
The graph format used is a simple edge list. The first line is a # followed by two numbers `n` and `m` which specify the number of nodes of your input `n` and the number of edges/updates your perform. If there is a third number that equals `1` in this line, then the graph is weighted. If the graph is weighted, then the next `n` lines will specify vertex weights (one line per vertex). In both cases the `m` lines that follow, each line specifies an update. An update is either an edge insertion or deletion. An edge insertion is specified by a `1` followed by two numbers `u` and `v` which specify the edge `{u,v}` to be inserted. An edge deletion is specified by a `0` followed by two numbers `u` and `v` which specify the edge `{u,v}` to be deleted. In general, vertex IDs start at 1. Updates of vertex weights are in principle also possible, but not supported by the current implementation.
27+
## Install via Homebrew
3828

39-
To convert a METIS graph file (like the ones available here https://dimacs10.github.io/) into the graph sequence format used by our program, you can use the following command:
4029
```console
41-
./deploy/convert_metis_seq nameofgraphfile.graph
30+
brew install DynGraphLab/dyngraphlab/dynwmis
4231
```
43-
The output will be store `nameofgraphfile.graph.seq`; For example,
32+
33+
Then run:
4434
```console
45-
./deploy/convert_metis_seq examples/3elt.graph
35+
dynwmis FILE --algorithm=DynamicOneFast
4636
```
47-
Creates the file `examples/3elt.graph.seq`; Note, however, that this results in insertion only sequences.
4837

38+
## Installation (from source)
4939

50-
Running Programs
51-
=====
52-
Running the algorithm is done as follows:
53-
54-
Running the algorithm on a graph file `3elt.graph.seq` with the algorithm `DynamicOneFast`:
5540
```console
56-
./deploy/dynwmis examples/3elt.graph.seq --algorithm=DynamicOneFast
41+
git clone https://github.com/DynGraphLab/DynWMIS
42+
cd DynWMIS
43+
./compile_withcmake.sh
5744
```
5845

59-
Running the algorithm on a graph file `3elt.graph.seq` with the algorithm `DynamicOneFast`:
46+
All binaries are placed in `./deploy/`. Alternatively, use the standard CMake process:
47+
6048
```console
61-
./deploy/dynwmis examples/4elt.graph.seq --algorithm=DynamicOneFast
49+
mkdir build && cd build
50+
cmake ../ -DCMAKE_BUILD_TYPE=Release
51+
make && cd ..
6252
```
6353

64-
The following commands should reproduce the values of the `4elt` instance in Table 1 of our paper:
54+
## Usage
6555

6656
```console
67-
for g in `seq 1 10`; do ./deploy/dynwmis examples/4elt.graph.seq --algorithm=DynamicOneFast --seed=$g | grep weight | grep -v spec; done | awk '{if($NF>max){max=$NF}}END{print max}'
57+
dynwmis FILE [options]
6858
```
6959

60+
### Examples
61+
7062
```console
71-
for g in `seq 1 10`; do ./deploy/dynwmis examples/4elt.graph.seq --algorithm=DynamicOneStrong --seed=$g | grep weight | grep -v spec; done | awk '{if($NF>max){max=$NF}}END{print max}'
63+
./deploy/dynwmis examples/4elt.graph.seq --algorithm=DynamicOneFast
64+
./deploy/dynwmis examples/4elt.graph.seq --algorithm=DynamicOneStrong
7265
```
7366

67+
### Converting METIS graphs
7468

69+
To convert a METIS graph file into the dynamic sequence format:
70+
71+
```console
72+
./deploy/dynwmis_convert_metis_seq nameofgraphfile.graph
73+
```
7574

76-
Licence
77-
=====
78-
The program is licenced under MIT licence.
79-
If you publish results using our algorithms, please acknowledge our work by quoting the following paper:
75+
## Input Format
8076

77+
Edge list format. The first line starts with `# n m [weighted]` where `n` is the number of nodes, `m` is the number of updates, and an optional `1` indicates a weighted graph. For weighted graphs, the next `n` lines specify vertex weights. Updates follow: `1 u v` for edge insertion, `0 u v` for edge deletion. Vertex IDs start at 1.
8178

8279
```
83-
@misc{borowitz2024optimalneighborhoodexplorationdynamic,
84-
title={Optimal Neighborhood Exploration for Dynamic Independent Sets},
85-
author={Jannick Borowitz and Ernestine Großmann and Christian Schulz},
86-
year={2024},
87-
eprint={2407.06912},
88-
archivePrefix={arXiv},
89-
primaryClass={cs.DS},
90-
url={https://arxiv.org/abs/2407.06912},
91-
}
80+
# 100 500
81+
1 1 2
82+
1 3 4
83+
0 1 2
9284
```
9385

86+
For weighted graphs:
87+
```
88+
# 100 500 1
89+
10
90+
20
91+
...
92+
1 1 2
93+
```
9494

95-
95+
## License
96+
97+
The program is licensed under the [MIT License](https://opensource.org/licenses/MIT).
98+
If you publish results using our algorithms, please acknowledge our work by citing the following paper:
99+
100+
```bibtex
101+
@inproceedings{DBLP:conf/alenex/BorowitzG025,
102+
author = {Jannick Borowitz and
103+
Ernestine Gro{\ss}mann and
104+
Christian Schulz},
105+
title = {Optimal Neighborhood Exploration for Dynamic Independent Sets},
106+
booktitle = {27th Symposium on Algorithm Engineering and Experiments, {ALENEX} 2025},
107+
pages = {1--14},
108+
publisher = {{SIAM}},
109+
year = {2025},
110+
doi = {10.1137/1.9781611978339.1}
111+
}
112+
```

img/dynwmis-banner.png

131 KB
Loading

img/dynwmis-banner.svg

Lines changed: 117 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)