You are on page 1of 10

Electronics and Communications in Japan, Part 3, Vol. 83, No.

2, 2000
Translated from Denshi Joho Tsushin Gakkai Ronbunshi, Vol. J80-A, No. 11, November 1997, pp. 1951–1959

Analog Neuro-Based Approach to Tiling Problem Using Fitting


Function of Polyominoes

Hiroshi Ninomiya, Takeshi Nakayama, and Hideki Asai

Department of Systems Engineering, Faculty of Engineering, Shizuoka University, Hamamatsu, Japan 432

SUMMARY complete problem, and the convergence to the true solution


is not satisfactory in Ref. 5, even though a small-sized
The tiling problem is a typical NP-complete problem, problem is considered in the experiment.
where the polyominoes are to be arranged without a gap on Later, Refs. 6 and 7 considered a larger-sized prob-
a finite checkerboard. In this study, the arrangement of l lem. Assuming that the rotation of the polyomino is not
polyominoes on an m u n checkerboard is considered. As considered, a tiling problem is solved successfully where
the first step, the conventional parallel algorithm using the 10 polyominoes are arranged on a 7 u 7 checkerboard. The
maximum neural network is verified. Then, the authors problem is to find a unique solution from approximately 1.3
propose a solution procedure for the tiling problem, where u 1014 candidates, which is a very difficult problem. In Refs.
the analog neural network is used in addition to the fitting 6 and 7, however, there remained the problem that the
function. Lastly, the proposed method and the conventional minimum of the energy function does not always corre-
method are compared, and it is shown that the proposed spond to the optimal solution [8].
method is also effective for more complex tiling problems. On the other hand, Hopfield and Tank showed that an
© 1999 Scripta Technica, Electron Comm Jpn Pt 3, 83(2): approximate solution for the traveling-salesman problem
1–10, 2000 (TSP) can be derived using a neural network [9], and many
subsequent reports have been presented concerning the
optimization problem [6, 7, 10]. The authors have shown
Key words: Tiling problem; polyomino; fitting func- design procedures for the digital sequential circuit and the
tion; analog neural network; maximum neural network. discrete Walsh transformer using the Hopfield network [11,
12]. The energy function for an optimization problem such
as TSP, however, contains the local convergence problem,
1. Introduction and it is not always true that a satisfactory result is obtained.
From such a viewpoint, a new energy function is presented
The tiling problem is the problem where polyomi- for the TSP, based on city adjacency, which prevents local
noes are to be arranged without a gap on a finite checker- convergence to some extent [13–15].
board. By polyomino is meant a polygon that can be This article considers the tiling problem and im-
represented as a set of squares. There have been many proves the energy function used in the conventional method
discussions of the tiling problem using polyominoes [1–4]. by introducing a function representing the fitting of the
All of the latter, however, are sequential procedures. Refer- polyominoes [18–21]. Then, the maximum neural network
ence 5 first used the parallel procedure, where the tiling used in the conventional method is handled as an analog
problem is handled as an optimization problem using a neural network. In other words, escape from local solutions
stochastic neural network. The tiling problem is an NP- can be realized by allowing analog values for the response

CCC1042-0967/00/020001-10
1 © 1999 Scripta Technica
of the neuron. Using the method proposed by the authors, sample problem, 10 u 7 u 7 neural arrays are needed. In the
a tiling problem is solved in which 14 polyominoes are proposed procedure, the polyomino on the sideboard is
arranged on a 10 u 10 checkerboard. The total number of projected as a marker on the neural array. By this procedure,
candidates for this problem is about 1.6 u 1024, and it is thus a neuron as a marker can represent the coordinate the shape
shown that the proposed algorithm can handle a larger and of the polyomino.
more complex tiling problem. Using the neural array composed of 10 u 7 u 7 Vijk
and the sideboard of size Vgijk as shown in Fig. 2, the sample
problem is solved. The operational equation for the ijk-th
2. Conventional Method neuron is given by

