jinsong guo jilin university, china background filtering techniques are used to remove some local...

34
Jinsong Guo Jilin University, China

Upload: rudolf-barker

Post on 04-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

Jinsong Guo Jilin University, China

Page 2: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

Background

Filtering techniques are used to remove some local inconsistencies in the search algorithms solving the instances of the Constraint Satisfaction Problem (CSP).

They can be used in a preprocessing step or during the search.

Page 3: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

A value (xj, b) is an AC-support of value (xi, a) if ((xi, a), (xj, b)) is allowed by cij.

An AC-support (xj, b) of (xi, a) is a PC-support of (xi, a) iff at least one PC-witness exists in the domain of each third variable xk which is constrained with both xi and xj.

A PC-witness of the value pair ((xi, a), (xj, b)) is a value which is consistent with both (xi, a) and (xj, b).

Background

Page 4: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

Background maxRPC is a promising local consistency. Stronger than AC, maxRPC removes not

only the values that have no AC-supports, but also those that have no PC-supports.

A binary CN is max-restricted path consistent iff for all xi∈X, D(xi) is a non empty arc consistent domain and, for all a∈D(xi), for all xj∈X linked to xi, there exists b∈D(xj) s.t. ((xi, a), (xj, b)) ∈ rel(cij) and for all xk ∈X linked to both xi and xj, there exists c∈D(xk) s.t. ((xi, a), (xk, c)) ∈ rel(cik)∧ ((xk, c), (xj, b))∈ rel(cjk).

Page 5: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

maxRPC1 fine-grained, relatively high space cost time complexity O(end3) space complexity O(end)

maxRPC2coarse-grained, reducing the space cost

(O(ed))The time complexity is O(end3) too

They are not suited for use during search

Background

Page 6: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

maxRPCrm

make use of the residues, can be better suited for use during search

maxRPC2 and maxRPCrm both suffer from the overhead caused by the redundant constraint checks.

maxRPC3 and maxRPC3rm largely eliminate the redundant

constraint checks

Background

Page 7: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

Background

When used during search, lmaxRPC which is the light version of maxRPC is used.

Page 8: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

The inspiration of this paper

Local consistencies stronger than AC (such as maxRPC ) have two aspects:

advantageThey can remove more inconsistent values than AC. (pruning efficiency)

disadvantage Enforcing or maintaining them cost more.

(computational cost)

Page 9: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

disadvantage > advantage Good advantage < disadvantage Not

preferable

Thus, I thought: Why not find a way to overcome the

disadvantage so that the advantage can be more effective?

The inspiration of this paper

Page 10: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

Where does the disadvantage come from? maxRPC removes not only the values

that have no AC-supports, but also those that have no PC-supports.

The “Culprit”Verifying whether a value has the PC-supports.

Page 11: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

overcome the disadvantage The process of verifying whether a value (xi,

a) has a PC-support in the domain of xj: Step 1: Verifying whether (xi, a) has an AC-

support in the domain of xj.

Step 2(If such an AC-support (xj, b) is found) :

Verifying whether the value pair ((xi, a), (xj, b)) has one PC-witness in all the domains of each third variable xk linked to both xi and xj.

Page 12: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

Speed up the process of Step 2. I think that if the step 2 costs little,

the time cost of enforcing or maintaining maxRPC may be close to AC.

overcome the disadvantage

Page 13: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

searching for a PC-witness When searching for a PC-witness for

a pair of values ((xi, a), (xj, b)) in a third variable xk, all existing algorithms need to perform constraint checks to confirm whether a value (xk, c) satisfies ((xi, a), (xk, c))∈ rel(cik) and ((xj, b), (xk, c))∈ rel(cjk).

Page 14: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

searching for a PC-witness The differences at this process in the

existing algorithms are from which value in D(xk) the search starts.

maxRPC2 and maxRPCrm start the search from scratch thus there are redundant constraint checks, maxRPC1 and maxRPC3 avoid these redundant constraint checks, and maxRPC3 requires only two constraint checks when LastACxi, a, xk or LastACxj, b, xk happens to be the PC-witness.

Page 15: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

Our new method

In our method, bitwise operations are performed instead of constraint checks when searching for PC-witnesses.

Our method is based on the binary representation.

In the following introduction, we consider that the computer is equipped with a 32-bit processor.

