Graph Colouring Various Models. an obvious model SAT sets demo random graphs chromatic number maxCol phase transition.

Slides:



Advertisements
Similar presentations
An empirical study of the stable marriage problem with ties and incomplete lists (SMTI) Ian Gent & Patrick Prosser.
Advertisements

A Study of 0/1 Encodings Prosser & Selensky A Study of 0/1 Encodings Prosser & Selensky.
10/7/2014 Constrainedness of Search Toby Walsh NICTA and UNSW
Constraint Satisfaction Problems
1 Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides)
1 Constraint Satisfaction Problems. 2 Intro Example: 8-Queens Generate-and-test: 8 8 combinations.
1 Finite Constraint Domains. 2 u Constraint satisfaction problems (CSP) u A backtracking solver u Node and arc consistency u Bounds consistency u Generalized.
Graph-02.
1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
NP and NP Complete. Definitions A problem is in the class P if there is a polynomial time solution to the problem A problem is in the class NP if there.
Review: Constraint Satisfaction Problems How is a CSP defined? How do we solve CSPs?
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
4 Feb 2004CS Constraint Satisfaction1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3.
Chapter 9 Graph algorithms. Sample Graph Problems Path problems. Connectedness problems. Spanning tree problems.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
Constraint Satisfaction Problems
NP-complete examples CSC3130 Tutorial 11 Xiao Linfu Department of Computer Science & Engineering Fall 2009.
Clique Cover Cook’s Theorem 3SAT and Independent Set
Distributed Scheduling. What is Distributed Scheduling? Scheduling: –A resource allocation problem –Often very complex set of constraints –Tied directly.
Constraint Satisfaction Problems
ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 4 Constraint Satisfaction Problems Instructor: Alireza Tavakkoli September 17, 2009 University.
Constrainedness Including slides from Toby Walsh.
Graphs Rosen, Chapter 8. Isomorphism (Rosen 560 to 563) Are two graphs G1 and G2 of equal form? That is, could I rename the vertices of G1 such that the.
Example Question on Linear Program, Dual and NP-Complete Proof COT5405 Spring 11.
TECH Computer Science NP-Complete Problems Problems  Abstract Problems  Decision Problem, Optimal value, Optimal solution  Encodings  //Data Structure.
Chapter 5 Section 1 – 3 1.  Constraint Satisfaction Problems (CSP)  Backtracking search for CSPs  Local search for CSPs 2.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
Course: Logic Programming and Constraints
Chapter 5: Constraint Satisfaction ICS 171 Fall 2006.
1 Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
1 How to prove that a problem is NPC. 2 Cook Cook showed the first NPC problem: SAT Cook received Turing Award in 1982.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
1/24 Introduction to Graphs. 2/24 Graph Definition Graph : consists of vertices and edges. Each edge must start and end at a vertex. Graph G = (V, E)
Graph.
Lecture 6 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
Instructor Neelima Gupta Table of Contents Class NP Class NPC Approximation Algorithms.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
1 Constraint Satisfaction Problems Chapter 5 Section 1 – 3 Grand Challenge:
CHAPTER 5 SECTION 1 – 3 4 Feb 2004 CS Constraint Satisfaction 1 Constraint Satisfaction Problems.
Constraint Satisfaction Problems University of Berkeley, USA
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
1. 2 Outline of Ch 4 Best-first search Greedy best-first search A * search Heuristics Functions Local search algorithms Hill-climbing search Simulated.
Lecture 25 NP Class. P = ? NP = ? PSPACE They are central problems in computational complexity.
CSC 413/513: Intro to Algorithms
Chapter 5 Team Teaching AI (created by Dewi Liliana) PTIIK Constraint Satisfaction Problems.
1 Ch 10 - NP-completeness Tractable and intractable problems Decision/Optimization problems Deterministic/NonDeterministic algorithms Classes P and NP.
Heuristics with Mad queens and example from jssp.
Where are the hard problems?. Remember Graph Colouring? Remember 3Col?
Conceptual Foundations © 2008 Pearson Education Australia Lecture slides for this course are based on teaching materials provided/referred by: (1) Statistics.
Constraint Satisfaction Problems
EMIS 8373: Integer Programming Combinatorial Optimization Problems updated 27 January 2005.
Timetable Problem solving using Graph Coloring
Where are the hard problems?
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The Theory of NP-Completeness
More NP-Complete and NP-hard Problems
Matrix Representation of Graphs
Lecture 2-2 NP Class.
Minimum Spanning Tree Chapter 13.6.
ICS 353: Design and Analysis of Algorithms
EMIS 8373: Integer Programming
Connectivity Section 10.4.
Artificial Intelligence
NP-Complete Problems.
CSE 6408 Advanced Algorithms.
The Theory of NP-Completeness
Lecture 24 Classical NP-hard Problems
Hamiltonian Circuit (HC) problem
Presentation transcript:

