L02: Modelling Introduction Flashcards

1
Q

What are some common features of constraint languages? (5)

A
  • Allow us to declare decision variables, and their domains
  • Often support arrays of variables
    Remember the order and colour grids from the Steel Mill example
    And iteration over these arrays for concision
  • Allow us to model problem classes.
  • All support extensional/table constraints (those are the basic building blocks)
  • Operators allow us to build constraint expressions that are represented intensionally
    Arithmetic: +, -, x, *, absolute value
    Logical: AND, OR, NOT
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are some examples of constraint models?

A
  • Steel Mill Slab Design
  • Crystal Maze
  • Sudoku
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the 2 components of constraint solving?

A
  • Systematic search
  • Constraint propagation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the 4 components used to structure a constraint model?

A
  1. Given parameters
  2. Find decision variables
  3. Such That constraints
  4. Min/Maximising objective (for COP)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What can we use instead of table/extensional representation?

A

Intensional representation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What could the objectives of a COP be?

A
  • Minimising waste or cost.
  • Minimising time taken (e.g. for scheduling).
  • Maximising profit.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does a constraint model do?

A
  • A constraint model maps the features of a combinatorial problem onto the features of a constraint satisfaction problem (CSP).
  • A constraint model is a recipe that produces a CSP/COP
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a constraint language?

A
  • A constraint language is a language used to specify constraints for a model
  • I.e. constraint programs are written in constraint languages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a problem class?

A

A problem class describes a family of problems, related by a common set of parameters. A problem class is specified by one or more parameters.

  • Obtain an instance: give values for the parameters.
  • Example: n-queens problem class.
    Place n queens on an n x n chess board such that no pair of queens attack each other.
  • Another example is the sudoku problem class
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a problem instance?

A
  • An instance is specified from a class by instantiating the parameters to particular values.
  • An individual CSP/COP represents a problem instance.
  • Constraint solvers solve individual instances.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is intensional representation?

A

Constraint solvers provide a library of commonly-occurring constraints that can be specified much more concisely

Internally, the solver usually represents these constraints Intensionally:

  • An expression that can be evaluated:
    E.g. =, <, ≤, ≠.
  • An algorithm that can be executed:
    AllDifferent, various kinds of counting constraints
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the (finite-domain) constraint satisfaction problem (CSP)?

A

Given:

  1. A finite set of decision variables.
  2. For each decision variable, a finite domain
    of potential values.
  3. A finite set of constraints on the decision
    variables.

Find:

An assignment of values to variables such that
all constraints are satisfied.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the advantage of having a table constraint?

A

We can represent any constraint we wish to model like this

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the advantage of using intensional representation?

A

Simple to check whether an assignment satisfies this constraint as there is no need to check through the whole table, one comparison/algorithm can be applied

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the Constrained Optimisation Problem (COP)?

A

Given:

  • A CSP + an objective function.
  • E.g. maximise/minimise value of some variable/expression.

Find:

  • An assignment of values to variables such that:
    All constraints are satisfied.
    The objective is optimised.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the disadvantage of having a table constraint?

A

The table constraint can be very cumbersome.
- Think about modelling AllDifferent on 9
variables like this (e.g. for Sudoku).
- That’s 9! Tuples…

17
Q

What is the relationship between constraint languages, models, classes, instances, solvers?

A
  • Constraint Models are recipes written in constraint languages
  • Follow the recipe to get a CSP/COP
  • The model can be parameterised to represent a problem class
  • Give values for the parameters to obtain an instance
  • A CSP/COP corresponds to a single instance
  • Feed the CSP/COP to a constraint solver to get a solution to that instance
18
Q

What is the table constraint?

A
  • Consists of literally listing the satisfying combinations of assignments
  • Also known as the extensional representation.
  • The most basic constraint available to us
19
Q

When is extensional/table representation appropriate?

A
  • Sometimes it is the only sensible option.
  • E.g. Table(p1, p2) where p1 and p2 are variables whose domains are people and the constraint being represented is p1 likes p2.
  • No obvious algorithmic representation for that!