The conventional method (called method 1) for solv-


ing the tiling problem is considered in this section [6, 7].
For simplicity, a tiling problem is considered in the follow-
ing, where 10 polyominoes are to be arranged on a 7 u 7
checkerboard [6, 7]. In method 1, the maximum neuron
given by the following equation is used as the neuron
model:

(2)

(1) Here, the first term is the constraint that only one of the
polyominoes can fire on the neural array. The second term
where Vijk and Uijk are the output and input, respectively, of is the constraint that the markers will not overlap at the same
the ijk-th neuron. place, looking through the neural array from the front side.
For each polyomino, the neural array representing the The third term is the objective condition that the polyomi-
coordinates and the sideboard representing the shape, both noes do not overlap, looking through the sideboards from
7 u 7 in size, are prepared as in Fig. 1. In order to solve the the front.
f i is the function that detects the overlap, while
representing the shape of the polyomino. It is given as
follows:

Fig. 2. Neural representation for the 7 u 7 tiling


Fig. 1. Ten polyominoes and their markers. problem.

2
(3)

(5)
Here, Vgist represents the value on the sideboard, with i, s,
and t as coordinates. When marker Vijk fires, s and t are
determined according to the shape of the polyomino, and
For the optimal solution for the tiling problem in the
we have Vgist 1.
method using Eq. (5), only the outputs Vijk of l neurons, that
In Fig. 2, the isolated space detection sideboard is
is, the same number as that of polyominoes, are 1, and the
used to eliminate the isolated space, as the 11th sideboard.
outputs Vijk of the other neurons are 0. On the other hand,
By isolated space is meant the space where the following
the second term of Eq. (5) has a nonzero value in the optimal
conditions are satisfied:
solution of the tiling problem. The second term is a con-
straint to avoid overlap of the marker neurons of the layers
for each coordinate of the l-layered m u n neural array. It is
a term that takes the value 0 when m u n neurons fire
without an overlap. This contradicts the previous property
of the optimal solution for the tiling problem. Consequently,
in this optimization problem, the energy function does not take
the minimum for the true solution in method 1.
From such a viewpoint, this article proposes an en-
ergy function based on Eq. (5), where the second term of
When these conditions are satisfied, the isolated space can the energy function given by Eq. (5), which has been a
be eliminated by establishing problem in method 1, is deleted, and a new objective
condition is included.

3. Proposed Method

for the 11th sideboard. 3.1. Energy function containing fitting


As another point, the convergence to the global mini- function and analog neural network
mum is improved in method 1, by well balancing the use of
cf i and cf i Vijk in the third term of Eq. (2). The fourth In the proposed method, the energy function for the
term is the hill-climbing term, in order to avoid the local tiling problem is newly defined as
minimum and to converge toward the global minimum. The
function h x takes the value 1 when x = 0, and the value 0
otherwise. The 7 u 7 tiling problem is solved in method 1
using such an operational equation.
According to Ref. 16, the operational Eq. (2) for the
neuron can be represented by the partial derivative of the
energy function as shown in Eq. (4). Then, the energy
function in method 1 is given by Eq. (5).

(4)

3
(6)

where Vijk represents the output of the ijk-th neuron.


