Problem : Given a labeled(1..n) undirected graph, create a model in Gecode for finding a supergraph with a given sequence degree:
Difficulties: the main difficulty is to find fancy model to accurately express degrees over it:
Why not Adjacency matrix? Because graph tends to be big and sparse
Why not Edge list? We are going to add edges, but we don't know how many of them, CP requires predefined number of variables (am I right?)
Why not Adjacency list? modeling problem as a list of sets we need to push a constraint for all i, j: (j in a[i] <=> i in a[j])