Introduction: Combinatorial Problems Combinatorial Problem Solving - - PowerPoint PPT Presentation

introduction combinatorial problems
SMART_READER_LITE
LIVE PREVIEW

Introduction: Combinatorial Problems Combinatorial Problem Solving - - PowerPoint PPT Presentation

Introduction: Combinatorial Problems Combinatorial Problem Solving (CPS) Enric Rodr guez-Carbonell February 11, 2020 Combinatorial Problems A combinatorial problem consists in finding, among a finite set of objects, one that


slide-1
SLIDE 1

Introduction: Combinatorial Problems

Combinatorial Problem Solving (CPS)

Enric Rodr´ ıguez-Carbonell

February 11, 2020

slide-2
SLIDE 2

Combinatorial Problems

2 / 9

A combinatorial problem consists in finding, among a finite set of objects,

  • ne that satisfies a set of constraints

Several variations:

Find one solution

Find all solutions

Find best solution according to an objective function

slide-3
SLIDE 3

Examples (I): Prop. Satisfiability

3 / 9

Given a formula F in propositional logic, is F satisfiable? (= is there any assignment of Boolean values to variables that evaluates F to “true”?)

slide-4
SLIDE 4

Examples (I): Prop. Satisfiability

3 / 9

Given a formula F in propositional logic, is F satisfiable? (= is there any assignment of Boolean values to variables that evaluates F to “true”?)

Is (p ∨ q) ∧ (p ∨ ¬q) ∧ (¬p ∨ q) satisfiable?

slide-5
SLIDE 5

Examples (I): Prop. Satisfiability

3 / 9

Given a formula F in propositional logic, is F satisfiable? (= is there any assignment of Boolean values to variables that evaluates F to “true”?)

Is (p ∨ q) ∧ (p ∨ ¬q) ∧ (¬p ∨ q) satisfiable? Yes: set p, q to true

slide-6
SLIDE 6

Examples (I): Prop. Satisfiability

3 / 9

Given a formula F in propositional logic, is F satisfiable? (= is there any assignment of Boolean values to variables that evaluates F to “true”?)

Is (p ∨ q) ∧ (p ∨ ¬q) ∧ (¬p ∨ q) satisfiable? Yes: set p, q to true

Is (p ∨ q) ∧ (p ∨ ¬q) ∧ (¬p ∨ q) ∧ (¬p ∨ ¬q) satisfiable?

slide-7
SLIDE 7

Examples (I): Prop. Satisfiability

3 / 9

Given a formula F in propositional logic, is F satisfiable? (= is there any assignment of Boolean values to variables that evaluates F to “true”?)

Is (p ∨ q) ∧ (p ∨ ¬q) ∧ (¬p ∨ q) satisfiable? Yes: set p, q to true

Is (p ∨ q) ∧ (p ∨ ¬q) ∧ (¬p ∨ q) ∧ (¬p ∨ ¬q) satisfiable? No

slide-8
SLIDE 8

Examples (I): Prop. Satisfiability

3 / 9

Given a formula F in propositional logic, is F satisfiable? (= is there any assignment of Boolean values to variables that evaluates F to “true”?)

Is (p ∨ q) ∧ (p ∨ ¬q) ∧ (¬p ∨ q) satisfiable? Yes: set p, q to true

Is (p ∨ q) ∧ (p ∨ ¬q) ∧ (¬p ∨ q) ∧ (¬p ∨ ¬q) satisfiable? No

Arises in:

Hardware verification

Circuit optimization

...

slide-9
SLIDE 9

Examples (II): Graph Coloring

4 / 9

Given a graph and a number of colors, can vertices be painted so that neighbors have different colors?

Arises in:

Frequency assignment

Register allocation

...

slide-10
SLIDE 10

Examples (III): Knapsack

5 / 9

Given n items with weights wi and values vi, a capacity W and a number V , is there a subset S of the items such that

i∈S wi ≤ W and

  • i∈S vi ≥ V ?

Arises in:

Selection of capital investments

Cutting stock problems

...

slide-11
SLIDE 11

Examples (IV): Bin Packing

6 / 9

Given n items with volumes vi and k identical bins with capacity V , is it possible to place all items in bins?

Arises in:

Logistics

...

slide-12
SLIDE 12

A Note on Complexity

7 / 9

All previous examples are NP-complete

No known polynomial algorithm (likely none exists)

Available algorithms have worst-case exp behavior: there will be small instances that are hard to solve

In real-world problems there is a lot of structure, which can hopefully be exploited

slide-13
SLIDE 13

A Note on Complexity

7 / 9

All previous examples are NP-complete

No known polynomial algorithm (likely none exists)

Available algorithms have worst-case exp behavior: there will be small instances that are hard to solve

In real-world problems there is a lot of structure, which can hopefully be exploited

Other combinatorial problems solvable in P-time, e.g.

Bipartite matching: given a set of boys and girls and their compatibilities, can we marry all of them?

Shortest paths: given a graph and two vertices, which is the shortest way to go from one to the other?

slide-14
SLIDE 14

A Note on Complexity

7 / 9

All previous examples are NP-complete

No known polynomial algorithm (likely none exists)

Available algorithms have worst-case exp behavior: there will be small instances that are hard to solve

In real-world problems there is a lot of structure, which can hopefully be exploited

Other combinatorial problems solvable in P-time, e.g.

Bipartite matching: given a set of boys and girls and their compatibilities, can we marry all of them?

Shortest paths: given a graph and two vertices, which is the shortest way to go from one to the other?

Our focus will be on hard (= NP-complete) problems

slide-15
SLIDE 15

Approaches to Problem Solving

8 / 9

Specialized algorithms

Costly to design, implement and extend

slide-16
SLIDE 16

Approaches to Problem Solving

8 / 9

Specialized algorithms

Costly to design, implement and extend

Declarative methodology 1. Choose a problem solving framework (what is my language?) 2. Model the problem (what is a solution?)

Define variables

Define constraints 3. Solve it (with an off-the-shelf solver)

slide-17
SLIDE 17

Approaches to Problem Solving

8 / 9

Specialized algorithms

Costly to design, implement and extend

Declarative methodology 1. Choose a problem solving framework (what is my language?) 2. Model the problem (what is a solution?)

Define variables

Define constraints 3. Solve it (with an off-the-shelf solver)

Pros of Declarative methodology

Specification of the problem is all we need to solve it!

Fast development and easy maintenance

Often better performance than ad-hoc techniques

slide-18
SLIDE 18

About CPS

9 / 9

Problem solving frameworks

Constraint Programming (CP)

Linear Programming (LP)

Propositional Satisfiability (SAT)

For each of these frameworks

Modeling techniques

Inner workings of solvers