Undergraduate Thesis (Roger Willis)

  • Upload
    rojeeee

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    1/87

    S a t i s a b i l i t y S o l v i n g

    R o g e r M . W i l l i s

    A D i s s e r t a t i o n p r e s e n t e d f o r t h e d e g r e e o f

    B a c h e l o r o f S c i e n c e

    1 7 9 0 0 W o r d s

    D e p a r t m e n t o f C o m p u t e r S c i e n c e

    U n i v e r s i t y o f D u r h a m

    E n g l a n d

    M a y 2 0 0 6

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    2/87

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    3/87

    A b s t r a c t

    S a t i s a b i l i t y o r S A T c a n e a s i l y b e c o n s i d e r e d a s t h e q u i n t e s s e n t i a l p r o b l e m i n c o m -

    p u t a t i o n a l c o m p l e x i t y t h e o r y . T h e p r o b l e m p r o v e d t o b e N P - c o m p l e t e b y C o o k

    i n 1 9 7 1 [ 1 5 ] e n t a i l s n d i n g a t r u t h - a s s i g n m e n t f o r v a r i a b l e s o f a p r o p o s i t i o n a l

    B o o l e a n f o r m u l a , s u c h t h a t t h e f o r m u l a e v a l u a t e s t o t r u e .

    S A T i s f u n d a m e n t a l t o m a n y p r o b l e m s o l v i n g d i s c i p l i n e s s u c h a s ; a u t o m a t e d

    r e a s o n i n g ( A R ) , a r t i c i a l i n t e l l i g e n c e ( A I ) a n d e l e c t r o n i c d e s i g n a u t o m a t i o n ( E D A ) ,

    t h u s i t i s v i e w e d a s a c o r e p r o b l e m i n c o m p u t e r s c i e n c e w h i c h e n j o y s c o n s i d e r a b l e

    r e s e a r c h a t t e n t i o n . E c i e n t S A T - s o l v i n g a l g o r i t h m s a r e o f g r e a t i m p o r t a n c e i n

    t h e o r y a n d p r a c t i s e h o w e v e r d u e t o t h e N P - c o m p l e t e n e s s o f S A T i t i s u n l i k e l y a

    t r a c t a b l e s o l u t i o n t o t h e p r o b l e m e x i s t s .

    U n t i l r e c e n t l y , r e s e a r c h h a s b e e n g e a r e d t o w a r d s t h e t h e o r e t i c a l a s p e c t s o f S A T -

    s o l v i n g ; n d i n g e e c t i v e h e u r i s t i c s t o p r u n e t h e s e a r c h s p a c e o f a S A T i n s t a n c e

    w i t h t h e g o a l o f r a p i d l y c o n v e r g i n g o n a s o l u t i o n . L e s s a t t e n t i o n h a s b e e n f o c u s e d

    o n t h e i m p l e m e n t a t i o n i s s u e s o f t h e s e p r o p o s e d h e u r i s t i c s u n t i l r e c e n t l y w i t h t h e

    d e v e l o p m e n t o f C h a , a h i g h l y o p t i m i s e d s o l v e r o u t l i n i n g n e w S A T - s o l v i n g m e t h o d s

    b a s e d o n e n g i n e e r i n g r a t h e r t h a n a t h e o r e t i c a l g r o u n d i n g [ 4 ] .

    T h i s p a p e r i n t e n d s t o r e v i e w a n d q u a l i t i v e l y e x a m i n e e x i s t i n g S A T - s o l v i n g t e c h -

    n i q u e s t h r o u g h e m p i r i c a l a n a l y s i s a n d m a k e c l a i m s r e g a r d i n g e c i e n c y w i t h r e f e r -

    e n c e t o t h e e n g i n e e r i n g o f t h e s o l v e r s i n q u e s t i o n . A s s h o w n w i t h z C h a , a n e c i e n t

    i m p l e m e n t a t i o n c a n v a s t l y s p e e d u p a s o l v e r s ' o v e r a l l p e r f o r m a n c e .

    T h i s p a p e r h o p e s t o p r e s e n t a c o m p r e h e n s i v e o v e r v i e w o f e x i s t i n g S A T - s o l v e r s

    a n d m a k e c l a i m s r e g a r d i n g t h e r e a s o n i n g b e h i n d t h e i r p e r f o r m a n c e a n d i f p o s s i b l e

    s u g g e s t p e r f o r m a n c e e n h a n c e m e n t s .

    i i i

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    4/87

    A c k n o w l e d g e m e n t s

    T h a n k s t o t h e p a t i e n t a n d h e l p f u l D r . S t e f a n D a n t c h e v f o r a g r e e i n g t o s u p e r v i s e

    m y d i s s e r t a t i o n . T h a n k s t o D r . N i c k H o l l i m a n , P r o f . M a l c o l m M u n r o a n d M r .

    B r e n d a n H o d g s o n f o r a l l o w i n g m e t o c h a n g e m y d i s s e r t a t i o n t o p i c a t a l a t e d a t e .

    L a s t l y T h a n k s t o M r . M . I m r a n w h o p r e p a r e d t h i s L y x t e m p l a t e s o I d i d n ' t h a v e

    t o .

    i v

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    5/87

    C o n t e n t s

    A b s t r a c t i i i

    A c k n o w l e d g e m e n t s i v

    1 I n t r o d u c t i o n 1

    1 . 1 P r e l i m i n a r i e s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

    1 . 1 . 1 D e n i t i o n o f S A T . . . . . . . . . . . . . . . . . . . . . . . . . 1

    1 . 1 . 2 E x a m p l e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

    1 . 1 . 3 C o m p l e x i t y . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

    1 . 1 . 4 D I M A C S . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    1 . 2 M o t i v a t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    1 . 3 O b j e c t i v e s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

    1 . 3 . 1 P l a n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

    1 . 3 . 2 D e l i v e r a b l e s . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

    1 . 3 . 3 R e p o r t s t r u c t u r e . . . . . . . . . . . . . . . . . . . . . . . . . 8

    2 L i t e r a t u r e S u r v e y 1 0

    2 . 1 V a r i a t i o n s o f S A T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 0

    2 . 1 . 1 k - S A T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 0

    2 . 1 . 2 H o r n - S A T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1

    2 . 2 S A T i n s t a n c e s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2

    2 . 2 . 1 P o l y n o m i a l T i m e R e d u c t i o n s . . . . . . . . . . . . . . . . . . . 1 2

    2 . 2 . 2 R a n d o m G e n e r a t i o n . . . . . . . . . . . . . . . . . . . . . . . 1 4

    2 . 2 . 3 H a r d V s E a s y I n s t a n c e s . . . . . . . . . . . . . . . . . . . . . 1 5

    2 . 3 D e d u c t i o n m e t h o d s . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 6

    v

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    6/87

    C o n t e n t s v i

    2 . 3 . 1 R e s o l u t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 7

    2 . 3 . 2 U n i t r e s o l u t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . 1 8

    2 . 3 . 3 S u b s u m p t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 9

    2 . 3 . 4 P u r i c a t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 9

    2 . 4 T w o B r a n c h e s o f S o l v e r . . . . . . . . . . . . . . . . . . . . . . . . . . 2 0

    2 . 4 . 1 C o m p l e t e S y s t e m a t i c S e a r c h . . . . . . . . . . . . . . . . . . . 2 1

    2 . 4 . 2 I n c o m p l e t e S t o c h a s t i c L o c a l S e a r c h . . . . . . . . . . . . . . . 2 2

    2 . 4 . 3 O t h e r m e t h o d s . . . . . . . . . . . . . . . . . . . . . . . . . . 2 3

    3 D e s i g n 2 4

    3 . 1 S y s t e m a t i c S o l v e r D e s i g n . . . . . . . . . . . . . . . . . . . . . . . . . 2 4

    3 . 1 . 1 T h e N e e d F o r a N e w M e t h o d . . . . . . . . . . . . . . . . . . 2 4

    3 . 1 . 2 T h e D P L L A l g o r i t h m . . . . . . . . . . . . . . . . . . . . . . . 2 5

    3 . 1 . 3 S e a r c h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 8

    3 . 1 . 4 D e d u c t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1

    3 . 1 . 5 C o n i c t A n a l y s i s . . . . . . . . . . . . . . . . . . . . . . . . . 3 4

    3 . 1 . 6 O t h e r t e c h n i q u e s . . . . . . . . . . . . . . . . . . . . . . . . . 3 7

    3 . 2 S t o c h a s t i c S o l v e r D e s i g n . . . . . . . . . . . . . . . . . . . . . . . . . 3 8

    3 . 2 . 1 A N e w P o w e r f u l M e t h o d . . . . . . . . . . . . . . . . . . . . . 3 8

    3 . 2 . 2 G S A T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 9

    3 . 2 . 3 W a l k S A T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 0

    3 . 2 . 4 V a r i a b l e S e l e c t i o n H e u r i s t i c s . . . . . . . . . . . . . . . . . . . 4 1

    4 I m p l e m e n t a t i o n 4 2

    4 . 1 I m p l e m e n t a t i o n L a n g u a g e s . . . . . . . . . . . . . . . . . . . . . . . . 4 2

    4 . 2 S y s t e m a t i c S e a r c h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3

    4 . 2 . 1 S t a t i c a n d D y n a m i c H e u r i s t i c s . . . . . . . . . . . . . . . . . . 4 3

    4 . 2 . 2 P o i n t e r a n d C o u n t e r B C P . . . . . . . . . . . . . . . . . . . . 4 5

    4 . 2 . 3 L e a r n i n g S c h e m e s . . . . . . . . . . . . . . . . . . . . . . . . . 4 6

    4 . 2 . 4 O t h e r F a c t o r s . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 7

    4 . 3 L o c a l S e a r c h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 8

    4 . 3 . 1 E s c a p i n g L o c a l M a x i m a . . . . . . . . . . . . . . . . . . . . . 4 8

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    7/87

    C o n t e n t s v i i

    4 . 3 . 2 P e r f o r m a n c e T r a d e O . . . . . . . . . . . . . . . . . . . . . . 4 9

    4 . 3 . 3 C o n g u r a t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 9

    5 R e s u l t s a n d E v a l u a t i o n 5 1

    5 . 1 T e s t i n g P r e l i m i n a r i e s . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1

    5 . 1 . 1 S A T - i n s t a n c e s U s e d . . . . . . . . . . . . . . . . . . . . . . . . 5 1

    5 . 1 . 2 S o l v e r s T e s t e d . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2

    5 . 1 . 3 T h e T e s t i n g P l a t f o r m . . . . . . . . . . . . . . . . . . . . . . . 5 4

    5 . 2 R e s u l t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 4

    5 . 3 E v a l u a t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 4

    5 . 3 . 1 D e d u c t i o n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 6

    5 . 3 . 2 H e u r i s t i c s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 7

    5 . 3 . 3 C o n i c t D r i v e n L e a r n i n g . . . . . . . . . . . . . . . . . . . . . 5 8

    5 . 3 . 4 L o c a l S e a r c h . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 0

    5 . 3 . 5 O t h e r O b s e r v a t i o n s . . . . . . . . . . . . . . . . . . . . . . . . 6 1

    6 C o n c l u s i o n s 6 2

    6 . 1 A c h i e v e m e n t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2

    6 . 1 . 1 I m p o r t a n c e o f D e c i s i o n V a r i a b l e s . . . . . . . . . . . . . . . . 6 3

    6 . 1 . 2 E m p h a s i s o n E n g i n e e r i n g . . . . . . . . . . . . . . . . . . . . . 6 3

    6 . 1 . 3 D o m a i n D e p e n d e n t S A T - S o l v i n g . . . . . . . . . . . . . . . . . 6 4

    6 . 2 F u r t h e r S t u d i e s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4

    B i b l i o g r a p h y 6 6

    A p p e n d i x 7 2

    A A d d i t i o n a l I n f o r m a t i o n 7 2

    A . 1 P l a n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2

    A . 2 R e s u l t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    8/87

    L i s t o f F i g u r e s

    1 . 1 T h e s e a r c h s p a c e o f a S A T - i n s t a n c e c a n b e r e p r e s e n t e d a s a b i n a r y t r e e 5

    2 . 1 T h e b i p a r t i t e ( 2 - c o l o u r a b l e ) g r a p h

    G. . . . . . . . . . . . . . . . . . 1 4

    2 . 2 N u m b e r o f D P L L s o l v e r o p e r a t i o n s r e q u i r e d a n d P r o b a b i l i t y o f S a t -

    i s a b i l i t y v s . c l a u s e t o v a r i a b l e r a t i o . . . . . . . . . . . . . . . . . . . 1 6

    2 . 3 A t r e e - l i k e r e s o l u t i o n r e f u t a t i o n o f

    . . . . . . . . . . . . . . . . . . . 1 7

    3 . 1 I t e r a t i v e d e n t i o n o f t h e D P L L a l g o r i t h m . . . . . . . . . . . . . . . . 2 6

    3 . 2 T h e a d j a c e n c y r e l a t i o n s h i p b e t w e e n v a r i a b l e s a n d c l a u s e s . . . . . . . 3 2

    3 . 3 W a t c h e d L i t e r a l c a s e s f o r B C P . . . . . . . . . . . . . . . . . . . . . . 3 4

    3 . 4 A s a m p l e I m p l i c a t i o n G r a p h . . . . . . . . . . . . . . . . . . . . . . . 3 6

    3 . 5 T h e s e a r c h s p a c e o f l o c a l s e a r c h a l g o r i t h m o n a 6 6 v a r i a b l e c l a u s e - s e t . 3 9

    3 . 6 T h e G S A T a l g o r i t h m . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 0

    A . 1 G A N T T C h a r t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3

    v i i i

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    9/87

    L i s t o f T a b l e s

    5 . 1 S e a r c h a n d c o n i c t a n a l y s i s t e s t S A T - i n s t a n c e s . . . . . . . . . . . . . 5 2

    5 . 2 C o m b i n a t i o n s o f d e v e l o p e d D P L L b a s e d S A T - s o l v e r s t o t e s t . . . . . 5 3

    5 . 3 C o m b i n a t i o n s o f d e v e l o p e d L o c a l s e a r c h S A T - s o l v e r s t o t e s t . . . . . 5 4

    A . 1 l e x r e s u l t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2

    A . 2 l e x - l e a r n r e s u l t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4

    A . 3 r a n d r e s u l t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4

    A . 4 d l c s r e s u l t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 4

    A . 5 d l i s r e s u l t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 5

    A . 6 r d l c s r e s u l t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 5

    A . 7 r d l c s - l e a r n r e s u l t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 5

    A . 8 v s i d s r e s u l t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 6

    A . 9 g s a t r e s u l t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 6

    A . 1 0 w a l k s a t r e s u l t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 6

    A . 1 1 g s a t - w e i g h t e d . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 6

    A . 1 2 g s a t - t a b u . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 7

    A . 1 3 B C P t e s t r e s u l t s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 8

    i x

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    10/87

    C h a p t e r 1

    I n t r o d u c t i o n

    T h i s r s t c h a p t e r p r e s e n t s a b r i e f o v e r v i e w o f t h e m o t i v a t i o n s f o r w r i t i n g t h i s p a p e r

    a s w e l l a s o u t l i n i n g t h e s u b s e q u e n t c h a p t e r s . F i r s t l y , t h e r e a d e r i f n o t a q u a i n t e d

    w i t h b a s i c S A T t e r m i n o l o g y w o u l d b e a d v i s e d t o r e a d t h e f o l l o w i n g s e c t i o n t o g a i n

    a b a s i c u n d e r s t a n d i n g o f S A T , i n c l u d i n g s o m e s t a n d a r d n o t a t i o n w h i c h w i l l u s e d

    t h r o u g h o u t t h i s p a p e r .

    1 . 1 P r e l i m i n a r i e s

    A n o v e r v i e w o f e s s e n t i a l b a c k g r o u n d i n f o r m a t i o n i n c l u d i n g ; t h e S A T p r o b l e m d e f -

    i n i t i o n , t h e c o m p l e x i t y o f S A T , e x a m p l e s a n d a n i n s i g h t i n t o t h e S A T r e s e a r c h

    c o m m u n i t y .

    1 . 1 . 1 D e n i t i o n o f S A T

    T h i s s e c t i o n w i l l a s s u m e a n u n d e r s t a n d i n g o f b a s i c p r o p o s i t i o n a l l o g i c a n d s e t -

    t h e o r e t i c a l c o n c e p t s w h i c h w i l l b e u s e d t o g i v e a s u s s i n c t d e n i t i o n o f S A T . L e t

    V = {v1 vn} b e a n a l p h a b e t o f n p r o p o s i t i o n a l B o o l e a n v a r i a b l e s . A p r o p o s i -

    t i o n a l B o o l e a n f o r m u l a

    c a n b e d e n e d a s a c o n j u n c t i o n o f m

    c l a u s e s s u c h t h a t :

    = c1 c2 . . . cn

    1

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    11/87

    1 . 1 . P r e l i m i n a r i e s 2

    w h e r e e a c h ci i s d e n e d a s a d i s j u n c t i o n o f l i t e r a l s s u c h t h a t :

    l1 l2 . . . ln

    w h e r e e a c h lj r e p r e s e n t s a l i t e r a l w h i c h i s e i t h e r a v a r i a b l e , v A , o r i t s n e g a t i o n

    v. T h e f o r m u l a

    i s r e f e r r e d t o a s b e i n g i n c o n j u n c t i v e n o r m a l f o r m ( C N F ) w h i c h i s

    w i d e l y u s e d a s t h e s t a n d a r d i n p u t t o m a n y S A T - s o l v e r s . A n y a r b i t a r y p r o p o s i t i o n a l

    B o o l e a n f o r m u l a c a n b e t r a n s l a t e d i n t o C N F i n p o l y n o m i a l t i m e u s i n g T s e i t i n ' s

    T r a n s l a t i o n a l g o r i t h m [ 1 7 ] w h i c h p r e s e r v e s e q u i s a t i s a b i l i t y

    1

    .

    T o c h e c k w h e t h e r t h e C N F i s s a t i s a b l e , t r u t h v a l u e s h a v e t o b e a s s i g n m e d f o r

    a l lv A . W h e n a v a r i a b l e v i s a s s i g n e d a t r u t h v a l u e , e a c h l i t e r a l w h i c h i s

    e i t h e r a n i n s t a n c e o f a v a r i a b l e o r i t s n e g a t i o n a d o p t s t h e a s s i g n e d t r u t h v a l u e .

    M o r e f o r m a l l y , a t r u t h a s s i g n m e n t ( T A ) o f a v a r i a b l e v

    c a n b e d e n e d a s a f u n c t i o n ,

    t : V {true, f alse}, t h i s f u n c t i o n c a n b e e x t e n d e d t o a t r u t h a s s i g n m e n t o v e r

    i n d i v i d u a l l i t e r a l s s u c h t h a t i f t (v) = true

    t h e n t (v) = false

    a n d i f t (v) = true

    t h e n t (v) = false

    . I fdom (t) V t h e n t h e t r u t h a s s i g n m e n t i s s a i d t o b e p a r t i a l ,

    e l s e i f dom (t) = V

    t h e t r u t h a s s i g n m e n t i s t o t a l . N o t e t h e f o l l o w i n g e q u i v e l a n c e s

    i s s a t i s a b l e i s s a t i s e d b y a p a r t i a l T A i s s a t i s e d b y a t o t a l T A

    A p a r t i a l T A c a n b e e x t e n d e d t o a t o t a l T A b y a s s i g n i n g a r b i t a r y B o o l e a n v a l u e s

    t o u n a s s i g n e d v a r i a b l e s . G i v e n a n y l i t e r a l , i t i s s a i d t o b e s a t i s e d i f a n d o n l y i f i t

    i s a s s i g n e d t h e t r u t h v a l u e true

    . I n t u r n , a c l a u s e i s s a i d t o b e s a t i s e d i f a n d o n l y

    i f a t l e a s t o n e l i t e r a l i n t h e c l a u s e i s s a t i s e d . T h u s , g i v e n t h e n a t u r e o f a l o g i c a l

    c o n j u n c t i o n , a f o r m u l a i s s a i d t o b e s a t i s e d i f a n d o n l y i f e v e r y c l a u s e i s s a t i s e d .

    S o g i v e n t h e p r o p o s i t i o n a l f o r m u l a

    , S A T c a n b e d e n e d a s f o l l o w s ; d o e s t h e r e

    e x i s t a t r u t h a s s i g n m e n t s u c h t h a t

    i s s a t i s e d ? . I f s u c h a n a s s i g n m e n t e x i s t s t h e n

    i s s a t i s a b l e , o t h e r w i s e

    u n s a t i s a b l e .

    A c l a u s e c a n b e r e p r e s e n t e d a s a s e t o f l i t e r a l s w h i c h c a n b e c o n s i d e r e d t o b e

    a n i m p l i c i t d i s j u n c t i o n , s i m i l a r l y , a f o r m u l a i n C N F c a n b e r e s p r e s e n t e d a s a s e t

    1

    T w o p r o p o s i t i o n a l f o r m u l a s a r e e q u i s a t i s a b l e i f e i t h e r b o t h a r e s a t i s a b l e o r b o t h a r e u n s a t -

    i s a b l e .

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    12/87

    1 . 1 . P r e l i m i n a r i e s 3

    o f c l a u s e s w h i c h c a n b e c o n s i d e r e d t o b e a n i m p l i c i t c o n j u n c t i o n . T h i s m e t h o d f o r

    r e p r e s e n t a t i o n u s i n g s e t s i s b e n e c i a l f o r i n p u t t i n g C N F f o r m u l a e i n t o m o d e r n S A T

    s o l v e r s w h i c h g i v e s r i s e t o t h e D I M A C S

    2

    C N F f o r m a t , e x p l a i n e d i n S e c t i o n 1 . 1 . 4 .

    C l a u s e - s e t s a r e e q u i v l a n t t o C N F f o r m u l a s s u c h t h a t

    i s s a t i s a b l e i f a n d o n l y i f

    t h e c l a u s e - s e t r e p r e s e n t i n g

    i s s a t i s a b l e .

    W i t h r e f e r e n c e t o t h e r e p r e s e n t a t i o n o f C N F f o r m l e a u s i n g s e t s , t h e s a t i s a b i l i t y

    o f t h e e m p t y f o r m u l a = c o n t a i n i n g n o c l a u s e s c a n b e t r i v i a l l y d e c l a r e d a s

    s a t i s a b l e ( o r t r u t h f u n c t i o n a l l y v a l i d ) a s t h e n o t i o n o f s a t i s a b i l i t y c l a i m s t h a t a

    s e t o f c l a u s e s i s s a t i s a b l e i f t h e r e i s a t r u t h a s s i g n m e n t f o r

    s u c h t h a t e v e r y c l a u s e

    e v a l u a t e s t o t r u e . H o w e v e r , t h e r e a r e n o c l a u s e s i n

    t h a t n e e d t o b e t r u e , s o

    i s

    s a t i s a b l e . F u r t h e r m o r e , t h e e m p t y c l a u s e r e p r e s e n t e d b y i s u n s a t i s a b l e a s f o r

    a c l a u s e t o b e s a t i s a b l e t h e r e i s r e q u i r e d t o b e a t l e a s t o n e s a t i s e d l i t e r a l , t h u s

    a f o r m u l a c o n t a i n i n g t h e e m p t y c l a u s e i s a l s o u n s a t i s a b l e . T h i s i s t h e b a s i c p r i n -

    c i p l e b e h i n d p r o p o s i t i o n a l r e s o l u t i o n w h i c h i s a p o w e r f u l r u l e o f l o g i c a l i n r e f e r e n c e

    e x p l a i n e d i n C h a p t e r 2 .

    1 . 1 . 2 E x a m p l e

    C o n s i d e r t h e c l a u s e - s e t

    c o n t a i n i n g 5 c l a u s e s a n d 3 v a r i a b l e s s u c h t h a t

    {1 : {x,y, z} , 2 : {x, y} , 3 : {y, z} , 4 : {z, x} , 5 : {x, y, z}}

    A f t e r a b r i e f l o o k i t i s o b v i o u s t h a t

    i s s a t i s a b l e a s t h e f o l l o w i n g p a r t i a l t r u t h

    a s s i g n m e n t c a n b e d e n e d

    t (x) = true, t (z) = true

    a s s i g n i n g

    xt o

    trues a t i s e s c l a u s e s 1 , 2 a n d 4 , a s s i g n i n g

    zt o

    trues a t i s e s c l a u s e s

    3 a n d 5 . A r a n d o m v a l u e c a n b e a s s i g n e d t o y

    i f a t o t a l t r u t h a s s i g n m e n t i s p r e f e r r e d .

    F o r l a r g e r ( a n d h a r d e r ) c l a u s e - s e t s c o n t a i n i n g h u n d r e d s o f c l a u s e s a n d v a r i a b l e s

    i t i s q u i t e e v i d e n t t h a t t h e s i m p l e e x a m i n a t i o n o f a c l a u s e - s e t i s n o t s u c i e n t t o

    2

    T h e C e n t e r f o r D i s c r e t e M a t h s a n d T h e o r e t i c a l C o m p u t e r S c i e n c e .

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    13/87

    1 . 1 . P r e l i m i n a r i e s 4

    d e t e r m i n e s a t i s a b i l i t y . V a r i o u s d e d u c t i o n t e c h n i q u e s h a v e b e e n d e v e l o p e d t o s o l v e

    l a r g e S A T - i n s t a n c e s a n d a n o v e r v i e w o f t h e m w i l l b e i n t r o d u c e d i n C h a p t e r 2 .

    1 . 1 . 3 C o m p l e x i t y

    S t e p h e n C o o k a n d L e o n i d L e v i n b o t h i n d e p e n d e n t l y p r o v e d t h e N P - c o m p l e t e n e s s

    o f S A T i n 1 9 7 1 [ 1 5 , 1 8 ] . I n c o m p u t a t i o n a l c o m p l e x i t y t h e o r y , s o m e o f t h e m o r e

    d i c u l t p r o b l e m s r e s i d e i n t h e c o m p l e x i t y c l a s s N P

    3

    , w h e r e N P - c o m p l e t e i s a s u b s e t

    o f N P t h a t c o n t a i n s t h e h a r d e s t p r o b l e m s i n N P , i . e . t h e y a r e u n l i k e l y t o r e s i d e i n

    t h e c o m p l e x i t y c l a s s P

    4

    w h i c h c o n t a i n s t h e ' e a s i e r ' p r o b l e m s . O n e p r o p e r t y o f N P -

    c o m p l e t e n e s s s t a t e s t h a t e v e r y o t h e r p r o b l e m i n N P i s r e d u c i b l e t o a n N P - c o m p l e t e

    p r o b l e m v i a a p o l y n o m i a l t i m e - r e d u c t i o n a l g o r i t h m , t h i s i m p l i e s t h a t o t h e r p r o b l e m s

    i n N P s u c h a s g r a p h c o l o u r i n g , H a m i l t o n i a n C y c l e a n d C l i q u e c a n b e r e p r e s e n t e d

    a s a S A T p r o b l e m i n C N F . V a r i o u s d o m a i n s p e c i c t r a n s l a t i o n a l g o r i t h m s a l l o w t h e

    c o n v e r s i o n o f a n y p r o b l e m i n N P t o S A T .

    B e i n g N P - c o m p l e t e , t h e r e i s n o t r a c t a b l e a l g o r i t h m f o r s o l v i n g S A T i n r e a s o n a b l e

    t i m e , s o f o r a n y C N F w i t h n

    p r o p o s i t i o n a l v a r i a b l e s t h e r e a r e 2n

    p o s s i b l e t r u t h

    a s s i g n m e n t s . I t i s i n f e a s i b l e t o ' b r u t e - f o r c e ' t h e c o m p l e t e s e a r c h s p a c e o f a S A T

    i n s t a n c e w h e r e n

    l a r g e , t h i s h a s b e e n t h e m o t i v a t i o n f o r d e v e l o p i n g v a r i o u s h e u r i s t i c s

    t o s o l v e t h e p r o b l e m b y p r u n i n g t h e s e a r c h s p a c e , e e e F i g u r e 1 . 1

    5

    .

    R e s t r i c t i o n s o n t h e t y p e o f p r o p o s i t i o n a l B o o l e a n f o r m u l a ( e x p l a i n e d i n C h a p t e r

    2 ) c a n g i v e r i s e t o s p e c i c f o r m u l a t i o n s o f S A T s u c h a s H o r n - S A T [ 1 9 ] a n d k - S A T

    ( w h e r e k = 2

    ) w h i c h c a n b e s o l v e d i n p o l y n o m i a l t i m e [ 2 0 ] . A l t h o u g h c o m p l e x i t y

    a n d w o r s t - c a s e r u n - t i m e o f a p r o b l e m i s a g o o d m e a s u e o f i t s h a r d n e s s s , m a n y S A T -

    s o l v e r s c a n s o l v e S A T - i n s t a n c e s w e l l w i t h i n t h e b o u n d s o f t h e w o r s t c a s e O (2n)

    , t h i s

    3

    N o n - d e t e r m i n i s t i c p o l y n o m i a l t i m e , i m p l y i n g t h a t a n o n - d e t e r m i n i s t i c T u r i n g M a c h i n e c a n

    s o l v e a n N P - c o m p l e t e p r o b l e m i n p o l y n o m i a l t i m e . T h e r e a d e r m u s t b e a w a r e t h a t t h e r e e x i s t s

    n o p r a c t i c a l i m p l e m e n t i o n o f a n o n - d e t e r m i n i s t i c T u r i n g M a c h i n e , t h e y a r e m e e r l y t h e o r e t i c a l

    c o n c e p t s . A n a l t e r n a t i v e d e n i t i o n o f N P s t a t e s t h a t a D e t e r m i n i s t i c T u r i n g m a c h i n e c a n v e r i f y

    t h e v a l i d i t y o f a s o l u t i o n s u c h a s a t r u t h a s s i g n m e n t f o r a p a r t i c u l a r c l a u s e - s e t t o a n N P - c o m p l e t e

    p r o b l e m i n p o l y n o m i a l t i m e .

    4

    D e t e r m i n i s t i c p o l y n o m i a l t i m e , i m p l y i n g t h a t a e t e r m i n i s t i c T u r i n g M a c h i n e c a n s o l v e a p r o b -

    l e m o f c l a s s P i n p o l y n o m i a l t i m e .

    5

    T a k e n f r o m L i n t a o Z h a n g , S e a r c h i n g F o r T r u t h : T e c h n i q u e s f o r S a t i s a b i l i t y o f B o o l e a n F o r -

    m u l a s . P h d T h e s i s , J u n e 2 0 0 3 , P r i n c e t o n U n i v e r s i t y .

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    14/87

    1 . 2 . M o t i v a t i o n 5

    F i g u r e 1 . 1 : T h e s e a r c h s p a c e o f a S A T - i n s t a n c e c a n b e r e p r e s e n t e d a s a b i n a r y t r e e

    g i v e s r i s e t o t h e n o t i o n o f t h e ' h a r d ' a n d ' e a s y ' d i s t r i b u t i o n o f S A T - i n s t a n c e s a l s o

    e x p l a i n e d i n C h a p t e r 2 .

    1 . 1 . 4 D I M A C S

    T h e C e n t e r f o r D i s c r e t e M a t h e m a t i c s a n d T h e o r e t i c a l C o m p u t e r S c i e n c e ( D I M A C S )

    i s a c o l l a b o r a t i o n b e t w e e n R u t g e r s a n d P r i n c e t o n U n i v e r s i t i e s a s w e l l a s a n u m b e r

    o f r e s e a r c h r m s w h o a r e c o m m i t t e d , t o b o t h t h e o r e t i c a l d e v e l o p m e n t a n d p r a c t i c a l

    a p p l i c a t i o n s o f d i s c r e t e m a t h e m a t i c s a n d t h e o r e t i c a l c o m p u t e r s c i e n c e

    6

    . A m a j o r

    c o n t r i b u t i o n t o t h e S A T s o m m u n i t y b y D I M A C S w a s t h e , s u g g e s t e d f o r m a t f o r

    S a t i s a b i l i t y p r o b l e m s , w h i c h d e n e s a s u g g e s t e d i n p u t f o r t o d a y s m o d e r n S A T

    s o l v e r s . D e t a i l s o f t h i s f o r m a t w h i c h w i l l b e u s e d a s t h e i n p u t t o s o l v e r s d e v e l o p e d

    f o r t h i s p a p e r c a n b e s e e n i n [ 1 0 ] .

    1 . 2 M o t i v a t i o n

    R e s e a r c h e r s h a v e b e e n s t u d y i n g S A T - s o l v i n g a l g o r i t h m s f o r m a n y y e a r s s i n c e t h e

    p u b l i c a t i o n o f t h e D a v i d - P u t n a m p r o c e d u r e a n d m u c h p r o g r e s s h a s b e e n m a d e

    6

    D I M A C S , W i k i p e d i a .

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    15/87

    1 . 2 . M o t i v a t i o n 6

    d e v e l o p i n g e e c t i v e t h e o r i e s o n t o w h i c h f u t u r e a l g o r i t h m s w i l l b e b a s e d u p o n . H o w -

    e v e r , o f e q u a l i m p o r t a n c e t o t h e t h e o r y b e h i n d t h e s e a l g o r i t h m s i s t h e w a y i n w h i c h

    t h e y a r e i m p l e m e n t e d , m a k i n g u s e o f s o u n d e n g i n e e r i n g p r o c e d u r e s a n d e m p i r i c a l

    a n a l y s i s w h i c h c a n b e u s e d t o r e n e a n d o p t i m i s e t h e e c i e n c y o f t h e s e a l g o r i t h m s .

    A S A T - s o l v i n g a l g o r i t h m t h a t p e r f o r m s w e l l i n t h e o r y i s n o t a n a d e q u a t e c l a i m

    f o r a S A T r e s e a r c h e r t o p r e s e n t . F o r t h e a l g o r i t h m t o b e o f p r a c t i c a l u s e , a g o o d

    a v e r a g e - c a s e p e r f o r m a n c e o f t h e a l g o r i t h m i s r e q u i r e d w h i c h c a n o n l y b e a c h i e v e d

    t h r o u g h a n e x t e n s i v e e n g i n e e r i n g , t e s t i n g a n d r e n e m e n t l i f e c y c l e .

    S A T - s o l v e r e n g i n e e r i n g i s m a i n l y c o n c e r n e d w i t h t h e i m p l e m e n t i o n o f t h e v a r i o u s

    h e u r i s t i c s a n d d a t a - s t r u c t u r e s w h i c h f o r m t h e c o r e o f m o d e r n S A T - s o l v e r s . S o l v e r s

    u t i l i s i n g p o w e r f u l a l g o r i t h m s w h i c h c l a i m t o q u i c k i l y s o l v e S A T - i n s t a n c e s m a y

    s e e m i m p r e s s i v e w h e n p r e s e n t e d o n p a p e r , h o w e v e r t h e t r u e p o t e n t i a l o f t h e a l g o -

    r i t h m w i l l b e d e m o n s t r a t e d i f t h e y e x c e l i n p r a c t i s e . I n c r e a s e d s o p h i s t i c a t i o n d o e s

    n o t i m p l y a m o r e e c i e n t a l g o r i t h m a n d b e c a u s e o f t h i s r e s e a r c h e r s a r e t r y i n g t o

    s t r i k e a b a l a n c e b e t w e e n c o m p l e x i t y , s i m p l i c i t y a n d e c i e n c y . F o r e x a m p l e , c o m p l e x

    d e c i s i o n s w i l l t a k e l o n g e r t o e x e c u t e t h a n s i m p l e d e c i s i o n s , h o w e v e r d o t h e c o m p l e x

    d e c i s i o n s d e o m o n s t r a t e a p e r f o r m a n c e i n c r e a s e , o r c o n v e r s l e y , a p e r f o r m a n c e l o s s ?

    I t c a n b e s h o w n t h a t s i m p l e S A T - s o l v i n g a l g o r i t h m s c a n b e j u s t a s c o m p e t i t i v e a s

    c o m p l e x s o l v e r s s p o r t i n g t h o u s a n d s o f l i n e s o f s o u r c e c o d e . F o r e x a m p l e , l a t e r o n i n

    t h i s p a p e r a s i m p l e a l g o r i t h m [ 2 3 ] c a n b e p r e s e n t e d w h i c h i s c a p a b l e o f p e r f o r m a n c e

    o n a c e r t a i n c l a s s o f S A T - i n s t a n c e s c o m p a r a b l e t o t h a t o f s t a t e - o f - t h e - a r t S A T -

    s o l v e r s s u c h a s C h a .

    A s p r e v i o u s l y m e n t i o n e d i n S e c t i o n 1 . 1 . 3 , i t i s n o t t h e t h e o r e t i c a l c o m p u t a t i o n a l

    c o m p l e x i t y o f S A T t h a t d e t e r m i n e s i t s h a r d n e s s w h i c h i s w h y S A T - s o l v e r s n e e d t o

    b e c o m p r e h e n s i v e l y t e s t e d o n a w i d e r a n g e o f S A T - i n s t a n c e s . T h i s o u t l i n e s t h e m o -

    t i v a t i o n f o r w r i t i n g t h i s p a p e r ; r e s e a r c h e r s a r e b e g i n n i n g t o b e l i e v e t h a t t h e f u t u r e

    o f S A T r e s e a r c h l i e s i n t h e e n g i n e e r i n g a s p e c t s o f a l g o r i t h m i m p l e m e n t a t i o n , t h o u g h

    o f c o u r s e t h e o r e t i c a l s t u d y i s s t i l l r e q u i r e d . T h i s h a s b e e n r e e c t e d i n r e c e n t r e -

    s e a r c h a s t h e b a s i c D P L L

    7

    a l g o r i t h m ( e x p l a i n e d i n C h a p t e r 2 ) h a s e n ' t c h a n g e d f o r

    7

    T h e D a v i d - P u t n a m - L o v e l a n d - L o g e m a n n p r o c e d u r e w h i c h i s a c o m p l e t e s y s t e m a t i c s e a r c h

    f r a m e w o r k f o r s o l v i n g S A T .

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    16/87

    1 . 3 . O b j e c t i v e s 7

    m a n y y e a r s , h o w e v e r t h e a l g o r i t h m s b a s e d o n D P L L h a v e s h o w n s i g n i c a n t p e r f o r -

    m a n c e i n c r e a s e s t h r o u g h a m e a n s o f e x t e n s i v e e m p i r i c a l a n a l y s i s o f t h e u n d e r l y i n g

    f r a m e w o r k a n d a s a c o n s e q u e n c e i m p r o v i n g t h e o v e r a l l p e r f o r m a n c e o f S A T - s o l v e r s .

    1 . 3 O b j e c t i v e s

    T h i s p a p e r a i m s t o p r e s e n t a t h o r o u g h a n a l y s i s o f m o d e r n S A T s o l v i n g t e c h n i q u e s

    w i t h r e f e r e n c e t o t h e i r p r a c t i c a l e c i e n c y . T h r o u g h e m p i r i c a l a n a l y s i s o f t h e s e

    m o d e r n t e c h n i q u e s , g o o d e n g i n e e r i n g p r a c t i s e w i l l b e i d e n t i e d a n d e x p l a i n e d w i t h

    r e f e r e n c e t o t h e p e r f o r m a n c e o f S A T - s o l v e r s .

    F u r t h e r m o r e i t w i l l b e s h o w n t h a t e n g i n e e r i n g , t e s t i n g a n d r e n e m e n t i s a p o w -

    e r f u l w a y o f d e v e l o p i n g e c i e n t S A T - s o l v e r s a s o p p o s e d t o b e n c h m a r k i n g a l g o r i t h m s

    o n w o r s t - c a s e c o m p l e x i t y . A b o v e a l l , t h i s p a p e r w i l l p r e s e n t a w a l k - t h r o u g h o f S A T -

    s o l v e r d e v e l o p m e n t f r o m t h e D a v i s - P u t n a m p r o c e d u r e u p t o s t a t e - o f - t h e - a r t S A T -

    s o l v e r s s u c h a s C h a , h i g h l i g h t i n g t h e s o l v e r s e v o l u t i o n a r y p r o g r e s s w i t h r e f e r e n c e

    t o e n g i n e e r i n g i s s u e s .

    1 . 3 . 1 P l a n

    T h e r e a d e r i s p o i n t e d t o t h e A p p e n d i x A w h e r e t h e o r i g i n a l p r o j e c t p l a n a n d v a r i o u s

    n e c e s s a r y a m e n d m e n t s a r e l o c a t e d .

    1 . 3 . 2 D e l i v e r a b l e s

    T h e d e l i v e r a b l e s f o r t h i s d i s s e r t a t i o n a r e s p l i t u p i n t o t h r e e s e c t i o n s ; b a s i c , i n t e r m e -

    d i a t e a n d a d v a n c e d o b j e c t i v e s a n d a r e a s f o l l o w s :

    1 . B a s i c o b j e c t i v e s

    ( a ) I m p l e m e n t a b a s i c D P L L s o l v e r a n d t e s t i t s p e r f o r m a n c e o n a r a n g e o f

    S A T i n s t a n c e s .

    ( b ) E x p e r i m e n t w i t h a n d c o m p a r e t h e p e r f o r m a n c e o f s i m p l e v a r i a b l e s e l e c -

    t i o n h e u r i s t i c s .

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    17/87

    1 . 3 . O b j e c t i v e s 8

    ( c ) C o m p a r e t h e p e r f o r m a n c e o f s i m p l e d a t a s t r u c t u r e s f o r t h e D P L L s o l v e r .

    2 . I n t e r m e d i a t e o b j e c t i v e s

    ( a ) I m p l e m e n t a D P L L s o l v e r u s i n g m o r e a d v a n c e d h e u r i s t i c s a n d i m p l e m e n t

    a b a s i c c o n i c t d r i v e n l e a r n i n g p r o c e d u r e .

    ( b ) I m p l e m e n t a b a s i c s t o c h a s t i c l o c a l s e a r c h s o l v e r G S A T a n d W a l k S A T .

    ( c ) C o m p a r e t h e p e r f o r m a n c e o f s t o c h a s t i c l o c a l s e a r c h a n d c o m p l e t e s y s -

    t e m a t i c s e a r c h a l g o r i t h m s .

    ( d ) C o m p a r e t h e p e r f o r m a n c e o f t h e b a s i c a n d m o r e a d v a n c e d D P L L s o l v e r s .

    3 . A d v a n c e d o b j e c t i v e s

    ( a ) I m p l e m e n t a s t a t e - o f - t h e - a r t D P L L s o l v e r u s i n g a d v a n c e d t e c h n i q u e s f o r

    s e a r c h , d e d u c t i o n a n d c o n i c t a n a l y s i s .

    ( b ) I m p l e m e n t a s t a t e - o f - t h e - a r t W a l k S A T s o l v e r u s i n g a d v a n c e d h e u r i s t i c a l

    m e t h o d s f o r v a r i a b l e s e l e c t i o n .

    ( c ) C o m p a r e t h e p e r f o r m a n c e o f b o t h s o l v e r s o n a w i d e r a n g e o f S A T i n -

    s t a n c e s .

    ( d ) C o m p a r e t h e p e r f o r m a n c e o f a l l t h e s o l v e r s i m p l e m e n t e d .

    1 . 3 . 3 R e p o r t s t r u c t u r e

    T h i s p a p e r i s s p l i t u p i n t o 6 m a i n c h a p t e r s , i n c l u d i n g ; I n t r o d u c t i o n ( t h e c u r r e n t

    C h a p t e r ) , L i t e r a t u r e S u r v e y , D e s i g n , I m p l e m e n t a t i o n , R e s u l t s & E v a l u a t i o n a n d

    t h e C o n c l u s i o n .

    C h a p t e r 2 , t h e l i t e r a t u r e s u r v e y r e v i e w s e x i s t i n g c o n t r i b u t i o n s t o t h e S A T c o m -

    m u n i t y a n d w i l l c o v e r t o p i c s s u c h a s d e d u c t i o n m e t h o d s , a l g o r i t h m s , v a r i a t i o n s o f

    t h e S A T p r o b l e m , t h e p r a c t i c a l ' h a r d n e s s ' o f S A T a s w e l l a s o t h e r e s s e n t i a l S A T

    t o p i c s .

    C h a p t e r 3 w i l l c o v e r i n d e t a i l t h e a l g o r i t h m s w h i c h w i l l b e i m p l e m e n t e d , a s w e l l

    a s p r e s e n t i n g a n d e x p l a i n i n g t h e d i e r e n c e s b e t w e e n t h e m .

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    18/87

    1 . 3 . O b j e c t i v e s 9

    C h a p t e r 4 c o v e r s i m p l e m e n t a t i o n i s s u e s o f t h e s o l v e r s s u c h a s d a t a s t r u c t u r e a n d

    a l g o r i t h m o p t i m i s a t i o n .

    C h a p t e r 5 c o v e r s t h e e m p i r i c a l a n a l y s i s o f t h e s o l v e r s , e a c h o f t h e w h i c h w i l l b e

    t e s t e d a n d t h e i r p e r f o r m a n c e s w i l l b e c r i t i c a l l y a n a l y z e d .

    C h a p t e r 6 w i l l p r e s e n t t h e c o n c l u s i o n s o f t h i s p a p e r a n d i f p o s s i b l e , c h a n g e s w i l l

    b e s u g g e s t e d f o r e x i s t i n g a l g o r i t h m s w h i c h m a y e n h a n c e p e r f o r m a n c e .

    T h e b i b l i o g r a p h y a n d a p p e n d i x w i l l f o l l o w .

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    19/87

    C h a p t e r 2

    L i t e r a t u r e S u r v e y

    T h i s c h a p t e r w i l l r e v i e w e x i s t i n g c o n t r i b u t i o n s t o t h e S A T r e s e a r c h c o m m u n i t y a n d

    e x p l a i n t h e i r r e l e v a n c e t o t h e o b j e c t i v e o f t h i s p a p e r . T h e m a i n t o p i c s t h a t w i l l b e

    c o v e r e d i n c l u d e e x i s t i n g t y p e s o f S A T a l g o r i t h m s a n d t h e i r u n d e r l y i n g d e d u c t i o n

    m e t h o d s a s w e l l a s t y p e s a n d v a r i a t i o n s o f S A T i n s t a n c e s .

    2 . 1 V a r i a t i o n s o f S A T

    V a r i o u s r e s t r i c t i o n s c a n b e p l a c e d u p o n S A T - i n s t a n c e s g e n e r a t i n g s u b s e t s i n t e r m s

    o f c o m p l e x i t y o f t h e S A T p r o b l e m s u c h a s k - S A T a n d H o r n - S A T . F o r t h e m o s t

    p a r t o f t h i s p a p e r r a n d o m l y g e n e r a t e d 3 - S A T i n s t a n c e s ( e x p l a i n e d b e l o w ) a n d c l a s s i c

    c o m p u t e r s c i e n c e p r o b l e m s ( s u c h a s P i g e o n H o l e a n d G r a p h c o l o u r i n g r e d u c e d t o a

    S A T p r o b l e m ) w i l l b e c o n s i d e r e d f o r t e s t i n g p u r p o s e s .

    2 . 1 . 1 k - S A T

    T h e m o s t c o m m o n v a r i a t i o n o f S A T i s k - S A T . W i t h k - S A T , c l a u s e s a r e r e s t r i c t e d t o

    a m a x i m u m o f k

    l i t e r a l s p e r c l a u s e , t h o u g h m o s t o f t h e t i m e a l l t h e c l a u s e s i n m o s t k -

    S A T i n s t a n c e s w i l l c o n t a i n e x a c t l y

    kl i t e r a l s . k - S A T i n s t a n c e s c a n b e g e n e r a t e d f r o m

    g e n e r a l S A T - i n s t a n c e s b y u s i n g e x t e n t i o n v a r i a b l e s

    1

    o r r a n d o m l y g e n e r a t e d u s i n g a n

    a l g o r i t h m . k - S A T i n s t a n c e s w h e r e k = 3

    a r e m a i n l y u s e d t o b e n c h m a r k S A T - s o l v e r s

    1

    U s i n g e x t e n t i o n v a r i a b l e s e n a b l e s t o t r a n s f o r m c l a u s e - s e t s w i t h a r b i t a r y w i d t h c l a u s e s i n t o a

    k - S A T c l a u s e - s e t .

    1 0

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    20/87

    2 . 1 . V a r i a t i o n s o f S A T 1 1

    a s i t i s e a s y t o g e n e r a t e c l a u s e - s e t s w i t h a d e s i r e d ' h a r d n e s s ' w h i l s t s t a y i n g w i t h i n

    t h e b o u n d s o f N P - c o m p l e t e n e s s . A s j u s t s t a t e d , 3 - S A T i s i n t e r e s t i n g b e c a u s e i t i s

    N P - C o m p l e t e , 2 - S A T f o r e x a m p l e i s n o t N P - c o m p l e t e , i t i s i n f a c t P - c o m p l e t e

    2

    a n d

    c a n b e s o l v e d u s i n g A s p v a l l ' s a l g o r i t h m b y c o n v e r t i n g t h e 2 - S A T - i n s t a n c e i n t o a

    g r a p h a n d t h e n p r o c e e d t o s e a r c h f o r p a i r s o f s t r o n g l y c o n n e c t e d c o m p o n e n t s ( S C C )

    f r o m e a c h l i t e r a l l

    t o i t s n e g a t i o n l

    . I f t h e r e e x i s t s S S C f r o m a l i t e r a l l

    t o i t s n e g a t i o n

    lt h e n t h e i n s t a n c e c a n b e d e c l a r e d u n s a t i s a b l e , o t h e r w i s e a t r u t h a s s i g n m e n t c a n

    b e g e n e r a t e d f r o m t h e g r a p h

    3

    .

    2 . 1 . 2 H o r n - S A T

    4

    A c l a u s e i s c o n s i d e r e d t o b e H o r n i f i t c o n t a i n s a t m o s t o n e p o s i t i v e l i t e r a l . A c l a u s e

    i s c a l l e d d i n i t i v e H o r n i f i t c o n t a i n s e x a c t l y o n e p o s i t i v e l i t e r a l . A c l a u s e - s e t i s

    c a l l e d ( d e n i t i v e ) H o r n i f i t c o n t a i n s o n l y ( d e n i t i v e ) H o r n c l a u s e s . F o r e x a m p l e

    {x, y, z}i s a h o r n c l a u s e , h o w e v e r

    {x, y, z}i s n o t . T h e f o l l o w i n g i s a n e x a m p l e o f a

    ( d e n i t i v e ) H o r n c l a u s e - s e t :

    {{x, y} , {x, y} , {x, y, z} , {x, z}}

    A s e a c h c l a u s e m a y o n l y c o n t a i n u p t o o n e p o s i t i v e l i t e r a l , t h e c l a u s e - s e t c a n b e

    r e - w r i t t e n a s a s e r i e s o f i m p l i c a t i o n s

    {{y x} , {x y} , {y z x} , {x z}}

    s u c h t h a t t h e t r u t h v a l u e s o f a l l t h e n e g a t i v e l i t e r a l s , i m p l i e s t h e t r u t h v a l u e o f

    t h e s i n g u l a r p o s i t i v e l i t e r a l . F o r e x a m p l e , i f a c l a u s e c o n t a i n s n o n e g a t i v e l i t e r a l s

    t h e n t h e s i n g l e p o s i t i v e l i t e r a l m u s t b e a s s i g n e d t o true

    . I f t h e r e a r e n o p o s i t i v e

    l i t e r a l s p r e s e n t i n a H o r n c l a u s e - s e t t h e n t r i v i a l l y , e v e r y v a r i a b l e c a n b e a s s i g n e d t o

    false, t h u s s a t i s f y i n g t h e c l a u s e - s e t .

    2

    T h e s e t P - c o m p l e t e c o n t a i n s t h e h a r d e s t p r o b l e m s i n P a n d i s a n a l o g o u s t o t h e s e t o f N P -

    c o m p l e t e p r o b l e m s .

    3

    A A I - A R l e c t u r e n o t e s b y S t e f a n S z e i d e r , D u r h a m U n i v e r s i r t y .

    4

    i b i d .

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    21/87

    2 . 2 . S A T i n s t a n c e s 1 2

    2 . 2 S A T i n s t a n c e s

    F o r t h i s p a p e r , r a n d o m 3 - S A T i n s t a n c e s a n d v a r i o u s N P - h a r d p r o b l e m s ( s u c h a s

    P i g e o n h o l e a n d G r a p h C o l o u r i n g ) w i l l b e r e d u c e d t o S A T f o r t e s t i n g p u r p o s e s .

    2 . 2 . 1 P o l y n o m i a l T i m e R e d u c t i o n s

    A p o l y n o m i a l - t i m e r e d u c t i o n A R B w h e r e A, B N P i s a n a l g o r i t h m t h a t

    t r a n s f o r m s a n i n s t a n c e o f p r o b l e m A

    i n t o a n i n s t a n c e o f p r o b l e m B

    , a s t h e n a m e o f

    t h e r e d u c t i o n s u g g e s t s , t h i s i s d o n e i n p o l y n o m i a l t i m e . S o , f o r e v e r y p r o b l e m i n N P

    i t i s p o s s i b l e t o r e p r e s e n t i t a s a S A T p r o b l e m , t h i s i s u s e f u l f o r t e s t i n g t h e a b i l i t y

    o f S A T - s o l v e r s .

    A s m a n y d o m a i n s p e c i c a l g o r i t h m s a r e d e v e l o p e d t o s o l v e N P - c o m p l e t e p r o b -

    l e m s w h i c h m a k e g o o d u s e o f c o m m o n s t r u c t u r e s i n p r o b l e m i n s t a n c e s i t i s u n l i k e l y

    t h a t e v e n t h e m o s t e c i e n t S A T - s o l v e r s w o u l d b e a b l e t o c o m p e t e . I n a s e n s e , i t i s

    p r a c t i c a l l y p o i n t l e s s i n r e d u c i n g p r o b l e m s t o S A T i n o r d e r t o s o l v e t h e m w i t h a S A T -

    s o l v e r . O n e m u s t a l s o a p p r e c i a t e t h a t t h e t r u t h a s s i g n m e n t o f a p r o b l e m r e d u c e d t o

    S A T m u s t b e i n t e r p r e t e d t o c o r r e s p o n d t o a s o l u t i o n t o t h e o r i g i n a l p r o b l e m .

    P i g e o n H o l e c l a u s e s e t s c a n b e g e n e r a t e d i n t h e f o l l o w i n g w a y

    5

    . F o r n N, l e t

    P Hn b e t h e c l a u s e s e t t h a t r e p r e s e n t s t h e u n t r u e s t a t e m e n t t h a t n + 1 p i g e o n s c a n

    b e t t e d i n t o n

    h o l e s s u c h t h a t e a c h h o l e c o n t a i n s o n l y o n e p i g e o n . T h e c l a u s e - s e t

    P Hn c o n t a i n s t h e v a r i a b l e s xi,j f o r 1 i n + 1 a n d 1 j n w h e r e xi,j i s t r u e i f

    p i g e o n i

    i s i n h o l e j

    . T h e c l a u s e - s e t c o n t a i n s t w o t y p e s o f c l a u s e s :

    A c l a u s e {xi,1, . . . , xi,n} f o r e a c h 1 i n + 1 w h i c h r e p r e s e n t s t h a t p i g e o n i

    i s i n o n e o f t h e n

    h o l e s .

    A c l a u s e

    xi,j, xi ,j

    f o r e a c h

    1 i < i

    n+1a n d

    1 j nw h i c h r e p r e s e n t s

    t h a t i n e a c h h o l e t h e r e i s a t m o s t o n e p i g e o n .

    I t s h o u l d b e o b s e r v e d t h a t P Hn i s u n s a t i s a b l e , i n f a c t i t c a n b e p r o v e d t h a t p i -

    g e o n h o l e c l a u s e - s e t s r e q u i r e l o n g r e s o l u t i o n r e f u t a t i o n s , i . e . t h e s h o r t e s t r e s o l u t i o n

    5

    A d a p t e d f r o m A A I - A R l e c t u r e n o t e s b y S t e f a n S z e i d e r , D u r h a m U n i v e r s i r t y .

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    22/87

    2 . 2 . S A T i n s t a n c e s 1 3

    r e f u t a t i o n o f a p i g e o n h o l e c l a u s e - s e t c o n t a i n s 2(n)

    c l a u s e s [ 2 1 ] . A l t e r n a t i v e l y a r e s -

    o l u t i o n r e f u t a t i o n c a n b e v i e w e d a s s h o r t i f t h e n u m b e r o f c l a u s e s i n t h e r e f u t a t i o n

    a r e p o l y n o m i a l i n t h e s i z e o f t h e i n p u t c l a u s e s . T h e P i g e o n H o l e c l a u s e - s e t P H2 c a n

    b e r e p r e s e n t e d b y t h e f o l l o w i n g c l a u s e s :

    {x1,1, x1,2} {x2,1, x2,2} {x3,1, x3,2}

    {x1,1, x2,1} {x1,1, x3,1} {x2,1, x3,1}

    {x1,2, x2,2} {x1,2, x3,2} {x2,2, x3,2}

    S u D o k u t h e p o p u l a r c o n s t r a i n t s a t i s f a c t i o n p u z z l e w h i c h i s f o u n d i n n e w s p a p e r s

    w o r l d w i d e c a n b e r e p r e s e n t e d a s S A T . A m o r e d e t a i l e d e x p l a n a t i o n c a n b e f o u n d i n

    [ 2 2 ] . T r a d i t i o n a l 9 9 g r i d s d o n o t p r o v e d i c u l t f o r e c i e n t S A T s o l v e r s , h o w e v e r

    t h e p r o b l e m c a n b e a b s t r a c t e d t o m u c h l a r g e r g r i d s .

    G r a p h C o l o u r i n g c a n b e e a s i l y r e d u c e d t o S A T . G i v e n a g r a p h G = (V, E)

    ,

    w h e r e

    Vi s t h e s e t o f v e r t i c i e s a n d

    Ei s t h e s e t o f e d g e s , a k - c o l o u r i n g o f

    Gf o r s o m e

    k N i s a f u n c t i o n f : G (V) {1, 2,...,k} w h i c h a s s i g n s a c o l o u r t o e a c h v e r t e x

    v G (V) s u c h t h a t a d j a c e n t v e r t i c i e s d o n o t g e t a s s i g n e d t h e s a m e c o l o u r , i . e . f o r

    e v e r y e d g e uv G (E) , f(v) = f(u). I f t h e r e i s a k - c o l o u r i n g f o r G, t h e n G i s

    r e f e r e d t o a s k - c o l o u r a b l e . T o r e d u c e g r a p h c o l o u r i n g t o S A T , i t w o u l d b e p r u d e n t

    t o f o l l o w t h e a b o v e e x a m p l e o f P i g e o n h o l e c l a u s e - s e t s i n t h a t :

    F o r v G (V) a n d c {1, 2,...,k} t h e v a r i a b l e xv,c r e p r e s e n t s , t h e p o s s i b i l i t y

    t h a t v e r t e x v

    i s a s s i g n e d c o l o u r c

    .

    A c l a u s e {{xv,c : c {1, 2,...,k}} , v G (V)} r e p r e s e n t s t h a t e a c h v e r t e x g e t s

    a s s i g n e d a c o l o u r .

    A c l a u s e {{xv,c, xu,c} : c {1, 2,...,k} , uv G (E)} r e p r e s e n t s t h a t a d j a c e n t

    v e r t i c i e s d o n o t g e t a s s i g n e d t h e s a m e c o l o u r .

    T h e b i p a r t i t e g r a p h G

    ( s h o w n i n F i g u r e 2 . 1 ) f o r e x a m p l e i s 2 - c o l o u r a b l e , i t i s r e p r e -

    s e n t e d a s a S A T - i n s t a n c e b y t h e f o l l o w i n g c l a u s e s f o r w h i c h t h e r e a r e t w o s a t i s f y i n g

    a s s i g n m e n t s :

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    23/87

    2 . 2 . S A T i n s t a n c e s 1 4

    F i g u r e 2 . 1 : T h e b i p a r t i t e ( 2 - c o l o u r a b l e ) g r a p h G

    {x1,1, x1,2} {x2,1, x2,2} {x3,1, x3,2} {x4,1, x4,2}

    {x1,1, x2,1} {x1,2, x2,2} {x2,1, x3,1} {x2,2, x3,2}

    {x3,1, x4,1} {x3,2, x4,2} {x4,1, x1,1} {x4,2, x1,2}

    A s c a n b e s e e n b y t h e a b o v e c l a u s e - s e t , r e d u c i n g a k - c o l o u r a b i l i t y p r o b l e m t o

    S A T r e s u l t s i n a k - S A T c l a u s e - s e t .

    T o e v a l u a t e t h e S A T - s o l v e r s p r o d u c e d f o r t h i s p a p e r , o t h e r i n s t a n c e s m a y b e

    u s e d s u c h a s n Q u e e n s , T o w e r s o f H a n o i a n d P a r i t y

    6

    .

    2 . 2 . 2 R a n d o m G e n e r a t i o n

    I n o r d e r t o t e s t t h e e c i e n y o f a S A T - s o l v e r , a r e l i a b l e b e n c h m a r k i s n e e d e d , t h i s

    e n t a i l s t h e u s e o f N P - h a r d p r o b l e m s r e d u c e d t o S A T ( a b o v e ) , o r t h e c r e a t i o n o f

    r a n d o m k - S A T i n s t a n c e s , s p e c i c a l l y r a n d o m 3 - S A T . T h e r e a r e a n u m b e r o f c r e a t i o n

    a l g o r i t h m s a v a i l a b l e , t h e s i m p l i s t o f w h i c h i s t h e f o l l o w i n g :

    1 . S p e c i f y n

    v a r i a b l e s a n d m

    c l a u s e s t o c r e a t e .

    2 . F o r e a c h ( 3 - S A T ) c l a u s e r a n d o m l y s e l e c t a s e t o f t h r e e v a r i a b l e s f r o m t h e p o o l

    o fn

    v a r i a b l e s .

    3 . R a n d o m l y s e l e c t a t r u t h a s s i g n m e n t f o r e a c h v a r i a b l e w i t h p r o b a b i l i t y 0 . 5 .

    O t h e r a l g o r i t h m s i n c l u d e [ 2 7 , 2 8 ] . T h e i m p o r t a n c e o f k n o w i n g t h e ' h a r d n e s s ' o f

    t h e i n s t a n c e s g e n e r a t e d i s p a r a m o u n t i f t h e y t o b e u s e d f o r t e s t i n g a S A T - s o l v e r a s

    6

    h t t p : / / w w w . i n t e l l e k t i k . i n f o r m a t i k . t u - d a r m s t a d t . d e / S A T L I B / b e n c h m . h t m l

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    24/87

    2 . 2 . S A T i n s t a n c e s 1 5

    t h e r e i s l i t t l e p o i n t i n b e n c h - m a r k i n g a s o l v e r w i t h n o k n o w l e d g e a b o u t t h e i n s t a n c e s

    u s e d .

    2 . 2 . 3 H a r d V s E a s y I n s t a n c e s

    A s p r e v i o u s l y s t a t e d , i n d e p e n d e n t l y o f t h e w o r s t - c a s e c o m p u t a t i o n a l c o m p l e x i t y o f

    S A T t h e r e e x i s t s h a r d a n d e a s y i n s t a n c e s o f t h e p r o b l e m . F o r e x a m p l e , s o m e S A T -

    i n s t a n c e s c a n b e s o l v e d q u i c k i l y , e v e n w i t h a n i a v e a l g o r i t h m [ 2 3 ] . S i m i l a r l y , s o m e

    i n s t a n c e s a r e e a s y f o r a p a r t i c u l a r t y p e o f a l g o r i t h m , i . e . l o c a l s e a r c h p e r f o r m s v e r y

    w e l l o n r a n d o m 3 - S A T i n s t a n c e s [ 1 , 3 ] .

    T h e f o r m a l i s a t i o n o f a h a r d S A T - i n s t a n c e i s h a r d t o d e n e a s t h e m a n y d i e r e n t

    t y p e s o f S A T - s o l v e r p e r f o r m w e l l o n p a r t i c u l a r i n s t a n c e s , a l s o d o m a i n e n h a n c e m e n t s

    c a n i n c r e a s e a s o l v e r s p e r f o r m a n c e o n a p a r t i c u l a r i n s t a n c e . R e s e a r c h e r s h a v e t u r n e d

    t o u s i n g S A T - i n s t a n c e s t h a t t h e y c a n e a s i l y g a u g e t h e d i c u l y o f , t h i s e n t a i l s u s i n g

    r a n d o m l y g e n e r a t e d 3 - S A T o r i n s t a n c e s g e n e r a t e d f r o m c o n g u r a b l e a l g o r i t h m s .

    G e n e r a l l y , t h e f o l l o w i n g a s s u m p t i o n c a n b e m a d e r e g a r d i n g a r a n d o m 3 - S A T

    c l a u s e - s e t w i t h a x e d n u m b e r o f k

    v a r i a b l e s :

    S h o r t c l a u s e - s e t s , t h a t c o n t a i n f e w e r c l a u s e s , a r e u n d e r - c o n s t r a i n e d a n d t h e r e -

    f o r e h a v e m a n y s a t i s f y i n g a s s i g n m e n t s , s o a n a s s i g n m e n t i s l i k e l y t o b e f o u n d

    e a r l y o n i n t h e s e a r c h .

    L o n g e r c l a u s e - s e t s a r e o v e r - c o n s t r a i n e d t h e r e f o r e a r e m o s t l i k e l y u n s a t i s a b l e ,

    s o a c o n t r a d i c t i o n w i l l b e f o u n d e a s i l y .

    I n s t a n c e s i n b e t w e e n a r e c o n s i d e r e d m u c h h a r d e r a s t h e y c o n t a i n f e w s a t i s f y i n g

    a s s i g n m e n t s a n d t o n d a c o n t r a d i c t i o n m a n y v a r i a b l e s w i l l b e h a v e t o a s s i g n e d

    t r u t h v a l u e s .

    I t h a s b e e n f o u n d t h r o u g h e m p i r i c a l a n a l y s i s t h a t t h e h a r d e s t 3 - S A T i n s t a n c e s o c c u r

    w h e n t h e r e i s a r a t i o o f 4 . 3 c l a u s e s t o e a c h v a r i a b l e . T h e y a r e a l s o h a r d e r w h e n t h e r e

    i s a 5 0 % c h a n c e t h a t t h e i n s t a n c e i s s a t i s a b l e b e c a u s e t h e s o l v e r h a s t o d o m o r e

    w o r k t o d e d u c e a s a t i s a b l e o r u n s a t i s a b l e s o l u t i o n ( w i t h r e f e r e n c e t o t h e p o i n t s

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    25/87

    2 . 3 . D e d u c t i o n m e t h o d s 1 6

    F i g u r e 2 . 2 : N u m b e r o f D P L L s o l v e r o p e r a t i o n s r e q u i r e d a n d P r o b a b i l i t y o f S a t i s -

    a b i l i t y v s . c l a u s e t o v a r i a b l e r a t i o .

    l i s t e d a b o v e ) , s e e F i g u r e 2 . 2

    7

    [ 1 2 , 2 5 ] .

    I t i s i m p o r t a n t t o u s e t h e a b o v e n d i n g s w h e n c h o s i n g S A T - i n s t a n c e s t o p e r f o r m -

    i n g e m p i r i c a l a n a l y s i s o n n e w S A T - s o l v e r s a s i t u n p r o f e s s i o n a l a n d u n p r o d u c t i v e t o

    ( u n k n o w i n g l y ) m a k e c l a i m s a b o u t t h e a v e r a g e c a s e p e r f o r m a n c e o f a s o l v e r o n a

    r a n g e o f e a s y S A T - i n s t a n c e s . F o r e x a m p l e , t a k e n f r o m S e l m a n e t a l . [ 3 ] c l a i m s

    m a d e b y G o l d b e r g ( t h a t S A T c o u l d b e s o l v e d o n a v e r a g e i n p o l y n o m i a l t i m e ) i n

    [ 3 0 ] w e r e s h o w n t o b e f a l s e b y F r a n c o a n d P a u l l i n [ 3 1 ] .

    2 . 3 D e d u c t i o n m e t h o d s

    V a r i o u s d e d u c t i o n m e t h o d s c a n b e u s e d a n d c o m b i n e d t o s o l v e S A T - i n s t a n c e s . T h e y

    c a n a l s o b e i n t e g r a t e d w i t h s y s t e m a t i c s e a r c h a l g o r i t h m s , f o r e x a m p l e t h e D P L L

    a l g o r i t h m i s b a s i c a l l y a d e p t h - r s t - s e a r c h w i t h u n i t r e s o l u t i o n . T h e f o l l o w i n g s e c t i o n

    7

    T a k e n f r o m [ 2 5 ] .

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    26/87

    2 . 3 . D e d u c t i o n m e t h o d s 1 7

    F i g u r e 2 . 3 : A t r e e - l i k e r e s o l u t i o n r e f u t a t i o n o f

    .

    r e v i e w s e x i s t i n g d e d u c t i o n m e t h o d s f o r p r o p o s i t i o n a l c l a u s e - s e t s .

    2 . 3 . 1 R e s o l u t i o n

    8

    R e s o l u t i o n i s a b a s i c i n r e f e r e n c e r u l e i n p r o p o s i t i o n a l l o g i c w h i c h s t a t e s t h a t g i v e n

    a c l a u s e - s e t

    a n d a n y t w o c l a u s e s A, B , w i t h a l i t e r a l x A a n d x B i t i s

    p o s s i b l e t o d e r v i e t h e c l a u s e C = A {x} B {x}, i n o t h e r w o r d s :

    (x y1 . . . yn) (x z1 . . . zm)

    (y1 . . . yn z1 . . . zm)

    I t c a n b e s a i d t h a t t h e ( r e s o l v e n t ) c l a u s e

    Cw a s d e r i v e d b y r e s o l u t i o n f r o m

    ,

    h e n c e i f t h e r e e x i s t s a r e s o l u t i o n d e r i v a t i o n f r o m

    t h a t c o n t a i n s C

    t h e n R C.

    I f R t h e n c a n b e d e c l a r e d a s u n s a t i s a b l e . A r e s o l u t i o n d e r i v a t i o n t h a t

    c o n t a i n s i s c a l l e d a r e s o l u t i o n r e f u t a t i o n , a r e s o l u t i o n r e f u t a t i o n i s s a i d t o b e t r e e -

    l i k e i f e v e r y c l a u s e i n t h e r e f u t a t i o n o c c u r s e x a c t l y o n c e , i . e . n o c l a u s e s a r e r e - u s e d

    f o r f u t u r e d e r i v a t i o n s . F o r e x a m p l e , t a k i n g t h e c l a u s e - s e t

    s u c h t h a t :

    {{x, y} , {x, y} , {x, y} , {x, y}}

    I t c a n b e s h o w n t h a t

    i s u n s a t i s a b l e t h r o u g h r e s o l u i o n , i n t h a t R w h i c h i s

    s h o w n i n F i g u r e 2 . 3 .

    8

    A d a p t e d f r o m A A I - A R l e c t u r e n o t e s b y S t e f a n S z e i d e r , D u r h a m U n i v e r s i r t y .

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    27/87

    2 . 3 . D e d u c t i o n m e t h o d s 1 8

    2 . 3 . 2 U n i t r e s o l u t i o n

    O f t e n c a l l e d u n i t p r o p a g a t i o n f o r r e a s o n s e x p l a i n e d b e l o w , u n i t r e s o l u t i o n c a n b e

    a p p l i e d t o a c l a u s e - s e t w h i c h c o n t a i n s a u n i t c l a u s e .

    U n i t c l a u s e s a r e c l a u s e s o f c a r d i n a l i t y 1 . F o r t h e u n i t c l a u s e t o b e s a t i s a b l e ,

    t h e s i n g l e l i t e r a l w i t h i n t h e u n i t c l a u s e m u s t b e s a t i s e d , t h u s i t c a n b e a s s i g n e d a

    t r u t h v a l u e w h i c h m u s t b e i n c l u d e d i n a s a t i s f y i n g a s s i g n m e n t .

    I m p l i e d c l a u s e s a r e c l a u s e s o f c a r d i n a l i t y n

    t h a t c o n t a i n n 1 u n s a t i s e d

    l i t e r a l s , t h u s t h e o n l y u n a s s i g n e d l i t e r a l m u s t a s s i g n e d a t r u t h v a l u e t h a t s a t i s e s

    t h e c l a u s e .

    C o n i c t c l a u s e s a r e c l a u s e s o f c a r d i n a l i t y n t h a t c o n t a i n n u n s a t i s e d l i t e r a l s .

    I f a c o n i c t c l a u s e o c c u r s t h e n t h e c u r r e n t t r u t h a s s i g n m e n t w h e t h e r p a r t i a l o r

    t o t a l d o e s n o t s a t i s f y t h e c l a u s e - s e t .

    G i v e n a c l a u s e - s e t

    t h a t c o n t a i n s t h e u n i t c l a u s e {x} e v e r y s a t i s f y i n g t r u t h

    a s s i g n m e n t o f

    m u s t c o n t a i n t (x) = true

    . H e n c e t h e c l a u s e - s e t [t]

    ( w h e r e t

    i s

    a ( p a r t i a l ) t r u t h a s s i g n m e n t ) c a n b e o b t a i n e d b y u n i t r e s o l u t i o n s u c h t h a t e v e r y

    c l a u s e c o n t a i n i n g t h e l i t e r a l x

    c a n b e r e m o v e d a n d t h e l i t e r a l x

    c a n b e r e m o v e d f r o m

    a l l r e m a i n i n g c l a u s e s . I t s h o u l d b e n o t e d t h a t i s s a t i s a b l e i f a n d o n l y i f [t] i s

    s a t i s a b l e . I n o t h e r w o r d s :

    (x y1 . . . yn) x

    (y1 . . . yn)

    F o r e x a m p l e t h e f o l l o w i n g c l a u s e - s e t

    c a n b e s h o w n t o b e u n s a t i s a b l e t h r o u g h

    u n i t r e s o l u t i o n :

    = {{x, y} , {x, y} , {x, y} , {x, y} , {x}}

    I d e n t i f y t h e u n i t c l a u s e {x} a n d p e r f o r m u n i t r e s o l u t i o n o n x:

    [x = true] = {{y} , {y}}

    I d e n t i f y t h e e i t h e r t h e u n i t c l a u s e {y}

    o r{y}

    a n d p e r f o r m u n i t r e s o l u t i o n o n

    y

    o r

    y:

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    28/87

    2 . 3 . D e d u c t i o n m e t h o d s 1 9

    [x = true, y = true/false] = {}

    U n i t p r o p a g a t i o n i s n a m e d s o b e c a u s e a s c a n b e s e e n i n t h e a b o v e e x a m p l e ,

    t h r o u g h o n e a p p l i c a t i o n o f u n i t r e s o l u t i o n t h e r e s t o f t h e v a r i a b l e a s s i g n m e n t s w i l l

    b e p r o p a g a t e d i n a r i p p l e e e c t a s i m p l i e d c l a u s e s a r e g e n e r a t e d f o r c i n g t h e t r u t h

    a s s i g n m e n t o f t h e o t h e r v a r i a b l e s u n t i l n o m o r e u n i t c l a u s e s . T h i s d e n e s t h e

    u n i t p r o p a g a t i o n p r o c e d u r e w h i c h f o r m s t h e t h e o r e t i c a l b a s i s f o r a l l D P L L t y p e

    S A T - s o l v e r s .

    2 . 3 . 3 S u b s u m p t i o n

    9

    G i v e n t w o c l a u s e s A

    a n dB

    a n d i f A B t h e n i t c a n b e s a i d t h a t A s u b s u m e s

    Ba n d t h a t

    Bi s s u b s u m e d b y

    A. G i v e n a p r o p o s i t i o n a l c l a u s e - s e t

    s u c h t h a t

    A, B a n d A s u b s u m e s B t h e n t h e c l a u s e - s e t

    = B i s s a t i s a b l e i f a n d

    o n l y i f

    i s s a t i s a b l e . T h e i n t u i t i o n b e h i n d s u b s u m p t i o n i s t h a t i f t h e r e i s a t r u t h

    a s s i g n m e n t t h a t s a t i s e s t h e l a r g e r c l a u s e B

    t h e n t h e t r u t h a s s i g n m e n t t h a t s a t i s e s

    Ai s c o n t a i n e d w i t h i n t h e t r u t h a s s i g n m e n t t h a t s a t u s e s

    B.

    S u b s u m p t i o n i s o f t e n u s e d t o s i m p i f y c l a u s e - s e t s i n b e t w e e n t h e a p p l i c a t i o n o f

    r e s o l u t i o n o r u n i t p r o p a g a t i o n .

    2 . 3 . 4 P u r i c a t i o n

    G i v e n a c l a u s e - s e t

    a n d s u p p o s e a l i t e r a l l

    a p p e a r s i n s o m e c l a u s e s o f

    a n d t h e

    c o m p l e m e n t o f l

    a p p e a r s i n n o c l a u s e s o f

    , t h e n t h e l i t e r a l l

    c a n b e s a i d t o b e

    p u r e a n d t h e c l a u s e - s e t [t] ( w h e r e t i s a ( p a r t i a l ) t r u t h a s s i g n m e n t i n c l u d i n g a n

    a s s i g n m e n t t o t h e p u r e l i t e r a l ) c a n b e o b t a i n e d b y r e m o v i n g e v e r y c l a u s e f r o m

    w h i c h c o n t a i n s l

    . T h e i d e a b e h i n d p u r e l i t e r a l e l i m i n a t i o n i s t h a t i f a l i t e r a l o n l y

    a p p e a r s i n o n e p h a s e i t c a n b e a s s i g n e d a t r u t h v a l u e s u c h t h a t i t s a t i s e s a l l t h e

    c l a u s e s i t a p p e a r s i n . G i v e n t h e f o l l o w i n g c l a u s e - s e t

    s u c h t h a t :

    9

    A d a p t e d f r o m A A I - A R l e c t u r e n o t e s b y S t e f a n S z e i d e r , D u r h a m U n i v e r s i r t y .

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    29/87

    2 . 4 . T w o B r a n c h e s o f S o l v e r 2 0

    {{x,y, z} , {y , z , v} , {x,v, y} , {y, z, v} , {z} , {x, y}}

    w h i c h c o n t a i n s a p u r e l i t e r a l v t h a t c a n b e a s s i g n e d t h e t r u t h v a l u e true t h u s

    s a t i s f y i n g a n y c l a u s e i n w h i c h v

    a p p e a r s i n , h e n c e i t i s p o s s i b l e t o g i v e a n e w c l a u s e -

    s e t [t]

    s u c h t h a t :

    [v = true] = {{x,y, z} , {z} , {x, y}}

    s o

    i s s a t i s a b l e i f a n d o n l y i f [v = true]

    i s s a t i s a b l e .

    2 . 4 T w o B r a n c h e s o f S o l v e r

    A s m e n t i o n e d b e f o r e , s o l i c i t i n g a b r u t e - f o r c e s e a r c h u p o n t h e s e a r c h s p a c e o f a h a r d

    ( o r l a r g e ) S A T i n s t a n c e w i t h t h e h o p e o f q u i c k i l y o b t a i n i n g a t r u t h a s s i g n m e n t

    i s n o t p o s s i b l e . A n y b r u t e - f o r c e s e a r c h w o u l d r e q u i r e a n e x p o n e n t i a l n u m b e r o f

    o p e r t a t i o n s w h i c h i s w h y S A T r e s e a r c h e r s h a v e s p e n t c o n s i d e r a b l e t i m e d e v e l o p i n g

    e c i e n t S A T - s o l v i n g m e t h o d s . R e s e a r c h h a s r e c e n t l y s p l i t i n t o t h e d e v e l o p m e n t o f

    t w o t y p e s o f s o l v e r :

    C o m p e l e t e s y s t e m a t i c d e a p t h - r s t - s e a r c h o f t h e s e a r c h s p a c e m a k i n g u s e

    o f d e d u c t i o n i n f e r e n c e r u l e s s u c h a s u n i t r e s o l u t i o n . T h e y a r e a l l a b l e t o

    d e t e r m i n e t h e s a t i s a b i l i t y o f s a t i s a b l e a n d u n s a t i s a b l e i n s t a n c e s , t h u s t h e y

    a r e k n o w n a s c o m p l e t e .

    S t o c h a s t i c l o c a l s e a r c h , u s i n g t e c h n i q u e s s u c h a s s i m u l a t e d a n n e a l i n g a n d

    g r e e d y h i l l c l i m b i n g . T h e y a r e u n a b l e t o d e d u c e u n s a t i s a b i l i t y o f a c l a u s e - s e t ,

    t h u s a r e k n o w n a s i n c o m p l e t e .

    B o t h t y p e s o f s o l v e r h a v e p r o v e d e e c t i v e a t s o l v i n g a w i d e r a n g e o f S A T - i n s t a n c e s

    a n d t h e i r u n d e r l y i n g f r a m e w o r k s w i l l b e d i s c u s s e d b e l o w , a l o n g w i t h a b r i e f m e n t i o n

    o f l e s s p o p u l a r b u t e e c t i v e m e t h o d s .

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    30/87

    2 . 4 . T w o B r a n c h e s o f S o l v e r 2 1

    2 . 4 . 1 C o m p l e t e S y s t e m a t i c S e a r c h

    T h e r e a r e t w o b a s i c c o m p l e t e f r a m e w o r k s f o r s o l v i n g S A T : t h e D a v i s - P u t n a m ( D P )

    p r o c e d u r e [ 8 ] a n d t h e D a v i d - P u t n a m - L o v e l a n d - L o g e m a n n ( D P L L ) p r o c e d u r e [ 7 ] .

    T h e D a v i s - P u t n a m P r o c e d u r e , g i v e n a p r o p o s i t i o n a l f o r m u l a , t a c k l e s t h e

    S a t i s a b i l i t y p r o b l e m b y a t t e m p t i n g t o a p p l y t h e p r o p o s i t i o n a l r e s o l u t i o n r u l e t o

    e a c h v a r i a b l e t h a t a p p e a r s i n t h e c l a u s e - s e t . T h e D P p r o c e d u r e w i l l i t e r a t i v e l y

    p e r f o r m r e s o l u t i o n u n t i l i t e i t h e r e n c o u n t e r s t h e e m p t y c l a u s e , w h i c h i s u n s a t i s a b l e

    o r c a n b e s i m p l i e d n o f u r t h e r b u t d o e s n o t c o n t a i n t h e e m p t y c l a u s e , i m p l y i n g

    t h a t t h e c l a u s e - s e t i s s a t i s a b l e

    1 0

    . I n a d d i t i o n t o t h e a p p l i c a t i o n o f r e s o l u t i o n , a f t e r

    r e s o l v i n g c l a u s e s , D P s i m p l i e s t h e c l a u s e - s e t b y p e r f o r m i n g s u b s u m p t i o n . D P a l s o

    o m i t s t a u t o l o g i c a l

    1 1

    c l a u s e s .

    T h e p e r f o r m a n c e o f D P d e p e n d s g r e a t l y o n p i c k i n g t h e r i g h t v a r i a b l e s t o p e r f o r m

    r e s o l u t i o n w i t h . V a r i o u s h e u r i s t i c s h a v e b e e n d e v e l o p e d t o i m p r o v e t h e c h a n c e s o f

    p i c k i n g t h e o p t i m a l v a r i a b l e s b u t t h e p r o c e d u r e s ' r u n - t i m e i s s t i l l e x p o n e n t i a l . D P

    i s h o w e v e r a g r e a t d e a l m o r e e c i e n t t h a n t h e b r u t e - f o r c e a p p r o a c h a s e a c h t i m e

    r e s o l u t i o n i s a p p l i e d , a w h o l e s u b - t r e e o f t h e s e a r c h s p a c e i s e l i m i n a t e d .

    T h e D a v i s - P u t n a m - L o v e l a n d - L o g e m a n n P r o c e d u r e , u n l i k e t h e D P p r o c e -

    d u r e , w h i c h c a n n o t r e t u r n a s a t i s f y i n g a s s i g n m e n t , D P L L d o e s r e t u r n a s a t i s f y i n g

    a s s i g n m e n t i f o n e e x i s t s . I t i s b a s e d o n t h e u n i t r e s o l u t i o n i n f e r e n c e r u l e a n d i n c o r -

    p o r a t e s t h e f o l l o w i n g t h r e e i d e a s :

    S e a r c h : H e u r i s t i c a l l y c h o s e a v a r i a b l e t o p e r f o r m u n i t p r o p a g a t i o n w i t h .

    D e d u c t i o n : P e r f o r m u n i t p r o p a g a t i o n a n d l i t e r a l p u r i c a t i o n o n t h e c l a u s e - s e t .

    C o n i c t a n a l y s i s : I f a c o n i c t i n g c l a u s e o c c u r s d u r i n g u n i t p r o p a g a t i o n , t r y

    a n d d i a g n o s e t h e r e a s o n w h y a n d p r e v e n t s i m i l a r o c c u r e n c e s f r o m h a p p e n i n g

    i n t h e f u t u r e . B a c k t r a c k u p t h e s e a r c h t r e e o u t o f t h e s u b - t r e e w h i c h d o e s n o t

    c o n t a i n a s a t i s f y i n g a s s i g n m e n t .

    1 0

    D P c a n n o t a c t u a l l y n d a s a t i s f y i n g a s s i g n m e n t , i t c a n o n l y s h o w w h e t h e r a c l a u s e - s e t i s

    s a t i s a b l e o r u n s a t i s a b l e .

    1 1

    A c l a u s e c o n t a i n i n g a l i t e r a l l a s w e l l a s i t ' s n e g a t i o n l , w h i c h i s t r u e u n d e r a l l i n t e r p r e t a t i o n s .

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    31/87

    2 . 4 . T w o B r a n c h e s o f S o l v e r 2 2

    V a r i o u s v a r i a b l e s e l e c t i o n h e u r i s t i c s c a n b e e m p l o y e d s u c h a s ; s e l e c t i n g t h e v a r i a b l e

    w h i c h o c c u r s m o s t o f t e n o r s e l e c t i n g t h e v a r i a b l e w h i c h i n d u c e s t h e m o s t u n i t p r o p -

    a g a t i o n s . B r a n c h i n g h e u r i s t i c s c a n h a v e a t r e m e n d o u s i m p a c t o n r e d u c i n g t h e s i z e

    o f t h e s e a r c h s p a c e . T h e s e i s s u e s w i l l b e d i s c u s s e d i n t h e f o l l o w i n g t w o C h a p t e r s .

    T h e D P L L a l g o r i t h m i s u s u a l l y s h o w n a s a r e c u r s i v e p r o c e d u r e w h i c h i s c o n -

    v i e n i e n t a s d a t a s t r u c t u r e s ( t h e c u r r e n t v a r i a b l e a s s i g n m e n t ) a r e p r e s e r v e d f o r e a c h

    r e c u r s i v e c a l l o f t h e a l g o r i t h m b u t f o r t h e s a k e o f e c i e n y a n d t h e u s e o f m o r e m o r e

    c o m p l e x m e t h o d s w h i c h a r e u s e d i n m o d e r n D P L L s o l v e r s i t i s i m p l e m e n t e d

    i t e r a t i v e l y .

    R e c e n t r e s e a r c h h a s s e e n t h e d e v e l o p m e n t o f s o l v e r s s u c h a s G R A S P , S A T O ,

    C h a a n d B e r k m i n [ 2 , 4 , 1 4 , 2 4 ] w h i c h h a v e m a d e h u g e a d v a n c e s i n t h e e l d o f

    s y s t e m a t i c S A T - s o l v e r i n g w h i l s t s t i l l u t i l i s i n g t h e b a s i c D P L L f r a m e w o r k .

    2 . 4 . 2 I n c o m p l e t e S t o c h a s t i c L o c a l S e a r c h

    S t o c h a s t i c l o c a l s e a r c h a l g o r i t h m s a r e a c o m p l e t e l y d i e r e n t b r e e d o f S A T - s o l v e r ,

    r e s e a r c h h a v e s h o w n t h e m t o b e v e r y p o w e r f u l a n d e c i e n t f o r n d i n g s a t i s f y i n g

    a s s i g n m e n t s ; t h e t w o m a i n l o c a l s e a r c h s o l v e r s i n c l u d e G S A T [ 3 ] a n d W a l k S A T [ 1 ] .

    G S A T . A s s t a t e d p r e v i o u s l y , s o m e o f t h e m o s t p o w e r f u l a l g o r i t h m s f o r S A T -

    s o l v i n g a n d h i l l - c l i m b i n g s t y l e a l g o r i t h m s t h a t v i e w S A T a s a n o p t i m i z a t i o n p r o b l e m ;

    G S A T i s o n e s p e c i a l i z a t i o n o f h i l l - c l i m b i n g t a i l o r e d t o S A T .

    C o n s i d e r a S A T - i n s t a n c e w i t h n

    d i s t i n c t p r o p o s i t i o n a l v a r i a b l e s a n d m

    d i s j u n c -

    t i v e c l a u s e s . V i e w e d a s a n o p t i m i z a t i o n p r o b l e m , t h e s e t o f s t a t e s V

    i s t h e s e t o f

    p o s s i b l e t r u t h a s s i g n m e n t s . V i e w e d a s a m a x i m i z a t i o n p r o b l e m , t h e o b j e c t i v e f u n c -

    t i o n obj (n) m d e n o t e s t h e n u m b e r o f c l a u s e s t h a t a r e s a t i s e d i n s t a t e v V .

    S t a t e s a r e a s s i g n m e n t s o f t h e n

    p r o p o s i t i o n a l v a r i a b l e s t o {0, 1}. A c o n v e n i e n t r e p -

    r e s e n t a t i o n f o r s u c h a n a s s i g n m e n t i s a b i t s t r i n g bi {0, 1}, w h e r e bi d e n o t e s t h e

    t r u t h v a l u e o f t h e i

    t h p r o p o s i t i o n a l v a r i a b l e . B a s e d o n t h i s s t a t e r e p r e s e n t a t i o n ,

    G S A T u s e s t h e f o l l o w i n g n e i g h b o r h o o d o p e r a t i o n :

    N(v) = {u V : HamDist (u, v) = 1}

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    32/87

    2 . 4 . T w o B r a n c h e s o f S o l v e r 2 3

    w h i c h i s t h e s e t o f s t a t e s t h a t a r e r e a c h a b l e f r o m v

    v i a e x a c t l y o n e b i t / v a r i a b l e

    i p

    1 2

    . I n p r a c t i s e , G S A T i m p l e m e n t s t h e f o r c e - b e s t - m o v e h e u r i s t i c , w h i c h f o r c e s i t

    t o a c c e p t s o m e m o v e , e v e n i f t h e b e s t - m o v e b e y o n d t h e c u r r e n t s t a t e i s n o t i n f a c t a n

    i m p r o v e m e n t . T h i s a p p r o a c h s o m e t i m e s e n a b l e s t h e a l g o r i t h m t o p r o c e e d b e y o n d

    l o c a l o p t i m a u n l i k e o t h e r l o c a l s e a r c h a l g o r i t h m s w h i c h m a y h a v e t o r e s t a r t w h e n

    r e a c h i n g a l o c a l m a x i m a .

    G S A T + W a l k w h i c h w a s i n s p i r e d b y P a p a d i m i t r i o u ' s r a n d o m w a l k a l g o r i t h m

    f o r 2 - S A T [ 3 2 ] , w h i c h n d s a s a t i s f y i n g a s s i g n m e n t i n O (n2)

    b i t i p s f o r a n y 2 - S A T

    f o r m u l a w i t h n

    v a r i a b l e s . G S A T + W a l k a c t s l i k e G A S T w i t h p r o b a b i l i t y p

    , b u t w i t h

    p r o b a b i l i t y

    p 1i t i p s t h e t r u t h a s s i g n m e n t o f a v a r i a b l e i n a r a n d o m u n s a t i s e d

    c l a u s e . T h i s a d d s r a n d o m n o i s e t o t h e h i l l c l i m b i n g p r o c e s s , t h u s h o p e f u l l y a l l o w i n g

    i t t o a v o i d l o c a l m a x i m a .

    W a l k S A T i s e m p i r i c a l l y t h e b e s t a l g o r i t h m f o r S A T - s o l v i n g . L i k e G S A T +

    W a l k , W a l k S A T i p s t h e a s s i g n m e n t o f s o m e v a r i a b l e v

    t h a t a p p e a r s i n a n u n s a t i s e d

    c l a u s e C

    , d o i n g s o i n s t a n t l y r e n d e r s C

    s a t i s e d b u t a l s o h a s a t e n d e n c y t o r e n d e r

    p r e v i o u s l y s a t i s e d c l a u s e s u n s a t i s e d . T h e b r e a k v a l u e o f a v a r i a b l e v

    a t i s d e n e d

    a s t h e n u m b e r o f c l a u s e s t h a t a r e s a t i s e d b y t h e c u r r e n t t r u t h a s s i g n m e n t s b u t b r e a k

    w h e n t h e t r u t h a s s i g n m e n t o f v

    i s i p p e d . W i t h p r o b a b i l i t y p

    , W a l k S A T g r e e d i l y

    i p s t h e t r u t h v a l u e o f a v a r i a b l e o f m i n i m a l b r e a k v a l u e , f o r s o m e u n s a t i s e d c l a u s e .

    O t h e r w i s e , w i t h p r o b a b i l i t y p 1 W a l k S A T r a n d o m l y i p s t h e t r u t h a s s i g n m e n t o f

    a v a r i a b l e .

    2 . 4 . 3 O t h e r m e t h o d s

    A s w e l l a s D P ( L L ) a n d s t o c h a s t i c l o c a l s e a c h , m a n y o t h e r S A T - s o l v i n g m e t h o d s

    h a v e b e e n p r o p o s e d h o w e v e r f o r t h e s a k e o f s i m p l i c i t y , t h i s p a p e r w i l l c o n c e n t r a t e

    o n t h e t w o a f o r e m e n t i o n e d m e t h o d s . T h e r e a d e r s h o u l d b e a w a r e t h a t m a n y o t h e r

    m e t h o d s e x i s t s u c h a s u s i n g n e u r a l n e t w o r k s [ 3 3 ] , S t a l m a r c k ' s A l g o r i t h m [ 1 6 ] , u s i n g

    s i m u l a t e d a n n e a l i n g a n d g e n e t i c a l g o r i t h m s [ 3 4 ] , a n d H y b r i d a l g o r i t h m s ( C o m p l e t e

    l o c a l s e a r c h ) [ 3 5 ] .

    1 2

    H a m m i n g d i s t a n c e i s a m e a s u r e o f t h e d i e r e n c e b e t w e e n t w o b i n a r y s t r i n g s o f e q u a l l e n g t h .

    A h a m m i n g d i s t a n c e o f o n e i m p l i e s t h a t t w o s e q u e n c e s d i e r b y o n e b i t .

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    33/87

    C h a p t e r 3

    D e s i g n

    A s t h e a i m o f t h i s p a p e r i s t o c o m p a r e t h e e c i e n y o f a r a n g e o f S A T - s o l v e r s ,

    n a t u r a l l y a n i m p l e m e n t a t i o n o f t h e m w i l l b e r e q u i r e d s o a n e m p i r i c a l a n a l y s i s c a n

    b e p e r f o r m e d . T h i s c h a p t e r p r e s e n t s a n a r c h i t e c t u r e w h i c h w i l l b e c o v e r e d i n g r e a t

    d e p t h f o r s y s t e m a t i c a n d s t o c h a s t i c s o l v e r s b a s e d o n D P L L a n d G S A T / W a l k S A T

    r e s p e c t i v e l y , a l t h o u g h m o r e f o c u s w i l l b e o n s y s t e m a t i c s o l v e r s .

    3 . 1 S y s t e m a t i c S o l v e r D e s i g n

    T h e m o s t w i d e l y s t u d i e d s y s t e m a t i c s e a r c h a l g o r i t h m s a r e t h e D P p r o c e d u r e a n d

    D P L L a l g o r i t h m w h i c h w i l l b e d i s c u s s e d b e l o w .

    3 . 1 . 1 T h e N e e d F o r a N e w M e t h o d

    A l t h o u g h t h e D P p r o c e d u r e c a n s o l v e s m a l l t o m e d i u m s i z e d S A T - i n s t a n c e s , i t i s

    u n a b l e t o s o l v e S A T - i n s t a n c e s w h i c h r e q u i r e l o n g r e s o l u t i o n r e f u t a t i o n s u s u a l l y

    d e r i v e d f r o m E D A a p p l i c a t i o n s a n d v a r i o u s N P - h a r d p r o b l e m s . L o n g r e s o l u t i o n

    r e f u t a t i o n s i m p l y t h a t a n e x p o n e n t i a l n u m b e r o f c l a u s e s w i l l h a v e t o b e d e r i v e d .

    E x p o n s e n t i a l m e m o r y w i l l b e r e q u i r e d t o s t o r e t h e c l a u s e s , m e a n w h i l e t h e w h o l e

    r e s o l u t i o n p r o c e s s o b t a i n i n g t h e e m p t y c l a u s e o r e x h a u s t i n g t h e s e a r c h s p a c e

    t a k e s e x p o n e n t i a l t i m e .

    F u r t h e r m o r e , t h e D P p r o c e d u r e i s u s u a l l y d e n e d r e c u r s i v e l y w h i c h i m p l i e s i t

    h e a v i l y u s e s t h e s t a c k m e m o r y a l l o c a t e d t o t h e p r o g r a m r u n - t i m e e n v i r o n m e n t ,

    2 4

  • 8/14/2019 Undergraduate Thesis (Roger Willis)

    34/87

    3 . 1 . S y s t e m a t i c S o l v e r D e s i g n 2 5

    c r e a t i n g e v e n m o r e m e m o r y u s a g e p r o b l e m s . R e s o l u t i o n ( i f n i a v e l y i m p l e m e n t e d )

    a l s o r e q u i r e s t h e m a n i p u l a t i o n c o n c a t e n a t i o n o f c l a u s e s a n d d e l e t i o n o f l i t e r a l s

    w i t h i n c l a u s e s o f l i s t s w h i c h r e q u i r e s c o n s i d e r a b l e c o m p u t a t i o n a l t i m e .

    D e s p i d e m a n y n e g a t i v e p o i n t s , t h e D P p r o c e d u r e i s a s o u n d a n d c o m p l e t e m e t h o d

    f o r S A T - s o l v i n g t h u s i t c a n b e u s e d a s a b a s e l i n e b e n c h m a r k f o r f u t u r e d e v e l o p m e n t s

    t o i m p r o v e u p o n . T h e i n a d e q u a c i e s o f t h e D P p r o c e d u r e g a v e w a y f o r t h e d e v e l o p -

    m e n t o f t h e D P L L a l g o r i t h m e x p l a i n e d i n t h e n e x t s e c t i o n .

    3 . 1 . 2 T h e D P L L A l g o r i t h m

    A s m e n t i o n e d p r e v i o u s l y , D P L L c a n b e v i e w e d a s a s y s t e m a t i c , b a c k t r a c k i n g , d e p t h -

    r s t - s e a r c h a l g o r i t h m a n d d u e t o t h i s n a t u r e l i k e m a n y t r e e t r a v e r s a l a l g o r i t h m s

    i t i s o f t e n r e p r e s e n t e d r e c u r s i v e l y , t h i s a l l o w s D P L L t o c o n s e r v e t h e c u r r e n t ( p a r t i a l )

    t r u t h a s s i g n m e n t w i t h e a c h r e c u r s i v e c a l l . H o w e v e r , a s w i t h t h e D P p r o c e d u r e , a

    r e c u r s i v e i m p l e m e n t a t i o n t e n d s t o b e m o r e r e s o u r c e i n t e n s i v e , h e n c e a n i t e r a t i v e

    a p p r o a c h i s u s u a l l y p r e f e r e d f o r s e r i o u s i m p l e m e n t a t i o n s , t h i s a l s o a l l o w s t h e s o l v e r

    t o u s e a m o r e c o m p l e x c o n i c t a n a l y s i s p r o c e d u r e i n c o r p o r a t i n g n o n - c h r o n o l o g i c a l

    b a c k t r a c k i n g ( e x p l a i n e d i n S e c t i o n 3 . 1 . 5 ) .

    W i t h t h e i n t r o d u c t i o n o f t h e G R A S P s o l v e r [ 2 ] , a s t a n d a r d f r a m e w o r k f o r D P L L

    s o l v e r s w a s d e n e d . T h e p e r f o r m a n c e o f D P L L s o l v e r s v a r i e s o n l y d u e t o d i e r e n t

    i m p l e m e n t a t i o n s o f t h e t h r e e m a i n f u n c t i o n s o f t h e a l g o r i t h m ; s e a r c h , d e d u c t i o n a n d

    c o n i c t a n a l y s i s . A n i t e r a t i v e i m p l e m e n t a t i o n o f D P L L c a n b e s e e n i n F i g u r e 3 . 1

    1

    .

    D P L L i s b a s e d a r o u n d t h e m a n i p u l a t i o n o f d a t a - s t r u c t u r e s ; a c l a u s e - s e t a n d a

    l i s t o f v a r i a b l e s . A s m e n t i o n e d , D P L L i s r e l a t e d t o D P i n t h a t i t s t i l l u s e s ( u n i t )

    r e s o l u t i o n , h o w e v e r t h e d i e r e n c e w i t h D P L L i s t h a t t h e c l a u s e - s e t i s n o t a c t u a l l y

    m a n i p u l a t e d , h o w e v e r c o n s t a n t s i z e d m e t a d a t a a b o u t t h e c l a u s e s e t i s m a n i p u l a t e d

    ( u s u a l l y c o u n t e r s o r p o i n t e r s ) t o k e e p t r a c k o f c o n i c t i n g a n d u n i t c l a u s e s . T h e

    b a s i c o w o f D P L L w i t h r e f e r e n c e t o F i g u r e 3 . 1 i s a s f o l l o w s :

    F i r s t l y , a C N F c l a u s e - s e t i s p a r s e d t o c r e a t e a n i n i t i a l c l a u s e d a t a b a s e a n d l i s t o f

    v a r i a b l e s . C l a u s e s a r e u s u s a l l y s t o r e d i n a t w o d i m e n t i o n a l l i s t ; t h e s e c o n d d i m e n t i o n

    1

    A d a p t e d f r o m P r o p o s i t i o n a l S a t i s a b i l i t y a n d C o n s t r a i n