Download presentation

Presentation is loading. Please wait.

Published byAnika Coleson Modified about 1 year ago

1
CSP Yaron Kassner Winter 2013

2
Reminder Arc Consistency: the domains of pairs of variables are consistent. k-consistency: the domains of every k variables are consistent. AC3 – an algorithm that reduces the domains of variables by enforcing arc-consistency.

3
Reminder CSP problems can be solved using search. Heuristics: – assign the variable with the minimum number of remaining values – Most constraining variable – choose the variable that constrains the most variables. – choose the least-constraining-value: the value that is inconsistent with as few other values as possible. Forward checking – after assignment, reduce domain of neighboring variables. MAC – maintain arc-consistency: do a back-tracking search, and fix arc consistency after every assignment.

4
AC-3 complexity

5
Example: Cryptarithmetic Problem TWO + TWO _____ FOUR O R C1 W U C2 T F C301 C3 C2 C1

6
TWO + TWO _____ 1OUR O R C1 W U C2 T F C31 Characters are distinct 1 C2 C1 Example: Cryptarithmetic Problem

7
TWO + TWO _____ 1OUR O R C1 W U C2 T F C31 1 C2 C1 Example: Cryptarithmetic Problem

8
TWO + TWO _____ 1OUR O R C1 W U C2 T F C31 1 C2 C1 Example: Cryptarithmetic Problem

9
TWO + TWO _____ 1OUR O R C1 W U C2 T F C31 1 C2 C1 Example: Cryptarithmetic Problem

10
TWO + TWO _____ 1OUR O R C1 W U C2 T F C31 1 C2 C1 Example: Cryptarithmetic Problem

11
TWO + TWO _____ 1OUR O R C1 W U C2 T F C C1 Example: Cryptarithmetic Problem

12
TWO + TWO _____ 1OUR O R C1 W U C2 T F C C1 Example: Cryptarithmetic Problem

13
TWO + TWO _____ 1OUR O R C1 W U C2 T F C C1 Example: Cryptarithmetic Problem

14
TWO + TWO _____ 1OUR O R C1 W U C2 T F C C1 Example: Cryptarithmetic Problem

15
TWO + TWO _____ 1OUR O R C1 W U C2 T F C Example: Cryptarithmetic Problem

16
TW3 + TW3 _____ 13UR O R C1 W U C2 T F C Example: Cryptarithmetic Problem

17
TW3 + TW3 _____ 13U6 O R C1 W U C2 T F C Example: Cryptarithmetic Problem

18
6W3 + 6W3 _____ 13U6 O R C1 W U C2 T F C גלגול אחורה Example: Cryptarithmetic Problem

19
TWO + TWO _____ 1OUR O R C1 W U C2 T F C C1 Example: Cryptarithmetic Problem

20
TWO + TWO _____ 1OUR O R C1 W U C2 T F C Example: Cryptarithmetic Problem

21
TWO + TWO _____ 1OUR O R C1 W U C2 T F C Example: Cryptarithmetic Problem

22
TWO + TWO _____ 1OUR O R C1 W U C2 T F C Example: Cryptarithmetic Problem

23
TWO + TWO _____ 1OUR O R C1 W U C2 T F C Example: Cryptarithmetic Problem

24
TWO + TWO _____ 1OUR O R C1 W U C2 T F C Example: Cryptarithmetic Problem

25
8WO + 8WO _____ 1OUR O R C1 W U C2 T F C Example: Cryptarithmetic Problem

26
8W7 + 8W7 _____ 17UR O R C1 W U C2 T F C Example: Cryptarithmetic Problem

27
8W7 + 8W7 _____ 17U4 O R C1 W U C2 T F C Distinct character values Example: Cryptarithmetic Problem

28
_____ 17U4 O R C1 W U C2 T F C Example: Cryptarithmetic Problem

29
_____ 1734 O R C1 W U C2 T F C Example: Cryptarithmetic Problem

30
Example: Zebra puzzle 4OY 4OY Some kind of MAC.

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google