E ffjc i e n t e n c o d i n g s o f fj r s t - - - PowerPoint PPT Presentation

e ffjc i e n t e n c o d i n g s o f fj r s t o r d e r h
SMART_READER_LITE
LIVE PREVIEW

E ffjc i e n t e n c o d i n g s o f fj r s t - - - PowerPoint PPT Presentation

E ffjc i e n t e n c o d i n g s o f fj r s t - o r d e r H o r n p r o b l e ms i n e q u a t i o n a l l o g i c K o e n C l a e s s e n N i c k S ma l l b o n e E q


slide-1
SLIDE 1

E ffjc i e n t e n c

  • d

i n g s

  • f

fj r s t

  • r

d e r H

  • r

n p r

  • b

l e ms i n e q u a t i

  • n

a l l

  • g

i c

K

  • e

n C l a e s s e n N i c k S ma l l b

  • n

e

slide-2
SLIDE 2

E q u a t i

  • n

a l t h e

  • r

e m p r

  • v

e r s a r e a w e s

  • m

e ! B u t t h e r e ’ s a p r

  • b

l e m …

H i g h p e r f

  • r

m a n c e ! R e a d a b l e p r

  • f

s !

slide-3
SLIDE 3

R e a s

  • n

i n g a b

  • u

t a l g e b r a

slide-4
SLIDE 4

R e a s

  • n

i n g a b

  • u

t a l g e b r a

slide-5
SLIDE 5

R e a s

  • n

i n g a b

  • u

t f u n c t i

  • n

a l p r

  • g

r a m s

s

  • r

t [ ] = [ ] s

  • r

t ( x : x s ) = i n s e r t x ( s

  • r

t x s ) i n s e r t x [ ] = x : [ ] i n s e r t x ( y : y s ) = i f x < y t h e n x : y : y s e l s e y : ( i n s e r t x y s )

slide-6
SLIDE 6

R e a s

  • n

i n g a b

  • u

t f u n c t i

  • n

a l p r

  • g

r a m s

s

  • r

t [ ] = [ ] s

  • r

t ( x : x s ) = i n s e r t x ( s

  • r

t x s ) i n s e r t x [ ] = x : [ ] i n s e r t x ( y : y s ) = i f x < y t h e n x : y : y s e l s e y : ( i n s e r t x y s )

slide-7
SLIDE 7

O u r p a p e r

Wh a t ? T e a c h a u n i t e q u a l i t y p r

  • v

e r h

  • w

t

  • r

e a s

  • n

a b

  • u

t H

  • r

n c l a u s e s H

  • w

? B y e n c

  • d

i n g H

  • r

n c l a u s e s a s e q u a t i

  • n

s ( l e a v i n g e x i s t i n g e q u a t i

  • n

s a l

  • n

e ) Wh y ? T

  • g

e t a p r

  • v

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

  • s

t l y

  • e

q u a t i

  • n

a l r e a s

  • n

i n g

slide-8
SLIDE 8

T h e p l a n

H

  • r

n c l a u s e : a t m

  • s

t

  • n

e p

  • s

i t i v e l i t e r a l

  • e

. g . f ( x ) = x p ( x ) g ( x ) = a

  • o

r p ( x ) q ( x ) f a l s e

  • S

t a g e 1 : h

  • w

t

  • e

n c

  • d

e c l a u s e s

  • f

t h e f

  • r

m :

a = b c = d

  • S

t a g e 2 : h

  • w

t

  • e

n c

  • d

e c l a u s e s

  • f

t h e f

  • r

m :

a

1

= b

1

… a

  • n

= b

n

c = d

  • S

t a g e 3 : h

  • w

t

  • e

n c

  • d

e p r e d i c a t e s S k i p p e d : h

  • w

t

  • e

n c

  • d

e g

  • a

l c l a u s e s

slide-9
SLIDE 9

S t a g e 1 :

H

  • w

t

  • e

n c

  • d

e a b i n a r y c l a u s e ( a = b c = d )

  • a

s a n e q u a t i

  • n
slide-10
SLIDE 10

T h e i d e a

W e a r e g

  • i

n g t

  • a

x i

  • m

a t i s e a f u n c t i

  • n

i f e q : i f e q ( x , y , z , w ) = i f x = y t h e n z e l s e w Tie n w e c a n e n c

  • d