Here, the first term is a constraint so that only one of
the polyominoes on the i-th neural network array fires. The
second term is the constraint that the polyominoes do not
overlap, as in the third term of Eq. (2). Consequently, f i is
represented as in Eq. (3), respectively. The third term is the
objective condition for detecting the contact of each
polyomino with other polyominoes and the outer frame. It
is defined to take the value 0 when all polyominoes are in Fig. 3. Optimal solution and fitting function.
complete contact with other polyominoes and the outer (a) Optimal solution. (b) Fitting function,
frame. wn i 12 in this example.
As shown in Fig. 3(a), all polyominoes in the optimal
solution are in contact with other components at the periph-
ery. The fitting function g i : {g i |i 1, 2, . . . , 10} is de-
fined as follows according to the shape of the polyomino.
It is given as follows: The overlapping function given by Eq. (3) and the
fitting function given by Eq. (7) have maximum values that
(7) greatly vary with the area and shape of the polyomino.
Consequently, Eqs. (3) and (7) are normalized as follows in
G i represents the length of the periphery of the i-th the proposed method, so that only the effects of the overlap
polyomino [Fig. 3(b)]. gc i is the function that examines and contact of the polyominoes are reflected on the energy
whether or not the i-th polyomino is in contact with other function, independently of the area and shape of the
polyominoes or the outer frame. It is defined as polyomino. By this measure, it is no longer necessary to
adjust greatly the coefficients B and C of the energy func-
tion for each problem:

(9)

(10)

where F i is the area of the polyomino, with the area of the


unit square being defined as 1.
By this procedure, the energy function (6) is rewritten
as

(8)

where Vgist is the value on the sideboard as in Eq. (3), with


i, s, and t as coordinates. s and t are determined by the
coordinate of the polyomino periphery. The fourth term
forces the neuron output to the binary value (0, 1), which is
needed in using the analog neuron model.

4
the polyomino corresponding to each output of the marker
(11) [Fig. 4(a)] is arranged on the sideboard [Fig. 4(b)], and the
values are added as Vgijk [Fig. 4(c)]. As a result, the effects
of all polyominoes that have the possibility of being placed
The energy function of Eq. (11) takes the minimum and the on that point are reflected in the network behavior accord-
value 0 when all polyominoes are arranged in the given ing to the magnitude of the possibility.
checkerboard without an overlap and all polyominoes are By the magnitude of the possibility is meant the value
in completed contact with other polyominoes or the outer of the neuron. In other words, the neuron with a larger
frame. In this sense, Eq. (11) obviously differs from Eq. (5). output value has a higher possibility of being placed at the
According to Eq. (4), the operational equation for the point. In contrast, in method 1, only the marker with the
ijk-th neuron is given as largest input value, that is, only the effect of the polyomino
that has the highest possibility of being placed at the point
at the considered time, is reflected in the behavior of the
network [Fig. 4(d)]. Thus, in the conventional method in
which the analog neural network is used, only one neuron
is allowed to fire on each array composed of the maximum
neural network. But in the proposed method, the output of
(12) the neuron is reflected in the energy function, even if the
output value is small.

where Uijk is the input to the ijk-th neuron. 3.2. Simulation procedure
In the proposed method, the following sigmoid func-
tion is used instead of Eq. (1) as the input–output relation Essentially in the proposed method, Eq. (12) is nu-
of the neuron: merically integrated by the progressive Euler method. The
simulation procedure is as follows.
Step 0: Initial setting.
(13) Step 1: A random variable is used as the input Uijk
to the neuron:

When the neuron with the sigmoid function as the input– (14)
output relation is used, very small changes of the input are
reflected in the energy function. With the analog repre- Step 2: Using Eq. (13), the output value Vijk is
sentation of the input–output relation, the analog value calculated.
Vgijk of the sideboard is defined as the sum of markers (Fig. Step 3: All Vgijk are initialized.
4). This produces the following effect. Step 4: The output value is added to Vgijk related to
In method 1, only the marker with the maximum the marker:
input is reflected on the sideboard. In the proposed method,

Fig. 4. An analog expression of the 6th polyomino in Fig. 1.

5
where Umax 1.0 and Umin 1.0.
Step 8: If the steady state is reached (E = 0), go to
step 1. Otherwise, the time t is increased by 't 102 .
Step 9: If the number of iterations exceeded T, end.
If not, go to step 2.

The initial value for the input Uijk to the neuron is


