FIVE INTEGER NUMBER ALGORITHMS TO SOLVE LINEAR SYSTEMS

Similar documents
Foundations of Arithmetic

A CLASS OF RECURSIVE SETS. Florentin Smarandache University of New Mexico 200 College Road Gallup, NM 87301, USA

Difference Equations

APPENDIX A Some Linear Algebra

A new Approach for Solving Linear Ordinary Differential Equations

The internal structure of natural numbers and one method for the definition of large prime numbers

a b a In case b 0, a being divisible by b is the same as to say that

2.3 Nilpotent endomorphisms

Lectures - Week 4 Matrix norms, Conditioning, Vector Spaces, Linear Independence, Spanning sets and Basis, Null space and Range of a Matrix

Chapter 5. Solution of System of Linear Equations. Module No. 6. Solution of Inconsistent and Ill Conditioned Systems

Module 9. Lecture 6. Duality in Assignment Problems

Introduction to Vapor/Liquid Equilibrium, part 2. Raoult s Law:

n α j x j = 0 j=1 has a nontrivial solution. Here A is the n k matrix whose jth column is the vector for all t j=0

Example: (13320, 22140) =? Solution #1: The divisors of are 1, 2, 3, 4, 5, 6, 9, 10, 12, 15, 18, 20, 27, 30, 36, 41,

Inner Product. Euclidean Space. Orthonormal Basis. Orthogonal

First day August 1, Problems and Solutions

5 The Rational Canonical Form

3.1 Expectation of Functions of Several Random Variables. )' be a k-dimensional discrete or continuous random vector, with joint PMF p (, E X E X1 E X

THE CHINESE REMAINDER THEOREM. We should thank the Chinese for their wonderful remainder theorem. Glenn Stevens

