Description Usage Arguments Details Value Author(s) References Examples
Approximate minimum weight vertex cover in a hypergraph
1 | vCoverHypergraph(hg, vW=rep(1, numNodes(hg)))
|
hg |
an instance of the |
vW |
vertex weights |
Hypergraph g
has non-negative weights on its vertices.
The minimum weight vertex cover problem is to find a subset of vertices C
such that C includes at least one vertex from each hyperedge and the sum of
the weights of the vertices in C is minimum. This problem is NP-hard.
We implement the greedy algorithm to approximate near-optimal solution, proposed by E. Ramadan, A. Tarafdar, A. Pothen, 2004.
A list of vertices from hypergraph g
.
Li Long <li.long@isb-sib.ch>
A hypergraph model for the yeast protein complex network, Ramadan, E. Tarafdar, A. Pothen, A., Parallel and Distributed Processing Symposium, 2004. Proceedings. 18th International.
1 2 3 4 5 6 7 8 | # to turn the snacoreex.gxl graph (from RBGL package) to a hypergraph
# this is a rough example
kc_hg_n <- c("A", "C", "B", "E", "F", "D", "G", "H", "J", "K", "I", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U")
kc_hg_e <- list(c("A", "C"), c("B", "C"), c("C", "E"), c("C", "F"), c("E", "D"), c("E", "F"), c("D", "G"), c("D", "H"), c("D", "J"), c("H", "G"), c("H", "J"), c("G", "J"), c("J", "M"), c("J", "K"), c("M", "K"), c("M", "O"), c("M", "N"), c("K", "N"), c("K", "F"), c("K", "I"), c("K", "L"), c("F", "I"), c("I", "L"), c("F", "L"), c("P", "Q"), c("Q", "R"), c("Q", "S"), c("R", "T"), c("S", "T"))
kc_hg_he <- lapply(kc_hg_e, "Hyperedge")
kc_hg <- new("Hypergraph", nodes=kc_hg_n, hyperedges=kc_hg_he)
vCoverHypergraph(kc_hg)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.