Presentation is loading. Please wait.

Presentation is loading. Please wait.

But Shaun’s already proved P equals NP. Can’t we move onto quantified SAT? Woof!

Similar presentations


Presentation on theme: "But Shaun’s already proved P equals NP. Can’t we move onto quantified SAT? Woof!"— Presentation transcript:

1 But Shaun’s already proved P equals NP. Can’t we move onto quantified SAT? Woof!

2 Set Variables using as an example Steiner Triples

3 Set Variables using as an example Steiner Triples SteinerKirkman

4 … and BIBD’s, 0/1 encoding, symmetry breaking See choco manual 1.4.2, page 14 and 15 CSPLib prob028 choco manual 6.3, pages 64 and 65 choco manual 8.56 lex (constraint)

5 Represented with two bounds kernel: intersection of all possible sets envelope: the union of all possible setsupper bound lower bound

6 We will do this by example, solving a problem

7

8 We are given a set S of size n. Produce n.(n-1)/6 triples (subsets of S of size 3) such that given any pair of triples their intersection is of size at most 1 Equivalently, every possible pair of elements in S occurs in only one of the n.(n-1)/6 triples

9 Given a set of size n, how many triples are we to produce? Equivalently, every possible pair of elements in S occurs in only one of the triples How many pairs are there? n.(n-1)/2 Every triple contains 3 pairs Therefore n.(n-1)/6 triples required

10 We are given a set S of size n. Produce n.(n-1)/6 triples (subsets of S of size 3) such that given any pair of triples their intersection is of size at most 1

11 A triple is also called a “block” and the entries of a block a “point” This is then a BIBD (balanced incomplete block design) Applications: design of experiments, testing, …

12 Modelling the Steiner Triple problem using Set Variables

13

14

15

16

17 Given a set of size n, how many triples are we to produce? Equivalently, every possible pair of elements in S occurs in only one of the triples How many pairs are there? n.(n-1)/2 Every triple contains 3 pairs Therefore n.(n-1)/6 triples required

18

19

20

21

22 Compile and Run

23 An alternative representation

24 0/1 Array m=7 block point Sum of a column = 3, intersection between two columns is at most 1 111 111 111 111 111 111 111

25

26

27

28

29

30

31

32

33

34 Compile & Run For both models try n=1, n=7, n=9 Show effect of symmetry breaking and search over only decision variable

35

36

37 How about we do the following: Generate all triples where 0 ≤ i < j < k < m and pick the ones we want Have a zero/one IntegerVariable for each triple, in an array A, such that A[i][j][k] is 1 iff we select triple Flatten the array A into a one-D vector, say v? Constrain v such that it sums to m.(m-1)/6 For every pair of triples that match on two indices make the sum of their corresponding constrained integer variables be at most 1 (i.e. select at most 1 of these triples) Is this dumb?

38 Fix i and j: Sum of A[i][j][*] ≤ 1 Fix i and k: Sum of A[i][*][k] ≤ 1 Fix j and k: Sum of A[*][j][k] ≤ 1 But we need to ensure that the sum of the above sums is also at most 1 For every pair of triples that match on two indices make the sum of their corresponding constrained integer variables be at most 1 (i.e. select at most 1 of these triples)

39 The age of stupid

40

41

42

43

44

45

46

47

48 Compile & Run

49

50 An array, m by m, where pair[i][j] is an integer pair[i][j] = k means that pair (i,j) is in kth block Proposed by Chris Unsworth Location, location, location pair[i][j] = k iff points i and j are in block[k] The number of points in a block is 3

51 Proposed by Chris Unsworth Location, location, location Constrain pair[i][j] = k iff block[k][i] = 1 and b[k][j] = 1 i and j are in the kth triple if and only if kth triple contains i and kth triple contains j

52

53

54

55

56

57

58

59 Compile & Run

60 More generally Steiner Triple is a BIBD

61

62

63

64 So? 1. Set variables 2. Steiner triples 3. Various models (four!) 4. Symmetry breaking with lex 5. Dare to be stupid

65


Download ppt "But Shaun’s already proved P equals NP. Can’t we move onto quantified SAT? Woof!"

Similar presentations


Ads by Google