This repository contains code to exactly solve the Cardinality-Constrained Submodular Monotone Subset Maximization problem.
Given a universe
Let
Set function
Set function
Given a submodular and monotone set function
Currently, six functions can be optimized.
Given a graph
Given a graph
Given a set
Given a set of
Given a collection
Let
Komogorv's Blossom V implementation is required.
Vladimir Kolmogorov. "Blossom V: A new implementation of a minimum
cost perfect matching algorithm." In Mathematical Programming
Computation (MPC), July 2009, 1(1):43-67.
Its redistribution is prohibited, so we offer a script that will automatically download and extract it.
Move into directory src/3rd_party/
and execute setup_3rd_party.sh
.
This script will automatically download and extract the files to the correct folder.
At the end the folder blossom5
should contain the downloaded code.
To build the binary use ./build.sh
. The binary submodst
will be in the folder build
.
Use the following options:
-i [ --input-file ]
Path to the file.-f [ --function ]
Which function to optimize.-k [ --k ]
The solution budget.-o [ --output-file ]
Path to the output file.--initial-solution-file
(Optional) Path to a file holding an initial solution.-t [ --time-limit ]
(Optional) Maximum amount of running time (preprocessing not included).-n [ --nickname ]
Name of the algorithm. CurrentlyPlain
,Simple
,Simple+
,LE-Rank
,LE-Score
,LE-RankOrScore
,LE-RankAndScore
,PWG-k^
,PWG-Sqrt-n^
,PWM-k^
,PWM-Sqrt-n^
,PWD-k^
,PWD-10
are available. We recommendLE-Score
as the fastest.
The file format should be
e11 e12
e21 e22
...
en1 en2
with ei1 ei2
denoting edge
- Each
$e_{ij}$ should be a positive integer$\geq 0$ . - The graph should be fully connected.
- The algorithm assumes that the vertex with the smallest ID is 0.
- Lines starting with a
%
are comments and will be ignored.
The file format should be
x11 x12 ... x1d
x21 x22 ... x2d
...
xn1 xn2 ... xnd
each line denotes one point of the dataset.
- Each
$x_{ij}$ should be a double value. - Lines starting with a
%
are comments and will be ignored.
The file format should be
g11 g12 ... g1m
g21 g22 ... g2m
...
gn1 gn2 ... gnm
- Each entry
$g_{ij}$ should be a non-negative double value for customer$i$ and location$j$ . - Lines starting with a
%
are comments and will be ignored.
The file format should be
w1 w2 ... wm
b11 b12 ... b1m
...
bn1 bn2 ... bnm
- Each
$w_j$ should be non-negative double value, that denotes the weight of item$j$ . - Each entry
$b_{ij}$ should be either 1.0 (item$j$ included in subset$i$ ) or 0.0 (not included). - Lines starting with a
%
are comments and will be ignored.
The file format should be
p11 p12 ... p1m
p21 p22 ... p2m
...
pn1 pn2 ... pnm
- Each entry
$p_{ij}$ is the edge activation from source$i$ to target$j$ . They should be double values in the range$[0, 1]$ . - Lines starting with a
%
are comments and will be ignored.
GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
Active development.
If any bugs arise, quesions occur, comments want to shared, or ideas discussed, please do not hesitate to contact the current repository owner ([email protected]) or leave a GitHub Issue or Discussion. Thanks!
If you use this work an any academic work, please cite
BibTeX to be added!