Ant Colony Optimization With Combining Gaussian Eliminations For Matrix Multiplication
Ant Colony Optimization With Combining Gaussian Eliminations For Matrix Multiplication
Abstract—One of the main unsolved problems in computer We partition two input matrices X and Y and their product
algebra is to determine the minimal number of multiplications Z = XY into quadrants as follows:
which is necessary to compute the product of two matrices. For
practical value, the small format is of special interest. This leads Z11 Z12 X11 X12 Y11 Y12
to a combinatorial optimization problem which is unlikely solved =
Z21 Z22 X21 X22 Y21 Y22
in polynomial time. In this paper, we present a method called com-
bining Gaussian eliminations to reduce the number of variables in
this optimization problem and use heuristic ant colony algorithm where Zij = 2k=1 Xik Ykj , i, j = 1, 2.
to solve the problem. The results of experiments on 2 × 2 case To compute the size-n product XY , we recursively compute
show that our algorithm achieves significant performance gains. eight size-n/2 products Zij and a few O(n2 ) additions. If we
Extending this algorithm from 2 × 2 case to 3 × 3 case is also use T (n) to denote the total number of arithmetic operations to
discussed.
compute the product of two n × n matrices, then we have that
Index Terms—Ant colony optimization (ACO), evolutionary n
algorithms, Gaussian eliminations, matrix multiplication, multi- T (n) = 8T + O(n2 ) T (2) = O(1).
plicative complexity, Strassen’s algorithm. 2
A proof by recursion shows that T (n) = O(n3 ), and this
I. I NTRODUCTION
method is no faster than the ordinary one. However, the effi-
ciency can be further improved. We consider calculating the
T HE MULTIPLICATION of two matrices is one of the
most basic operations of linear algebra and scientific
computation, such as the solution of linear equations, matrix
following seven products:
inversion, and so on. It has drawn considerable attention to find P1 = X11 (Y12 − Y22 )
methods to speed up the computation [1]. P2 = (X11 + X12 )Y22
The standard algorithm for multiplying two n × n matrices
requires n3 scalar multiplications and n3 − n2 scalar additions, P3 = (X21 + X22 )Y11
for a total arithmetic operation count of 2n3 − n2 . For a very P4 = X22 (−Y11 + Y21 )
long time, no one doubts that that can be done using less than
n3 multiplications. It was not until 1969 that history changed. P5 = (X11 + X22 )(Y11 + Y22 )
Strassen [2] constructed a recursive algorithm that needs nlog2 7 P6 = (X12 − X22 )(Y21 + Y22 )
multiplications to calculate matrix product after analyzing the
relation between the elements of the matrix in 1969. P7 = (−X11 + X21 )(Y11 + Y12 ).
Strassen’s algorithm is usually described in the divide-and- It turns out that
conquer form. Assume for simplicity that n is a power of
two. Let X = (xij ) and Y = (yij ) be two n × n matrices. Z11 = − P2 + P4 + P5 + P6
Z12 = P1 + P2
Z21 = P3 + P4
Manuscript received February 21, 2012; revised June 14, 2012; accepted
June 22, 2012. Date of publication July 20, 2012; date of current version Z22 = P1 − P3 + P5 + P7 .
January 11, 2013. This work was supported in part by the National Natural
Science Foundation of China under Grants 61170081, 61165003, 61170305,
61070009, and 60873078 and in part by the Natural Science Foundation of
This method needs seven multiplications and 18 additions,
Guangdong Province of China under Grant 9251064101000010. This paper was and we derive the following recurrence for arithmetic opera-
recommended by Editor P. P. Angelov. tions T (n) to multiply two n × n matrices:
Y. Zhou is with the School of Computer Science and Engineering, n
South China University of Technology, Guangzhou 510006, China (e-mail:
[email protected]). T (n) = 7T + O(n2 ).
2
X. Lai is with the School of Computer Science and Engineering, South China
University of Technology, Guangzhou 510006, China, and also with the School
of Mathematics and Computer Science, Shangrao Normal University, Shangrao The solution works out to be T (n) = O(nlog2 7 ) = O(n2.81 ).
334001, China (e-mail: [email protected]). Thus, the aforementioned recursive method yields a faster ma-
Y. Li and W. Dong are with the School of Computer Science, Wuhan trix multiplication algorithm, and it can be extended to matrices
University, Wuhan 430072, China (e-mail: [email protected]; hubei_001@
163.com). of arbitrary size by embedding them into larger matrices of size
Digital Object Identifier 10.1109/TSMCB.2012.2207717 2n × 2n .
Strassen’s work started the search for even faster algo- ACO to solve it. We use two variants of ACO named MMAS
rithms for matrix multiplication. Winograd [3] proposed an and MMAS∗ to find solutions for 2 × 2 case. The experimental
algorithm that required seven multiplications and 15 addi- results show that the run-time could be reduced greatly. What
tions/subtractions in 1973. Since multiplications are more is more, we find a lot of other algorithms that are of the same
expensive than additions/subtractions, this algorithm did not quantity with Strassen’s algorithm.
improve Strassen algorithm too much. Hopcroft and Kerr [4] This paper is organized as follows. In Section II, we briefly
showed that at least seven multiplications were required for describe the formulation of the matrix multiplication problem.
multiplying 2 × 2 matrices. In addition, Bshouty [5] has proved Section III contains the details of the method combining the
that at least 15 additions/subtractions are needed for multiply- Gaussian eliminations to reduce the number of variables in
ing 2 × 2 matrices. A lot of effort has been spent on improving the combinatorial optimization problem introduced by small-
Strassen’s upper bound. In 2003, Cohn and Umans [6] devel- size matrix multiplication. The ACO algorithms with com-
oped a group theoretic approach to fast matrix multiplication. bining Gaussian eliminations are described in Section IV. In
They showed that if there are groups that simultaneously satisfy Section V, the effectiveness of the ACO algorithms for matrix
two conditions, then the group theoretic approach will yield multiplication problem of 2 × 2 case is shown by differ-
nontrivial (< 3) upper bound on the exponent for matrix multi- ent experiments. Finally, Section VI gives some concluding
plication. They later found a group that satisfies the two condi- remarks.
tions [7]. Currently, the best algorithm for matrix multiplication
was proposed by Coppersmith and Winograd [8] since its time
II. P ROBLEM F ORMULATION
complexity was O(n2.376 ). However, most researchers believe
that an optimal algorithm for matrix multiplication will run in Given an arbitrary integer n and two n × n matrices X =
O(n2 ) time. (xij ) and Y = (yij ), the optimal matrix multiplication problem
For the aforementioned algorithms except Strassen’s algo- asks how many essential multiplications are needed to compute
rithm, the constants hidden in the O notation are far too huge the entries of product Z = (zij ) = XY . More precisely, we
to make these algorithms usable in practice. Since the number wish to determinate the smallest number m of products
of multiplications in Strassen’s algorithm is optimal, we have
to look for another small format to obtain faster algorithm of pr = ur (xij )vr (yij )
practical value. The 3 × 3 format is of particular interest. To
with linear forms ur in the xij and vr in the yij such that each
improve Strassen’s upper bound on the matrix multiplication,
entry of XY can be represented by a linear combination of pr .
an algorithm for 3 × 3 matrices with 21 or less multipli-
Let us guess that each product pr (r = 1, . . . , m) can be
cations is required. It is known that the optimal number of
expressed in the form
multiplications of 3 × 3 format is in the interval [19, 23] (see,
⎛ ⎞⎛ ⎞
e.g., [9] and [10]). n n
It is not clear exactly how Strassen discovered the submatrix pr = ⎝ r
αij xij ⎠ ⎝ r
βkl ykl ⎠
products that are the key to make his algorithm work. He i,j=1 k,l=1
probably realized that he wanted to determine each element in
the product using less than eight multiplications. However, the such that each entry of XY can be written as a linear combina-
computer search provides an efficient and interesting method tion of these m products
for fast matrix multiplication problem. In 1970, Brent [11] used n m
r
a least squares minimization technique on a function whose zst = xsp ypt = γst pr
minima correspond with matrix multiplication algorithm to p=1 r=1
rediscover the 2 × 2 case. In 2001, Kolen and Bruce [12] used ⎛ ⎞⎛ ⎞
m n n
evolutionary algorithms to construct 2 × 2 matrix multiplica- ⎝
= r
αij xij ⎠ ⎝ r
βkl ykl ⎠ γst
r
(1)
tion. They presented the representational schema, evaluation
r=1 i,j=1 k,l=1
criteria, and evolution mechanisms employed during search.
Their experiments validated that the evolutionary search can where αij r r
, βkl r
, and γst are coefficients to be specified such
replicate Strassen’s discovery. Recently, Oh and Moon [13] also that the aforementioned equations are identities in the indeter-
use genetic algorithm to reproduce Strassen’s algorithm and minates xsp and ypt for all s, p, t ∈ {1, . . . , n}.
found 608 algorithms that have the same quantity as Strassen’s. Strassen’s algorithm, for example, has n = 2, m = 7, αij r
,
They defined the fitness as the number of product matrix entries r r
βkl , and γst with elements taken from the set {−1, 0, 1}. For the
that can be represented by the linear combinations of bilinear simple case n = 2, it has been proved that the smallest number
products and used Gaussian elimination and linear indepen- of product is seven [4].
dence techniques to help genetic search. In the following, we expend (1) and represent it in the
In this paper, we propose the ant colony optimization (ACO) form of a cubic system. We consider an alternate formulation
with combining Gaussian eliminations to solve the combina- of (1)
torial optimization problem introduced by small-size matrix ⎛ ⎞
multiplication. This method takes advantage of combining n m n
Authorized licensed use limited to: ST. JOSEPH ENGINEERING COLLEGE MANGALORE. Downloaded on March 09,2025 at 09:56:53 UTC from IEEE Xplore. Restrictions apply.
ZHOU et al.: ACO WITH COMBINING GAUSSIAN ELIMINATIONS FOR MULTIPLICATION 349
⎛ γ1 1
γ12 1
γ21 1
γ22
⎞
To expend (2), we maker use of the vector schema to present 11
the sum term ni,j,k,l=1 αij r
βkl xij ykl . ⎜ 2
γ11 2
γ12 2
γ21 2
γ22 ⎟
⎜ 3 3 3 3 ⎟
For r = 1, . . . , m, let αr = (α11 r r
, . . . , α1n r
, α21 r
, . . . , α2n , ⎜ γ11 γ12 γ21 γ22 ⎟
H=⎜ 4
γ11 4
γ12 4
γ21 4 ⎟
γ22
r r r r r
. . . , αn1 , . . . , αnn ) and βr = (β11 , . . . , β1n , β21 , . . . , β2n r
, ⎜ ⎟
⎜ 5
γ11 5
γ12 5
γ21 5 ⎟
γ22
r
. . . , βn1 r
, . . . , βnn ) be row vectors whose elements are those ⎝ 6 6 6 6 ⎠
r r γ11 γ12 γ21 γ22
of matrices (αij )n×n and (βkl )n×n , respectively, in row order. 7
γ11 7
γ12 7
γ21 7
γ22
Furthermore, we use pr to denote the column vector whose ⎛1 0 0 0⎞
elements are those of αrT βr in row order, i.e.,
⎜0 1 0 0⎟
⎜0 0 0 0⎟
⎜ ⎟
r
pr = (α11 r
β11 r
, . . . , α11 r
β1n r
, α11 r
β21 r
, . . . , α11 r
β2n ,..., ⎜0 0 0 0⎟
⎜ ⎟
⎜0 0 0 0⎟
r
α11 r
βn1 r
, . . . , α11 r
βnn r
, . . . , αnn r
β11 r
, . . . , αnn r
β1n , ⎜0 0 ⎟
⎜ 0 0⎟
⎜1 0 0⎟
r
αnn r
β21 r
, . . . , αnn r
β2n r
, . . . , αnn r
βn1 r
, . . . , αnn r T
βnn ) (3) ⎜ 0 ⎟
⎜0 1 0⎟
D=⎜ ⎟
0
⎜0 0 (5)
1 0⎟
⎜ ⎟
which is the vector representation for the sum term ⎜0 0 0 1⎟
n ⎜ ⎟
r r ⎜0 0 0 0⎟
i,j,k,l=1 αij βkl xij ykl . ⎜0 0 ⎟
In a similar manner, the entry of product XY can be ⎜ 0 0⎟
⎜0 0 0⎟
expressed by the vector schema. For example, for n = 2, ⎜ 0 ⎟
⎜0 0 0 0⎟
the entry 2i,j,k,l=1 ηijkl xij ykl of product XY , where ηijkl ⎝ ⎠
0 0 1 0
takes value from {0, 1}, can be expressed as (x11 y11 , x11 y12 , 0 0 0 1
x11 y21 , x11 y22 , x12 y11 , x12 y12 , x12 y21 , x12 y22 , . . . , x22 y11 ,
x22 y12 , x22 y21 , x22 y22 )(η1111 , η1112 , η1121 , η1122 , η1211 , Since both matrices H and D have n2 column vectors,
η1212 , η1221 , η1222 , . . . , η2211 , η2212 , η2221 , η2222 )T . Hence, we denote D = (d1 , . . . , dn2 ) and H = (h1 , . . . , hn2 ). Then,
the vector schema representation for x11 y11 + x12 y21 is (1, 0, system (4) consists of n2 systems
0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0)T , since the first term x11 y11
and the seventh term x12 y21 appear in x11 y11 + x12 y21 . P hk = dk (k = 1, . . . , n2 ). (6)
Similarly, the vector representations for x11 y12 + x12 y22 , r r
x21 y11 + x22 y21 , and x21 y12 + x22 y22 are (0, 1, 0, 0, 0, 0, 0, 1, Note that, when coefficients αij and βkl are held fixed, each
0, 0, 0, 0, 0, 0, 0, 0)T , (0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0)T , system of (6) is a system of linear equations, which can be
and (0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1)T , respectively. solved efficiently by Gaussian eliminations. For simplicity, in
r r
Let n4 × m matrix P = (p1 , . . . , pm ). Defining the matrix the following, we limit the elements αij and βkl to the set
D to be n4 × n2 matrix whose column vectors correspond to {−1, 0, 1}, and then, our objective is to assign −1, 0, and
r r
the entries of product XY and matrix H to be m × n2 matrix 1 to variables αij and βkl such that linear systems (6) are
whose elements are γst r
(r = 1, . . . , m; s, t = 1, . . . , n), we solvable.
may then express (2) as the following system: A natural generalization of the aforementioned problem is to
ask whether there exists an assignment of variables such that
at least a certain number of linear systems are solvable. We
PH = D (4) formulate the number of solvable linear systems as the value
of an objective function to be maximized so the matrix multi-
which is a system of n6 cubic equations with 3n2 m unknowns. plication problem is transformed into a maximization problem.
r
For example, for n = 2 and m = 7, For given matrix P which is determined by coefficients αij
r
and βkl in (4), we use the notation f itness(P ) to denote the
⎛ α1 β 1 α211 β11
2 α311 β11
3 α411 β11
4 α511 β11
5 α611 β11
6 7 ⎞
α711 β11 number of solvable linear systems which is an integer from
11 11
1 β1 α211 β12
2 α311 β12
3 α411 β12
4 α511 β12
5 α611 β12
6 α711 β12
7 zero to n2 . The aim is then to find an assignment of variables
⎜ α11 12 ⎟
⎜ α111 β21
1 2 2
α11 β21 3 3
α11 β21 4 4
α11 β21 5 5
α11 β21 6 6
α11 β21 7 7 ⎟
α11 β21
r
αij r
and βkl to maximize f itness(P ). Since the number of
⎜ 1 1 ⎟
⎜ α11 β22 2 2
α11 β22 3 3
α11 β22 4 4
α11 β22 5 5
α11 β22 6 6
α11 β22 7 ⎟
α711 β22
2
all possible assignments is 32n m , the exhaustive search is
⎜ 1 1 7 ⎟
⎜ α12 β11 α212 β11
2 α312 β11
3 α412 β11
4 α512 β11
5 α612 β11
6 α712 β11 ⎟ impractical, even for the simplest case n = 2 and m = 7. In
⎜ α1 β 1 7 ⎟
⎜ 12 12 α212 β12
2 α312 β12
3 α412 β12
4 α512 β12
5 α612 β12
6 7
α12 β12 ⎟ the following sections, we will use the heuristic ant colony
⎜ α1 β 1 2 2 3 3 4 4 5 5 6 6 7 ⎟
α712 β21
⎜ 12 21 α12 β21 α12 β21 α12 β21 α12 β21 α12 β21 ⎟ algorithm with combining Gaussian eliminations to solve this
⎜ α1 β 1 2 2 3 3 4 4 5 5 6 6 7 ⎟
α712 β22
P =⎜ ⎟
12 22 α12 β22 α12 β22 α12 β22 α12 β22 α12 β22
⎜ α121 β11
1 7 ⎟ problem.
α221 β11
2 α321 β11
3 α421 β11
4 α521 β11
5 α621 β11
6 α721 β11
⎜ 1 1 ⎟
⎜ α21 β12 α221 β12
2 α321 β12
3 α421 β12
4 α521 β12
5 α621 β12
6 7 ⎟
α721 β12
⎜ 1 1 7 ⎟
⎜ α21 β21 2 2
α21 β21 3 3
α21 β21 4 4
α21 β21 5 5
α21 β21 6 6
α21 β21 α721 β21 ⎟ III. C OMBINE G AUSSIAN E LIMINATIONS TO R EDUCE THE
⎜ α1 β 1 7 ⎟
⎜ 21 22 2 2
α21 β22 3 3
α21 β22 4 4
α21 β22 5 5
α21 β22 6 6
α21 β22 α721 β22 ⎟ N UMBER OF VARIABLES IN M ATRIX
⎜ α1 β 1 α222 β11
2 α322 β11
3 α422 β11
4 α522 β11
5 α622 β11
6 7 ⎟
α722 β11
⎜ 22 11 ⎟ M ULTIPLICATION P ROBLEM
⎜ α1 β 1 α222 β12
2 α322 β12
3 α422 β12
4 α522 β12
5 α622 β12
6 7 ⎟
α722 β12
⎝ 221
12
1 2 2 3 3 4 4 5 5 6 6
⎠
α22 β21 α22 β21 α22 β21 α22 β21 α22 β21 α22 β21 α722 β21
7
Computational difficulty in solving the matrix multiplication
α122 β22
1 2 2
α22 β22 3 3
α22 β22 4 4
α22 β22 5 5
α22 β22 6 6
α22 β22 α722 β22
7
problem is caused by problem dimension, i.e., the number
Authorized licensed use limited to: ST. JOSEPH ENGINEERING COLLEGE MANGALORE. Downloaded on March 09,2025 at 09:56:53 UTC from IEEE Xplore. Restrictions apply.
350 IEEE TRANSACTIONS ON CYBERNETICS, VOL. 43, NO. 1, FEBRUARY 2013
values associated with the edges of the construction graph. 1-ANT MMAS
Formally, we denote pheromones by a function τ : E → R+ . Begin
At vertex vi−1 , edge ei,j is then chosen according to proba- For all ei,j , initialize τ (ei,j );
bility τ (ei,j )/(τ (ei,−1 ) + τ (ei,0 ) + τ (ei,1 )). Thus, a walk of Construct an initial solution x;
the ant produces a solution vector x = (x1 , x2 , . . . , xn ) ∈ While (termination condition does not hold){
{−1, 0, 1}n , and we denote the path by P (x). Construct a new solution x ;
Update pheromone: A pheromone τ (ei,j ), associated with If f (x ) ≥ f (x) then x := x ;
edge ei,j , is initiated randomly and is then changed dynamically Update the pheromone values w.r.t. x;
during the run of the algorithm. The aim of the pheromone }
update is to strengthen the pheromone values on the edges End
participating to good solutions and to decrease these with bad 1-ANT MMAS∗
ones. More precisely, these changes are determined by the Begin
evaporation rate ρ ∈ [0, 1]: A ρ-fraction of all pheromones For all ei,j , initialize τ (ei,j );
evaporates, and some pheromone is added to the edges that Construct an initial solution x;
belong to best so-far path. In order to prevent premature con- While (termination condition does not hold){
vergence, Stützle and Hoos [16] proposed the max–min ant Construct a new solution x ;
system (MMAS) that imposes explicit limit on the pheromone If f (x ) > f (x) then x := x ;
to ensure that each search point has a positive probability Update the pheromone values w.r.t. x;
of being chosen in the next step. In this paper, we use the }
max–min pheromone update rule and restrict each pheromone End
to the interval [1/n, 1 − (1/n)]. This choice is inspired by the n-ANT MMAS
standard mutation in the evolutionary algorithm which flips Begin
each bit of solution vector (x1 , x2 , . . . , xn ) with probability For all ei,j , initialize τ (ei,j );
1/n. Depending on whether edge ei,j is contained in the path Construct an initial solution x;
P (x) of the constructed solution x, the pheromone update is While (termination condition does not hold){
performed as follows: Construct n new solutions;
Select the best new solution x ;
min (1−ρ)τ (ei,j )+ρ,1− n1 if ei,j ∈ P (x) If f (x ) ≥ f (x) then x := x ;
τ (ei,j ) =
max (1−ρ)τ (ei,j ), n1 otherwise Update the pheromone values w.r.t. x;
(11) }
where ρ is the evaporation rate of the pheromone. End
Since the objective function’s value of the combinatorial n-ANT MMAS∗
optimization problem introduced by the matrix multiplication Begin
problem with size n and multiplications m is an integer between For all ei,j , initialize τ (ei,j );
zero and m, it is obviously a plateau function. Plateau is a Construct an initial solution x;
region in the search space, in which all search points have the While (termination condition does not hold){
same fitness. Construct n new solutions;
Commonly, there exist two acceptance criteria for genetic Select the best new solution x ;
algorithms, ACOs, and other heuristic algorithms. One is that If f (x ) > f (x) then x := x ;
an algorithm accepts a new solution which is not bad compared Update the pheromone values w.r.t. x;
with the current best one, and the other is that the algorithm }
accepts a new solution only when it is strictly better than the End
current best one. For a plateau function, acceptance criterion
has a notable impact on evolutionary algorithms’ performances, We use the aforementioned algorithms to solve the matrix
particularly the run-time of the algorithms [17], [18]. In [19], multiplication problem. For the matrix multiplication problem
Neumann et al. have investigated that the acceptance criterion with order 2 and 7 multiplications, a solution x means an
r r
of accepting a new solution as good as the current best one assignment of variables αij and βkl (r = 1, 2, 3; i, j, k, l =
could drastically reduce the run-time of MMAS. 1, 2) to −1, 0, and 1, and the objective function f (x) is de-
In this paper, we use two kinds of ant colony algorithms termined by the objective function value calculation algorithm
called MMAS and MMAS∗ to solve matrix multiplication in Section III. The experimental results are given in the next
problem of case n = 2. The MMAS algorithms accept a new section.
solution that is not bad compared with the current best one.
The MMAS∗ algorithms accept a new candidate solution that
V. E XPERIMENTAL R ESULTS
is strictly better than the current best one. Each kind contains
three different numbers of ants, i.e., 1, 15, and 30 ants. MMAS We now experimentally compare the different algorithms
and MMAS∗ are similar to or the same as MMAS and MMAS∗ for the matrix multiplication problem of the case n = 2 and
discussed in [19] and [20]. Both of them are described as m = 7 that we have presented in this paper. We first give a brief
follows. description of main experimental results.
Authorized licensed use limited to: ST. JOSEPH ENGINEERING COLLEGE MANGALORE. Downloaded on March 09,2025 at 09:56:53 UTC from IEEE Xplore. Restrictions apply.
ZHOU et al.: ACO WITH COMBINING GAUSSIAN ELIMINATIONS FOR MULTIPLICATION 353
TABLE I
D IFFERENT T YPES OF 2 × 2 M ATRIX M ULTIPLICATION A LGORITHMS
In [13], Oh and Moon used genetic algorithms to find so- find a solution. In extreme case, the run-times for MMAS and
lutions for matrix multiplication of case n = 2 and m = 7. In MMAS∗ algorithms are all less than 1 s.
general, it takes a few hours to find a solution, and in extreme Table I shows the ten types of solutions found by both
case, the run-time is 10 s. In our experiments, results show MMAS and MMAS∗ for matrix multiplication problem of case
that the run-time could be reduced greatly. It takes about from n = 2 and m = 7. Besides the nine types of solutions found in
seconds to less than 20-s mean time for MMAS algorithms [13], both of MMAS and MMAS∗ find a new solution type of
and dozens of minutes in general for MMAS∗ algorithms to 2266668 (type 4).
Authorized licensed use limited to: ST. JOSEPH ENGINEERING COLLEGE MANGALORE. Downloaded on March 09,2025 at 09:56:53 UTC from IEEE Xplore. Restrictions apply.
354 IEEE TRANSACTIONS ON CYBERNETICS, VOL. 43, NO. 1, FEBRUARY 2013
In the following, the effect of ACO algorithm parameters on MMAS could find a solution for matrix multiplication problem
performance and comparisons of MMAS and MMAS∗ will be of case n = 2 and m = 7 with the smallest mean number of
discussed by various experiments. iterations when ρ = 0.05. While 15-ANT MMAS needs the
In Section V-B, we investigate 1-ANT MMAS, 15-ANT largest mean number of iterations to find a solution when ρ is
MMAS, and 30-ANT MMAS with different evaporation rates set to 0.05, 30-ANT MMAS needs the largest mean number of
ρ, and in Section V-C, we investigate 1-ANT MMAS∗ , iterations to find a solution when ρ is set to 0.01. With ρ taking
15-ANT MMAS∗ , and 30-ANT MMAS∗ with respect to their value from 0.1 to 1, 15-ANT MMAS and 30-ANT MMAS
iterations and times needed to find a solution. Furthermore, in could find a solution with relatively smaller iterations. The more
Section V-D, we compare MMAS and MMAS∗ with respect the number of ants is, the smaller the number of iterations to
to the mean iterations and the mean times to find solutions for find a solution is.
matrix multiplication problem of case n = 2 and m = 7. Since 30-ANT MMAS and 15-ANT MMAS try 30 and 15
In Section V-E, we further investigate the distribution of candidate solutions in one iteration, respectively, while 1-ANT
solutions found by 1-ANT MMAS, 15-ANT MMAS, and MMAS tries only one candidate solution in one iteration, the
30-ANT MMAS with different evaporation rates ρ. mean time needed for 1-ANT MMAS to find a feasible solution
is the shortest among these three algorithms, as shown in
Table II. In addition, the shortest mean time for 1-ANT MMAS
A. Experiment Setting
to find a solution for matrix multiplication of case n = 2 and
Experimental computer is an Intel Xeon 2.00-GHz server m = 7 is 2.2896 when ρ is set to 0.05.
with 4-GB RAM. The evaporation rates are ρ = 0.01, 0.05, 0.1, Table III shows that 1-ANT MMAS could find a solution
0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, and 1.0. from less than 1 s to less than 1 min and, for 15-ANT MMAS
The n’s of n-ANT MMAS and n-ANT MMAS∗ are 1, 15, and 30-ANT MMAS, the times to find a solution range from
and 30. less than 1 s to several minutes.
Mean square error (mse) is the measure of stability per-
formance of an algorithm. Table II also shows the mse of
B. 1-ANT MMAS, 15-ANT MMAS, and 30-ANT MMAS for
three MMASs. As far as the stability performance (mse) is
Matrix Multiplication Problem of Case n = 2 and m = 7
concerned, we could see that 1-ANT MMAS is the worst,
In this subsection, we investigate 1-ANT MMAS, 15-ANT 30-ANT MMAS is the best, and 15-ANT MMAS is medium in
MMAS, and 30-ANT MMAS on finding solutions for matrix stability measured by the mse for the number of iterations. This
multiplication problem of case n = 2 and m = 7. may be because the more ants an algorithm contains, the more
Table II and III show the details of experimental results of candidate solutions are constructed and tried in one iteration,
50 independent runs. From Table II, we can find that 1-ANT and the more stable this algorithm is.
Authorized licensed use limited to: ST. JOSEPH ENGINEERING COLLEGE MANGALORE. Downloaded on March 09,2025 at 09:56:53 UTC from IEEE Xplore. Restrictions apply.
ZHOU et al.: ACO WITH COMBINING GAUSSIAN ELIMINATIONS FOR MULTIPLICATION 355
TABLE IV TABLE V
M EAN N UMBERS OF I TERATIONS (M EAN I TER #), M EAN T IMES , AND L ARGEST AND S MALLEST N UMBERS OF I TERATIONS (S MALLEST # AND
T HEIR MSE OF D IFFERENT MMAS∗ A LGORITHMS TO F IND A S OLUTION L ARGEST #, R ESPECTIVELY ) AND THE S HORTEST AND L ONGEST T IMES
FOR 2 × 2 C ASE OVER 50 I NDEPENDENT RUNS . (S HORTEST T AND L ONGEST T, R ESPECTIVELY ) OF D IFFERENT MMAS∗
T HE U NIT OF T IME IS S ECOND A LGORITHMS TO FIND A S OLUTION FOR 2 × 2 C ASE OVER
50 I NDEPENDENT RUNS . T HE U NIT OF T IME IS S ECOND
Fig. 2. Distribution of different solution types found by 1-ANT MMAS. For Fig. 4. Distribution of different solution types found by 30-ANT MMAS. For
each ρ, the algorithm is terminated after having found 2383 solutions. each ρ, the algorithm is terminated after having found 2383 solutions.
Authorized licensed use limited to: ST. JOSEPH ENGINEERING COLLEGE MANGALORE. Downloaded on March 09,2025 at 09:56:53 UTC from IEEE Xplore. Restrictions apply.