33
Dominating Set Stephen Grady, Jeremy Poff

Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Dominating Set

Stephen Grady, Jeremy Poff

Page 2: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Outline

● Questions● About us● Overview● Problem Similarities● History● Bounds● Complexity● Algorithms● Applications● Implementation● Open Questions● Discussion

Page 3: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Questions

To what other graph algorithm(s) is dominating set intrinsically linked?

Of what other graph algorithm is dominating set a specific case?

What is the minimum number of disjoint dominating sets a connected graph can have?

Page 4: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

About Us

● Jeremy○ Undergrad in cs○ I’m working on learning Haskell○ I have an australian shepard ○ From Greenback, Tennessee

● Stephen○ Graduate student in the

Genome, Science and Technology Program○ Advisor: Dr. Michael Langston○ From Gravette, Arkansas

Page 5: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Overview

● Dominating Set (DS) - Given a graph G = (V,E) a DS is a subset S ⊆ V s.t. for all vertices v ∈ V, v is either in S or is adjacent to a vertex in S

● Minimum Dominating Set - A dominating set of smallest cardinality on a graph

● Domination Number (G)=|Minimum Dominating Set|

Page 6: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Example

Page 7: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Flavors of Dominating Set

● Connected Dominating Set: Graph induced by DS must be connected.● Total Dominating Set: No isolated vertices on graph induced by DS.● Independent Dominating Set: All vertices must be isolated by graph induced

by DS.● Dominating Clique: Graph induced by DS must be clique.● Red-Blue Dominating Set: Partition graph into two sets, Red and Blue.

Dominate all vertices in Blue using only vertices in Red.

Page 8: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Problem Similarities

Vertex Cover: Every vertex cover is a dominating set in connected graphs.

Independent Set: Every maximal independent set is a dominating set.

Page 9: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

History of Dominating Set

● First instance of the problem thought to be the queen’s domination problem.● Originally called “coefficient of external stability” in first published formalization

by Claude Berge in 1958.● First called dominating set by Oystein Ore in 1962● Increased interest in 1970s and 1980s

○ Growth of interest in “covering” and “location” problems○ It’s relationship to other NP-complete problems○ Location - Slater (1975), Harary and Melter (1976)○ Location and Domination - Henning and Oellermann (2004)

Page 10: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Bounds on Dominating Set

● A lower bound is based on the most a vertex can dominated.○ γ(G)≥n/(1+Δ)

● The set of all vertices on a graph is by definition a dominating set○ Therefore γ(G)≤n

● If the graph has no isolated vertices we can improve this bound○ γ(G)≤n/2

■ This is due to the fact that every connected graph has least two disjoint dominating sets. Domatic number ≥ 2.

Page 11: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Complexity

● Decision version: Given a graph G and an integer k, is (G)≤k?○ NP-Complete

● Optimization: Given a graph G, what is (G)?○ NP-Hard

Page 12: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Basic Greedy DS

Each vertex has a state associated with it:Black= in DSGreen= dominatedWhite= not dominated

Initially all vertices are set to white.

DS:=∅While ∃ vertices that are white do

v=vertex adjacent to the most white verticesDS:=DS ∪ v

End do

Put gif here

Page 13: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Parallel Greedy DS

Initialize like sequential greedy DS

DS:=∅While v is adjacent to white vertices do

span=number of white vertices to which v is adjacentSend span to all vertices up to 2 hopsIf v has greatest span then

DS:=DS ∪ vEnd if

End do

Page 14: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Exact Minimum Dominating Set

The best known exact minimum dominating set algorithm runs in O(1.5134n)

It does this by reducing the given instance of dominating set to the set cover problem. In actuality dominating set is a specific case of the set cover problem.

Page 15: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Permanent Dominating Set

● Given a dynamic graph G=(V,E) where all updates are known a priori.

● V is represented as instances of vertices and assumed to be static; only E changes.

Find a DS that covers all instances.

Page 16: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Permanent Dominating Set

Page 17: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Applications of Dominating Set

● Minimum DS of a network - important exchange points● The ideas of Connected DS used in routing (unicast, multicast, ospf, etc..)● Ad Hoc wireless networks

Page 18: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Applications of Dominating Set

● Locating and Dominating Set (LDS)○ S is a dominating set and a locating set (every vertex is unique in respect to its vector of

distances to vertices of S)

● Security○ Determine best place to install IDS systems based on LDS○ Eternal Dominating Set

Page 19: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Applications of Dominating Set

● Medicine○ Find the smallest set of drugs used

to treat condition

● Cancer Research○ Find a small subset of cancer drugs

that affect certain cancer cell lines

● Controllability of Networks○ Permutation on nodes of DS thought

to drive network.

Page 20: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Applications of Dominating Set

