4 views

Uploaded by Anonymous 0U9j6BLllB

An algorithm is given that ascertains whether a linear equation has integer number solutions or not; if it does, the general integer solution is determined.

- 1st Term Scheme of Work Class 8 Maths
- Harvard University - Linear Algebra & Differential Equation
- Math g8 m4 Teacher Materials
- Mathematics En
- Dynamics of the Matching Model
- Scimakelatex.15471.Takeshi
- Math g8 m4 Teacher Materialssdsa
- 12 Maths CBSE Sample Papers 2019
- Scimakelatex.14647.Sam.edwin
- DSM_I test
- HW1-2014
- 457 lesson plan el
- On the Depoyment of Fiber-Optic Cables
- 3rd assignment
- KS1 Crazy Character Algorithms Activity PDF Barefoot Computing2
- G9 A;gebra Q
- Sys Eqns Applications 3x3
- Contrasting Moore’s Law and Telephony.pdf
- AEI602
- scimakelatex.13278.Genival+Lacerda.Mc+Dononald.Liguri+Brito

You are on page 1of 6

An Integer Number

Algorithm To Solve Linear

Equations

Arbor (USA): InfoLearnQuest, 2007.

An algorithm is given that ascertains whether a linear equation has integer number

solutions or not; if it does, the general integer solution is determined.

Input

A linear equation a1 x1 + ... + an xn = b , with ai ,b Z , xi being integer number

Output

Decision on the integer solution of this equation; and if the equation has solutions

in Z , its general solution is obtained.

Method

Step 1. Calculate d = ( a1 ,..., an ) .

then the equation does not have integer solution; stop.

Step 3. Consider h := 1 . If d 1 , divide the equation by d ; consider

ai := ai / d, i = 1, n, b := b / d .

as 0

Step 6. If a = 1 , then:

(A)

xi = (a1 x1 + ... + ai 1 xi 1 + ai +1 xi +1 + ... + an xn b) ai

(B) Substitute the value of xi in the values of the other determined

unknowns.

(C) Substitute integer number parameters for all the variables of the

unknown values in the right term: k1 , k2 ,..., kn 2 , and kn 1

respectively.

(D) Write, for your records, the general solution thus determined; stop.

Step7. Write down all a j , j i and under the form:

a j = ai q j + rj

aj

b

b = ai q + r where q j = , q = .

ai

ai

Step 8. Write xi = q1 x1 ... qi 1 xi 1 qi +1 xi +1 ... qn xn + q t h . Substitute the

value of xi in the values of the other determined unknowns.

Step 9. Consider

88

a1 := r1

:

ai 1 := ri 1

ai +1 := ri +1

:

an := rn

and go back to Step 4.

and

ai := ai

b := r

xi := t h

h := h + 1

Proof:

Lets a1 x1 + ... + an xn = b be the initial linear equation, with not all ai = 0 ; check

for min as = a1 1 (if not, it is renumbered). Following the algorithm, once we pass

as 0

from this initial equation to a new equation: a1' x1 + a2' x2 + ... + an' xn = b ' , with a1' < ai for

i = 2, n , b ' < b and a1' = a1 .

It follows that min

'

as 0

as 1

of steps we obtain, at Step 4, a := 1 (the actual a is always smaller than the previous a ,

according to the previous note) and in this case the algorithm terminates.

Lemma 2. Let the linear equation be:

(25) a1 x1 + a2 x2 + ... + an xn = b , with min as = a1 and the equation

as 0

(26)

a1t1 + r2 x2 + ... + rn xn = r ,

with

t1 = x1 q2 x2 ... qn xn + q ,

where

b

r = . Then x1 = x10 ,

a1

0

0

x2 = x2 ,, xn = xn is a particular solution of equation (25) if and only if

t1 = t10 = x1 q2 x20 ... qn xn0 + q , x2 ,..., xn = xn0 is a particular solution of equation

(26).

Proof:

x1 = x10 , x2 = x20 ,, xn = xn0 , is a particular solution of equation (25)

a1 x10 + a2 x20 + ... + an xn0 = b a1 x10 + (r2 + a1q2 )x20 + ... + (rn + a1qn )xn0 = a1q + r

r2 x20 + ... + rn xn0 a1 (x10 q2 x20 ... qn xn0 + q) = r a1t10 + r2 x20 + ... + rn xn0 = r

t1 = t10 , x2 = x20 ,..., xn = xn0 is a particular solution of equation (26).