C/CS/Phy191 Problem Set 3 Solutions Out: Oct 1, 2008., where ( 00. ), so the overall state of the system is ) ( ( ( ( 00 ± 11 ), Φ ± = 1

The Order Relation and Trace Inequalities for. Hermitian Operators

On the size of quotient of two subsets of positive integers.

CHAPTER 5 NUMERICAL EVALUATION OF DYNAMIC RESPONSE

Math 261 Exercise sheet 2

ON A DETERMINATION OF THE INITIAL FUNCTIONS FROM THE OBSERVED VALUES OF THE BOUNDARY FUNCTIONS FOR THE SECOND-ORDER HYPERBOLIC EQUATION

SL n (F ) Equals its Own Derived Group

Solution of Linear System of Equations and Matrix Inversion Gauss Seidel Iteration Method

More metrics on cartesian products

FACTORIZATION IN KRULL MONOIDS WITH INFINITE CLASS GROUP

NUMERICAL DIFFERENTIATION

The optimal delay of the second test is therefore approximately 210 hours earlier than =2.

princeton univ. F 17 cos 521: Advanced Algorithm Design Lecture 7: LP Duality Lecturer: Matt Weinberg

Self-complementing permutations of k-uniform hypergraphs

Appendix B. Criterion of Riemann-Stieltjes Integrability

Problem Set 9 Solutions

Min Cut, Fast Cut, Polynomial Identities

Convexity preserving interpolation by splines of arbitrary degree

Randić Energy and Randić Estrada Index of a Graph

Subset Topological Spaces and Kakutani s Theorem

An (almost) unbiased estimator for the S-Gini index

Module 2. Random Processes. Version 2 ECE IIT, Kharagpur

Affine transformations and convexity

Physics 5153 Classical Mechanics. D Alembert s Principle and The Lagrangian-1

Formulas for the Determinant

Bernoulli Numbers and Polynomials

MMA and GCMMA two methods for nonlinear optimization

arxiv: v1 [math.ho] 18 May 2008

APPENDIX 2 FITTING A STRAIGHT LINE TO OBSERVATIONS

Appendix for Causal Interaction in Factorial Experiments: Application to Conjoint Analysis

Chapter 12. Ordinary Differential Equation Boundary Value (BV) Problems

Graph Reconstruction by Permutations

Complete subgraphs in multipartite graphs

The Multiple Classical Linear Regression Model (CLRM): Specification and Assumptions. 1. Introduction

FINITELY-GENERATED MODULES OVER A PRINCIPAL IDEAL DOMAIN

Problem Solving in Math (Math 43900) Fall 2013

Another converse of Jensen s inequality

MATH 241B FUNCTIONAL ANALYSIS - NOTES EXAMPLES OF C ALGEBRAS

College of Computer & Information Science Fall 2009 Northeastern University 20 October 2009

Christian Aebi Collège Calvin, Geneva, Switzerland

THERE ARE NO POINTS OF ORDER 11 ON ELLIPTIC CURVES OVER Q.

On quasiperfect numbers

(2mn, m 2 n 2, m 2 + n 2 )

arxiv: v1 [math.co] 1 Mar 2014

Lecture 3. Ax x i a i. i i

Expected Value and Variance

arxiv: v1 [math.co] 12 Sep 2014

MAKING A DECISION WHEN DEALING WITH UNCERTAIN CONDITIONS

18.781: Solution to Practice Questions for Final Exam

Module 3 LOSSY IMAGE COMPRESSION SYSTEMS. Version 2 ECE IIT, Kharagpur

10. Canonical Transformations Michael Fowler

Exercises of Chapter 2

Maximizing the number of nonnegative subsets

Errors for Linear Systems

Linear Approximation with Regularization and Moving Least Squares

HMMT February 2016 February 20, 2016

Structure and Drive Paul A. Jensen Copyright July 20, 2003

Numerical Heat and Mass Transfer

REAL ANALYSIS I HOMEWORK 1

Global Sensitivity. Tuesday 20 th February, 2018

Deriving the X-Z Identity from Auxiliary Space Method

VARIATION OF CONSTANT SUM CONSTRAINT FOR INTEGER MODEL WITH NON UNIFORM VARIABLES

Yong Joon Ryang. 1. Introduction Consider the multicommodity transportation problem with convex quadratic cost function. 1 2 (x x0 ) T Q(x x 0 )

y i x P vap 10 A T SOLUTION TO HOMEWORK #7 #Problem

Transfer Functions. Convenient representation of a linear, dynamic model. A transfer function (TF) relates one input and one output: ( ) system

REGULAR POSITIVE TERNARY QUADRATIC FORMS. 1. Introduction

The path of ants Dragos Crisan, Andrei Petridean, 11 th grade. Colegiul National "Emil Racovita", Cluj-Napoca

Linear, affine, and convex sets and hulls In the sequel, unless otherwise specified, X will denote a real vector space.

9 Characteristic classes

PRIMES 2015 reading project: Problem set #3

Fundamental loop-current method using virtual voltage sources technique for special cases

Calculation of time complexity (3%)

The Geometry of Logit and Probit

1 GSW Iterative Techniques for y = Ax

CONJUGACY IN THOMPSON S GROUP F. 1. Introduction

PHYS 705: Classical Mechanics. Newtonian Mechanics

On the Multicriteria Integer Network Flow Problem

Complex Numbers. x = B B 2 4AC 2A. or x = x = 2 ± 4 4 (1) (5) 2 (1)

General viscosity iterative method for a sequence of quasi-nonexpansive mappings

2E Pattern Recognition Solutions to Introduction to Pattern Recognition, Chapter 2: Bayesian pattern classification

A New Refinement of Jacobi Method for Solution of Linear System Equations AX=b

Transcription:

FIVE INTEGER NUMBER ALGORITHMS TO SOLVE LINEAR SYSTEMS Florentn Smarandache, Ph D Assocate Professor Char of Department of Math & Scences Unversty of New Mexco 200 College Road Gallup, NM 870, USA E-mal: smarand@unmedu Ths chapter further extends the results obtaned n chapters and 5 (from lnear equaton to lnear systems) Each algorthm s thoroughly proved and then an example s gven Fve nteger number algorthms to solve lnear systems are further gven Algorthm (Method of substtuton) (Although smple, ths algorthm requres complex computatons but s, nevertheless, easy to mplement nto a computer program) Some nteger number equaton are ntally solved (whch s usually smpler) by means of one of the algorthms or 5 (If there s an equaton of the system whch does not have nteger systems, then the nteger system does not have nteger systems, then Stop) The general nteger soluton of the equaton wll depend on n nteger number parameters (see [5]): () (p ) x f k () (),,k n,,n, where all functons f () are lnear and have nteger number coeffcents Ths general nteger number system (p ) s ntroduced nto the other m equatons of the system We obtan a new system of m equatons wth n unknown varables: () k,,n, whch s also to be solved wth nteger numbers The procedure s smlar Solvng a new equaton, we obtan ts general nteger soluton: where all functons f 2 (2) (p 2 ) k 2 () f 2 (2) k (2) (2),,k n 2, 2,n, are lnear, wth nteger number coeffcents (If, along ths algorthm we come across an equaton, whch does not have nteger solutons, then the ntal system does not have nteger soluton Stop) In the case that all solved equatons had nteger system at step ( ), r ( r beng of the same rank as the matrx assocated to the system) then: ( ) ( ) ( (p ) k f k ) ( ),,k n,,n, f ( ) are lnear functons and have nteger number coeffcents

Fnally, after r steps, and f all solved equatons had nteger solutons, we obtan the nteger soluton of one equaton wth n r unknown varables The system wll have nteger solutons f and only f n ths last equaton has nteger solutons If t does, let ts general nteger soluton be: ( r ) ( r) ( r) ( r) (p r ) k f k,, k, r,n r, where all f r (r) r r n are lnear functons wth nteger number coeffcents We ll present now the reverse procedure as follows We ntroduce the values of k r (r ), r,n r, at step p r n the values of from step (p r ) It follows: k, r,n r 2 ( r 2) r k f f k,, k,, f k,, k g k,, k, ( r 2) ( r ) ( r) ( r) ( r) ( r) ( r) ( r) ( r ) ( r) ( r) r r n r n r n r r n r (r ) r,n r, from whch t follows that g r are lnear functons wth nteger number coeffcents Then follows those (p r 2 ) n (p r e ) and so on, untl we ntroduce the values obtaned at step (p 2 ) n those from the step (p ) It wll follow: x g k (r) (r),,k n r notaton g,, k k n r,,n, wth all g most obvously, lnear functons wth nteger number coeffcents (the notaton was made for smplcty and aesthetcal aspects) Ths s, thus, the general nteger soluton, of the ntal system The correctness of algorthm The algorthm s fnte because t has r steps on the forward way and r steps on the reverse, (r ) Obvously, f one equaton of one system does not have (nteger number) solutons then the system does not have solutons ether Wrtng S for the ntal system and S the system resulted from step (p ), r 2, t follows that passng from (p ) to ( p ) we pass from a system S to a system S equvalent from the pont of vew of the nteger number soluton, e ( ) k t 0,,n, whch s a partcular nteger soluton of the system S f and only f ( ) k 0 h,,n, s a partcular nteger soluton of the system S 0 k ( ) f t 0 0,,t n 2 where,,n Hence, ther general nteger solutons are also equvalent (consderng these substtutons) Such that, n the end, resolvng the ntal system S s equvalent wth solvng the equaton (of the system consstng of one equaton) S r wth nteger number

coeffcents It follows that the system S has nteger number soluton f and only f the systems S have nteger number soluton, r Example By means of algorthm, let us calculate the nteger number soluton of the followng system: 5x 7y 2z 6w 6 (S) x 6y z w 0 Soluton: We solve the frst nteger number equaton We obtan the general soluton (see [] or [5]): x t 2t 2 (p ) y t z t 5t 2 t w t where t, t 2, t Substtutng n the second, we obtan the system: (S ) 5t 2t 2 2t 9 0 Solvng ths nteger equaton we obtan ts general nteger soluton: t k (p 2 ) t 2 k 2k 2 t 9k 2k 2 7 where k, k 2 The reverse way Substtutng (p 2 ) n (p ) we obtan: x k k 2 2 where k, k 2 y k z k 79k 2 2 w 9k 2k 2 7, whch s the general nteger soluton of the ntal system (S) Stop Algorthm 2 Input A lnear system () wthout all a 0 Output We decde on the possblty of an nteger soluton of ths system If t s possble, we obtan ts general nteger soluton Method t, h, p 2 (A) Dvde each equaton by the largest co-dvsor of the coeffcents of the unknown varables If you do not obtan an nteger quotent for at least one equaton, then the system does not have nteger solutons Stop

(B) If there s an nequalty n the system, then the system does not have nteger solutons Stop (C) If repetton of more equatons occurs, keep one and f an equaton s an dentty, remove t from the system If there s ( 0, 0 ) such that a 0 0 then obtan the value of the varable x 0 from equaton 0 ; statement (T t ) Substtute ths statement (where possble) n the other equatons of the system and n the statement (T t ), (H h ) and (P p ) for all, h, and p Consder t : t, remove equaton ( 0 ) from the system If there s no such a par, go to step 5 Does the system (left) have at least one unknown varable? If t does, consder the new data and go on to step 2 If t does not, wrte the general nteger soluton of the system substtutng k, k 2, for all varables from the rght term of each expresson whch gves the value of the unknowns of the ntal system Stop 5 Calculate a mn r a r mod a, 0 r a,, 2 2 2 and determne the ndces,, 2 as well as the r for whch ths mnmum can be calculated (If there are more varables, choose one arbtrarly) a r 6 Wrte: x 2 t h x 2, statement (H a h ) Substtute ths statement (where 2 possble n all the equatons of the system and n the statements (T t ), (H h ) and (P p ) for all t, h, and p 7 (A) If a, consder x 2 : t h, h : h, and go on to step 2 (B) If a, then obtan the value of x from the equaton () ; statement (P p ) Substtute ths statement (where possble n the other equatons of the system and n the relatons (T t ), (H h ) and (P p ) for all t, h, and p Remove the equaton () from the system Consder h : h, p : p, and go back to step The correctness of algorthm 2 Let consder system () Lemma We consder the algorthm at step 5 Also, let M r, a r mod a, 0 r a,,,,2,, 2 2 2 Then M Ø Proof: Obvously, M s fnte and M * Then, M has a mnmum f and only f M Ø We suppose, conversely, that M Ø Then a 2 0(moda 2 ),,, 2 It follows as well that a 2 0(mod a ),,, 2

That s a a 2,,, 2 We consder an 0 arbtrary but fxed It s clear that (a 0,,a 0 n ) : a 0 0, (because the algorthm has passed through the sub-steps 2(B) and 2(C) But, because t has also passed through step, t follows that a 0,, but as t prevously passed through step 2(A), t would result that a 0, Ths contradcton shows that the assumpton s false Lemma 2 Let s consder a r(mod a ) Substtute 0 2 x 2 t h a 0 r a 0 2 n system (A) obtanng system (B) Then x x 0,,n s the partcular nteger soluton of (A) f and only f a x x 0 0 0, 2 and t h x r 2 a 0 2 s the partcular nteger soluton of (B) 5 x Lemma Let a and a 2 obtaned at step 5 Then 0 a 2 a Proof: It s suffcent to show that a a,, because n order to get a 2, step 6 s oblgatory, when the coeffcents f the new system are calculated, a beng equal to a coeffcent form the new system (equalty of modules), the coeffcent on ( 0 ) Let a 0 0 wth the property a 0 0 a Hence, a a mn a Let a 0 s wth a 0 s a m ; there s such an element 0 0 because a 0 m s the mnmum of the coeffcents n the module and not all a 0,,n are equal (conversely, t would result that ( a,, a ) a,, r, the algorthm 0 0n 0 passed through sub-step 2(A) has smplfed each equaton by the maxmal co-dvsor of ts coeffcents; hence, t would follow that a 0,,n, whch, agan, cannot be real because the algorthm also passed through step ) Out of the coeffcents a 0 m we choose one wth the property a 0 s 0 Ma 0 m there s such an element (contrary, t would result ( a,, ) 0 a 0n a 0 m but the algorthm has also passed through step 2(A) and t

would mean that a 0 m passed) whch contradcts step through whch the algorthm has also Consderng q 0 a 0 s 0 / a 0 m and r a 0 s 0 q 0 a 0 m, we have a 0 s 0 r 0 (moda 0 m ) and 0 r 0 a 0 m a 0 0 a We have, thus, obtaned an r 0 wth r 0 a, whch s n contradcton wth the very defnton of a Thus a a,, Lemma Algorthm 2 s fnte Proof: The functonng of the algorthm s meant to transform a lnear system of m equatons and n unknowns nto one of m n wth m m, n n, thus, successvely nto a fnal lnear equaton wth n r unknowns (where r s the rank of the assocated matrx) Ths equaton s solved by means of the same algorthm (whch works as [5]) The general nteger soluton of the system wll depend on the n nteger number ndependent parameters (see [6] smlar propertes can be establshed also the general nteger soluton of the lnear system) The reducton of equatons occurs at steps 2, and sub-step 7(B) Step 2 and are obvous and, hence, trval; they can reduce the equaton of the system (or even put an end to t) but only under partcular condtons The most mportant case fnds ts soluton at step 7(B), whch always reduces one equaton of the system As the number of equatons s fnte we come to solve a sngle nteger number equaton We also have to show that the transfer from one system m n to another m n s made n a fnte nterval of tme: by steps 5 and 6 permanent substtuton of varables are made untl we to a (we to a because, accordng to lemma, all a s are postve nteger numbers and form a strctly decreasng row) Theorem of correctness Algorthm 2 correctly calculates the general nteger soluton of the lnear system Proof: Algorthm 2 s fnte accordng to lemma Steps 2 and are obvous (see also [], [5]) Ther part s to smplfy the calculatons as much as possble Step tests the fnalty of the algorthm; the substtuton wth the parameters k, k 2, has systematzaton and aesthetc reasons The varables t, h, p are counter varables (started at step ) and they are meant to count the statement of the type T, H,P (numberng requred by the substtutons at steps, 6 and sub-step 7(B); h also counts the new (auxlary) varables ntroduced n the moment of decomposton of the system The substtuton from step 6 does not affect the general nteger soluton of the system (t follows from lemma 2) Lemma shows that at step 5 there s always a, because Ø M * The algorthm performs the transformaton of a system m n nto another m n, equvalent to t, preservng the general soluton (takng nto account, however, the substtutons) (see also lemma 2) Example 2 Calculate the nteger soluton of: 6

2x 7y 9z 2 5y 8z 0w 0 0z 0w 0 5x 2z 69w Soluton: We apply algorthm 2 (we purposely selected an example to be passed through all the steps of ths algorthm): t, h, p 2 (A) The fourth equaton becomes 5x 7z 2w (B) (C) Equaton s removed No; go on to step5 5 a 2 and, 2, 2, and r 2 6 z t y, the statement (H ) Substtutng t n the 2x 2y 9 t 2 y 9t 0 w 0 5 x 7 y 7t 2 w 7 a consder z t,h : 2, and go back to step 2 2 No Step 5 5 a and 2,, 2 2, and r 6 y t 2 w, the statement (H 2 ) Substtutng n the system: 2x 2t 9t 6w 2 2 t 8 t w 0 2 5 x 7t 7t 2w 2 Substtutng t n statement (H ), we obtan: z t t 2 w, statement (H ) 7 w t 2 8t statement (P ) Substtutng t n the system, we obtan: 2x 20t 57t 2 2 5 x t 9t 2 Substtutng t n the other statements, we obtan: z 0t 25 t, ( H ) 2 y 0t2 2 t, ( H2) h:, p : 2, and go back to step Yes 2 t 2 5x 9t, statement (T ) Substtutng t (where possble) we obtan: 7

2x 27t 8 (the new system); z 0 50x 5 t, ( H ) y 0 50x t, ( H ) 2 w 5 x 5 t, ( P) Consder t : 2 go on to step Yes Go back to step 2 (From now on algorthm 2 works smlarly wth that from [5], wth the only dfference that the substtuton must also be made n the statements obtaned up to ths pont) 2 No Go on to step 5 5 a (one three) and, 2, 2, and r 6 x t 2t, statement (H ) After substtutng we obtan: 2t t 8 (the system) IV z 0 50t 5 t, ( H ) ; y 0 50t t, ( H ); 2 w 5 t 5 t, ( P ); t 5 t t ( T ); 2, 7 x : t, h : and go on to step 2 2 No go on to step 5 5 a 5 and,, 2 2 and r 5 6 t t 9t, statement (H ) Substtutng t, we obtan : 5t t 8 (the system) V z 0 85t 5 t, ( H ) ; IV y 0 76t t, ( H ) ; 2 x 9 t 2 t, ( H ); w 0 t 5 t, ( P ); t t t ( T ); 2, 7 t : t ;h : 5 and go back to step 2 2 No Step 5 5 a 2 and, 2, 2 and r 2 6 t t 5 t statement (H 5 ) After substtutng, we obtan: 5t 5 2t 8 (the system) 8

VI z 0 85t 20 t, ( H ) ; 5 V y 0 76t 2 t, ( H ) ; 5 2 IV x 9t 55 t, ( H ) ; 5 IV w 0t 85 t, ( P) ; 5 t t t, ( T ); 2 5 t 9t5 26 t, ( H); 7 t : t 6,h : 6 and go back to step 2 2 No Step 5 5 a and, 2, 2,r 6 t t 6 2t 5 statement (H 6 ) After substtutng, we obtan: t 5 2t 6 8 (the system) VII z 0 95t 20 t, ( H ) ; 5 6 IV y 0 92t 2 t, ( H ) ; 5 6 2 x t t H 9 5 55 6, ( ) ; V w 0t 85 t, ( P ) ; 5 6 IV t 68t t, ( T ) ; 2 5 6 t t 26 t, ( H ); 5 6 t 5t5 t6, H5 ( ); 7 t 5 2t 6 8 statement (P 2 ) Substtutng t n the system we obtan: 0=0 Substtutng t n the other statements, t follows: z 00t 6 70 y 98t 6 2826 x 27t 6 728 w 65t 6 2 t t t t 77t 5 2 6 2t 6 t 0 6 6 5 t 6 statements of no mportance Consder h : 7, p :, and go back to step t 6 No The general nteger soluton of the system s: x 27k 728 y z w 98k 2826 00k 70 65k 2 9

where k s an nteger number parameter Stop Algorthm Input A lnear system () Output We decde on the possblty of an nteger soluton of ths system If t s possble, we obtan ts general nteger soluton Method Solve the system n n If t does not have solutons n solutons n n ether Stop 2 f, t, h, g Wrte the value of each man varable x under the form: n, t does not have E : x f, q x q 0 r x r / wth all q, q, r, r, n such that all r, 0, r (where all x the rght term are nteger number varables: ether of the secondary varables of the system or other new varables ntroduced wth the algorthm) For all, we wrte r f E : r f, x r f Y f, r 0 where Y f, varables We remove all the equatons F f, whch are denttes are auxlary nteger number 5 Does at least one equaton F f, exsts? If t does not, wrte the general nteger soluton of the system substtutng k, k 2, for all the varables from the rght term of each expresson representng the value of the ntal unknowns of the system Stop 6 (A) Dvde each equaton F f, by the maxmal co-dvsor of the coeffcents of ther unknowns If the quotent s not an nteger number for at least one 0 the system does not have nteger solutons Stop (B) Smplfy as n m - all the fractons from the statements E f, 7 Does r 0 0 exst havng the absolute value? If t does not, go on to step 8 If t does, fnd the value of x from the equaton F f, 0 ; wrte T t for ths statement, and substtute t (where t s possble) n the statements E f,, T t, H h, G g for all, t, h and g Remove the equaton F f, 0 Consder f : f, t : t, and go back to step 8 Calculate of

a mn r, r r(mod r ), 0 r r,, 2 2 2 and determne the ndces, m, 2 as well as the r for whch ths mnmum can be obtaned (When there are more varables, choose only one) a m 9 (A) Wrte x 2 z r h x, where z a h s a new nteger varable; statement m 2 H h (B) Substtute the letter (where possble) n the statements E f,, F f,, T t, H h, G g for all, t, h and g (C) Consder h : h 0 (A) If a go back to step (B) If a calculate the value of the varable x from the equaton F f, ; relaton G g Substtute t (where possble) n the statements E f,, T t, H h, G g for all, t, h, and g Remove the equaton F f, Consder g : g, f : f and go back to step The correctness of algorthm Lemma 5 Let be fxed Then ntegers, n n 2, 0 and all x and only f r,, r, r n n2 n2 n r x r (wth all r, r,, n, n 2 beng beng nteger varables) can have nteger values f Proof: The fracton from the lemma can have nteger values f and only f there s a z such that n2 n2 n n r x r z r x z r 0, whch s a lnear equaton Ths equaton has nteger soluton r,, r, r n n2 Lemma 6 The algorthm s fnte It s true The algorthm can stop at steps,5 or sub-steps 6(A) (It rarely stops at step ) One equaton after another are gradually elmnated at step and especally 7 and 0(B) F f, - the number of equaton s fnte If at steps and 7 the elmnaton of equatons may occur only n specal cases elmnaton of equatons at sub step 0 (B) s always true because, through steps 8 and 9 we get to a (see [5]) or even lemma (from the correctness of algorthm 2) Hence, the algorthm s fnte Theorem of Correctness The algorthm correctly calculates the general nteger soluton of the system ()

Proof: The algorthm f fnte accordng to lemma 6 It s obvous that the system does not have soluton n n t does not have n n n n ether, because Z (step ) The varables f, t, h, g are counter varables and are meant to number the statements of the type E, F, T, H and G, respectvely They are used to dstngush between the statements and make the necessary substtutons (step 2) Step s obvous All coeffcents of the unknowns beng ntegers, each man varable x wll be wrtten: x c x c whch can assume the form and condtons requred n ths step Step s obtaned from by wrtng each fracton equal to an nteger varable Y f, (ths beng x ) Step 5 s very close to the end If there s no fracton among all E f, t means that all man varables x already have values n, whle the secondary varables of the system can be arbtrary n, or can be obtaned from the statements T, H or G (but these have only nteger expressons because of ther defnton and because only nteger substtutons are made) The second asserton of ths step s meant to systematze the parameters and renumber; t could be left out but aesthetc reasons dctate ts presence Accordng to lemma 5 the step 6(A) s correct (If a fracton dependng on certan parameters (nteger varables) cannot have values n, then the man varable whch has n the value of ts expresson such a fracton cannot have values n ether; hence, the system does not have nteger system) Ths 6(A) also has a smplfyng role The correctness of step 7, trval as t s, also results from [] and the steps 8-0 from [5] or even from algorthm 2 (lemma ) Ther ntal system s equvalent to the system from step (n fact, E f, as well, can be consdered a system) Therefore, the general nteger soluton s preserved (the changes of varables do not preudce t (see [], [5], and also lemma 2 from the correctness of algorthm 2)) From a system m n we form an equvalent system m n wth m m and n n Ths algorthm works smlarly to algorthm 2 Example Employng algorthm, fnd an nteger soluton of the followng system: x x 2 22x 8x 5 25 6x 6x 2x 5 2 x 2 x x 9x 5 26 Soluton Common resolvng n t follows: 2

x 2x 6x 5 x 2 x 2x 5 2 x x 5 2 2 f, t, h, g 2x x 7x 2x 5 x x 2 6 x 5 x x x 5 2 5 E, E, 2 E, 2 x y 0 F, x 2x y 0 F 5 2, 2 x y 2 0 F 5, 5 Yes 6 7 Yes: r 5 Then x5 y 2 the statement T Substtutng t n the others, we obtan: x 7x 6y 2x E, x 2 6 x 6y E, 2 x 2y 8 y 2 2 E, Remove the equaton F, Consder f : 2, t : 2 ; go back to step x 7x 6y 2x E 2, x 2 y +5 x 2y E 2, 2 x y 8 E 2,

2 x y 0 F 2 2, x 2y y 0 F 22 2, 2 5 Yes 6 7 Yes r 2 We obtan x 2y y 22 statement T 2 Substtutng t n the others we obtan: y 8y22 x 28y22 20 y E2, x y y +5 E 2 22 2, 2 x y 8 E 2, Remove the equaton F 2, 2 Consder f :, t : and go back to step 2y 2y22 x 22y 0 y E 22, x y y 5 E 2 22 2, 2 x y 8 E, 2y 2 y22 y 0 F, 5 Yes 6 7 No 8 a and m,, 2 22, and r 9 (A) y 22 z y (statement H ) (B) Substtutng t n the others we obtan: 2y 2z 2y x 22y 0z 0y E, x y z y 5 E 2, 2 x y 8 E, 2y 2z y 0 F, x 2y z y T 2 (C) Consder h : 2 0 (B) y 2y 2z, statement G Substtutng t n the others we obtan:

Remove equaton F, x 0y 92 z +27 E, x y z E 2,2 x y 8 E, x 6y 2z T 2 y 2y z H 22 Consder g : 2, f : and go back to step x 0y 92z 27 E, x y z E 2,2 x y 8 E, - 5 No The general soluton of the ntal system s: x 0k 92k 27, from E where k,k 2 2, x k k, from E 2 2,2 x k 8, from E, x 6k 2 k, from T 2 2 x5 k 2, from T Algorthm Input A lnear system () wth not all a 0 Output We decde on the possblty of nteger soluton of ths system If t s possble, we obtan ts general nteger soluton Method h, v 2 (A) Dvde every equaton by the largest co-dvsor of the coeffcents of the unknowns If the quotent s not an nteger for at least one 0 then the system does not have nteger solutons Stop (B) If there s an nequalty n the system, then t does not have nteger solutons (C) In case of repetton, retan only one equaton of that knd 5

(D) Remove all the equatons whch are denttes Calculate a mn a, a 0 and determne the ndces 0, 0 for whch ths, mnmum can be obtaned (If there are more varables, choose one, at random) If a go on to step 6 If a, then: (A) Calculate the value of the varable x 0 from the equaton 0 note ths statement V v (B) Substtute ths statement (where possble) n all the equatons of the system as well as n the statements V v, H h, for all v and h (C) Remove the equaton 0 from the system (D) Consder v : v 5 Does at least one equaton exst n the system? (A) If t does not, wrte the general nteger soluton of the system substtutng k, k 2, for all the varables from the rght term of each expresson representng the value of the ntal unknowns of the system (B) If t does, consderng the new data, go back to step 2 6 Wrte all a 0, 0 and b 0 under the form : a 0 a 0 0 q 0 r 0, wth r 0 a 0 b 0 a 0 q 0 r 0, wth 0 r a 0 0 0 x q 0 t h, statement H h 7 Wrte x 0 q 0 0 Substtute (where possble) ths statement n all the equatons of the system as well as n the statement V v, H h, for all v and h 8 Consder x 0 : t h, h : h, a 0 : r 0, 0, and go back to step 2 a 0 0 : a 0 0, b 0 : r 0, The correctness of Algorthm Ths algorthm extends the algorthm from [] (nteger solutons of equatons to nteger solutons of lnear systems) The algorthm was thoroughly proved n our prevous artcle; the present one ntroduces a new cycle havng as cyclng varable the number of equatons of system the rest remanng unchanged, hence, the correctness of algorthm s obvous 6

Dscusson The counter varables h and v count the statements H and V, respectvely, dfferentatng them (to enable the substtutons); 2 Step 2 ((A)+(B) + (C)) s trval and s meant to smplfy the calculatons (as algorthm 2); Sub-step 5 (A) has aesthetc functon (as all the algorthms descrbed) Everythng else has been proved n the prevous chapters (see [], [5], and algorthm 2) Example Let us use algorthm to calculate the nteger soluton of the followng lnear system: x 7x 6 x 2 x x 6x 5 x 9 2 5 Soluton h, v 2 a and, Go on to step 6 6 Then, 7 ( ) 2 6 2 0 2 0 2 7 x =x 2x t statement H Substtutng t n the second equaton we obtan: t x 2 2x x 5x 5 9 8 x : t, h : 2, a 2 : 0, a : 2, a : 0, a :, b : 2 Go back to step 2 2 The equvalent system was wrtten: t x 2 t x 2x x 5x 9 2 5 a, 2, = (A) Then: x t x2 2x 5x 5 9 statement V (B) Substtutng t n H, we obtan: x 7t 6 x 2 2x 0x 5 8, H (C) Remove the second equaton of the system (D) Consder: v : 2 5 Yes Go back to step 2 2 The equaton 2 2 t x s left a 2 and, 7

2 2, go to step 6 6 2 2 2 2( ) 0 7 x 2t t 2 statement H 2 Substtutng t n H, V, we obtan: x 5t 6 x 2t 0x 59 H 2 2 5 x 20t x 2t 5x V 2 2 5 8 x : t 2, h :, a :=, a : 2, b :=0, (the others beng all = 0) Go back to step 2 2 The equaton 5t 2t 2 0 was obtaned a, and, = (A) Then t 2t 2 statement V 2 (B) After substtuton, we obtan: x 9t 6x 0 x +59 H ; 2 2 5 x 28t x 5 x V ; 2 2 5 x t H ; 2 2 (C) Remove the frst equaton from the system (D) v : 5 No The general nteger soluton of the ntal system s: x 9k 6k 2 0k 59 where k, k 2,k Stop x 2 k 2 x k x 28k k 2 5k x 5 k Algorthm 5 Input A lnear system () Output We decde on the possblty of an nteger soluton of ths system If t s possble, we obtan ts general nteger soluton Method We solve the common system n n, then t does not have solutons n n, then t does not have solutons n n ether Stop 2 f, v, h Wrte the value of each man varable x under the form: 8

E x q x q r x r, f, : / wth all q, q, r, r, from such that all r, r, (where all x S of the rght term are nteger varables: ether from the secondary varables of the system or the new varables ntroduced wth the algorthm) For all, we wrte r f E : r f, x r, f y f, r 0 where y f, are auxlary nteger varables Remove all the equatons F f, whch are denttes 5 Does at least one equaton F f, exst? If t does not, wrte the general nteger soluton of the system substtutng k, k 2, for all the varables of the rght number of each expresson representng the value of the ntal unknowns of the system Stop 6 (A) Dvde each equaton F f, by the largest co-dvsor of the coeffcents of ther unknowns If the quotent s an nteger for at least one 0 then the system does not have nteger solutons Stop (B) Smplfy as prevously ((A)) all the functons n the relatons E f, 7 Calculate a mn r, r 0, and determne the ndces 0, 0 for whch ths, mnmum s obtaned 8 If a, go on to step 9 If a, then: (A) Calculate the value of the varable x 0 from the equaton F f, wrte V v for ths statement (B) Substtute ths statement (where possble) n the statement E f,, V v, H h, for all, v, and h (C) Remove the equaton E f, (D) Consder v : v, f : f and go back to step 9 Wrte all r, and r 0 under the form: 0 0 r 0 0 q 0 r 0, wth r 0 ; r 0 0 q 0 r 0, wth r 0 0 (A) Wrte x 0 q 0 x 0 q 0 t h statement H h (B) Substtute ths statement (where possble) n all the statements E f,, F f,, V v, H h 9

(C) Consder h : h and go back to step The correctness of the algorthm s obvous It conssts of the frst part of algorthm and the end part of algorthm Then, steps -6 and ther correctness were dscussed n the case of algorthm The stuaton s smlar wth steps 7-0 (After calculatng the real soluton n order to calculate the nteger soluton, we resorted to the procedure from 5 and algorthm 5 was obtaned) Ths means that all these nsertons were proven prevously Example 5 Usng algorthm 5, let us obtan the general nteger soluton of the system: x 6x 2x 0 x 2 2x 7x 5 Soluton Solvng n 5 we obtan: 6x 2x x 2x 7x5 x2 2 f, v, h 2x E, : x 2x 2x E,2 : x 2 x x 5 5 F, : 2x y 0 F,2 :2x x 5 y 2 0 5 Yes 6 7 2 and 0 2, 0 8 2 9 2 2 ( 2) 2 0 0 x x 5 2y 2 t statement H After substtuton: E : x 2x y 2t, 5 2 E : x x,2 2 5 F : x 2t 0,2 5 Consder h : 2 and go back to step 2x x5 y2 2t 20

F, : 2x y 0 F,2 : 2t x 5 0 5 Yes 6 7 a and 0 2, 0 5 (A) x 5 2t statement V (B) Substtutng t, we obtan: E : x 6t 2 y, 2 E : x 2t y,2 2 2 H : x t 2 y 2 (C) Remove the equaton F,2 2x (D) Consder v 2, f 2 and go back to step 2x E2, : x 6t y 2 2 E 2,2 : x 2 2t y 2 F2, : 2x y 2 0 5 Yes 6 7 a 2 and 0, 0 8 2 9 2 () 0 (A) x y 2 t 2 statement H 2 (B) After substtuton, we obtan: 2y 2t E2, : x 6t y2 2 F : y 2t 0 2, 2 2 2 2 Consder h :, and go back to step F2, : y2 2t 2 0 5 Yes 6 7 a and 0, 0 2 (two, one) (A) y 2 2t 2 statement V 2 (B) After substtuton, we obtan: (C) Remove the equaton 2, F (D) Consder v, f and go back to step 2

E, : x 6t y 2 2t 2 2 E,2 : x 2 2t y 2 5 No The general nteger soluton of the system s: where k, k 2,k Stop x 6k k 2k 2, from E ; 2, x 2 k k, from E ; 2 2,2 x k 2 k, from H ; 2 x k, from H ; 2 x5 2 k V, from ; Note Algorthm,, and 5 can be appled n the calculaton of the nteger soluton of a lnear equaton Note 2 The algorthms, because of ther form, are easly adapted to a computer program Note It s up to the reader to decde on whch algorthm to use Good luck! REFERENCES [] Smarandache, Florentn Rezolvarea ecuaţlor ş a sstemelor de ecuaţ lnare în numere întreg - dploma paper, Unversty of Craova, 979 [2] Smarandache, Florentn Généralsatons et généraltés - Edton Nouvelle, Fes (Maroc), 98 [] Smarandache, Florentn Problems avec et sans problems! Sompress, Fes (Maroc), 98 [] Smarandache, Florentn General soluton propretes n whole numbers for lnear equatons Bul Unv Braşov, seres C, mathematcs, vol XXIV, pp 7-9, 982 [5] Smarandache, Florentn Baze de soluţ pentru congruenţe lneare Bul Unv Braşov, seres C, mathematcs, vol XXII, pp 25-, 980, republshed n Buletnul Ştnţfc ş Tehnc al Insttutulu Poltehnc Traan Vua, Tmşoara, seres mathematcs-physcs, tome 26 (0) fasccle 2, pp -6, 98, revewed n Mathematcal Rev (USA): 8e:0006 [6] Smarandache, Florentn O generalzare a teoreme lu Euler refertoare la congruenţe Bul Unv Braşov, seres C, mathematcs, vol XXII, pp 07-2, revewed n Mathematcal Revews (USA):8:0006 22

[7] Creangă, I, Cazacu, C, Mhuţ, P, Opaţ, Gh, Corna Rescher Introcucere în teora numerelor - Edtura Ddactcă ş Pedagogcă, Bucharest, 965 [8] Cucurezeanu, Ion Probleme de artmetcă ş teora numerelor, Edtura Tehncă, Buharest, 976 [9] Ghelfond, A O Rezolvarea ecuaţlor în numere întreg - translaton from Russan, Edtura Tehncă, Bucharest, 95 [0] Golsten, E, Youndn, D Problemes partculers de la programmaton lneare - Edton Mr, Moscou, Tradut de russe, 97 [] Ion, D Ion, Nţă, C Elemente de artmetcă cu aplcaţ în tehnc de calcul, Edtura Tehncă, Bucharest, 978 [2] Ion, D Ion, Radu, K Algebra - Edtura Ddactcă ş Pedagogcă, Bucharest 970 [] Mordell, L Two papers on number theory - Veb Deutscher Verlag der Wssenschafen, Berln, 972 [] Popovc, C P Artmetca ş teora numerelor - Edtura Ddactcă ş Pedagogcă, Bucharest, 96 [5] Popovc, C P Logca ş teora numerelor - Edtura Ddactcă ş Pedagogcă, Bucharest, 970 [6] Popovc, C P Teora numerelor lecture course, Edtura Ddactcă ş Pedagogcă, Bucharest, 97 [7] Rusu, E Artmetca s teora numerelor - Edtura Ddactcă ş Pedagogcă, Bucharest, 96 [8] Rusu, E Bazele teore numerelor - Edtura Tehncă, Bucharest, 95 [9] Serpnsk, W Ce ştm ş ce nu ştm despre numerele prme Edtura Ştnţfcă, Bucharest, 966 [20] Serpnsk, W 250 problemes de theore elementares des nombres - Classques Hachette, Pars, 972 [Partly publshed n Bulet Unv Braşov, seres C, Vol XXIV, pp 7-9, 982, under the ttle: General nteger soluton propertes for lnear equatons ] 2