Polynomial time algorithm for Diophantine equations in one variable.pdf

download Polynomial time algorithm for Diophantine equations in one variable.pdf

of 11

Transcript of Polynomial time algorithm for Diophantine equations in one variable.pdf

  • 8/14/2019 Polynomial time algorithm for Diophantine equations in one variable.pdf

    1/11

    A P o l y n o m i a l T i m e A l g o r i t h m f o r D i o p h a n t i n e

    E q u a t i o n s i n O n e V a r i a b l e

    F e l i p e C u c k e r

    D e p a r t m e n t o f M a t h e m a t i c s

    C i t y U n i v e r s i t y o f H o n g K o n g

    8 3 T a t C h e e A v e n u e , K o w l o o n

    H O N G K O N G

    e - m a i l : m a c u c k e r @ m a t h . c i t y u . e d u . h k

    P a s c a l K o i r a n

    L I P , E c o l e N o r m a l e S u p e r i e u r e d e L y o n

    4 6 , a l l e e d ' I t a l i e

    6 9 3 6 4 L y o n C e d e x 0 7

    F R A N C E

    e - m a i l : k o i r a n @ l i p . e n s - l y o n . f r

    S t e v e S m a l e

    D e p a r t m e n t o f M a t h e m a t i c s

    C i t y U n i v e r s i t y o f H o n g K o n g

    8 3 T a t C h e e A v e n u e , K o w l o o n

    H O N G K O N G

    e - m a i l : m a s m a l e @ m a t h . c i t y u . e d u . h k

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

    T h e g o a l o f t h i s p a p e r i s t o p r o v e t h e f o l l o w i n g .

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

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

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

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

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

    f = a

    d

    t

    d

    + : : : + a

    1

    t + a

    0

    ;

    1

  • 8/14/2019 Polynomial time algorithm for Diophantine equations in one variable.pdf

    2/11

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

    i

    j 0 i d a n d a

    i

    6= 0 g . T h e s i z e o f t h e

    s p a r s e r e p r e s e n t a t i o n o f f i s d e n e d b y

    s i z e f =

    X

    i j a

    i

    6 = 0

    s i z e a

    i

    + s i z e i =

    X

    i j a

    i

    6 = 0

    h t a

    i

    + h t i

    w h e r e h t a = l o g 1 + j a j i s t h e l o g a r i t h m i c h e i g h t o f a n i n t e g e r a 2 Z Z . T h u s ,

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

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

    b o u n d e d b y c s i z e f

    d

    f o r p o s i t i v e c o n s t a n t s c ; d .

    N o t e t h a t t h e d e g r e e o f f i s a t m o s t 2

    s i z e f

    a n d t h i s e x p o n e n t i a l d e p e n d e n c e

    i s s h a r p i n t h e s e n s e t h a t t h e r e i s n o q 2 I N s u c h t h a t t h e d e g r e e o f f i s b o u n d e d

    b y s i z e f

    q

    f o r a l l f . I n p a r t i c u l a r , e v a l u a t i n g f a t a g i v e n i n t e g e r x m a y b e a n

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

    s i z e f a n d s i z e x .

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

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

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

    0

    ; a

    1

    ; : : : ; a

    d

    g . T h i s i s d u e t o

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

    w a y .

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

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

    p o l y n o m i a l t i m e w i t h t h e s p a r s e r e p r e s e n t a t i o n . T h e o r e m 1 s a y s t h a t t h e e x i s t e n c e

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

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

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

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

    W e n o t e h e r e t h a t a v e r s i o n o f T h e o r e m 1 i s w e l l - k n o w n f o r d e n s e p o l y n o m i a l s .

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

    1 9 8 9 ; M i g n o t t e 1 9 9 2 .

    2 C o m p u t i n g s i g n s o f s p a r s e p o l y n o m i a l s

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

    p o l y n o m i a l f a t x 2 Z Z i n p o l y n o m i a l t i m e . T h a t i s , g i v e n f 2 Z Z t a n d x 2 Z Z , w e

    c a n c o m p u t e t h e q u a n t i t y

    s i g n f x =

    8

    :

    , 1 i f f x 0

    0 i f f x = 0

    1 i f f x 0

    i n t i m e p o l y n o m i a l i n s i z e x a n d s i z e f .

    2

  • 8/14/2019 Polynomial time algorithm for Diophantine equations in one variable.pdf

    3/11

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

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

    p o l y n o m i a l i n s i z e x a n d s i z e f .

    R e c a l l t h a t a s t r a i g h t - l i n e p r o g r a m w i t h o n e v a r i a b l e i s a s e q u e n c e P =

    f c

    1

    ; : : : ; c

    k

    ; t ; u

    1

    ; : : : ; u

    `

    g w h e r e c

    1

    ; : : : ; c

    k

    2 Z Z , a n d f o r i ` , u

    i

    = a b w i t h

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

    i

    .

    C l e a r l y , u

    `

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

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

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

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

    s i z e o f P t o b e

    s i z e P = ` +

    k

    X

    i = 1

    s i z e c

    i

    :

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

    a n d x 2 Z Z s u c h t h a t 0 f x T f o r s o m e T 0 . T h e n f x c a n b e c o m p u t e d i n

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

    P r o o f . O n e p e r f o r m s t h e a r i t h m e t i c o p e r a t i o n s t h e r e a r e a t m o s t s o f t h e m

    i n t h e r i n g Z Z

    T

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

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

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

    t h e v a l u e o f f x . 2

    R e m a r k 1 A s i m i l a r r e s u l t h o l d s i f w e h a v e , T f x 0 .

    L e m m a 2 T h e r e i s a n a l g o r i t h m w h i c h g i v e n i n p u t x ; 2 Z Z

    2

    , x 0 , 0

    o u t p u t s ` 2 Z Z , ` 0 , s u c h t h a t 2

    ` , 1

    x

    2

    ` + 1

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

    a p o l y n o m i a l i n s i z e x a n d s i z e .

    S k e t c h o f t h e p r o o f . C o m p u t e ` 2 Z Z , ` 0 s a t i s f y i n g ` , 1 l o g x ` + 1 .

    T o d o s o , o n e c o m p u t e s a n a p p r o x i m a t i o n y o f l o g x s u c h t h a t j y , l o g x j 1 = 2 .

    2

    P r o o f o f T h e o r e m 2 . W e c a n a s s u m e t h a t x 0 s i n c e i f x 0 t h e n f x i s

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

    m o n o m i a l s w i t h o d d d e g r e e . A l s o , i f x = 0 t h e p r o b l e m c a n b e s o l v e d b y l o o k i n g a t

    t h e c o n s t a n t t e r m o f f . T h u s , s u p p o s e x 0 .

    L e t k b e t h e n u m b e r o f m o n o m i a l s o f f s o t h a t

    f = a

    1

    t

    1

    + : : : + a

    k

    t

    k

    w i t h

    1

    2

    : : :

    k

    0 :

    T h e n , f x c a n b e e v a l u a t e d u s i n g H o r n e r ' s r u l e a s f o l l o w s . L e t

    k

    =

    k

    a n d

    j

    =

    j

    ,

    j + 1

    f o r j = 1 ; : : : ; k , 1 . T h e n ,

    j

    =

    j

    +

    j + 1

    + : : : +

    k

    f o r j = 1 ; : : : ; k .

    3

  • 8/14/2019 Polynomial time algorithm for Diophantine equations in one variable.pdf

    4/11

  • 8/14/2019 Polynomial time algorithm for Diophantine equations in one variable.pdf

    5/11

    I f

    i , 1

    = 0 t h e n c o m p u t e ` s u c h t h a t 2

    `

    j a

    i

    j 2

    ` + 1

    a n d l e t

    v

    i

    = ` , V

    i

    = ` + 1 a n d

    i

    = s i g n a

    i

    .

    I f

    i , 1

    6= 0 p r o c e e d a s f o l l o w s .

    I f 2

    m

    i , 1

    2 j a

    i

    j w e h a v e t w o c a s e s :

    i f

    i , 1

    a

    i

    0 t h e n l e t v

    i

    = m

    i , 1

    a n d V

    i

    = M

    i , 1

    + 1

    e l s e , i f

    i , 1

    a

    i

    0 , l e t v

    i

    = m

    i , 1

    , 1 a n d V

    i

    = M

    i , 1

    .

    O n t h e o t h e r h a n d , i f 2

    m

    i , 1

    2 j a

    i

    j ,

    c o m p u t e t h e e x a c t v a l u e o f p

    i , 1

    u s i n g L e m m a 1 w i t h

    T = 2

    M

    i , 1

    + 1 a n d l e t s

    i

    = p

    i , 1

    + a

    i

    .

    I f s

    i

    = 0 , l e t

    i

    = 0 .

    I f s

    i

    6= 0 t h e n

    c o m p u t e ` s u c h t h a t 2

    `

    j s

    i

    j 2

    ` + 1

    a n d l e t

    v

    i

    = ` , V

    i

    = ` + 1 a n d

    i

    = s i g n s

    i

    .

    I t i s i m m e d i a t e t o c h e c k t h a t , i f m

    i , 1

    ; M

    i , 1

    a n d

    i , 1

    s a t i s f y c o n d i t i o n s 1 a n d

    2 t h e n v

    i

    ; V

    i

    a n d

    i

    s a t i s f y c o n d i t i o n s 3 a n d 4 . A l l l i n e s i n t h e a b o v e a l g o r i t h m

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

    t h e e x a c t v a l u e o f p

    i

    . B u t t h e a l g o r i t h m i n L e m m a 1 h a s a h a l t i n g t i m e b o u n d e d

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

    i

    x . I n o u r c a s e o n e

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

    i

    o f s i z e p o l y n o m i a l i n t h e s i z e o f f

    H o r n e r ' s r u l e a s e x p o s e d a b o v e p r o v i d e s o n e w i t h 2 i , 1 o p e r a t i o n s a n d w e n o t e

    t h a t t h e s i z e o f T , i s a b o u t M

    i , 1

    , a n d

    M

    i , 1

    m

    i

    + 3 i , 1 l o g 2 j a

    i

    j + 3 i , 1

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

    F o r b , w e p r o c e e d a s f o l l o w s .

    C o m p u t e ` s u c h t h a t 2

    ` , 1

    x

    i

    2

    ` + 1

    a s i n L e m m a 2 .

    I f

    i

    6= 0 t h e n l e t m

    i

    = v

    i

    + ` , 1 a n d M

    i

    = V

    i

    + ` + 1 .

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

    i , 1

    a n d M

    i , 1

    i f

    i

    = 0 . C o n s e -

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

    R e m a r k 2 I t i s a n o p e n p r o b l e m w h e t h e r o n e c a n c o m p u t e t h e s i g n o f f x i n

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

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

    w h e t h e r f x = 0 i n r a n d o m i z e d o n e - s i d e e r r o r p o l y n o m i a l t i m e s e e S c h w a r t z

    1 9 8 0 .

    5

  • 8/14/2019 Polynomial time algorithm for Diophantine equations in one variable.pdf

    6/11

    3 P r o o f o f T h e o r e m 1

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

    t h a t i s , t h e e x p r e s s i o n k r o o t s " m e a n s k d i e r e n t r o o t s .

    L e m m a 3 L e t f 2 I R t h a v e k m o n o m i a l s . T h e n f h a s a t m o s t 2 k r e a l r o o t s .

    P r o o f . I f k = 1 t h e s t a t e m e n t i s t r u e . I f k 1 w r i t e f = x

    p w i t h p 0 6= 0 .

    T h e n p

    0

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

    m o s t 2 k , 1 r o o t s . F r o m t h i s w e d e d u c e t h a t p h a s a t m o s t 2 k , 1 r e a l r o o t s a n d

    h e n c e f h a s a t m o s t 2 k . 2

    D e n i t i o n 1 L e t p 2 Z Z t a n d M 2 Z Z , M 0 . L e t C = f u

    i

    ; v

    i

    g

    i = 1 ; : : : ; N

    b e a

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

    i

    u

    i + 1

    a n d v

    i

    = u

    i

    o r

    v

    i

    = u

    i

    + 1 f o r a l l i . W e s a y t h a t C l o c a t e s t h e r o o t s o f p i n , M ; M i f f o r e a c h r o o t

    o f p i n , M ; M t h e r e i s i N s u c h t h a t 2 u

    i

    ; v

    i

    . N o t e t h a t i n t h i s c a s e p h a s

    n o r o o t s i n v

    i

    ; u

    i + 1

    f o r a l l i .

    L e t g 2 Z Z t a n d M 2 Z Z , M 0 . W r i t e g = t

    p w i t h p 0 6= 0 a n d s u p p o s e

    t h a t C

    0

    = f u

    i

    ; v

    i

    g

    i = 1 ; : : : ; N

    l o c a t e s t h e r o o t s o f p

    0

    i n , M ; M . T h e n , f o r e a c h i N ,

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

    i

    ; u

    i + 1

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

    t w o r o o t s i n v

    i

    ; u

    i + 1

    t h e p

    0

    m u s t h a v e a r o o t i n t h i s i n t e r v a l a s w e l l .

    M o r e o v e r , p h a s a r o o t i n t h i s i n t e r v a l i f a n d o n l y i f p v

    i

    p u

    i + 1

    0 . T h i s i s

    s o s i n c e i f p v

    i

    p u

    i + 1

    0 a n d p h a s s o m e r o o t i n v

    i

    ; u

    i + 1

    t h e n , e i t h e r p h a s a t

    l e a s t t w o r o o t s i n v

    i

    ; u

    i + 1

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

    i

    ; u

    i + 1

    . I n b o t h c a s e s p

    0

    h a s

    a r o o t i n v

    i

    ; u

    i + 1

    c o n t r a d i c t i n g t h e c h o i c e o f C

    0

    .

    P r o p o s i t i o n 1 T h e r e i s a n a l g o r i t h m w h i c h , g i v e n i n p u t g ; p 2 Z Z t , M ; N a n d C

    0

    a s a b o v e c o m p u t e s a l i s t C l o c a t i n g t h e r o o t s o f p i n , M ; M . T h e l i s t C h a s a t m o s t

    N + 2 k i n t e r v a l s w h e r e k i s t h e n u m b e r o f m o n o m i a l s o f g . T h e h a l t i n g t i m e o f t h e

    a l g o r i t h m i s p o l y n o m i a l l y b o u n d e d i n s i z e M , s i z e g a n d N .

    P r o o f . U s i n g t h e a l g o r i t h m o f T h e o r e m 2 c o m p u t e t h e s i g n o f p a t t h e p o i n t s

    , M ; u

    1

    ; v

    1

    ; : : : ; u

    N

    ; v

    N

    ; M .

    L e t x ; y b e a n y o f t h e N + 1 i n t e r v a l s , M ; u

    1

    ; v

    1

    ; u

    2

    ; : : : ; v

    N , 1

    ; u

    N

    ; v

    N

    ; M .

    I f p x p y 0 w e k n o w t h a t t h e r e a r e n o r e a l r o o t s o f p i n x ; y . O t h e r w i s e , t h e r e

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

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

    u ; u i f w e n d a m i d - p o i n t u s u c h t h a t p u = 0 . W e f o r m C b y a d d i n g t o C

    0

    t h e s e

    i n t e r v a l s .

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

    o f i n t e r v a l s i n C i s a t m o s t N + 2 k .

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

    i n t e r v a l s a t m o s t . E a c h o f t h e s e i n t e r v a l s h a s l e n g t h a t m o s t 2 M a n t h e r e f o r e , t h e

    6

  • 8/14/2019 Polynomial time algorithm for Diophantine equations in one variable.pdf

    7/11

    n u m b e r o f s i g n e v a l u a t i o n s i s o f t h e o r d e r o f l o g M , t h a t i s , i t i s l i n e a r i n s i z e M .

    F i n a l l y , a l l t h e s i g n e v a l u a t i o n s t h e 2 N + 1 r s t o n e s a n d t h e o n e s p e r f o r m e d

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

    T h e o r e m 2 . 2

    P r o o f o f T h e o r e m 1 . L e t

    f = a

    1

    t

    1

    + : : : + a

    k

    t

    k

    w i t h

    1

    2

    : : :

    k

    0 . T h e n , w e c a n d e n e p o l y n o m i a l s p

    i

    i n d u c t i v e l y b y

    f = t

    k

    p

    1

    p

    1

    0 6= 0 a n d p

    1

    h a s k m o n o m i a l s

    p

    0

    1

    = t

    k , 1

    p

    2

    p

    2

    0 6= 0 a n d p

    2

    h a s k , 1 m o n o m i a l s

    .

    .

    .

    p

    0

    k , 1

    = t

    1

    p

    k

    p

    k

    2 Z Z ; p

    k

    6= 0

    w h e r e

    k

    =

    k

    a n d

    1

    ; : : : ;

    k , 1

    o n l y d e p e n d o n

    1

    ; : : : ;

    k

    .

    I f L i s a b o u n d f o r t h e a b s o l u t e v a l u e o f t h e c o e c i e n t s o f f , t h e c o e c i e n t s o f

    p

    j

    a r e b o u n d e d b y L

    j , 1

    1

    f o r j = 1 ; : : : ; k . T h e r e f o r e , s i n c e p

    j

    h a s e x a c t l y k , j + 1

    c o e c i e n t s , w e d e d u c e t h a t

    s i z e p

    j

    k , j + 1 j , 1 s i z e

    1

    + s i z e f

    w h i c h i s b o u n d e d b y 2 s i z e f

    3

    f o r a l l j = 1 ; : : : ; k .

    N o w w e n o t e t h a t i f i s a n i n t e g e r r o o t o f f , t h e n e i t h e r = 0 o r d i v i d e s

    a

    k

    . T o p r o v e t h i s , s u p p o s e t h a t f = 0 a n d 6= 0 . T h e n

    k

    = 0 , t h a t i s ,

    f = a

    1

    t

    1

    + : : : + a

    k , 1

    t

    k , 1

    + a

    k

    a n d w e h a v e

    a

    1

    1

    + : : : + a

    k , 1

    k , 1

    = , a

    k

    :

    S i n c e d i v i d e s t h e l e f t - h a n d s i d e , i t m u s t d i v i d e a

    k

    .

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

    k

    j ; j a

    k

    j a n d w e c a n r e s t r i c t

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

    C o n s i d e r t h e a l g o r i t h m

    i n p u t f

    C o m p u t e p

    1

    ; : : : ; p

    k

    .

    L e t C

    k

    = 0 ; 0 .

    F o r i = k , 1 ; : : : ; 1 , i n d u c t i v e l y

    c o m p u t e C

    i

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

    i

    i n , j a

    k

    j ; j a

    k

    j

    u s i n g P r o p o s i t i o n 1 w i t h i n p u t C

    i + 1

    .

    L e t S = ; .

    F o r e a c h e n d p o i n t x o f a n i n t e r v a l i n C

    1

    ,

    i f f x = 0 t h e n l e t S = S f x g .

    O u t p u t S

    7

  • 8/14/2019 Polynomial time algorithm for Diophantine equations in one variable.pdf

    8/11

    T h e l i s t C

    k

    i s o l a t e s t h e r o o t s o f p

    k

    . T h e n , b y k , 1 a p p l i c a t i o n s o f P r o p o s i t i o n 1 ,

    t h e l i s t C

    1

    i s o l a t e s t h e r o o t s o f p

    1

    a n d s i n c e i t c o n t a i n s t h e i n t e r v a l 0 ; 0 , t h e r o o t s

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

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

    f a c t t h a t s i z e p

    j

    2 s i z e f

    3

    f o r a l l j = 1 ; : : : ; k . 2

    4 A R e n e m e n t

    L e t f =

    P

    n

    i = 0

    a

    i

    t

    i

    b e a n i n t e g e r p o l y n o m i a l w i t h

    0

    1

    n

    a n d a l l a

    i

    ' s

    n o n z e r o . G i v e n k 2 f 1 ; : : : ; n , 1 g , o n e c a n w r i t e u n i q u e l y f a s f = r

    k

    + x

    k + 1

    q

    k

    w h e r e

    r

    k

    a n d q

    k

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

    k

    =

    k

    o f c o u r s e , r

    k

    =

    P

    k

    i = 0

    a

    i

    t

    i

    a n d

    q

    k

    =

    P

    n

    i = k + 1

    a

    i

    t

    i

    ,

    k

    . W i t h t h e s e n o t a t i o n s , w e h a v e t h e f o l l o w i n g s i m p l e f a c t .

    P r o p o s i t i o n 2 L e t M

    k

    = s u p

    0 i k

    j a

    i

    j . I f x i s a n i n t e g e r r o o t o f f a n d j x j 2 , x

    m u s t a l s o b e a r o o t o f q

    k

    a n d r

    k

    p r o v i d e d t h a t

    k + 1

    ,

    k

    1 + l o g M

    k

    .

    P r o o f . S i n c e x i s a r o o t o f f , j r

    k

    x j = j q

    k

    x j j x j

    k + 1

    . M o r e o v e r ,

    j r

    k

    x j M

    k

    1 + j x j + + j x j

    k

    = M

    k

    j x j

    1 +

    k

    , 1

    j x j , 1

    :

    F r o m t h e s e t w o r e l a t i o n s w e o b t a i n

    j q

    k

    x j j x j

    k + 1

    ,

    k

    M

    k

    j x j = j x j , 1 2 M

    k

    s i n c e j x j 2 . F i n a l l y , q

    k

    x 6= 0 i m p l i e s

    k + 1

    ,

    k

    l o g j x j 1 + l o g M

    k

    s i n c e

    j q

    k

    x j 1 i n t h i s c a s e . T h i s i s i n c o n t r a d i c t i o n w i t h t h e h y p o t h e s i s

    k + 1

    ,

    k

    1 + l o g M

    k

    . W e c o n c l u d e t h a t q

    k

    x = 0 , a n d r

    k

    x = 0 f o l l o w s i m m e d i a t e l y . 2

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

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

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

    d e g r e e d =

    n

    w i t h a n o n z e r o c o n s t a n t c o e c i e n t i . e .

    0

    6= 0 a n d M = M

    n

    =

    s u p

    0 i n

    j a

    i

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

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

    d

    n

    1 + l o g M .

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

    r

    k

    o r q

    k

    a n d t h e n c h e c k w h e t h e r a n y o f t h e s e r o o t s i s a l s o a r o o t o f q

    k

    o r r

    k

    .

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

    p a r t i c u l a r w h e n e i t h e r q

    k

    o r r

    k

    i s o f s m a l l s i z e c o m p a r e d t o f . F o r i n s t a n c e , i f f i s

    o f t h e f o r m f x = x

    2

    , 3 + x

    5

    q x , o n l y , 1 a n d 1 c a n p o s s i b l y b e i n t e g e r r o o t s o f f .

    A n d i f f i s o f t h e f o r m f x = x

    2

    , 9 + x

    7

    q x , a l l i n t e g e r r o o t s a r e i n f , 3 ; , 1 ; 1 ; 3 g .

    8

  • 8/14/2019 Polynomial time algorithm for Diophantine equations in one variable.pdf

    9/11

    5 F i n a l R e m a r k s

    N a t u r a l e x t e n s i o n s o f T h e o r e m 1 w o u l d c o n s i d e r t h e e x i s t e n c e o f r a t i o n a l o r r e a l

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

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

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

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

    c o m p u t e t h e s i g n o f f p = q i n p o l y n o m i a l t i m e . F o r r e a l r o o t s t h e s i t u a t i o n s e e m s

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

    I n a n o t h e r d i r e c t i o n , o n e c o u l d c o n s i d e r d i o p h a n t i n e e q u a t i o n s i n s e v e r a l v a r i -

    a b l e s . F o r s p a r s e p o l y n o m i a l s i n s e v e r a l v a r i a b l e s , s i g n d e t e r m i n a t i o n s e e m s t o b e a

    d i c u l t q u e s t i o n , a n d i t i s n o t c l e a r w h e t h e r T h e o r e m 2 c a n b e g e n e r a l i z e d .

    R e c a l l t h a t t h e l o g a r i t h m i c h e i g h t o f a n i n t e g e r x i s d e n e d b y h t x = l o g 1 +

    j x j .

    L e t f 2 Z Z t

    1

    ; : : : ; t

    n

    , f =

    P

    a

    t

    . H e r e a

    6= 0 , 2 I N

    n

    i s a m u l t i i n d e x a n d t h e

    s u m i s o v e r a n i t e s e t A I N

    n

    . T h e s p a r s e r e p r e s e n t a t i o n o f f i s t h e s e q u e n c e o f

    p a i r s ; a

    , a n d t h e s i z e o f f f o r t h i s r e p r e s e n t a t i o n i s d e n e d b y

    s i z e f =

    X

    2 A

    h t + h t a

    w h e r e h t = h t

    1

    + : : : + h t

    n

    .

    I t i s w e l l k n o w n t h a t f c a n b e e v a l u a t e d a t a p o i n t x 2 Z Z

    n

    i n t i m e p o l y n o m i a l

    i n s i z e f a n d s i z e x i f f i s c o n s i d e r e d w i t h t h e d e n s e r e p r e s e n t a t i o n .

    P r o b l e m 1 G i v e n f 2 Z Z t

    1

    ; : : : ; t

    n

    a n d x 2 Z Z

    n

    , i s i t p o s s i b l e t o c o m p u t e

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

    o f f ?

    T h e o r e m 2 s o l v e s t h i s p r o b l e m f o r t h e c a s e n = 1 . F o r a n y x e d n , S h u b 1 9 9 3

    s o l v e s i t u s i n g B a k e r ' s t h e o r e m B a k e r 1 9 7 5 i n c a s e f h a s o n l y t w o m o n o m i a l s b u t

    t h e h a l t i n g t i m e d e p e n d s e x p o n e n t i a l l y i n n . M o r e o v e r h e p o s e s a q u e s t i o n a k i n t o

    P r o b l e m 1 .

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

    a b l e s i s w e l l - k n o w n t o b e u n d e c i d a b l e c f . M a t i y a s e v i c h 1 9 9 3 . T h u s w e c o n s i d e r

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

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

    f 2 Z Z t

    1

    ; : : : ; t

    n

    h a s d e g r e e d 2 I N , t h e d e n s e r e p r e s e n t a t i o n o f f i s t h e s e q u e n c e

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

    g f o r a l l 2 I N

    n

    w i t h j j =

    1

    + : : : +

    n

    d . T h e s e q u e n c e i s

    o r d e r e d b y l e x i c o g r a p h i c o r d e r i n g i n I N

    n

    . T h e n , t h e s i z e o f t h e d e n s e r e p r e s e n t a t i o n

    o f f i s

    s i z e f =

    X

    j j d

    s i z e a

    :

    H e r e s i z e a = h t a i f a 6= 0 a n d s i z e 0 = 1 .

    W e p r o p o s e t h e f o l l o w i n g c o n j e c t u r e .

    9

  • 8/14/2019 Polynomial time algorithm for Diophantine equations in one variable.pdf

    10/11

    C o n j e c t u r e 1 T h e f e a s i b i l i t y o f a n y d i o p h a n t i n e e q u a t i o n P x ; y = 0 c a n b e d e -

    c i d e d i n t i m e 2

    C s

    w h e r e C i s a u n i v e r s a l c o n s t a n t a n d s i s t h e s i z e o f P f o r t h e

    d e n s e r e p r e s e n t a t i o n .

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

    j e c t u r e o n t h e h e i g h t o f s o l u t i o n s .

    C o n j e c t u r e 2 I f a d i o p h a n t i n e e q u a t i o n P x ; y = 0 i s f e a s i b l e , t h e r e e x i s t s a s o -

    l u t i o n a ; b 2 Z Z

    2

    w i t h h t a a n d h t b b o t h b o u n d e d b y K s w h e r e K i s a u n i v e r s a l

    c o n s t a n t a n d s i s t h e s i z e o f P f o r t h e d e n s e r e p r e s e n t a t i o n .

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

    m o r e c o n j e c t u r e s t h a n t h e o r e m s . F o r i n s t a n c e , t h e L a n g - S t a r k c o n j e c t u r e L a n g

    1 9 9 1 p r o p o s e s t h e u p p e r b o u n d j x j C m a x j a j

    3

    ; j b j

    2 k

    C a n d k a r e u n i v e r s a l

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

    2

    = x

    3

    + a x + b

    w i t h 4 a

    3

    + 2 7 b

    2

    6= 0 . H e r e w e o n l y n e e d a b o u n d o n t h e s m a l l e s t h e i g h t o f a s o l u t i o n ,

    t h o u g h .

    R e m a r k 3 I f s i s t a k e n t o b e t h e s i z e o f t h e s p a r s e r e p r e s e n t a t i o n o f P i n C o n j e c -

    t u r e 2 , t h e n t h e c o n j e c t u r e s d o e s n o t h o l d .

    C o n s i d e r t h e p o l y n o m i a l

    P = x , 2

    2

    + y , x

    n 2

    :

    O n c e e x p a n d e d a s a s u m o f s i x m o n o m i a l s , o n e c h e c k s t h a t t h e s i z e o f t h e s p a r s e

    r e p r e s e n t a t i o n o f P i s b o u n d e d b y 2 l o g n + 1 7 . B u t t h e o n l y i n t e g e r z e r o o f P i s

    2 ; 2

    n

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

    O n e c a n c h e c k t h a t P d e n e s a c u r v e o f g e n u s 0 i n t h e c o m p l e x p r o j e c t i v e p l a n e

    I P C

    3

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

    1 9 6 9 ; W a l k e r 1 9 6 2 f o r b a s i c f a c t s o f a l g e b r a i c c u r v e s . T h u s C o n j e c t u r e s 1 a n d 2

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

    R e f e r e n c e s

    A k r i t a s , A . 1 9 8 9 . E l e m e n t s o f C o m p u t e r A l g e b r a w i t h A p p l i c a t i o n s . J o h n W i l e y &

    S o n s .

    B a k e r , A . 1 9 7 5 . T r a n s c e n d e n t a l N u m b e r T h e o r y . C a m b r i d g e U n i v e r s i t y P r e s s .

    F u l t o n , W . 1 9 6 9 . A l g e b r a i c C u r v e s . B e n j a m i n .

    L a n g , S . 1 9 9 1 . N u m b e r T h e o r y I I I , V o l u m e 6 0 o f E n c y c l o p a e d i a o f M a t h e m a t i c a l S c i -

    e n c e s . S p r i n g e r - V e r l a g .

    M a t i y a s e v i c h , Y . 1 9 9 3 . H i l b e r t ' s T e n t h P r o b l e m . T h e M I T P r e s s .

    M i g n o t t e , M . 1 9 9 2 . M a t h e m a t i c s f o r C o m p u t e r A l g e b r a . S p r i n g e r - V e r l a g .

    S c h w a r t z , J . 1 9 8 0 . F a s t p r o b a b i l i s t i c a l g o r i t h m s f o r v e r i c a t i o n o f p o l y n o m i a l i d e n t i -

    t i e s . J o u r n a l o f t h e A C M 2 7 , 7 0 1 7 1 7 .

    1 0

  • 8/14/2019 Polynomial time algorithm for Diophantine equations in one variable.pdf

    11/11

    S h u b , M . 1 9 9 3 . S o m e r e m a r k s o n B e z o u t ' s t h e o r e m a n d c o m p l e x i t y t h e o r y . I n M . H i r s c h ,

    J . M a r s d e n , a n d M . S h u b E d s . , F r o m T o p o l o g y t o C o m p u t a t i o n : P r o c e e d i n g s o f t h e

    S m a l e f e s t , p p . 4 4 3 4 5 5 . S p r i n g e r - V e r l a g .

    W a l k e r , R . 1 9 6 2 . A l g e b r a i c C u r v e s . D o v e r .

    1 1