ri = ai ai qi ,

i = 2, n ,

r = b a1q

while

a

qi = i ,

a

(25) if and only if

(28) t1 = (c11 + q2 c21 + ... + qn cn1 )k1 ... (c1n 1 + q2 c2n 1 + ... + qn cnn 1 )kn

(d1 + q2 d 2 + ... + qn d n ) + q ,

x j = c1 j1k1 + ... + c jn 1kn 1 + d j , j = 2, n

89

Proof:

t1 = t10 = x10 q2 x20 ... qn xn0 + q, x2 = x20 ,..., xn = xn0 is a particular solution of

the equation (25) x1 = x10 , x2 = x20 ,..., xn = xn0 is a particular solution of equation (26)

k1 = k10 Z,..., k n = k n0 Z such that

xi = ci1k10 + ... + cin 1kn01 + d i = xi0 , i = 1, n k1 = k10 Z,..., kn = kn0 Z ,

such that

xi = ci1k10 + ... + cin 1kn01 + d i = xi0 , i = 2, n ,

and

0

t1 = (c11 + q2 c21 + ... + qn cn1 )k10 ... (c1n 1 + q2 c2 n 1 + ... + qn cnn 1 )k n1

(29) a1 x1 + a2 x2 + ... + an xn = b with a1 = 1 has the general solution:

(30)

xi = ki Z

i = 2, n

Proof:

Lets consider x1 = x10 , x2 = x20 ,, xn = xn0 , a particular solution of equation (29).

k 2 = x20 , k n = xn0 , such that x1 = ( a2 x20 + ... + an xn0 b ) a1 = x10 , x2 = x20 ,..., xn = xn0 .

as 0

x1 = (q2 k2 + ... + qn kn q)

xi = ki Z

i = 2, n

Proof:

Dividing the equation by a1 the conditions of Lemma 4 are met.

Theorem of Correctness. The preceding algorithm calculates correctly the

general solution of the linear equation a1 x1 + ... + an xn = b , with not all ai = 0 .

Proof:

The algorithm is finite according to Lemma 1. The correctness of steps 1, 2, and 3

is obvious. At step 4 there is always min as as not all ai = 0 . The correctness of subas 0

step 6 A) results from Lemmas 4 and 5, respectively. This algorithm represents a method

of obtaining the general solution of the initial equation by means of the general solutions

of the linear equation obtained after the algorithm was followed several times (according

90

to Lemmas 2 and 3); from Lemma 3, it follows that to obtain the general solution of the

initial linear equation is equivalent to calculate the general solution of an equation at step

6 A), equation whose general solution is given in algorithm (according to Lemmas 4 and

5). The Theorem of correctness has been fully proven.

Note. At step 4 of the algorithm we consider a := min as such that the number of

as 0

s = 1,n

but it takes longer. The algorithm can be introduced into a computer program.

Application

Calculate the integer solution of the equation:

6x1 12x2 8x3 + 22x4 = 14 .

Solution

The previous algorithm is applied.

1. (6, 12, 8, 22) = 2

2. 2 | 14 therefore the solution of the equation is in Z .

3. h := 1; 2 1 ; dividing the equation by 2 we obtain:

3x1 = 6x2 4 x3 + 11x4 = 7 .

4. a := min { 3 , 6 , 4 , 11 } = 3, i = 1

5. a 1

7. 6 = 3 ( 2) + 0

4 = 3 ( 2) + 2

11 = 3 3 + 2

7 = 3 2 +1

8. x1 = 2x2 + 2x3 3x4 + 2 t1

9.

a2 := 0

a1 := 3

a3 := 2

a4 := 2

b := 1

x1 := t1

h := 2

4. We have a new equation:

3t1 0 x2 + 2x3 + 2x4 = 1

a := min { 3 , 2 , 2 } and

i=3

5. a 1

7. 3 = 2 (2) + 1

0 = 20 + 0

2 = 2 1 + 0

1= 20 + 0

91

determined for x1 we obtain: x1 = 2 x2 5 x4 + 3t1 2t2 + 2

9. a1 := 1

a3 := 2

a2 := 0

b := 1

a4 := 0

x3 := t 2

h := 3

4. We have obtained the equation:

1 t2 + 0 x2 2 t2 + 0 x4 = 1 , a = 1 , and i = 1

6. (A) t1 = (0 x2 2t 2 + 0 x4 1) 1 = 2t 2 + 1

(B) Substituting the value of t1 in the values of x1 and x3 previously