empirically determined in step 1, according to Refs. 6 and
(15) 7. In step 5, a procedure to modify the operational equation
according to the number of iterations [6, 7] is applied, in
order to realize the escape from the local solution.
Step 5: The operational equation dUijk / dt is calcu-
lated using Eq. (12):
4. Result of Simulation and Discussion

4.1. Result of simulation

In order to examine the convergence to the optimal


solution, simulations are performed for the five examples
shown in Fig. 5 for more than 100 iterations. The results are
given in Table 1, where complexity refers to the total
number of possible arrangements except for the rotation
and inversion. In other words, complexity is the total num-
ber of possible arrangements of all polyominoes on the
checkerboard. In practice, however, the difficulty of the
tiling problem will be affected greatly by the shape and
arrangement of the polyominoes. This report, however,
is not greatly concerned with the difficulty of the tiling
Step 6: Uijk iter  1 is calculated by the progres- problem.
sive Euler method: When the rotation of the polyomino is considered, the
complexity is increased by the power of 4, compared to the
case where rotation is not considered, since the polyomino
can take any of the four directions. When inversion of the
(17)
polyomino is considered, the complexity is further in-
creased by the power of 2. The complexity of the problem
Step 7: Setting of saturation level for the input is tremendously increased when rotation or inversion is
value: considered. Consequently, the problem is discussed in this
article without considering rotation and inversion, as in
Refs. 6 and 7.
As shown in Table 1, the procedure converges to the
optimal solution for all examples without falling in a local

Fig. 5. Examples.

6
Table 1. Simulation results

minimum, even though the initial value for the input Uijk to tion is shown in Table 2, where it is seen that the first and
the neuron is given by the random variable as in Eq. (14). fourth terms affect greatly the speed of convergence. As to
The proposed method is compared to method 1 as follows. the effect of the initial value D u RAND D 1.0 u 106 , the
On simulation by the authors, method 1 could not reach the true solution is always obtained for all examples, if Z is set
true solutions for examples 2 to 5. For example 1, the between 1 and 3.
average number of iterations is 930 in method 1, when the In order to examine the dependence on the initial
coefficients in Eq. (5) are set as A = 1.0, B = 1.0, C = 1.0, value, the initial value is set as D u RAND D 1.0 u 102
and D = 1.0 and for Z = 7. The number of iterations in the in example 1. The result of simulation is shown in Table 3,
proposed method is 922. In other words, the number of where it is seen that the percentage of convergence to the
iterations in reaching the true solution are nearly the same. true solution depends on the value of Z. This implies that
The coefficients of the energy function used in this simula- the procedure may converge to different patterns when the
tion by method 1, however, are the values empirically initial value is varied.
obtained as realizing the fastest convergence. Thus, it is As the next step, the effects of the second and third
concluded that the proposed method can handle a larger- terms, that is, the effects of the overlapping function and
scale problem than can the conventional method. the fitting function, are examined as follows. The coeffi-
cients B and C are varied by steps of 0.1 in example 1, and
4.2. Discussion of coefficients in energy the simulations are performed. Table 4 shows the range of
function coefficients for which the true solution is reached, together
with the number of iterations. Since those terms are normal-
As the first step, the coefficients for the first to third ized by Eqs. (9) and (10) for the area and shape of the
terms of the energy function are normalized to 1.0, follow- polyomino, the effects of the overlapping function and the
ing Refs. 6 and 7. The coefficient for the fourth term is set fitting function are directly represented by varying B and
as 0.0, in order to eliminate its effect. In other words, it is C. It is seen from Table 4 that C of the fitting function has
set that A = 1.0, B = 1.0, C = 1.0, and D = 0.0. Then, the a smaller degree of freedom than does B of the overlapping
simulation is executed by varying Z. The result of simula- function.

Table 2. Average numbers of iterations

7
Table 3. Simulation results for different initial values D 1.0 u 102 )

