+ All Categories
Home > Documents > Maximal Independent Sets of a Hypergraph

Maximal Independent Sets of a Hypergraph

Date post: 30-Dec-2015
Category:
Upload: claudia-morton
View: 31 times
Download: 1 times
Share this document with a friend
Description:
Maximal Independent Sets of a Hypergraph. IJCAI01. What’s that then?. A hypergraph G = (V,E) V is a set of vertices E is a set of hyperedges an edge with 2 or more vertices. An independent set S assume vertices(e) is set of vertices in hyperedge e. Maximal independent set S - PowerPoint PPT Presentation
23
Maximal Independent Sets of a Hypergraph IJCAI01
Transcript
Page 1: Maximal Independent Sets of a Hypergraph

Maximal Independent Sets of a Hypergraph

IJCAI01

Page 2: Maximal Independent Sets of a Hypergraph

A hypergraph G = (V,E)• V is a set of vertices• E is a set of hyperedges

• an edge with 2 or more vertices

An independent set S

• assume vertices(e) is set of vertices in hyperedge e ))(( SeverticesEe

Maximal independent set S

• there is no independent set S’ that subsumes S

What’s that then?

Page 3: Maximal Independent Sets of a Hypergraph
Page 4: Maximal Independent Sets of a Hypergraph

Show Me!

1

2 3

4 5 7

9

8

6

)}9,8,7,3(),6,4(),5,4,2(),3,2,1{(

}9,8,7,6,5,4,3,2,1{

E

V

A Hypergraph

Page 5: Maximal Independent Sets of a Hypergraph

Show Me!

1

2 3

4 5 7

9

8

6

}9,7,5,4,1{S

An Independent Set

You could add vertex 3 or vertex 8!

It aint maximal

Page 6: Maximal Independent Sets of a Hypergraph

Show Me!

1

2 3

4 5 7

9

8

6

}8,7,6,5,3,2{S

A Maximal Independent Set

There are 11 maximal independent sets of size 6

Page 7: Maximal Independent Sets of a Hypergraph

Show Me!

1

2 3

4 5 7

9

8

6

}9,8,7,6,5,2,1{S

The Largest Independent Set

There is only one for this graph

Page 8: Maximal Independent Sets of a Hypergraph

Show Me!

1

2 3

4 5 7

9

8

6

}9,8,4,3,2{S

A Minimal Maximal Independent Set

There are 3 minimal maximal independent set

Honest!

Page 9: Maximal Independent Sets of a Hypergraph

… and now for a constraint programming solution … in Choco

Page 10: Maximal Independent Sets of a Hypergraph

CP/Choco

1

2 3

4 5 7

9

8

6

Vv

ev

k size ofset t independen

e hyperedge ofarity isr where v

selectednot ex vert0

selectedex vert1

kv

r

iV

iVth

i

thi

But what about maximality?

Page 11: Maximal Independent Sets of a Hypergraph

CP/Choco

1

2 3

4 5 7

9

8

6

Encoding Maximality

)2()2(1

)2()2(0

54312

54312

VVVVV

VVVVV

That is, we state when a variable MUST be selected and when it MUST NOT be selected

An example, vertex 2

Page 12: Maximal Independent Sets of a Hypergraph

CP/Choco

1

2 3

4 5 7

9

8

6

on so and ...

)3()2(1

)3()2(0

)2()2(1

)2()2(0

21

20

987213

987213

54312

54312

321

321

VVVVVV

VVVVVV

VVVVV

VVVVV

VVV

VVV Example, vertices 1,2, and 3

Page 13: Maximal Independent Sets of a Hypergraph

More Generally

]1)([0

]1)([1

maximality ensure :Vertices

)()(

)()(

iji

iji

VeverticesVj

Vedgesei

VeverticesVj

Vedgesei

VearityV

VearityV

))((

ceindependen ensure :Edges

)(

earityVEeeverticesV

VV

i

i

kV

set of size :Graph

Page 14: Maximal Independent Sets of a Hypergraph

… here’s some code

Page 15: Maximal Independent Sets of a Hypergraph

TRACE:{true,false} :: true

Edge <: thing

Vertex <: thing(var:IntVar,edges:list[Edge])

Edge <: thing(vertices:list[Vertex],arity:integer)

Graph <: thing(V:list[Vertex],E:list[Edge],P:Problem)

[makeVertex(v:IntVar) : Vertex -> Vertex(var = v, edges = nil)]

[makeEdge(vList:list[Vertex]) : Edge -> Edge(vertices = vList, arity = length(vList))]

[newGraph(Vertices:list[Vertex],Edges:list[Edge],PB:Problem) : Graph -> Graph(V = Vertices, E = Edges, P = PB)]

[look(e:Edge) : list -> list(e.arity,{x.var.name | x in e.vertices})]

[look(v:Vertex) : string -> v.var.name]

Page 16: Maximal Independent Sets of a Hypergraph

[maxIndSet(fname:string,k:integer) : Graph -> let p := fopen(fname,"r"), n := read(p), pb := makeProblem("maximality",n), v := list{makeIntVar(pb,"V" /+ string!(i),{0,1}) | i in (1 .. n)}, V := list{makeVertex(v[i]) | i in (1 .. n)}, E := nil, e := getEdge(p,V) in (while e.vertices ( E := add(E,e), for V_i in e.vertices V_i.edges := add(V_i.edges,e), e := getEdge(p,V)),

fclose(p), for v in V (post(pb,or(when0(v),when1(v)))), post(pb,occur(1,v) == k), newGraph(V,E,pb))]

[getEdge(p:port,V:list[Vertex]) : Edge -> let n := read(p), e := makeEdge(nil) in (for i in (1 .. n) (e.vertices := add(e.vertices,V[read(p)]), e.arity := e.arity + 1), e)]

Page 17: Maximal Independent Sets of a Hypergraph

[when1(v:Vertex) : AbstractConstraint -> and(v.var == 1,when1(v,v.edges))]

[when1(v:Vertex,E:list[Edge]) : TempTerm -> if (length(E) = 1) sumVerts(but(E[1].vertices,v)) < (E[1].arity - 1) else and(sumVerts(but(E[1].vertices,v)) < (E[1].arity - 1),when1(v,cdr(E)))]

[when0(v:Vertex) : AbstractConstraint -> and(v.var == 0,when0(v,v.edges))]

[when0(v:Vertex,E:list[Edge]) : TempTerm -> if (length(E) = 1) sumVerts(but(E[1].vertices,v)) == (E[1].arity - 1) else or(sumVerts(but(E[1].vertices,v)) == (E[1].arity - 1),when0(v,cdr(E)))]

[sumVerts(vertices:list[Vertex]) : TempTerm -> sumVar(list{v.var | v in vertices})]

Page 18: Maximal Independent Sets of a Hypergraph

So?

Page 19: Maximal Independent Sets of a Hypergraph

You can reformulate a csp as a problem of finding a independent set of a hypergraph (this is not new)

The independent set has to be of size n

It is also maximal

Page 20: Maximal Independent Sets of a Hypergraph

X + Y + Z = 2 where X, Y and Z are in {0,1}An Example

3111

2011

2101

1001

2110

1010

1100

0000ZYX

10

...

11

00

01

10

11

00

01

1

1

0

0

11

1

0

0

ZZ

YY

YY

YY

XX

XX

XX

XX

We have n.m vertices

)},,(),,,(),,,(),,,(),,,{( 111001010100000 ZYXZYXZYXZYXZYXnogoods

A hyper edge for each nogood

)},(),,(),,{( 101010 ZZYYXXcliques

An m-clique for each variable’s domain

Give me an independent set of size n

Page 21: Maximal Independent Sets of a Hypergraph

Another ExampleGolomb Ruler

• A ruler with N “ticks”

• Distance between every pair of ticks is different

• Ruler is of length L

1

,

i

different are distances all )(

variabledistance

tickofposition ]..1[

encoding csp alConvention

ii

jiji

XX

DallDiff

XXD

LX

Independent Set encoding

N.L vertices, corresponding to the L possible values for each of the N ticks

N cliques of size L (binary nogoods)

Hyper edges of arity 3 zyyxTTT zkyjxi ),,( ,,,

Page 22: Maximal Independent Sets of a Hypergraph

• There are maximality problems out there

• e.g. determining properties of block design problems

• experiments are proceeding

• Don’t need maximality constraint for csp reformulation

• but does it help propagation?

• Experiments required

• Reformulate a part of the problem, and link via channeling

• Use maximality as learning?

• For a csp with n variables, what is a maximal independent set of size less than n? What kind of nogood is this?

• Do we have one way of dealing with solvable and over-constrained csp’s

Conclusion

Page 23: Maximal Independent Sets of a Hypergraph

Easy questions only


Recommended