determined, we obtain:

x1 = 2x2 5x4 + 4t 2 + 5 and

x3 = x 4 + 3t 2 + 2

(C) x2 := k1 , x4 := k2 , t 2 := k3 , k1 , k2 , k3 Z

(D) The general solution of the initial equation is:

x1 = 2k1 5k2 + 4k3 + 5

x2 = k1

x3 = k2 + 3k3 + 2

x 4 = k2

k1 , k2 , k 3 are parameters Z

REFERENCE

[1]

systems of equations part of the diploma thesis, University of Craiova,

1979.

92

- 1st Term Scheme of Work Class 8 MathsUploaded bybshashi9
- Harvard University - Linear Algebra & Differential EquationUploaded byeverlbs
- Math g8 m4 Teacher MaterialsUploaded byRamon Gasgas
- Mathematics EnUploaded byJhanaia Agulto
- Dynamics of the Matching ModelUploaded byoverdozz
- Scimakelatex.15471.TakeshiUploaded byLK
- Math g8 m4 Teacher MaterialssdsaUploaded byGeraldineAguilera
- 12 Maths CBSE Sample Papers 2019Uploaded bySaurjyesh Karthikeyan (Gokul)
- Scimakelatex.14647.Sam.edwinUploaded byRasendranKirushan
- DSM_I testUploaded byRebecca Jessup
- HW1-2014Uploaded byAnonymous ewKJI4xU
- 457 lesson plan elUploaded byapi-335485506
- On the Depoyment of Fiber-Optic CablesUploaded byDaniel Mancia
- 3rd assignmentUploaded bySheikh Shoaib
- KS1 Crazy Character Algorithms Activity PDF Barefoot Computing2Uploaded byNurasfiqah Ccz
- G9 A;gebra QUploaded byPACITA LESTOJAS
- Sys Eqns Applications 3x3Uploaded byCarlo Gimarino Salazar
- Contrasting Moore’s Law and Telephony.pdfUploaded bythrw3411
- AEI602Uploaded byapi-26787131
- scimakelatex.13278.Genival+Lacerda.Mc+Dononald.Liguri+BritoUploaded byPolipio Saturnio
- W9 Revision 2Uploaded bybidarihassan
- keepersandtossers sec iUploaded byapi-233557025
- f11_sch_200Uploaded byKelzie Benensky
- Modified Leture Notes 7 (CSC-103)AlgorithmUploaded byMd Sakawat Hossain
- Math389Fall2011Test1.solnsUploaded byAndres del Junco
- bUploaded byDaniel Kozakevich
- CBSE Sample Question Papers for Class 12 Mathematics 2018-2019Uploaded byVijay mehra
- Mathematics syllabusUploaded byYash Nishal
- Lesson PlanUploaded byLeah
- Multi-Well Allocation (MWA) ExercisesUploaded byQuy Tran Xuan

