4_370_aydin.dvi EUROPEAN JOURNAL OF PURE AND APPLIED MATHEMATICS Vol. 3, No. 5, 2010, 819-830 ISSN 1307-5543 – www.ejpam.com Generalized Iterative Decreasing Dimension Method Kemal Aydın1,∗, Gülnur Çelik Kızılkan 2, Ali Osman Çıbıkdiken 3 1 Selçuk University, Faculty of Science, Department of Mathematics, Konya, Türkiye 2 Kahramanmaraş Sütçü İmam University, Faculty of Education, Dept. of Primary Math. Education, Kahramanmaraş, Türkiye 3 Selçuk University, K.F.I.V.S., Dept. of Computer Technology and Programming, Konya,Türkiye Abstract. In this study, we have given a generalization of the iterative decreasing dimension method given in [3] and a generalization of the iterative decreasing dimension algorithm based on this method. The algorithm is suited for implementation using computer algebra systems such as Maple and MAT- LAB. So we also have given symbolic and numerical examples using this algorithm and a Maple proce- dure for the algorithm. 2000 Mathematics Subject Classifications: 65F10 Key Words and Phrases: Iterative Decreasing Dimension Method, Iterative Decreasing Dimension Algorithm, Linear Algebraic Equations 1. Introduction Studying on solution of the systems of linear algebraic equation AX = f (1) is a classical problem which is important not only in linear algebra but also in other branches of science, engineering, economics. A decreasing dimension method (DDM) has been pro- posed in [4] to solve the system (1) where A is N × N -regular matrix, X and f are N - vectors. In [5] (therein [1, 2]), it has been said that the proposed DDM in [4] is same as the well known domain decomposition technique based on a Schur complement type method. Also it has been said that this method costs more than the standard Schur complement method and does not decrease the dimension of the linear systems. So in [3], the authors improved DDM and gave iterative decreasing dimension method (IDDM) which decreases the dimension of the linear systems, one order in every step without any pre-process. ∗Corresponding author. Email addresses: kaydin�sel uk.edu.tr (K. Aydın), g kizilkan�ksu.edu.tr (G. Kızılkan),ao diken�sel uk.edu.tr (A. Çıbıkdiken) http://www.ejpam.com 819 c© 2010 EJPAM All rights reserved. K. Aydın, G. Kızılkan, A. Çıbıkdiken / Eur. J. Pure Appl. Math, 3 (2010), 819-830 820 In this study; we have given a generalization of IDDM in [3] for the solution of the linear algebraic system (1) taking A is any M ×N - matrix instead of a N × N - regular matrix. In section 2; we have given symbols and we have summarized IDDM, then we have given generalized iterative decreasing dimension method (GIDDM) improving the method in [3]. In section 3, we have given generalized iterative decreasing dimension algorithm (GIDDA) based on GIDDM and some symbolic and numerical examples. We have also given a Maple procedure for GIDDA in section 4. 2. Generalized Iterative Decreasing Dimension Method (GIDDM) In this section, after introduce symbols used in this study and IDDM given in [3] we are going to give GIDDM which is the generalization of IDDM. The symbols will be used similar as in [3] in this study. 2.1. Symbols Let us give some symbols and explanations used in procedure. n : n=min{M , N} k : k = 1(1)n, (k = 1, 2, ..., n) - iteration step A(k) : Mk ×Nk - reduced coefficient matrix a(k)ps : a (k) i j 6= 0 which is the first non-zero element of matrix A(k) pk : p which is the number in a(k)ps 6= 0 Mk : Mk = M − k−1 ∑ i=1 pi ; 0 ∑ i=1 pi = 0 Nk : Nk = N − k+ 1 X (k) : Nk - solution vector of reduced system f (k) : Mk - right side vector of reduced system a (k) i j : (i, j) element of matrix A(k) x (k) i : i th element of vector X (k) f (k) i : i th element of vector f (k) u(k) : vector composed of f (k)p element of vector f (k) v(k) : vector composed of f (k) i , i = p+ 1(1)Mk element of vector f (k) A (k) 1 : matrix composed of first non-zero row vector of matrix A(k) A (k) 2 : matrix composed remain line vector of matrix A(k) X (k) 0 : special solution vector of A (k) 1 X (k) = u(k) R(k) : base matrix of solution space of A (k) 1 X (k) = 0 Note: If A is a N×N -regular matrix, then it is clear that Mk = Nk = N−k+1 for k = 1(1)n. K. Aydın, G. Kızılkan, A. Çıbıkdiken / Eur. J. Pure Appl. Math, 3 (2010), 819-830 821 2.2. IDDM Let us summarize IDDM given in [3]. Consider a system of linear algebraic equation AX = f ; A-regular (2) where A is a N × N -matrix, X and f are N -vectors. Suppose that k = 1(1)n is the iteration step, A(k) is a Nk × Nk - coefficient matrix of reduced system and f (k) is a right side vector of reduced system as following A(k) = ( A k = 1, A (k−1) 2 R(k−1) k = 2(1)n ; f (k) = ( f k = 1, v(k−1)− A (k−1) 2 X (k−1) 0 k = 2(1)n . X (k) 0 is a special solution as X (k) 0 = � 0 ... 0 f (k) 1 a (k) 1s 0 ... 0 �T where a (k) 1s 6= 0, (1≤ s ≤ Nk) which is the first non-zero element of matrix A (k) 1 and R(k) =                      r (k) 1×(Nk−1) I(Nk−1)×(Nk−1) ! s = 1,     I(s−1)×(s−1) 0(s−1)×(Nk−s) 01×(s−1) r (k) 1×(Nk−s) 0(Nk−s)×(s−1) I(Nk−s)×(Nk−s)     s = 2(1)Nk− 1, I(Nk−1)×(Nk−1) 01×(Nk−1) ! s = Nk . (3) Then the solution of linear system (2) is given to be X = X (1) = n ∑ i=1    i−1 ∏ j=1 R( j)    X (i) 0 ; i−1 ∏ j=1 R( j) = ( R(1)R(2) . . . R(i−1) i > 1, I i = 1 . (4) 2.3. Generalized Iterative Decreasing Dimension Method (GIDDM) Let us consider a system of linear algebraic equation AX = A(1)X (1) = f (1) = f (5) where A is a M × N -matrix, X is a N -vector and f is a M -vector and examine the solution of the linear system (5) according to situations of M and N . Now, we divide the given system into two systems such that A (1) 1 X (1) = u(1); A (1) 1 = � ap j � j=1(1)N ,u(1) = � fp � (6) A (1) 2 X (1) = v(1) ; A (1) 2 = � ai j � j=1(1)N i=p+1(1)M , v(1) = � fi � i=p+1(1)M (7) K. Aydın, G. Kızılkan, A. Çıbıkdiken / Eur. J. Pure Appl. Math, 3 (2010), 819-830 822 where p is the number of first non-zero row of matrix A(1). If p > 1, for the equation (5) to have a solution, f (1) i = 0, i = 1(1)p− 1 must be satisfied. X (1) 0 is chosen to be X (1) 0 = � 0 ... 0 f (1)p a (1) ps 0 ... 0 �T (8) which is a special solution of (6). In (8), a(1)ps 6= 0 (1≤ s ≤ N , 1≤ p ≤ M) is the first non-zero element of matrix A(1). Then, X (1) h -homogeneous solution of (6) is obtained to be X (1) h = R(1)X (2) where X (2) is a N2-vector composed of x i-parametric variables for i = 1(1)M2, i 6= s and R(1) is a matrix composed of the base vector of this solution space as R(1) =                      r (1) 1×(N−1) I(N−1)×(N−1) ! s = 1,     I(s−1)×(s−1) 0(s−1)×(N−s) 01×(s−1) r (1) 1×(N−s) 0(N−s)×(s−1) I(N−s)×(N−s)     s = 2(1)N − 1, I(N−1)×(N−1) 01×(N−1) ! s = N where r (1) 1×(N−s) = � r (1) 1(s+1) r (1) 1(s+2) . . . r (1) 1N � ; r (1) 1 j = − a (1) p j a (1) ps , j = s+ 1(1)N . The general solution of (6) is achieved as X (1) = X (1) 0 +R(1)X (2), where X (1) 0 is a N -vector and R(1) is a N × (N − 1)-matrix. By substituting solution X (1) into system (7), we have a new linear algebraic system as following A(2)X (2) = f (2), (9) where A(2) = A (1) 2 R(1) and f (2) = v(1) − A (1) 2 X (1) 0 . Applying the steps given above to the system (9), we can write the systems followed by each other as A(k)X (k) = f (k) ; k = 2(1)n (10) where A(k) = A (k−1) 2 R(k−1), f (k) = v(k−1)− A (k−1) 2 X (k−1) 0 . It is known that the general solutions of the system (10) are X (k) = X (k) 0 + R(k)X (k+1) if the solutions exist. Here R(k) is a matrix as given in (3). Now, we are going to examine the situations for solution of linear system (5). K. Aydın, G. Kızılkan, A. Çıbıkdiken / Eur. J. Pure Appl. Math, 3 (2010), 819-830 823 Case 1. Suppose that A(n) 6= 0. We have three situations according to M and N . a) If M = N , the system (5) is same as in IDDM, i.e. A is a regular matrix and its solution has been given by equation (4). b) If M < N , then the solution of (5) is expressed by substituting X (k+1) solution into X (k) solution for k = n(−1)1 as follows X = n ∑ i=1    i−1 ∏ j=1 R( j)    X (i) 0 +    n ∏ j=1 R( j)    X (n+1), where X (n+1) = � x (n+1) 1 x (n+1) 2 . . . x (n+1) Nn+1 �T and x (n+1) j ( j = 1(1)Nn+1) are the arbitrary parameters. c) If M > N , then the system A(n)X (n) = f (n) is obtained, where A(n) is a Mn × 1 - matrix, f (n) is a Mn -vector and X (n) is a 1 -vector given as A(n) =        a (n) 11 a (n) 21 ... a (n) Mn1        , f (n) =        f (n) 1 f (n) 2 ... f (n) Mn        , X (n) = � x (n) 1 � . Here, if A(n) = a (n) 11 f (n) 1 f (n) ( f (n) 6= 0), X (n) = X (n) 0 = � f (n) 1 a (n) 11 � and if f (n) = 0, X (n) = X (n) 0 = 0. Therefore, the solution of (5) is X = n ∑ i=1    i−1 ∏ j=1 R( j)    X (i) 0 . But, if A(n) 6= a (n) 11 f (n) 1 f (n) ( f (n) 6= 0), the equation (5) has no solution. Case 2. Suppose that A(k) 6= 0 (k < n) and Mk = 1 or pk. In this case; for all of the situations of M and N , the solution of the system (5) is obtained as follows X = k ∑ i=1    i−1 ∏ j=1 R( j)    X (i) 0 +    k ∏ j=1 R( j)    X (k+1), K. Aydın, G. Kızılkan, A. Çıbıkdiken / Eur. J. Pure Appl. Math, 3 (2010), 819-830 824 where X (k+1) = � x (k+1) 1 x (k+1) 2 . . . x (k+1) Nk+1 �T ; x (k+1) j ( j = 1(1)Nk+1) are the arbi- trary parameters and f (k) i = 0, i = 1(1)p− 1 for p > 1. Case 3. Suppose that A(k) = 0 (k ≤ n). a) If f (k) = 0, then the solution of the system (5) is obtained as follows X = k−1 ∑ i=1    i−1 ∏ j=1 R( j)    X (i) 0 +    k−1 ∏ j=1 R( j)    X (k), where X (k) = � x (k) 1 x (k) 2 . . . x (k) Nk �T ; x (k) j ( j = 1(1)Nk) are the arbitrary pa- rameters and f (k) i = 0, i = 1(1)p− 1for p > 1. b) If f (k) 6= 0, then (5) is an inconsistent system and has no solution. 3. Generalized Iterative Decreasing Dimension Algorithm (GIDDA) Here, we are going to give an algorithm based on GIDDM. GIDDA is the modification of the algorithm IDDA given in [3]. Input. A - M × N matrix, f - M -vector. Step 1. Get n=min{M , N}, A(1) = A, f (1) = f . Step 2. k = 1(1)n− 1, 2.1. Calculate A(k), f (k), Mk and Nk. 2.2. Control if a (k) i j 6= 0 for i = 1(1)Mk, j = 1(1)Nk; let a(k)ps 6= 0 is first element and take p = pk. Otherwise go Step 4. 2.3. If p > 1, control if f (k) i = 0 for i = 1(1)p− 1. If ∃i ∋ f (k) i 6= 0 then go Output 2. 2.4. If Mk = 1 or pk, calculate X (k) 0 , R(k), m= k and go Output 1. 2.5. Determine A (k) 1 , A (k) 2 , u(k), v(k). 2.6. Calculate X (k) 0 and R(k). Step 3. For k = n calculate A(k), f (k), Mk and Nk. 3.1. Control if a (k) i j 6= 0 for i = 1(1)Mk, j = 1(1)Nk; let a(k)ps 6= 0 is first element and take p = pk. Otherwise go Step 4. 3.2. If M < N , calculate X (k) 0 , R(k), take m = k and go Output 1 3.3. If A(k) = a (k) 11 f (k) 1 f (k) or f (k) = 0, calculate X (k) 0 , take m = k and go Output 1. K. Aydın, G. Kızılkan, A. Çıbıkdiken / Eur. J. Pure Appl. Math, 3 (2010), 819-830 825 3.4. If A(k) 6= a (k) 11 f (k) 1 f (k), go Output 2. Step 4. Control if f (k) i = 0 for i = 1(1)Mk. If ∃i ∋ f (k) i 6= 0 then go Output 2. 4.1. Take m = k− 1 and go Output 1. Output 1. X = m ∑ i=1 i−1 ∏ j=1 R( j) ! X (i) 0 + m ∏ j=1 R( j) ! X (m+1). Output 2. No Solution. Note: Vector X (m+1) in Output 1 is a parametric vector in Nm+1-dimension, i.e. x (m+1) j ( j = 1(1)Nm) are the arbitrary parameters, if Nm+1 6= 0. If Nm+1 = 0, X (m+1) = 0. Now, we are going to give some examples solved using algorithm GIDDA. Example 1. Input: A=      1 −2 2 3 2 1 1 −1 3 −1 3 2 5 0 4 1      , f =      1 −1 0 −1      . Step 1. n=min{4,4}= 4. Step 2. X (1) 0 =      1 0 0 0      ,R(1) =      2 −2 −3 1 0 0 0 1 0 0 0 1      X (2) 0 =    −3 5 0 0    , R(2) =    3 5 7 5 1 0 0 1    . A(3) = 0, f (3) = 0 and m = 2⇒ X (3) = � x (3) 1 x (3) 2 � = � a b � , a, b ∈ R Output. Solution X =      −1 5 − 4 5 a− 1 5 b −3 5 + 3 5 a+ 4 5 b a b      . Example 2. Input: A=      1 2 1 −2 2 3 1 1      , f =      3 4 25 4 13 4      . Step 1. n=min{4,2}= 2. K. Aydın, G. Kızılkan, A. Çıbıkdiken / Eur. J. Pure Appl. Math, 3 (2010), 819-830 826 Step 2. X (1) 0 = � 3 0 � ,R(1) = � −2 1 � A(2) = a (2) 11 f (2) 1 f (2) and m= 2⇒ X (2) 0 = � −1 4 � Output. Solution X = � 7 2 −1 4 � . Example 3. Input: A=      1 2 1 −2 2 3 1 1      , f =      3 1 5 2      . Step 1. n=min{4,2}= 2. Step 2. X (1) 0 = � 3 0 � ,R(1) = � −2 1 � A(2) =    −4 −1 −1    , f (2) =    −2 −1 −1    ,A(2) 6= a (2) 11 f (2) 1 f (2) Output. No Solution. 4. Maple Procedure for GIDDA>#A Maple Pro edure: To ompute the solution of the given linear system.>restart;>with(LinearAlgebra, Multiply);>with(linalg, oldim, rowdim, blo kmatrix, ve tdim);>gidda:=pro (A::Matrix, f::Ve tor)global n,B,M,N,u,v,A1,A2,X0,RR,X,S,XS;lo al g,m,z,i,j,p,s,k,t,r,R,H1,H2,B1,B2,B3,B4,B5,B6, Output1, Output2, Step4,Cal ulateX0, Cal ulateR, Find\_ps, bul;Output1:= pro ()RR[0℄:= Matrix(N[1℄, N[1℄, shape = identity); X:= X0[1℄;for i from 1 to m-1 do RR[i℄:= R[i℄; RR[i℄:= Multiply(RR[i-1℄,RR[i℄);S[i℄:= Multiply(RR[i℄, X0[i+1℄); X:= X + S[i℄; end do:for i from 1 to m do RR[i℄:= R[i℄; RR[i℄:= Multiply(RR[i-1℄, RR[i℄); end do;if N[m+1℄=0 then XS:= Ve tor(1 .. oldim(RR[m℄), 0);else XS:= Ve tor(1 .. oldim(RR[m℄), symbol = a); end if:X:= X + Multiply(RR[m℄, XS); print(X); break;end pro : K. Aydın, G. Kızılkan, A. Çıbıkdiken / Eur. J. Pure Appl. Math, 3 (2010), 819-830 827Output2:=pro ()printf("No solution"); break;end pro :Step4:=pro ()if verify(g[k℄,Ve tor(1..ve tdim(g[k℄),0),Ve tor)=false then Output2();end if:m:=k-1; Output1();end pro :Cal ulateX0:=pro ()X0[k℄:=Ve tor(1..N[k℄); X0[k℄[s[k℄℄:=(g[k℄[p[k℄℄)/(B[k℄[p[k℄,s[k℄℄); }end pro :Cal ulate R:=pro () r[k℄:=Matrix(1,1..N[k℄-s[k℄);for z from 1 to N[k℄-s[k℄do r[k℄[1,z℄:=-((B[k℄[p[k℄,s[k℄+z℄)/(B[k℄[p[k℄,s[k℄℄)); end do:H1:=Matrix(N[k℄-1,N[k℄-1,shape=identity); H2:=Matrix(1,N[k℄-1,0);B1:=Matrix(s[k℄-1,s[k℄-1,shape=identity); B2:=Matrix(s[k℄-1,N[k℄-s[k℄,0);B3:=Matrix(1,s[k℄-1,0); B4:=r[k℄; B5:=Matrix(N[k℄-s[k℄,s[k℄-1,0);B6:=Matrix(N[k℄-s[k℄,N[k℄-s[k℄,shape=identity);if s[k℄=1 then R[k℄:= onvert(blo kmatrix(2,1,[r[k℄,H1℄),Matrix);end if:if s[k℄=N[k℄ then R[k℄:= onvert(blo kmatrix(2,1,[H1,H2℄),Matrix);end if:if (s[k℄\texttt{>}=2 and s[k℄\texttt{<}=N[k℄-1) thenR[k℄:= onvert(blo kmatrix(3,2,[B1,B2,B3,B4,B5,B6℄),Matrix); end if:end pro :Find\_ps:=pro ()bul:=0; for i from 1 to M[k℄ do for j from 1 to N[k℄ doif bul=0 and B[k℄[i,j℄\texttt{<>}0 then p[k℄:=i;s[k℄:=j; bul:=1;end if:end do: end do: if bul=0 then Step4(); end if:end pro :>#Main Pro edureM[1℄:=rowdim(A); N[1℄:= oldim(A); g[1℄:=Ve tor(1..M[1℄);B[1℄:=Matrix(1..M[1℄,1..N[1℄); n:=min(M[1℄,N[1℄); B[1℄:=A; g[1℄:=f;for k from 1 to n-1 doif k<>1 then M[k℄:=rowdim(A)-sum(p[t℄,t=1..k-1); N[k℄:= oldim(A)-k+1;end if: K. Aydın, G. Kızılkan, A. Çıbıkdiken / Eur. J. Pure Appl. Math, 3 (2010), 819-830 828Find\_ps();if p[k℄>1 then for i from 1 to p[k℄-1 do if g[k℄[i℄<>0 then Output2();end if: end do:end if:if M[k℄=1 or M[k℄=p[k℄ then Cal ulateX0(); Cal ulateR(); m:=k;Output1(); end if:u[k℄:=Ve tor(1..1); u[k℄:=g[k℄[p[1℄℄; v[k℄:=Ve tor(1..M[k℄-p[k℄);for i from 1 to M[k℄-p[k℄ do v[k℄[i℄:=g[k℄[p[k℄+i℄; end do:A1[k℄:=Matrix(1,1..N[k℄);for j from 1 to N[k℄ do A1[k℄[1,j℄:=B[k℄[p[k℄,j℄; end do:A2[k℄:=Matrix(1..(M[k℄-p[k℄),1..N[k℄);for i from 1 to M[k℄-p[k℄ do for j from 1 to N[k℄ doA2[k℄[i,j℄:=B[k℄[p[k℄+i,j℄; end do:end do:Cal ulateX0(); Cal ulateR(); B[k+1℄:=Multiply(A2[k℄,R[k℄);g[k+1℄:=v[k℄-Multiply(A2[k℄,X0[k℄);end do:k:=n; M[k℄:=rowdim(A)-sum(p[t℄,t=1..k-1); N[k℄:= oldim(A)-k+1;Find_ps();if M[1℄A:=Matrix([[1,-2,2,3℄,[2,1,1,-1℄,[3,-1,3,2℄,[5,0,4,1℄℄); A=      1 −2 2 3 2 1 1 −1 3 −1 3 2 5 0 4 1     >f:=Ve tor([1,-1,0,-1℄); f =      1 −1 0 −1     >gidda(A,f);      −1 5 − 4 5 a1 − 1 5 a2 −3 5 + 3 5 a1 + 4 5 a2 a1 a2      REFERENCES 829 Example 5. >A:=Matrix([[1,2,-3,1,-1,-2,4℄,[2,4,-6,2,-2,-4,8℄,[3,6,-9,3,-3,-6,12℄,[1,-1,3,-2,0,1,2℄℄); A=      1 2 −3 1 −1 −2 4 2 4 −6 2 −2 −4 8 3 6 −9 3 −3 −6 12 1 −1 3 −2 0 1 2     >f:=Ve tor([4,8,12,1℄); f =      4 8 12 1     >gidda(A,f);            −2− a1+ a2 + 1 3 a3 − 8 3 a5 1+ 2a1− a2 + 1 3 a3 + a4 − 2 3 a5 a1 a2 a3 a4 a5            5. Conclusion GIDDM produces a special X (k) 0 solutions and R(k) matrices by reducing the dimension of a given system of linear algebraic equation. It obtains the solution depending on X (k) 0 and R(k). GIDDA is suited for implementation using computer algebra systems such as Maple and MATLAB. References [1] G.H. Golub and J.M. Ortega. Scientific Computing : An Introduction with Parallel Comput- ing. Academic Press, Boston, MA, 1993. [2] G.H. Golub and C.F. van Loan. Matrix Computations. The Johns Hopkins University Press, Baltimore, MD, 1983. [3] T. Keskin and K. Aydın. Iterative decreasing dimension algorithm. Comp. and Math. with Appl., 53:1153–1158, 2007. REFERENCES 830 [4] H. Wang and J. Jiang. Solution of the system of linear algebraic equations by decreasing dimension. App. Math. and Comput., 109:51–57, 2000. [5] J. Zhang. Comments on Solution of the system of linear algebraic equations by decreasing dimension. Appl. Math. and Comput., 128:95–98, 2002.