Algorithm 289: confidence interval for a ratio [G1]

B o o l e a n p r o c e d u r e SOLVEINTEGER (A) t imes: @) equals the vector : (b) t imes a leas t in teger : (d) where A is a mat r ix of d imension one to: 0n) by one to: (n) Also find: (k) l inear ly independen t auxi l iary solut ions and s tore in the mat r ix : (Y); v a l u e m, n; i n t e g e r m, n, d, k; i n t e g e r a r r a y A, x, b, y; c o m m e n t Seeks the smal les t posi t ive integer , d, for which an in teger so lu t ion to the equa t ion Ax = bd exists. If no solut ion exists then SOLVELVTEGER is r e tu rned as f a l s e . Otherwise SOLVEINTEGER is r e tu rned as t r u e and the values of d and the solut ion vec tor x are re turned. If nmre t h a n one solut ion exists t hen auxi l iary solut ions are r e tu rned in the ma t r ix Y. The addi t iona l solut ions are ob ta ined by adding any l inear combina t ion of the first k rows of Y to the so lu t ion x. It. is assumed t h a t A is d imensioned [1 : re,l: n], x is d imensioned [ l :n] , b is d imensioned [1: m], Y is d imensioned [ l :n , l :n . ] . No te t h a t a d iophan t ine solut ion exists if and only if d is r e tu rned as 1 and SOLVEINTEGER is r e tu rned as t r u e . The procedure relies en t i re ly on the act ion of the procedure L V T R A N K [Algori thm 287, Comm. A CM 9 (July 1966), 513]. In par t i cu la r , a matr ix , mat, is formed b y adjoining b to the t ranspose of A, and then adjoining an (n + 1) th order iden t i ty ma t r ix as follows: ,)