SOLVING FUZZY LINEAR SYSTEMS IN THE STOCHASTIC
ARITHMETIC BY APPLYING CADNA LIBRARY
Mohammad Ali Fariborzi Araghi
1
and Hassan Fattahi
2
1
Department of Mathematics, Faculty of Science, Islamic Azad University, Central Tehran Branch
P.O.Box 13185.768, Tehran, Iran
2
Department of Mathematics, Islamic Azad University, Kermanshah Branch, Kermanshah, Iran
K
eywords:
Iterative methods, Fuzzy Linear Systems (FLS), Stochastic arithmetic, CESTAC method, CADNA library,
Hausdorff distance, Fuzzy number.
Abstract:
In this paper, a fuzzy linear system with crisp coefficient matrix is considered in order to solve in the stochastic
arithmetic. The fuzzy CESTAC method is applied in order to validate the computed results. The Gauss-Seidel
and Jacobi iterative methods are used for solving a given fuzzy linear system. In order to implement the
proposed algorithm, the CADNA library is applied to find the optimal number of iterations. Finally, two
numerical examples are solved based on the given algorithm in the stochastic arithmetic.
1 INTRODUCTION
A general model for solving a FLS whose coefficient
matrix is crisp and the right-hand side column is an
arbitrary fuzzy number was first proposed by Fried-
man, Ming and Kandel, (1998). They used the em-
bedding method and replaced the original fuzzy lin-
ear system by a crisp linear system with a nonnegative
coefficients matrix. In the sequel, solving this kind of
fuzzy linear system based on the numerical and itera-
tive methods were proposed by others. Some of these
works were presented by Abbasbandy et al. (2006),
Allahviranloo (2004)(2005), Dehghan and Hashemi
(2006). Since, the results of the iterative methods
are obtained in the floating-point arithmetic, the ter-
mination criterion depends on a positive number like
ε. So, the final results may not be accurate or the
number of iterations may increase without increas-
ing the accuracy of the results. Therefore, the vali-
dation of the computed results is important. In this
case, because of the round-off error propagation, the
computer may not able to improve the accuracy of the
computed solution. By using the stochastic arithmetic
in place of the traditional floating-point arithmetic,
one can rely the results and estimate the accuracy of
them (Abbasbandy and Fariborzi Araghi, 2004; Ches-
neaux, 1992; Fariborzi Araghi, 2008; Vignes, 1993).
CESTAC (Controle et Estimation Stochastique des
Arrondis de Calculs) method is an efficient method
in order to estimate the accuracy of the results and
find the optimal number of iterations (Vignes,1993).
CADNA (Control of Accuracy and Debugging for
Numerical Applications) library is a tool to imple-
ment the stochastic arithmetic automatically. The first
goal of this software is the estimation of the accuracy
of each computed result. CADNA detects numerical
instabilities (informatical zero) during the run of the
program. CADNA works on Fortran or C++ codes.
When a result is a stochastic zero (i.e. is insignif-
icant), the symbol @.0 is printed. CADNA detects
numerical instabilities during the run of the program
(Jezequel and Chesneaux, 2008). For more details
about this library we refer the reader to ”http://www-
pequan.lip6.fr/cadna”.
By using the CESTAC method, N runs of the com-
puter program take place in parallel. In this way,
one runs every arithmetical operation N times syn-
chronously before running the next operation. In this
method, by running the program N times, for each re-
sult of any floating-point arithmetic operation, a set
of N computed results X
i
; i = 1, 2, ...N, is obtained.
N can be chosen any natural number like 2,3, 5, 7, but
in order to decrease operations cost, usually N = 3 is
considered. This method is able to estimate the round-
off error on each result and determine the accuracy of
it.
Let F be the set of all values represented on the
computer. Thus, any real value x is represented in the
form of X F on the computer. It has been mentioned
in (Vignes, 1993) that in a binary floating-point arith-
metic with P mantissa bits, the rounding error stems
from assignment operator is
446
Fariborzi Araghi M. and Fattahi H..
SOLVING FUZZY LINEAR SYSTEMS IN THE STOCHASTIC ARITHMETIC BY APPLYING CADNA LIBRARY.
DOI: 10.5220/0003675804460450
In Proceedings of the International Conference on Evolutionary Computation Theory and Applications (FCTA-2011), pages 446-450
ISBN: 978-989-8425-83-6
Copyright
c
2011 SCITEPRESS (Science and Technology Publications, Lda.)
X = xε2
EP
a, (1)
where ε is the sign of x, 2
P
a is the lost part of the
mantissa due to round-off error and E is the binary
exponent of the result. In single precision case, P =
24. If the floating-point arithmetic is as rounding to
+or , then 1 < a < 1.
According to (1) if we want to perturb the last
mantissa bit (or previous bits if necessary) of the value
x, it is sufficient to change a in the interval [1, 1]. We
consider a as a random variable uniformly distributed
on [1, 1]. Thus X, the calculated result, is a random
variable and its precision depends on its mean (µ) and
its standard deviation (σ).
The idea of CESTAC method is to consider that
every result X F of a floating-point operation cor-
responds to two informatical results one rounded off
from below (X
) , the second rounded off from above
(X
+
), each of them representing the exact arithmeti-
cal result x, with equal validity.
In this paper, we apply the stochastic arithmetic
to solve a fuzzy linear system by applying the fuzzy
CESTAC method for the Jacobi and Gauss-Seidel iter-
ative methods. For this purpose, the CADNA library
is used over the Linux operating system. The pro-
grams have been provided by C++. The preliminaries
are given in Section 2. The fuzzy CESTAC method
and the algorithm of solving FLS are introduced in
Section 3. In Section 4, two examples are solved
by using of the stochastic arithmetic and CADNA li-
brary and compare the results with the results of the
floating-point arithmetic.
2 PRELIMANERIES
Definition 1. An arbitrary fuzzy number X in para-
metric form is represented by an ordered pair func-
tions (X(r),
¯
X(r)), 0 r 1, where X(r) is a bounded
left-continuous non- decreasing function over [0, 1],
and
¯
X(r) is a bounded left-continuous non-increasing
function over [0, 1]. Also, X(r)
¯
X(r), 0 r 1. We
denote the set of all fuzzy numbers by E
1
.
Definition 2. Let
˜
X = (X(r), X(r)) and
˜
Y =
(Y(r),Y(r)) be arbitrary fuzzy numbers then the
Hausdorff distance of these numbers is defined by:
D(
˜
X,
˜
Y) =
sup
0r1
max{|X(r) Y(r)|, |X(r) Y(r)|}. (2)
Definition 3. Consider the n × n linear system of
equations:
AX = Y , (3)
where the coefficients matrix A = [a
ij
] is a crisp ma-
trix and y
i
E
1
, i = 1, 2, ..., n. The fuzzy system (3)
is called a fuzzy linear system (FLS). This system can
be converted to a crisp 2n ×2n linear system as fol-
lows (Abbasbandy et al., 2006; Allahviranloo, 2004;
Dehghan and Hashemi, 2006):
SX = Y, S =
B C
C B
(4)
where, B contains the positive entries of A, andC con-
tains the absolute values of the negative entries of A
and A = BC.
We suppose that S
ii
> 0, i = 1, 2, ..., 2n. Let B =
D
1
+ L
1
+ U
1
where D
1
, L
1
and U
1
are the diago-
nal, the strict lower and the strict upper triangular
matrices respectively. So, the elements of X
(k+1)
=
(X
(k+1)
, X
(k+1)
), k = 0, 1, 2, ..., in the Jacobi itera-
tive technique are obtained as follows (Allahviran-
loo,2004):
X
(k+1)
= D
1
1
(L
1
+U
1
)X
(k)
+ D
1
1
CX
(k)
+ D
1
1
Y,
(5)
X
(k+1)
= D
1
1
(L
1
+U
1
)X
(k)
+ D
1
1
CX
(k)
+ D
1
1
Y.
(6)
Also, the elements of the vector X
(k+1)
for
the Gauss-Seidel iterative method is (Allahviranloo,
2004):
X
(k+1)
= (D
1
+ L
1
)
1
U
1
X
(k)
(D
1
+ L
1
)
1
CX
(k)
+ (D
1
+ L
1
)
1
Y, (7)
X
(k+1)
= (D
1
+ L
1
)
1
U
1
X
(k)
(D
1
+ L
1
)
1
CX
(k)
+ (D
1
+ L
1
)
1
Y. (8)
3 INTRODUCING FUZZY
CESTAC METHOD
Let ˜x = (x(r), x(r)) be a fuzzy number in E
1
. Then,
˜x is represented as
˜
X = (X(r), X(r)), 0 r 1 in the
computer. It can be shown that:
X(r) = x(r) ε
1
2
E
1
P
α, (9)
X(r) = x(r) ε
2
2
E
2
P
α, (10)
where, ε
1
and ε
2
are the signs of x(r) and x(r) re-
spectively and 2
P
α and 2
P
α are the lost part of the
mantissa due to round-off error and E
1
and E
2
are the
binary exponents of the results. In single precision
case, P = 24 and 1 α, α 1. In the CESTAC
method, α and α in (9) and (10) are considered as
random variables uniformly distributed on [1, 1]. In
order to find samples for the obtained random vari-
ables, we perturb the last mantissa bit (or previous
SOLVING FUZZY LINEAR SYSTEMS IN THE STOCHASTIC ARITHMETIC BY APPLYING CADNA LIBRARY
447
bits) of the values X(r) and X(r), 0 r 1 (Vignes,
1993). The algorithm of fuzzy CESTAC method is
as follows where d is a small positive value like 10
2
and τ
β
is the value of T distribution with N1 degree
of freedom and confidence interval 1 β. If N = 3
and β = 0.05 then τ
β
= 4.303.
Algorithm 1:
For r = 0(d)1 do the following steps:
1) Find N samples for X(r) and X(r) as
X
1
(r), X
2
(r), ..., X
N
(r)
and
X
1
(r), X
2
(r), ..., X
N
(r),
by means of the perturbation of the last bit of the
mantissa,
2) Compute
X
ave
(r) =
N
i=1
X
i
(r)
N
and
X
ave
(r) =
N
i=1
X
i
(r)
N
3) Compute
S
2
(r) =
1
N1
N
i=1
(X
i
(r) X
ave
(r))
2
and
S
2
(r) =
1
N1
N
i=1
(X
i
(r) X
ave
(r))
2
,
4) Compute
C
X
ave
(r),X(r)
= log
10
N|X
ave
(r)|
τ
β
.S(r)
and
C
X
ave
(r),X(r)
= log
10
N|X
ave
(r)|
τ
β
.S(r)
as the common significant digits between the exact
values X(r) and X(r) and the approximate values
X
ave
(r) and X
ave
(r) respectively,
5) If
C
X
ave
(r),X(r)
0 or X
ave
(r) = 0
and
C
X
ave
(r),X(r)
0 or X
ave
(r) = 0
then write
˜
X = @.0
For solving fuzzy linear systems in the stochastic
arithmetic we use the following algorithm by apply-
ing Jacobi and Gauss-Seidel iterative methods with
the initial vector X
(0)
= (X
(0)
, X
(0)
). The programs
have been written in C++ and executed on a Linux
machine using CADNA library. For the termination
criterion, we consider the Hausdorff distance to be an
informatical zero (@.0). In the algorithm, the value d
is a small positive number like d = 0.1.
Algorithm 2:
1- Let k = 0 and i = 1,
2- For r = 0(d)1 do the following steps based on
the fuzzy CESTAC method:
2.a) Find X
(k+1)
and X
(k+1)
by using Jacobi or
Gauss-Seidel iterative method mentioned in (5)-
(8),
2.b) Let
dif = |X
(k+1)
X
(k)
|
and
dif = |X
(k+1)
X
(k)
|,
and put the maximum value of them as maxdif[i]
in the array maxdif,
2.c) i = i+ 1,
3- Find the maximum element of the array maxdif
and call it Hmax which is the approximation of
Hausdorff distance in the stochastic arithmetic. If
Hmax = @.0 then go to step 4 else put k = k + 1
and go to step 2,
4- Print k as the optimal iteration and X
(k)
X and
X
(k)
X as the approximate solution of the linear
system (4).
Now, from the procedure mentioned by Khojasteh
Salkuyeh and Toutounian (2006), we can prove the
following theorem for computing of the common sig-
nificant digits of each corresponding components of
the computed solution and exact solution for a lin-
ear system using an iterative method. In this theorem,
the notationC
X,X
means the common significant dig-
its between two distinct real vectors X and X
in R
n
which is defined as C
X,X
= log
10
||X+X
||
2
2
n||XX
||
2
.
Theorem 3.1. Let X
(k+1)
= P
1
X
(k)
+Q
1
and X
(k+1)
=
P
2
X
(k)
+Q
2
, k 0, be convergenceiterative method to
the exact solution X = (X, X) of the system (4) with
Q
1
, Q
2
6= 0. Then, for sufficiently large value of k, we
have
log
10
|1||P
1
||
2
| C
X
(k)
,X
C
X
(k)
,X
(k+1)
log
10
(1+ ||P
1
||
2
).
log
10
|1||P
2
||
2
| C
X
(k)
,X
C
X
(k)
,X
(k+1)
log
10
(1+ ||P
2
||
2
).
Since the above iterative procedure is convergent
if ||P
1
||
2
< 1 and ||P
2
||
2
< 1, hence according to the
theorem 3.1, when ||P
1
||
2
<< 1 and ||P
2
||
2
<< 1 then,
C
X
(k)
,X
C
X
(k)
,X
(k+1)
.
C
X
(k)
,X
C
X
(k)
,X
(k+1)
.
FCTA 2011 - International Conference on Fuzzy Computation Theory and Applications
448
4 NUMERICAL EXAMPLES
In this section, we solve two examples by using the
above algorithm based on the stochastic arithmetic.
The programs have been implemented by CADNA li-
brary. In each examples, the number of iterations in
both arithmetic are shown in single precision case. In
the floating-point arithmetic we use the termination
criterion Hmax < ε where ε is a given positive num-
ber.
Example 4.1. Consider the following fuzzy linear
system (Freidman et al.,1998)
x
1
x
2
= (r, 2 r),
x
1
+ 3x
2
= (4+ r, 72r),
Table 1: The number of iterations (example 4.1).
Jacobi Gauss-Seidel ε
Stochastic 26 9
Floating-point 34 10 10
7
As we observe in the table 1, for Jacobi method
the algorithm is stopped at the iteration k = 34 in the
floating-point arithmetic with ε = 10
7
. But, in the
stochastic arithmetic the optimal number of iterations
is k = 26. It means that after this number the contin-
uation of the iterations is useless and the accuracy of
the solution does not increase. Also, we can compare
the results of the Gauss-Seidel method. The optimal
solution of Jacobi method in the stochastic arithmetic
in the iteration k
opt
= 26 is:
x
1
= (0.1375001E + 01 + 0.6249994E + 00r,
0.2875000E + 010.87499957E+ 00r)
and
x
2
= (0.8750008E + 00 + 0.1249997E + 00r,
0.1375000E + 010.3749999E+ 00r).
Also, the optimal solution of Gauss-Seidel method
in the stochastic arithmetic in the iteration k
opt
= 9 is:
x
1
= (0.1374999E + 01 + 0.6250000E + 00r,
0.2874999E + 01 0.8750000E + 00r)
and
x
2
= (0.8750008E + 00 + 0.1250000E + 00r,
0.1375000E + 010.3750000E+ 00r).
The approximate result in the floating-point arith-
metic k = 34 is:
x
1
= (1.375+ 0.625r, 2.8750.875r)
and
x
2
= (0.875+ 0.125r, 1.3750.375r).
If we solve the system by Maple 8 directly and cal-
culate Hausdorff distance between the exact solution
and the result of iteration k = 26 of Jacobi method
based on (2), we have D(
˜
X,
˜
X
(26)
) = 9.5364×10
7
which means the computed result in the iteration 26
is very near to the exact solution.
Example 4.2. Consider the following fuzzy linear
system (Dehghan and Hashemi, 2006)
8x
1
+ 2x
2
+ x
3
3x
5
= (r, 2 r),
2x
1
+ 5x
2
+ x
3
x
4
+ x
5
= (4+ r, 72r),
x
1
x
2
+ 5x
3
+ x
4
+ x
5
= (1+ 2r, 63r),
x
3
+ 4x
4
+ 2x
5
= (1+ r, 3r),
x
1
2x
2
+ 3x
5
= (3r, 6 3r),
Table 2: The number of iterations (example 4.2).
Jacobi Gauss-Seidel ε
Stochastic 108 19
Floating-point > 10
4
60 10
7
The optimal solution of Jacobi method in the
stochastic arithmetic in the iteration k
opt
= 108 is:
x
1
= (0.728699E + 00 0.3305729E + 00r,
0.441342E 01+ 0.353992E+ 00r),
x
2
= (0.6141832E + 00 + 0.166261E + 00,
0.107726E + 010.296823E+ 00r),
x
3
= (0.126275E + 00 + 0.2905860E + 00r,
0.9182206E + 000.5013588E+ 00r),
x
4
= (0.2419159E + 00 0.331494E + 00r,
0.415803E + 00+ 0.3262251E+ 00r),
and
x
5
= (0.475281E + 00 + 0.9123067E + 00r,
0.2394742E + 010.100715E+ 01r).
Also, the optimal solution of Gauss-Seidel method in
the stochastic arithmetic in the iteration k
opt
= 19 is:
x
1
= (0.7286988E + 00 0.330572E + 00r,
0.441349E 01+ 0.3539914E+ 00r),
x
2
= (0.6141824E + 00 + 0.166262E + 00r,
0.107726E + 010.2968246E+ 00r),
x
3
= (0.126275E + 00 + 0.290586E + 00r,
0.9182215E + 000.5013596E+ 00r),
x
4
= (0.241915E + 00 0.331493E + 00r,
0.4158026E+ 00 + 0.326224E+ 00r),
and
x
5
= (0.475279E + 00 + 0.9123077E + 00r,
0.2394743E + 010.100715E+ 01r),
The exact solution of the system by using Maple 8 is:
x
1
= (0.72870.3306r, 0.04413+ 0.3540r),
x
2
= (0.6142+ 0.1663r, 1.0770.2968r),
x
3
= (0.1263+ 0.2906r, 0.91820.5014r),
x
4
= (0.24190.3315r, 0.4158+ 0.3262r),
and
x
5
= (0.4753+ 0.9123r, 2.3951.007r).
In Jacobi method the optimal number of iterations is
k
opt
= 108 in the stochastic arithmetic, but in the float-
ing point arithmetic the number of iterations exceed
SOLVING FUZZY LINEAR SYSTEMS IN THE STOCHASTIC ARITHMETIC BY APPLYING CADNA LIBRARY
449
k = 10000 with criterion Hmax < ε = 10
7
. These it-
erations are useless because after the iteration k = 108
the accuracy does not increase but the floating-point
arithmetic is not able to recognize it. In this case,
D(
˜
X,
˜
X
(108)
) = 1.18017×10
5
.
5 CONCLUSIONS
In this work, we proposed an algorithm in order to ap-
proximate the solution of a FLS in the stochastic arith-
metic. In this case, we are able to find the accuracy of
results and validate the results of the algorithm. Also,
we can find the optimal number if iterations in the it-
erative methods for solving fuzzy linear systems such
as Jacobi and Gauss-Seidel methods. In order to es-
timate the number of the significant digits we used
the CESTAC method and in order to implement the
stochastic arithmetic we applied the CADNA library.
Consequently, the stochastic arithmetic can play an
important role to rely the numerical solution of FLS.
ACKNOWLEDGEMENTS
The authors would like to thank the research center of
IAUCTB for their financial supports.
REFERENCES
Abbasbandy, S., Ezzati, R. and Jafarian, A. (2006). LU de-
composition method for solving fuzzy system of lin-
ear equations, Appl. Math. Comput., 172, 633-643.
Abbasbandy, S. and Fariborzi Araghi, M. A. (2004).
The use of the Stochastic arithmetic to estimate the
value of interpolation polynomial with optimal de-
gree, Appl. Num. Math., 50, 279-290.
Allahviranloo, T. (2004). Numerical methods for fuzzy sys-
tem of linear equations, Appl. Math. Comput., 155,
493-502.
Allahviranloo, T. (2005). Successive overrelaxation iter-
ative fuzzy system of linear equations, Appl. Math.
Comput., 162, 189-196.
Chesneaux, J. M. (1992). Stochastic arithmetic properties,
Comput. and Applied Mathematics, IMACS, 81-89.
Dehghan, M. and Hashemi, B. (2006). Iterative solution of
fuzzy linear systems, Appl. Math. Comput., 175, 645-
674.
Freidman, M., Ming, M. and Kandel, A. (1998). Fuzzy
linear systems, Fuzzy Sets & Systems, 96, 201-209.
Fariborzi Araghi, M. A. (2008). Dynamical control of accu-
racy using the stochastic arithmetic to estimate double
and improper integrals, Math. and Com. Appl., 13(2),
91-100.
Jezequel, F. and Chesneaux, J. M. (2008). CADNA,
a library for estimating round-off error propagation,
Comp. Phys. Commun., 178, 933-955.
Khojasteh Salkuyeh, D. and Toutounian, F. (2006). Numeri-
cal accuracy of a certain class of iterative methods for
solving linear system, Appl. Math. and Comp., 176,
727-738.
Vignes, J. (1993). A stochastic arithmetic for reliable sci-
entific computation, Math. and Comp. in Simul., 35,
233-261.
FCTA 2011 - International Conference on Fuzzy Computation Theory and Applications
450