e a = b c = d

  • a

s :

i f e q ( a , b , c , d ) = d

I f a = b t h e n i f e q ( a , b , c , d ) = c = d ; i f a ≠ b t h e n i f e q ( a , b , c , d ) = d . B u t h

  • w

t

  • a

x i

  • m

a t i s e i f e q e q u a t i

  • n

a l l y ?

slide-11
SLIDE 11

A x i

  • m

s f

  • r

i f e q

A x i

  • m

1 : i f e q ( x , x , y , z ) = y A x i

  • m

2 : x ≠ y i f e q ( x , y , z , w ) = w

F

  • r

H

  • r

n f

  • r

m u l a s , w e

  • n

l y n e e d t h e fj r s t a x i

  • m

!

slide-12
SLIDE 12

G i v e n a = b c = d

  • :

i f e q ( a , b , c , d ) = d i f e q ( x , x , y , z ) = y I f a = b t h e n i f e q ( a , b , c , d ) = d i f e q ( a , a , c , d ) = c s

  • c

= d .

H

  • w

t

  • d

i s c h a r g e a c

  • n

d i t i

  • n

a l

=

Tii s d e d u c t i

  • n

r u l e ( p

  • s

i t i v e u n i t r e s

  • l

u t i

  • n

) i s e n

  • u

g h f

  • r

H

  • r

n r e a s

  • n

i n g

slide-13
SLIDE 13

S t a g e 2 :

H

  • w

t

  • e

n c

  • d

e a n n

  • a

r y c l a u s e ( e . g . a = b c = d e = f )

  • a

s a n e q u a t i

  • n
slide-14
SLIDE 14

C l a u s e s w i t h m a n y n e g a t i v e l i t e r a l s

O p t i

  • n

# 1 : r e p e a t e d l y a p p l y t h e e n c

  • d

i n g a = b & c = d e = f → e = g b e c

  • m

e s a = b i f e q ( c , d , e , f ) = f b e c

  • m

e s i f e q ( a , b , i f e q ( c , d , e , f ) , f ) = f

slide-15
SLIDE 15

C l a u s e s w i t h m a n y n e g a t i v e l i t e r a l s

O p t i

  • n

# 2 : t u p l i n g a = b & c = d e = f

  • b

e c

  • m

e s p a i r ( a , c ) = p a i r ( b , d ) e = f

  • b

e c

  • m

e s i f e q ( p a i r ( a , c ) , p a i r ( b , d ) , e , f ) = f w h e r e p a i r m u s t b e f r e s h . ( t h i s i s n

  • t

s

  • u

n d f

  • r

n

  • n
  • H
  • r

n p r

  • b

l e m s ! )

slide-16
SLIDE 16
  • E

x a m p l e : L A T 2 2 4

  • 1
slide-17
SLIDE 17

S t a g e 3 :

H

  • w

t

  • e

n c

  • d

e p r e d i c a t e s u s i n g e q u a t i

  • n

s

slide-18
SLIDE 18

E n c

  • d

i n g p r e d i c a t e s

I d e a : a d d a c

  • n

s t a n t t r u e a n d e n c

  • d

e p ( t ) a s p ( t ) = t r u e

slide-19
SLIDE 19

E n c

  • d

i n g p r e d i c a t e s

I d e a : a d d a c

  • n

s t a n t t r u e a n d e n c

  • d

e p ( t ) a s p ( t ) = t r u e

U n s

  • u

n d !

slide-20
SLIDE 20

E n c

  • d

i n g p r e d i c a t e s

I d e a : a d d a c

  • n

s t a n t t r u e a n d e n c

  • d

e p ( t ) a s p ( t ) = t r u e S a t i s fj a b l e : (x , y . x = y ) ¬ p

  • U

n s a t i s fj a b l e : (x , y . x = y ) p ≠ t r u e

  • S
  • l

u t i

  • n

# 1 : u s e t y p e s S

  • l

u t i

  • n

# 2 : . . .

slide-21
SLIDE 21

E n c

  • d

i n g p r e d i c a t e s

S a t i s fj a b l e : (x , y . x = y ) ¬ p

  • U

n s a t i s fj a b l e : (x , y . x = y ) p ≠ t r u e

  • E