Page 16: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

the binary representation The arrays of words are used to

represent domains and constraints. Each word is a sequence of 32 bits An array of words can be regarded

as a bit sequence.

Page 17: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

Two 2-dimensional arrays bitdom and bitSup were introduced to respectively present domains and constraints.

length is used to denote the size of an array.

If the domain of xj has a size of d, the size of bitdom[xj] and bitSup[cij, xi, a] is d/32, i.e. both bitdom[xj] and bitSup[cij, xi, a] consist of d/32 words.

the binary representation

Page 18: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

Each bit in bitdom[X] can be associated with the index of any value in the domain of X. When a bit is set to 1 (resp. 0), it means that the corresponding value is present in the domain (resp. absent from it).

the binary representation

Page 19: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

bitSup[cij, xi, a] represents the binary representation of the supports of (xi, a) in cij. For each value in the domain of xj, there is a corresponding bit in bitSup[cij, xi, a] to mark whether this value is a support of (xi, a).

the binary representation

Page 20: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

The new method tests 32 values simultaneously each time and aims at finding out whether there is at least one PC-witness instead of finding out which value is the PC-witness.

the binary representation

Page 21: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

A new method for searching for PC-witness of ((xi,a),(xj,b)) in xk

ZERO denotes a sequence of 32 bits all set to 0. AND is the bitwise operator that simultaneously performs a logical AND operation on 32 pairs of corresponding bits.

Page 22: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

If the result (here it is called result.1) of “bitsup[Cik, xi, a][w] AND bitsup[Cjk, xj, b][w]” is not ZERO, there must be common supports for (xi, a) and (xj, b) in the initial domain of xk.

If the result of “ result.1 AND bitdom[xk][w]”is

not equal to ZERO, there must be at least one PC-witness in the current domain of xk

Page 23: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

This method is very efficient, consider that xk has a domain with the size of 100, only 8 bitwise operations need to be performed in the worst case, and these 8 bitwise operations can test all the values in xk, in contrast, 8 constraint checks can test only 4 to 8 values in existing algorithms

A new method for searching for PC-witnesses

Page 24: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

Two new algorithms

Utilizing this new method, we proposed two coarse-grained algorithms called maxRPCbit and maxRPCbit+rm

Page 25: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

maxRPCbit can be regarded as the variant of maxRPC2.

It transforms the step of searching for PC-witnesses through constraint checks into the new method exploiting bitwise operations.

Page 26: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

maxRPCbit+rm can be regarded as the variant of maxRPC3rm.

It transforms the step of searching for PC-witnesses through constraint checks into the new method exploiting bitwise operations.

When a PC-support b of (xi, a)is found, it does not set LastACxi, a, xj to b as maxRPC3rm

does. Instead, LastACxi, a, xj is set to the position of b in bitSup (b div 32) .

Page 27: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

Experimental evaluation

We compared the new algorithms with the most efficient ones among existing algorithms.

Performances have been measured in terms of cpu time in seconds (cpu) and the number of constraint checks (#ccks).

Note that for the new algorithms, #ccks corresponds to the number of bitwise operations.

Page 28: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

Average stand-alone performance

Page 29: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

Average stand-alone performance

Page 30: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

Average search performance

Page 31: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

Some instances on which the search algorithms applying lmaxRPC outperforms MAC

Page 32: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

Conclusions Main job: overcoming the disadvantage of

maxRPC(computational cost).

We have introduced a method based on bitwise operations to speed up the processes of searching for PC-witnesses.

Based on the new method, we presented two algorithms maxRPCbit and maxRPCbit+rm.

Significantly, our experiments show that maxRPC is a much more promising filtering technique than what we thought because lmaxRPCbit+rm outperforms MAC on many instances.

In the future, we will do further research to overcome the disadvantages of other local consistencies.

Page 33: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

[email protected]

By the way, I am a first-year graduate student in Jilin University of China. And this paper is the first one of mine.If you need a PHD student, who has a talent for CP and enjoys doing researches, could you please take me into consideration and contact me by the email? I won’t let you down~!

Page 34: Jinsong Guo Jilin University, China Background  Filtering techniques are used to remove some local inconsistencies in the search algorithms solving

Thank you very much!I am sorry for my absence.Wish you have a good time in Perugia!