It is seen in both Tables 1 and 2 that the average corners, are settled by 250 iterations in Fig. 6. Then, for the
number of iterations does not always increase when the newly formed frame (formed by the settled polyominoes),
complexity of the problem is increased. The average num- the polyominoes that are easier to fit are settled.
ber of iterations seems to be of the same order of magnitude The effect of the analog neural network is seen, for
as that of the complexity. It is left for a future study to example, in the behavior of the square polyomino appearing
investigate whether this property is due to the parallelism at the upper right of Fig. 6. Although the square polyomino
of the neural network or due to the property that the number
once starts to be settled, a bar-shaped polyomino appeared
of iterations depends on the difficulty of the tiling problem,
in competition. Then, the square polyomino is moved to
in terms of the shape and placement of the polyomino, and
another optimal place eventually by the effect of the fitting
not on the complexity. The definition of the difficulty is also
left for the future. function. This is due to the effect of the analog neural
network on the behavior of the network, which reflects all
polyominoes that can be placed at the point. Similar phe-
4.3. Discussion of transient behavior of
nomena are observed in other examples.
network
It was verified as a result that the proposed procedure
As a result of simulation, the authors have found a converges to the optimal solution of the time 100% for an
very interesting transient behavior of polyominoes, which initial value near 0, in all five examples. There is no guar-
is considered next. Figure 6 shows an example of the antee, however, that the solution shown in Fig. 5 is the
transient behavior for example 1. The output value of the unique solution, under the condition that rotation and inver-
marker is large when the thick line is used for the darker sion are not allowed. No optimal solution was actually
polyomino. More than one of the same polyomino may obtained in this study other than those shown in Fig. 5. It is
exist, since the analog neural network is used, and there can shown by simulation that the proposed method is more
be more than one marker neuron with nonzero values for effective than method 1, for larger and more complex tiling
each polyomino. problems. When the scale of the problem (i.e., the area of
It should be noted in Fig. 6 that the polyominoes start
the checkerboard and the number of polyominoes) is in-
to be settled from the frame, or the polyomino that is almost
creased, a larger number of neurons is required. In such a
to settle is suppressed by the competition with other
polyominoes. This is considered as an effect of combining case, it may happen that the procedure falls in a local
the analog neural network and the fitting function. By solution and the optimal solution is not obtained, even if the
introducing the fitting function, the polyominoes that fit proposed procedure is applied. It seems still necessary to
well to the frame and can contact easier with the frame, such consider the energy function and the setting of the parame-
as the shapes of a bar, a bent bar, or a bar with two bent ter for larger-scale problems.

Table 4. Effect of parameters B and C

8
Fig. 6. Transient dynamic movement of polyominoes and convergence for example 1.

5. Conclusions 2. Golomb SW. Tiling with sets of polyominoes. J Com-


binat Theory 1970;9:60–71.
This article has discussed a solution method for the 3. Klmkin MS, Liu A. Polyominoes on the infinite
tiling problem using a neural network. A solution method checkerboard. J Combinat Theory 1980;A28:7–16.
with better performance than the conventional method is 4. Golomb SW. Polyominoes which tile rectangles. J
obtained by defining a new energy function including the Combinat Theory 1989;A51:117–124.
fitting function and is applied using an analog neural net- 5. Akiyama Y, Yamashita A, Kajiura M, Aiso H. Com-
work. Through several examples, the convergence rate of binatorial optimization with Gaussian machines.
the proposed method is examined by simulation. It is shown Proc Int Joint Conf Neural Networks, 1989.
that the proposed method is also effective for relatively 6. Takefuji Y, Lee KC. A parallel algorithm for
large-scale and complex tiling problems, to which the con- tiling problems. IEEE Trans Neural Networks
ventional method has not been applied. 1990;1:143–145.
The following problems are left for further study. The 7. Takefuji Y. Neural network parallel computing. Klu-
difficulty of the tiling problem in terms of the shape and wer Academic Publishers; 1992.
placement of the polyominoes should be investigated from 8. Nakayama T, Ninomiya H, Asai H. Neuro-based
the viewpoint of the role of the proposed method. For the optimization for tiling problem. Proc ICONIP’94,
case where the size of the problem is enlarged, including Vol. 2, p 787–792.
the case where rotation and inversion of the polyominoes 9. Hopfield JJ, Tank DW. Neural computation of deci-
are considered, the energy function and the setting of the
sions in optimization problems. Biol Cybern
parameters should be investigated. The effect of Z on the
1985;52:141–152.
network dynamics is to be examined in detail.
10. Lee BW, Shue BJ. Hardware annealing in analog
VLSI neurocomputing. Kluwer Academic Publish-
REFERENCES ers; 1991.
11. Ninomiya H, Asai H. Design and simulation of neural
1. Klarner DA. Packing a rectangle with congruent N- network digital sequential circuits. IEICE Trans Fun-
ominoes. J Combinat Theory 1969;7:107–115. dam 1994;E77-A:968–976.