n c

  • d

i n g p r e d i c a t e s i s

  • n

l y u n s

  • u

n d b e c a u s e y

  • u

c a n g

  • f

r

  • m

x , y . x = y

  • t
  • p

= t r u e

  • t

h i s i s

  • n

l y a p r

  • b

l e m i f x , y . x = y

  • i

s p r

  • v

a b l e b u t t h e f

  • r

m u l a i s s a t i s fj a b l e

  • i

. e . , w h e n t h e p r

  • b

l e m h a s a m

  • d

e l

  • f

d

  • m

a i n s i z e 1

S

  • ,

fj r s t c h e c k i f t h e r e i s a m

  • d

e l

  • f

s i z e 1

  • E

a s y

  • p

e a s y : p r e d i c a t e s a r e c

  • n

s t a n t

  • v

a l u e d , a n d a l l e q u a l i t y l i t e r a l s a r e t r u e , s

  • t

h i s i s a H O R N S A T p r

  • b

l e m

I f t h e r e i s a m

  • d

e l

  • f

s i z e 1 , t h e p r

  • b

l e m i s s a t i s fj a b l e O t h e r w i s e , e n c

  • d

i n g p r e d i c a t e s i s s

  • u

n d

  • I

f x , y . x = y

  • i

s p r

  • v

a b l e , t h e p r

  • b

l e m i s u n s a t i s fj a b l e

slide-22
SLIDE 22

A n a l t e r n a t i v e e n c

  • d

i n g

slide-23
SLIDE 23

T h e i f e q

  • e

n c

  • d

i n g i s s u b

  • p

t i m a l

i f e q ( a , b , c , d ) = d

Tie p r

  • v

e r

  • n

l y n e e d s t

  • m

a k e a a n d b e q u a l B u t i t w i l l a l s

  • n

e e d l e s s l y r e a s

  • n

a b

  • u

t c a n d d

slide-24
SLIDE 24

a = b c = d

  • b

e c

  • m

e s :

f r e s h ( a , x

1

, …, x

n

) = c f r e s h ( b , x

1

, …, x

n

) = d

E n c

  • d

i n g # 2

A l l f r e e v a r i a b l e s

  • f

a , b , c a n d d ( s u b s t i t u t i

  • n

) A f r e s h f u n c t i

  • n

s y m b

  • l
slide-25
SLIDE 25

G i v e n a = b c = d

  • :

f r e s h ( a , x

1

, …, x

n

) = c f r e s h ( b , x

1

, …, x

n

) = d I f a = b t h e n f r e s h ( a , x

1

, …, x

n

) = c f r e s h ( b , x

1

, …, x

n

) = d s

  • c

= d .

E n c

  • d

i n g # 2 : a = b c = d

  • =
slide-26
SLIDE 26

f r e s h ( a , x

1

, …, x

n

) = c f r e s h ( b , x

1

, …, x

n

) = d

I f t h e s e e q u a t i

  • n

s a r e

  • r

i e n t e d l e f t

  • t
  • r

i g h t t h e n t h e p r

  • v

e r c a n

  • n

l y :

  • p

a r a m

  • d

u l a t e i n t

  • a
  • p

a r a m

  • d

u l a t e i n t

  • b
  • d

e d u c e c = d

  • n

c e a a n d b a r e s h

  • w

n e q u a l Tii s i s a b

  • u

t w h a t w e ’ d g e t w i t h a d e d i c a t e d p r

  • v

e r ! D

  • w

n s i d e : n

  • w

h a v e t w

  • c

l a u s e s t

  • r

e a s

  • n

a b

  • u

t

E n c

  • d

i n g # 2

slide-27
SLIDE 27

R e s u l t s

P r

  • v

e r S

  • l

v e d R a t i n g 1 s

  • l

v e d E ( n

  • t

e n c

  • d

e d ) 1 9 7 2 E ( e n c

  • d

e d ) 1 7 1 7 T w e e 1 6 8 3 2 9 W a l d m e i s t e r 1 3 7 8 1 5 S P A S S ( n

  • t

e n c

  • d

e d ) 1 3 7 3 7 p r

  • b

l e m s

  • f

r a t i n g 1 s

  • l

v e d i n t

  • t

