ISSN 1749-3889 (print), 1749-3897 (online) International Journal of Nonlinear Science Vol.4(2007) No.3,pp.208-212 Estimation of Hausdorff Measure of Fractals Based on Genetic Algorithm Li-Feng Xi 1, Qi-Li Xiao 2 1 Institute of Mathematics, Zhejiang Wanli University, Ningbo, 315100, P. R. China 2 College of Information Technology, Zhejiang Wanli University, Ningbo, 315100, P. R. China (Received 27 March 2007, accepted 26 September 2007) Abstract. In this paper, the upper bounds of the Hausdorff measure of the generalized Sierpinski gasket is estimated by using genetic algorithm, which is inspired by evolution. Keywords: genetic algorithm; Hausdorff measure; Sierpinski carpet; Sierpinski gasket. It is a basic question in fractal geometry to estimate the Hausdorff measure of fractals. However, this is very difficult even for the classical fractals, for example the Koch curve, the Sierpinski carpet and the Sierpinski gasket [5,6]. The genetic algorithm is a self adaptive and global optimizing probability search algorithm, which is inspired by evolution. The algorithm encode a potential solution to a specific problem on a simple chromosome-like data structure and apply recombination operators to these structure so as to preserve critical information. In this paper, the upper bounds of the Hausdorff measures of some classical fractals are obtained by using the genetic algorithm. 1 Foundation of Computation Recall the following basic definitions of fractals (also see [1-6]): Suppose the self-similar set E = n i=1 S i(e) ( R m ) is generated by similitudes {S i } 1 i n satisfying the open set condition. Let ρ i denote the contracting ratio of S i for each i, then the Hausdorff dimension s of E is obtained by: We equip with a mass distribution µ on E such that ρ s 1 + ρ s 2 + + ρ s n = 1. µ[s i1 S i2 S im (E)] = (ρ i1 ρ i2...ρ im ) s. Then self-similar measure µ is also considered as a Borel measure on R m. Given any set A R m, let A be the diameter of A. Then by [5], we have H s (E) = inf U is open U s µ(u), where the set U is taken over all the open sets of R m. Let Σ t n denote the collection the all word i 1 i t of length t, where every letter i j is taken from {1,, n}. The Sierpinski carpet F is generated by four similitudes: S 1 (x) = x/3, S 2 (x) = x/3 + (2/3, 0), S 3 (x) = x/3 + (2/3, 2/3) and S 4 (x) = x/3 + (0, 2/3). + Corresponding author. Tel. : +86-574-8822 2249; Fax: +86-574-8822 2249. E-mail address: xilf@zwu.edu.cn. Copyright c World Academic Press, World Academic Union IJNS.2007.12.15/113
L. Xi, Q. Xiao: Estimation of Hausdorff Measure of Fractals Based on Genetic Algorithm 209 These similitudes map the unit square [0, 1] 2 into four small squares with side 1/3 in four corners of the unit square. Let F 0 denote the unit square [0, 1] 2, and write F i1 i 2...i m = S i1 S i2... S im (F 0 ) and F t = {V : V = i1 i t ΞF i1 i 2...i t : Ξ Σ t 4 }. It is easy to check the following result: Conclusion 1 For the Sierpinski carpet F with dimension s = log 3 4 with the corresponding self-similar measure µ, the Hausdorff measure H s V s (F ) = lim inf t V F t µ(v ). The classical Sierpinski gasket, denoted by K 1/2, is generated by three similitudes: T 1 (x) = x/2, T 2 (x) = x/2 + (1/2, 0), T 3 (x) = x/2 + (1/4, 3/4). These similitudes map the unit equilateral triangle into three small equilateral triangles with side 1/2 in three angles of the unit equilateral triangle. The generalized Sierpinski gasket, denoted by K r, is generated by three similitudes: T 1,r (x) = rx, T 2,r (x) = rx + (1 r, 0), T 3,r (x) = rx + ((1 r)/2, (1 r) 3/2)). Fix r (0, 1/2). Let G 0 denote the unit equilateral triangle, and write G i1 i 2...i m T im,r(g 0 ) and G t = {V : V = i1 i t ΞG i1 i 2...i t : Ξ Σ t 3 }. It is easy to check that = T i1,r T i2,r... Conclusion 2 Fix r (0, 1/2). For the generalized Sierpinski gasket K r with Hausdorff dimension s = log r 3, suppose ν is the corresponding self-similar measure, then the Hausdorff measure H s (K r ) = lim inf t V G t V s υ(v ). Remark 3 The above results can be generalized to the self-similar sets under some suitable assumptions. We will use the above conclusions according to the Sierpinski carpet and generalized Sierpinski gasket to estimate corresponding Hausdorff measures. 2 Genetic Algorithm Designed for Self-similar Sets With the Sierpinski carpet as the example, we will interpret the genetic algorithm for computation of the Hausdorff measures of self-similar sets satisfying the open set condition. The process of encoding, decoding and fitness calculation is stated as follows: 2.1 Encoding During the process of calculating the Hausdorff measure, the method of binary code with fixed length is used. Fix an integer t 1. We arrange words of Σ t 4 in the lexicographic order, then every word i 1 i t Σ t 4 gets a position in [1, 4t ] N. For example, when t = 2, in the lexicographic order, we have 11, 12, 13, 14, 21, 22, 23, 24, 31, 32, 33, 34, 41, 42, 43, 44, here the word 11 gets the first position, 44 gets the last position, and 23 gets the seventh position. Given V F t, the encoding method for the set V is stated as follows: if F i1 i 2...i t is contained in V, then the binary digit of code in the position with respect to i 1 i 2...i t is 1, otherwise the binary digit is 0. In this way, a code of length 4 t can show whether each one of the 4 t squares of side 3 t in the t-th structure is chosen or not. Now let s state the detail encoding method in the second structure with t = 2. In the second structure, there are 4 2 = 16 small squares of side 1/9 altogether. If we regard the origin as the starting point and encode every small square anticlockwise, the marks of the 16 small squares are as shown in Figure 1. We choose every one of the 16 small squares one by one according to their marks from small to large. If a small square is chosen, we use 1 to represent on the corresponding position of the individual code, otherwise use 0. For example, 0001 0010 1000 0100 represents the union of four squares with their marks 4, 7, 9 and 14 respectively (see Figure 1). IJNS homepage:http://www.nonlinearscience.org.uk/
210 International Journal of Nonlinear Science,Vol.4(2007),No.3,pp. 208-212 16 15 12 11 13 14 9 10 4 3 8 7 1 2 5 6 Figure 1: 16 basic squares of side 1/9 2.2 Decoding During the calculation of the Hausdorff measure, an individual code of length 4 t represents a choice V F t. Then it is the decoding method that any binary digit 1 in some position represents the corresponding squares of side 3 t is chosen. The detail of decoding can be stated as follows: (1) Firstly, from left to right, we divide the whole code B of length 4 t, which represents some set V F t, into four subcodes of equal length 4 t 1, denoted by B 1, B 2, B 3, B 4. Then the four subcodes {B i } 4 i=1 represent {V S i(f 0 )} 4 i=1, where V S i(f 0 ) = S i (Si 1 V F 0 ) with S 1 i V F 0 F t 1. It is noted that V S i (F 0 ) if and only if there exists digit 1 in the subcode B i. We remain the set 1 = {B i : there exists digit 1 in B i }. (2) Secondly, for each subcode B i 1 with respect to Si 1 V F 0 ( F t 1 ),, from left to right we divide into four subcodes of length 4 t 2, denoted by B i1, B i2, B i3, B i4. These subcodes represent {V S i S j (F 0 )} 4 j=1, where V S is j (F 0 ) = (S i S j )[(S i S j ) 1 V F 0 ] with (S i S j V ) F 0 F t 2. It is noted that V S i S j (F 0 ) if and only if there is a digit 1 in the subcode B ij. We remain the set 2 = {B ij : B i 1 and there exists digit 1 in B ij }. (3) By induction, we get k and divide every subcode of k into four subcodes of equal length 4 t k 1. We remain the set k+1 = {B i1 i k i k+1 : B i1 i k k and there exists digit 1 in B i1 i k i k+1 }. We continue this process until k = t. 2.3 Computation of Fitness Suppose t is fixed. The fitness function is defined by Then we have f(v ) = µ(v ) V s for V F t. µ(v ) min V F t V s = 1 max V Ft f(v ). That means we shall find the maximum max V Ft f(v ) with #F t = 2 4t, where µ(v ) = (number of digit 1 s in the individual code w.r.t V )/4 t. In order to calculate the diameter of the set V F t with respect to the individual code B, we firstly decode B to find the squares of sides 3 t including in V, and then determined the coordinates of all vertexes IJNS email for contribution: editor@nonlinearscience.org.uk
L. Xi, Q. Xiao: Estimation of Hausdorff Measure of Fractals Based on Genetic Algorithm 211 of these squares. Therefore the time used in calculating individual fitness increases rapidly. However, the following method is very effective, and the time of calculating individual fitness would be decreased greatly. Step 1: Calculate the coordinates of all vertexes of all small squares. The detail calculation is stated as follows: Find out the all small squares of side 1/3 t in V as introduced above. Calculate the coordinates of the left bottom vertex of all small squares as follows: Suppose A, B, C and D are four small squares in the k-th structure, and they lie in the square G of side l = 3 (k 1) which is a basic square in the (k 1)-th structure (see Figure 2). If the coordinates of the bottom left vertex of the square G is (x 0, y 0 ), the coordinates of the bottom left vertex of small square A, B, C and D are listed as follows: (x A, y A ) = (x 0, y 0 ), (x B, y B ) = (x 0, y 0 ) + (2/3 l, 0), (x C, y C ) = (x 0, y 0 ) + (2/3 l, 2/3 l), (x D, y D ) = (x 0, y 0 ) + (0, 2/3 l). D C G A B ( x 0,y0) Figure 2: square G and four smaller squares of the next structure Calculate the coordinates of the other vertexes of all small squares as follows: If a basic square of side 3 k in the k-th structure with its bottom left vertex (x, y), then the other coordinates of other vertexes are (x, y) + (1/3 k, 0), (x, y) + (1/3 k, 1/3 k ), (x, y) + (0, 1/3 k ) in anticlockwise direction. Remark 4 All coordinates of all vertexes of all small squares of 3 t are saved in a global variable named location in turn in order to decrease the time of calculating individual fitness. Step 2: Calculate the individual fitness. Find the coordinates of the small squares chosen in the individual according to the result of Step 1. Calculate the diameter V, and obtain the number of 1 s in the individual code to obtain µ(v ). Calculate the corresponding fitness. 2.4 Genetic Operators In genetic algorithm, we need random initialization, fitness function, random selection, crossover operator and mutation operator. The genetic algorithm will keep better individuals according to the fitness to compute the approximate maximum of f(v ) in the space F t. During the calculation of the Hausdorff measure, the crossover method is selected to be the simple crossover, and the mutation method is the binary mutation. IJNS homepage:http://www.nonlinearscience.org.uk/
212 International Journal of Nonlinear Science,Vol.4(2007),No.3,pp. 208-212 2.5 Experimental Result and Analysis According to the ideas mentioned above, we have programmed aiming at the generalized Sierpinski gasket K 2/5 with r = 2/5, and have tested the program on the computer. The experimental result is stated as follows: When m = 3, the test value is 0.996780 ; When m = 4, 5, 6, the test value is 0.990835 ; When m = 7, the test value is 0.990621 ; When m = 8, the test value is 0.990561. Therefore, the conclusion can be obtained that the Hausdorff measure of the generalized Sierpinski gasket K 2/5, we have H s (K 2/5 ) 0.990561 where s = log 3/ log(5/2). 3 Conclusions It is noticed that the search space expands rapidly with the increase of times of recursions due to the structure of fractals. So far it is hard to calculate the exact value of Hausdorff measure by computer. Therefore, it seems necessary to find an effective algorithm to calculate or estimate the Hausdorff measure. In fact, the above experiment has proved that genetic algorithm is a kind of effective method to calculate or estimate the Hausdorff measures at present. References [1] Meifeng Dai, Xi Liu: Lipschitz equivalence between two Sierpinski gasketse. International Journal of Nonlinear Science. 2(2),77-82 (2006) [2] Qiuli Guo: Hausdorff dimension of level set related to symbolic system. International Journal of Nonlinear Science. 3(1),63-67 (2007) [3] Guoxing Dai, Yan Liu, Zhigang Feng: On box dimensions of profile curves of SPS. International Journal of Nonlinear Science. 2(3),188-192 (2006) [4] Qiuli Guo, Haiyi Jiang, Lifeng Xi: Hausdorff Dimension of Generalized Sierpinski Carpet. International Journal of Nonlinear Science. 2(3),153-158 (2006) [5] Zuoling Zhou: Hausdorff measure of self-similar set: Koch curve. Science in China(A). 28(2):103-107 (1998) [6] Zuoling Zhou, Min Wu: The Hausdorff measure of a Sierpinski carpet. Science in China(A). 29(2),138-144 (1999) [7] Guoliang Chen, Xufa Wang: Genetic algorithm and its application. People Post Publishing Company(2001) [8] Xiaoping Wang, Liming Cao: Theory, application and software realization of Genetic algorithm. Publishing Company of Xi an Jiaotong University (2002) IJNS email for contribution: editor@nonlinearscience.org.uk