Presentation is loading. Please wait.

Presentation is loading. Please wait.

Maths of Constraint Satisfaction, Oxford, March 2006 Constraint Programming Models for Graceful Graphs Barbara Smith.

Similar presentations


Presentation on theme: "Maths of Constraint Satisfaction, Oxford, March 2006 Constraint Programming Models for Graceful Graphs Barbara Smith."— Presentation transcript:

1 Maths of Constraint Satisfaction, Oxford, March 2006 Constraint Programming Models for Graceful Graphs Barbara Smith

2 Modelling in Constraint Programming How a problem is formulated as a CSP can have a huge impact on how easy it is to solve We often try to modify an existing model to make it easier to solve Thinking of a completely different way of modelling a problem is much harder….

3 Graceful Labelling of a Graph A labelling f of the nodes of a graph with q edges is graceful if: f assigns each node a unique label from {0,1,..., q } when each edge xy is labelled with |f (x) − f (y)|, the edge labels are all different

4 Initial Model as a CSP A variable for each node, x 1, x 2,..., x n each with domain {0, 1,..., q } Auxiliary variables for each edge, d 1, d 2,..., d q each with domain {1, 2,..., q } d k = |x i − x j | if edge k joins nodes i and j x 1, x 2,..., x n are all different d 1, d 2,..., d q are all different Find values for each of x 1, x 2,..., x n so that the constraints are satisfied

5 Symmetry The CSP has symmetry from two sources: the symmetry of the graph (if any) a value symmetry: in any solution, we can replace every assignment by We have used graceful graphs problems to investigate how to eliminate the effects of symmetry on search adding constraints to the CSP using dynamic symmetry breaking methods

6 A non-CP Approach to Graceful Graphs Beutner & Harborth, Graceful Labellings of Nearly Complete Graphs, Results in Mathematics (41),34-39, 2002 Focus on the edges: In any gracefully labelled graph with q edges: the edge labelled q joins nodes labelled 0 and q the edge labelled q -1 joins nodes labelled 0 and q -1 or 1 and q the edge labelled q -2 joins nodes labelled 0 and q -2 or 1 and q -1 or 2 and q etc.

7 Eliminating Value Symmetry In any gracefully labelled graph, we must have one of these two configurations They are symmetrically equivalent We can break the value symmetry by choosing one arbitrarily The edge labelled q -1 joins nodes labelled 0 and q -1 or 1 and q

8 K n is not graceful for n >4 (I) Breaking symmetry as above, we get the triangle below (since all nodes are connected) This is the graceful labelling of K 3 (with q = 3)

9 K n is not graceful for n >4 (II) For n  4, the edge labelled q-2 requires an extra node labelled either: q- 2 q-1 q-2 q 0 q q-1 1

10 K n is not graceful for n >4 (II) For n  4, the edge labelled q-2 requires an extra node labelled either: q- 2 or 1 q-1 1 q 0 q 1

11 K n is not graceful for n >4 (II) For n  4, the edge labelled q-2 requires an extra node labelled either : q- 2 or 1 or 2 Adding a node labelled 2 gives the graceful labelling of K 4 q-1 2 q 0 q 1 2 q-3 q-2

12 K n is not graceful for n >4 (III) To get an edge labelled q- 4, we need a new vertex labelled q- 4,q-2, 3 or 4; for K 5, only q- 4 does not give a repeated edge label. But then we get edges labelled q- 6 and 4: for K 5 these are the same For n  6, we cannot get an edge labelled q- 5 without repeating edge labels q-1 2 q 0 q 1 2 q-3 q-2

13 A Different Viewpoint The proof focuses on the labels: which node labels does this edge label join? The CSP model focuses on the nodes (and edges): what is the label on this node (and on this edge)? Can we build a new CSP model using the new viewpoint?

14 Variables of new model e k = l if the edge labelled k joins nodes labelled l and l+k n l = i if the node label l is attached to node i (or a dummy value if node label l is not used) e k = l iff the values of n l and n l+k are adjacent nodes in the graph n 1, n 2,..., n q are all different, unless they have the dummy value

15 Graceful Labelling of K n x P 2 K 3 x P 2 and K 4 x P 2 have several graceful labellings (excluding symmetric equivalents) K 5 x P 2 has just one K 6 x P 2 and K 7 x P 2 have none I conjecture that K n x P 2 is not graceful for n > 5

16 Finding All Graceful Labellings of K n x P 2 LabellingsOld model (backtracks) New model (backtracks) K 3 x P 2 42421 K 4 x P 2 15467210 K 5 x P 2 1140511037 K 6 x P 2 0-2614 K 7 x P 2 0-4036

17 Conclusions The original model seemed the ‘natural’ CSP model of the problem The model based on edge labels is less obvious, & is more difficult to write, but is much faster An example of a mathematical approach to the problem yielding a good CSP model But we can’t yet prove that K n x P 2 is not graceful for n  6 ……


Download ppt "Maths of Constraint Satisfaction, Oxford, March 2006 Constraint Programming Models for Graceful Graphs Barbara Smith."

Similar presentations


Ads by Google