a l , a l l a r e h e a v i l y e q u a t i

  • n

a l

  • O

u t

  • f

1 2 r a t i n g 1 H

  • r

n p r

  • b

l e m s t

  • t

a l C

  • n

c l u s i

  • n

: t h e e q u a t i

  • n

a l p r

  • v

e r s a r e r e s p e c t a b l e ( b u t n

  • t

g r e a t ) a t g e n e r a l

  • p

u r p

  • s

e r e a s

  • n

i n g – b u t v e r y g

  • d

a t e q u a t i

  • n

a l r e a s

  • n

i n g !

slide-28
SLIDE 28

P

  • s

s i b l e h e u r i s t i c s

… i f e q ( s , t , u , v ) …

1 . P r i

  • r

i t i s e i n f e r e n c e s t h a t m a k e t h e fj r s t t w

  • a

r g u m e n t s e q u a l

  • S
  • l

v e s m

  • r

e r a t i n g 1 p r

  • b

l e m s b u t f e w e r p r

  • b

l e m s

  • v

e r a l l 2 . D

  • n

’ t d

  • a

n y i n f e r e n c e s

  • n

t h e t h i r d a n d f

  • u

r t h a r g u m e n t

  • N
  • t

i m p l e m e n t e d , b u t

  • u

g h t t

  • h

e l p M

  • r

e ?

slide-29
SLIDE 29

F u l l fj r s t

  • r

d e r l

  • g

i c ?

a = b c = d ∨ c = e i s t h e s a m e a s i f e q ( a , b , c , d ) = c b u t

  • n

l y i f w e c a n a x i

  • m

a t i s e x ≠ y i f e q ( x , y , z , w ) = w !

  • I

t ’ s k n

  • w

n h

  • w

t

  • d
  • t

h i s … w i t h a b

  • u

t 1 d i fg e r e n t a x i

  • m

s p l u s c

  • n

g r u e n c e a x i

  • m

s f

  • r

e a c h f u n c t i

  • n

s y m b

  • l
slide-30
SLIDE 30

F u l l fj r s t

  • r

d e r l

  • g

i c ?

a = b c = d ∨ c = e i s t h e s a m e a s i f e q ( a , b , c , d ) = c b u t

  • n

l y i f w e c a n a x i

  • m

a t i s e x ≠ y i f e q ( x , y , z , w ) = w !

  • I

t ’ s k n

  • w

n h

  • w

t

  • d
  • t

h i s … w i t h a b

  • u

t 1 d i fg e r e n t a x i

  • m

s p l u s c

  • n

g r u e n c e a x i

  • m

s f

  • r

e a c h f u n c t i

  • n

s y m b

  • l

H e l p ! I n e e d s

  • m

e h e u r i s t i c s

slide-31
SLIDE 31

C

  • n

c l u s i

  • n

s

G

  • a

l : a c h e a p w a y t

  • t

u r n a n e q u a t i

  • n

a l p r

  • v

e r i n t

  • a

n “ e q u a t i

  • n

a l

  • p

l u s ” p r

  • v

e r

  • E

n c

  • d

i n g s w

  • r

k w e l l f

  • r

m

  • s

t l y

  • e

q u a t i

  • n

a l p r

  • b

l e m s

  • T

e a c h i n g t h e p r

  • v

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

  • b

e a g

  • d

i d e a

  • C

a n w e a d j u s t t h e p r

  • v

e r ’ s s t r a t e g y a b i t m

  • r

e r a d i c a l l y ? ( I g n

  • r

i n g c e r t a i n i n f e r e n c e s , a l w a y s c h

  • s

i n g c e r t a i n i n f e r e n c e s , … )

  • F

u l l fj r s t

  • r

d e r l

  • g

i c – c a n i t b e d

  • n

e ?

  • D

e c

  • d

i n g p r

  • f

s ?

I n t h e p a p e r : f

  • u

r e n c

  • d

i n g s , h

  • w

t

  • h

a n d l e c

  • n

j e c t u r e s , p r

  • f

s

  • f

c

  • r

r e c t n e s s Y

  • u

c a n t r y i t

  • u

t u s i n g T w e e (

  • n

T P T P )

  • .

. . a n d a l s

  • w

a t c h T w e e l

  • s

e a t C A S C !