- TOPSIS Method for MADM based on Interval Trapezoidal Neutrosophic NumberUploaded byAnonymous 0U9j6BLllB
- Neutrosophic Sets and Systems. Book series, vol. 23 / 2018Uploaded byAnonymous 0U9j6BLllB
- Neutrosophic Sets and Systems. Book series, vol. 22 / 2018Uploaded byAnonymous 0U9j6BLllB
- VIKOR based MAGDM Strategy with Trapezoidal Neutrosophic NumbersUploaded byAnonymous 0U9j6BLllB
- Operators on Single Valued Trapezoidal Neutrosophic Numbers and SVTN-Group Decision MakingUploaded byAnonymous 0U9j6BLllB
- Validation of the pedagogical strategy for the formation of the competence entrepreneurshipin high education through the use of neutrosophic logic and Iadov techniqueUploaded byAnonymous 0U9j6BLllB
- The Basic Notions for (over, off, under) Neutrosophic Geometric Programming ProblemsUploaded byAnonymous 0U9j6BLllB
- Some Neutrosophic Probability DistributionsUploaded byAnonymous 0U9j6BLllB
- Optimization of EOQ Model with Limited Storage Capacity by Neutrosophic Geometric ProgrammingUploaded byAnonymous 0U9j6BLllB
- Extension of Soft Set to Hypersoft Set, and then to Plithogenic Hypersoft SetUploaded byAnonymous 0U9j6BLllB
- Single Valued Neutrosophic Hesitant Fuzzy Computational Algorithm for Multiobjective Nonlinear Optimization ProblemUploaded byAnonymous 0U9j6BLllB
- Extensions to Linguistic Summaries Indicators based on Neutrosophic TheoryUploaded byAnonymous 0U9j6BLllB
- A New Neutrosophic Cognitive Map with Neutrosophic Sets on ConnectionsUploaded byAnonymous 0U9j6BLllB
- On Single Valued Neutrosophic Signed Digraph and its applicationsUploaded byAnonymous 0U9j6BLllB
- A framework for selecting cloud computing services based on consensus under single valued neutrosophic numbersUploaded byAnonymous 0U9j6BLllB
- Gaussian single-valued neutrosophic numbers and its application in multi-attribute decision makingUploaded byAnonymous 0U9j6BLllB
- On single-valued co-neutrosophic graphsUploaded byAnonymous 0U9j6BLllB
- Sinos River basin social-environmental prospective assessment of water quality management using fuzzy cogmitive maps and neutrosophic AHP-TOPSISUploaded byAnonymous 0U9j6BLllB
- Positive implicative BMBJ-neutrosophic ideals in BCK-algebrasUploaded byAnonymous 0U9j6BLllB
- Performance Evaluation of Mutual Funds Via Single Valued Neutrosophic Set (SVNS) Perspective: A Case Study in TurkeyUploaded byAnonymous 0U9j6BLllB
- On Neutrosophic Crisp Topology via N-TopologyUploaded byAnonymous 0U9j6BLllB
- Neutrosophic Soft Normed Linear SpacesUploaded byAnonymous 0U9j6BLllB
- Neutrosophic Soft Cubic Set in Topological SpacesUploaded byAnonymous 0U9j6BLllB
- Neutrosophic Shortest Path ProblemUploaded byAnonymous 0U9j6BLllB
- MBJ-neutrosophic structures and its applications in BCK/BCI-algebrasUploaded byAnonymous 0U9j6BLllB
- Intrusion Detection System and Neutrosophic Theory for MANETs: A Comparative StudyUploaded byAnonymous 0U9j6BLllB
- A new approach for multi-attribute decision-making problems in bipolar neutrosophic setsUploaded byAnonymous 0U9j6BLllB
- Algebraic Structure of Neutrosophic Duplets in Neutrosophic RingsUploaded byAnonymous 0U9j6BLllB

- Ordinary Differential EquationsUploaded byMadelynne
- Waves in a Shock TubeUploaded byCong Huan Phan
- chapter 1Uploaded by700ty
- Hidden Quadratic EquationsUploaded byFLORE
- Vibration shapes for a plucked string.Uploaded byJohn Alexiou
- Differential Equations - Solved Assignments - Semester Fall 2004Uploaded byMuhammad Umair
- Courant–Friedrichs–Lewy condition paper.pdfUploaded byRishav Kanth
- ode19.pdfUploaded bydeepak pandey
- TP_BEKA2333_2014_2015Uploaded byAzrul Nizar
- De PDF Theory Notes 3 (Mt)Uploaded bymann123456789
- Solucion Ecuaciones DiferencialesUploaded byIvan Marcelo Tapia
- HelmholtzUploaded bysamouille6666
- Vibraciones Forzadas AmortiguadasUploaded byVictor Jiron
- Euler Method for Solving Differential Equations PDFUploaded byGary
- 2 Linear Law(Mas)Uploaded bydupleh
- Bi Harmonic EquationUploaded byJose Díaz López
- AEMC16Uploaded byRodrigo Hernández
- Diffusion Simulation by the FDM in ExcelUploaded byrodwellhead
- Finite Difference Methods for Differential Equations (Math585) (R. LeVeque)Uploaded byCosmin Vestemean
- AlgebraUploaded byShreeroop Ajaykumar
- Adams Bash ForthUploaded byChAdnanUlQamar
- Polarizable Vacuum (PV) and the Schwarzschild SolutionUploaded bydgE
- Equations Week3Uploaded byVikashKumar
- 1597Uploaded byTarig Elzaki
- fem.pptUploaded byFan Yang
- Ejercicios Vibraciones Libres AmortiguadasUploaded byErick Iñaguazo Pindo
- Exact Solution Of Free Particle Wave Equation with Linear Auxiliary Conditions: By Ronald H. BradyUploaded byMusicMathMaster
- Lecture 2Uploaded byNaveen Raj
- Simultaneous F4Uploaded byyusainiKasiron69
- mt_solution.pdfUploaded byaucyaucy123