Docsity

Intro to Constraint Programming: Understanding & Solving Combinatorial Problems, Study notes of Computer Numerical Control

Partial preview of the text

Download Intro to Constraint Programming: Understanding & Solving Combinatorial Problems and more Study notes Computer Numerical Control in PDF only on Docsity!

Constraint Programming

An Introduction to Constraint Programming

Alan M. Frisch Artificial Intelligence Group Department of Computer Science University of York

Updated 15 Nov 2010

Constraint Programming: The Topic

What is Constraint Programming?

Narrow Answer

A more specific answer is obtained by programming with constraints in a particular manner.

Constraint programming involves solving a problem by:

  1. Modelling: Formulate the problem as a finite set of constraints (a Constraint Satisfaction Problem). This is sometimes called reducing the problem (e.g. in TOC).
  2. Solving: Solve the CSP, perhaps by using a constraint programming language
  3. Mapping: Map the solution to the CSP to a solution to the original problem

Problems vs. Problem Instances

Graph Colouring Problem: Given any graph G and any natural number k determine if G can be coloured with k colours.

Instance of Graph Colouring Problem: a graph and a natural number.

A program to solve the graph colouring problem

  • input: graph G and a natural number k
  • output: True/False indicating whether G can be coloured with k colours.

Constraint Programming: The Module

Theme of the Module

Most of the time we will take the “narrow” approach.

Focus on constraint programming with finite domains

  • Use MiniZinc for solving finite-domain CSPs.
  • Focus on solving combinatorial problems, usually ones that are NP- complete
  • Emphasise the use of the technology to solve practical problems. Hands on!
  • Hence, mostly focus on practical solution techniques and modelling rather than on theory and solution techniques that are rarely used in practice.

Organisation of Module

  • Class time: 8 scheduled hours per week
    • Some time I will lecture
    • Some time on interactively solving problems
    • Not all scheduled time will be used
  • Preparation: To learn the necessary skills, it is crucial that you seriously engage in the assigned work and come to class prepared to discuss your work.
  • Open exam
    • Involves using the MiniZinc FD constraint modelling system to solve a problem.
    • Hand out: Monday, week 10 of Autumn term
    • Hand in: Wednesday, week 3 of Spring term

Module Prerequisites

Prerequisite Knowledge: Experience with thinking about problems and algorithms to solve them.

Prerequisite Modules: Logic Programming & Artificial Intelligence (LPA)

  • problem representations, search spaces and search