Graph Colouring Various Models

an obvious model SAT sets demo random graphs chromatic number maxCol phase transition

kCol We are given a graph G = (V,E) where V is set of vertices and E is set of edges G is simple, undirected graph Given k colours, can we label vertices with colours such that for all (i,j)  E  colour(i) ≠ colour(j)

A Graph G = (V,E)

Colour such that adjacent vertices are different

Model 1

kCol Model 1 Have a constrained integer variable v[i] for each vertex i  V Domain of v[i] is {1..k} the set of avaliable colours For all for all (i,j)  E v[i] ≠ v[j] Decision variable are v[0] to v[n-1] Heuristic, Brelaz

Model 2

kCol Model 2 SAT encoding Consider as an example a 3Col instance with 2 adjacent vertices, i and j boolean variable to represent a vertex x taking a specific colour k “at least one and at most one” constraint adjacent vertices take different colours

kCol Model 2 SAT encoding Heuristics?

Implementation … generate data and pass to minisat+

Model 3

kCol Model 3 Have a constrained set variable S[i] for each colour Colour Sets of Vertices Decision variables are S[0] to S[k-1] Heuristics? Where col is a set of colours An edge is not in a coloured set All vertices are coloured

an example

g10.txt

is red 2 is green 3 is blue g10.txt

A different colour with Colour02

Generating random graphs

Small demo with data directory

Chromatic NumberChromatic Number

Chromatic NumberChromatic Number

We want the minimum number of colours to colour G Chromatic NumberChromatic Number introduce a constrained integer variable maxCol maxCol has domain {1.. n} each vertex has a constrained integer variable v[i] v[i] has domain {1.. n} for (int i=0;i<n;i++) modl.addConstraint(leq(v[i],maxCol)) sol.minimise(maxCol)

Chromatic NumberChromatic Number

Chromatic NumberChromatic Number

Chromatic NumberChromatic Number

What should we do if there are not enough colours and we want to do the best that we can? That is, colour as many vertices as possible leaving some vertices uncoloured, or colour all vertices and minimise conflicts? MaxCol (min-conflicts)

associate a dummy colour into domains dummy colour doesn’t conflict with any other colours get occurrence of dummy colour and minimise that OR associate a penalty with a conflict for edge {i,j} have constrained integer variable P[i][j] domain P[i][j] is {0,1} modl.addConstraint(or(and(neq(v[i],v[j]),eq(P[i][j],0)), (and(eq(v[i],v[j]),eq(P[i][j],1))) minimise the sum of the penalty variables

Lassie, do you think we could have a look at the phase transition in kCol? Woof!

Lassie, remember the paper by Cheeseman, Kanefsky and Taylor, and that stuff on constrainedness? Woof!

Lassie, are you lying? Woof!

Constrainedness is expected number of solutions N is log_2 of the size of the state space k = 0, all states are solutions, easy, underconstrained k = k = 1, critically constrained, 50% solubility, hard, is zero, easy, overconstrained Applied to: CSP, TSP, 3-SAT, 3-COL, Partition, HC, …?

Random Graphs

Make Experiments as a Job

The Results File

Analyse Results

4Col n = 50 sample size = ≤ p ≤ 0.3

Check Out the Dates 1 day’s work

fin