9
12. Kamio T, Ninomiya H, Asai H. A neural net approach 17. Nakano K, Iinuma K. Neural Network Group, Kiri-
to discrete Walsh transform. IEICE Trans Fundam tani S. Neurocomputer—Introduction and exercise.
1994;E77-A:1882–1886. Gijutsu Hyoronsha; 1989.
13. Joppe A, Cardon HRA, Bioch JC. A neural network 18. Nakayama T, Ninomiya H, Asai H. Tiling algorithm
for solving the traveling salesman problem on the using fitting function by analog neural network. Tech
basis of city adjacency in the tour. Int Neural Network Rep IEICE 1995;NL95-76.
Conf Paris, 1989. 19. Nakayama T, Ninomiya H, Asai H. Neuro-based
14. Murashima S, Manzen Y. Embedding of traveling- tiling algorithm using fitting violation function of
salesman problem in neural net based on city adja- polyominoes. Proc IEEE/ISCAS’96, Vol. 4.
cency on route. Trans IEICE 1991;J74-D-II: 20. Asai H, Nakayama T, Ninomiya H. Tiling algorithm
1080–1089. with fitting violation function for analog neural array.
15. Ninomiya H, Sato K, Nakayama T, Asai H. Neural Proc IEEE/ICNN’96, Vol. 1, p 565–570.
network approach to traveling salesman problem 21. Nakayama T, Ninomiya H, Asai H. A study of tiling
based on hierarchical city adjacency. Proc algorithm using fitting function by analog neural
IEEE/ICNN’95, p 2626–2631. network. Tech Rep IEICE 1996;NL95-86.
16. Takefuji Y, Lee KC. Artificial neural networks for
four-coloring map problems and K-colorability prob-
lems. IEEE Trans Circuits Syst 1991;38:326–333.

AUTHORS (from left to right)

Hiroshi Ninomiya (student member) graduated from Shizuoka University in 1993 and completed the master’s program
in 1995. He is presently a doctoral student there. Since 1995, he has been a special researcher at JSPS. He has been engaged in
research on neural networks.

Takeshi Nakayama graduated from Shizuoka University in 1994 and completed the master’s program in 1996. He then
joined Matsushita Electric Corporation. His graduate school research concerned neural networks.

Hideki Asai (member) graduated from Keio University in 1980 and completed the doctoral program in 1985. He is
presently a professor in the Department of Systems Engineering at Shizuoka University. His research largely concerns LSI-CAE
and parallel computation systems. He holds a D.Eng. degree. He received a 1988 Takayanagi Encouragement Award, a 1989
50-Year Memorial Award from Tokai Chapter of IEICE, and a 1993 Chio-Saito Encouragement Award. He was secretary of the
IEEE CAS Society Tokyo Chapter in 1994 and 1995. He is presently secretary, Study Group Nonlinear Problems and Study
Group Parthenon, IEICE.

10

You might also like