● Spatial Resource Allocation○ Fire Stations, ice cream trucks, advertisements, etc

Page 21: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Implementation of greedy minimal DS

● Black - In the set, Green - Neighbor of a black node, White - not covered

● Preprocess - add all 0 degree verts to the set since they have 0 white neighbors and will never be picked up

● while ( not_dominated ) big_span = vert with the most white neighbors state [ big_span ] = Black

for ( neighbor of big_span ) if states [neighbor] is white states [ neighbor ] = Green

Page 22: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

How to speed this up

● L1 cache reference 0.5ns● Branch mispredict 5ns● L2 cache reference 7ns● Mutux lock/unlock 25ns● Main memory reference 100ns● We want to avoid these

Page 23: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

How to speed this up - Time Complexity

● Lots of unnecessary O(V) operations● In the case where G(E, V) is immutable

○ We can use cached values - O(1) vs O(V) for lookups○ Const qualify calls - allows compiler to optimize better

● Pipeline ○ Change If ( states [ vert ] == White ] { white_states++; } to White && white_states++;○ Decreases branch mis-predictions - these are very expensive

● Use smaller types ○ Use uchars vs ints for states - can pack more into a cache line○ This bought a 10-20% speed up on the development box

Page 24: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

How to make this smaller - Space Complexity

● Type sizes○ Using a smaller type or a bit mask allows you to fit more in a cache line

● Adj list vs Adj matrix vs Adj triangle matrix○ Adj triangle still has O(1) operations but uses half the space

● Use intel intrinsics ○ 256 bit, 512 bit vector registers○ Can do logical operation on 8 or 16 verts at a time○ We didn’t use this as the bookkeeping overhead outweighed the benefits

● Generating large graphs (> 50k vertices) maxed on the ram on hydra● For large graphs, use bits for precomputed neighbor list

Page 25: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Timings

Page 26: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Some Other Times

Number of Verts Density Program Time Set Size

20k .1 2.7 39

20k .5 2.9 9

20k .99 4.47 2

20k .001 57.48 2113

80k .001 149.19 2369

100k .001 231.01 2496

Page 27: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Comparison to Exact Dominating Set

Graph Exact Minimal

arenas-jazz 13 14

foodweb 3 3

scc-fb-forum 27 27

soc-fb-Caltech 62 69

inf-USAair 36 37

Page 28: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

To Do

● Use SIMD instructions● Use bits for adj matrix

○ Use 1 byte for 8 verts ● Use bits for states

○ Use 1 byte for 4 states● Reference count white neighbors● Use bits for adjacency and neighbor lists

○ 12.5kB vs 100kB per row in adj matrix○ Use an adj list, increases speed on sparse graphs

● Dynamic Programming○ Only cache neighbor lists as you need them ○ This was actually slower Why?

Page 29: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Open Questions

● Vizing’s Conjecture: (G⬜H)≥ (G) (H)

● Does every 3-connected cubic graph satisfy (G)≤|V|/3

Page 30: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

References

● Intel Intrinsics Guide● Application of Dominating Sets in Wireless Sensor Networks, Amir Hassani Karbasi and Reza

Ebrahimi Atani ● Applications and Variations of Domination in Graphs, Paul Andrew Dreyer● Connected Dominating Set Problem and its Application to Wireless Sensor Networks, Razieh

Asgarnezhad and Javad Akbari Torkestani● Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Hedetniemi, R.C. Lasker● Domination in Graphs, Jennifer Tarr● Design by Measure and Conquer, a Faster Exact Algorithm for Dominating Set, Van Rool, J.M.M.;

Bodlaender, H.L.● Co-controllability of Drug-Disease-Gene Network, Peng Gang Sun● Applications and Variations of Dominating Set, Paul Andrew Dryer JR.

Page 31: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

References

● http://www.openproblemgarden.org/op/domination_in_cubic_graphs ● https://en.wikipedia.org/wiki/Eternal_dominating_set● https://en.wikipedia.org/wiki/Domatic_number● https://en.wikipedia.org/wiki/Dominating_set● https://en.wikipedia.org/wiki/Vertex_cover● https://en.wikipedia.org/wiki/Maximal_independent_set● http://csunplugged.org/dominating-sets/#RelatedResources

Page 32: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Final thoughts

The greedy code is available at https://github.com/jeremy24/min-dom-set

Page 33: Dominating Set - UTKweb.eecs.utk.edu/~cphill25/cs594_spring2017/... · 2017-03-30 · Bibliography on domination in graphs and some basic definitions of domination parameters, S.T

Questions

To what other graph algorithm(s) is dominating set intrinsically linked?

Of what other graph algorithm is dominating set a specific case?

What is the minimum number of disjoint dominating sets a connected graph can have?