2004 6 6 : 100026788 (2004) 0620061206 1, 2, 1 2, (1., 230027; 2., 230039) : PGA, : ; ; : T P301. 6 : A D esign and Imp lem en tation of Parallel Genetic A lgo rithm fo r F inding Roo ts Comp lex Functional Equation L IU Feng 1, 2, CH EN Guo2liang 1, W U H ao 2 ( 1. D epartm ent of Computer Science and Engineering, U niversity of Science and T echno logy of Ch ina, H efei 230027, Ch ina; 2. D epartm ent of Computer Science and Engineering, U niversity of A nh iu, H efei 230039, Ch ina) Abstract: A parallel genetic algo rithm fo r finding all roo ts of comp lex functional equation is p resent, research are m ade in som e technical p roblem s fo r realizing. W e describe the design and imp lem ent of genetic algo rithm fo r finding roo ts com p lex functional equation. Key words: parallel genetic algo rithm; roo t; comp lex functional equation 1,, :, ; ;, ;,,,, [ 1, 2 ],,,, (PGA ), [ 3 Grefen stette GA ], PGA ;M uh lenbei PGA 64 [ 4 400 R astrigin ] [ 5 ; Sp iessen s GA ] ; Po th s GA [ 6 ], PGA : 2003207221 : 973 (G1998030403) : (1962- ),,,, Em ail: fengliu@m ail. ustc. edu. cn; (1938- ),,,, ; (1973- ),,
62 2004 6, PGA, ;,, 2 PGA PGA,,,, PGA, [ 8, 9 PGA : ],, PGA PGA, PGA,,, COW,,, COW, LAN, E thernet, Token- R ing COW, COW : 1) M PP, COW 2),, C, C + + 3), COW, COW 4), COW 5) COW,,,,, COW PGA PGA PGA PGA,,, GA PGA : 1),, 2) GA,, 3 1), Ζ f (z ) = 0, : m ingf (z ) gζ 2) [ 9 ] f (z ) = u + iv C C, C, f (z ) C 1g(2Π) z C f (z ) Ζ f (z ) = u+ iv C C, C,, z 0= x 0+ iy 0 C, (u, v) N p, N n, C f (z ) = 0 N = N p - N nζ C (Z 1, Z 2,, Z n), Z u (x, y ), v (x, y ), Z, 2, 2, 3, 3, 3, 4, 4, 4, 4, 1, 1, 2, 2, Ζ (2, 3, 4, 1, 2, ) Ζ 3, 4, 4,
6 63 1, 2, 2, 3, 3, 4, 4, 1, 1, 2, 2, 3, 3, (3, 4, 1, 2, 3, 4, 1, 2, 3) Ζ N p = 2 ( (1, 2, 3, 4) 2 ), N n= 0 ( (4, 3, 2, 1) 0 ) Ζ N = N p - N n= 2Ζ 4 4. 1 1), : in t selection (Cumm u lative fitnesses) { in t i = 0; doub le selection= RAND _ NUM (0. 0, fitnesses[po PULA T ION _ S IZE- 1 ]) ; w h ile (fitnesses[ i ] < i + + ; selection) retu rn i ; gg } fitnesses, A [a0, a1,, a i,, an ], a0 1, a1 3, a2 4, fitnesses[0 ]= 1, fitnesses[1 ]= 1+ 3= 4, fitnesses[2 ]= 1+ 3+ 4= 8 2),, : alpha= RANDOM ; ch ild1- > arg= alpha3 father- > arg+ (1- alpha) 3 m o ther- > arg; ch ild2- > arg= (1- alpha) 3 father- > arg+ alpha3 m o ther- > arg; 3), : individual- > arg= RAND _ NUM (from arg, endarg) ; 4) GA GA,,, GA,, f (z ) = 0, x y,, (x, y ) gf (x, y ) g, p ( ) gf (p ) g GA 4. 2 PGA 1) GA : P c P m, m ax g enζ P c 0. 90-0. 96 ; P m 0. 01-0. 2 ; m ax g en GA, 100-300 e1, e2 (e1, e2 ) ; SR, SX, SY (SR, SX, SY ) ; T 0 d L (T 0, d, L M arkov ) 2) ( ) : typedef struct { doub le fitness; gg doub le values; gg
64 2004 6 doub le arg; gg, } Geno type; 3) typedef Geno type Genes[PO PULA T ION _ S IZE+ 1 ]; typedef struct { in t cu rren t; gg genes[ ] Genes genes[2 ]; gg } Pheno type; Pheno type ( ), ( ) Pheno type cu rren t genes, cu rren t= 0, genes[0 ] GA + 1. 0) ) 4) # define RANDOM - M A SK 32767 # define RANDOM ISE (srand (tim e (NULL ) ) ) # define RAND (rand () & RANDOM - M A SK) # define RANDOM ( ( (doub le) (rand () & RANDOM - M A SK) ) g( ( (doub le) RANDOM - M A SK) # define RAND - NUM (M,N ) ( (RANDOM 3 (N - M ) ) + M ) doub le arg; arg= RAND - NUM (from arg, endarg) ; individual- > arg= arg;, RAND - NUM (M, N ) RANDOM, RAND - NUM (M, N ) [ M, N ], RANDOM [0, 1 ] 5),,,, so rt- pheno type (individuals) ; gg individuals fo r ( i = 0; i < PO PULA T ION - S IZE; i+ + ) individuals- > genes[ individuals- > cu rren t ][ i]. fitness= 23 ( i + 1) ; gg, + 1 2. 6), PGA, GA : ( N ) C ( p m, p c, T 0, d ), L ; : M etropo lis [4 ] ; N 3 (L + 1), N T 0 d M arkov L 7) PGA PGA (SPM D ), PGA (, GA, ) ;
6 65 3 ( GA ) ; ( ) GA, (ge) ( ge 5 ), ; (m o list), ; m o list ; ge= gm ax (gm ax ), (7), (3) ; 5 4 P III 450, L inux PVM, M = 4, N = 50, G = 100, p c = 0. 92, p m = 0. 02, T 0 = 0. 9; d = 0. 5,M arkov L = 10 1 f (z ) = co sz - sinz = 0 z = Θ(co sη+ isinη), Θ [0, 20 ], Η [0, 2Π) : e1 = 0. 00001, e2 = 0. 00001 = g - g 1 1 0. 785398 0. 785399+ 0. 000000i 0. 000001-2. 356195-2. 356194+ 0. 000000i 0. 000001 3. 926991 3. 926991+ 0. 000001i 0. 000001-5. 497787-5. 497787+ 0. 000000i 0. 000000 7. 068583 7. 068581+ 0. 000002i 0. 000003-8. 639380-8. 639382-0. 000001i 0. 000002 10. 210176 10. 210175+ 0. 000002i 0. 000002-11. 780972-11. 780970+ 0. 000000i 0. 000002 13. 351769 13. 351772-0. 000001i 0. 000003-14. 922565-14. 922566+ 0. 000000i 0. 000001 16. 493361 16. 493361+ 0. 000000i 0. 000000-18. 064158-18. 064156+ 0. 000001i 0. 000002 19. 634954 19. 634955+ 0. 000000i 0. 000001 gm ax= 200,,, 2 f (z ) = z 5 + (- 4 + 10i) z 4 + (7-40i) z 3 + (4 + 70i) z 2 + (- 8 + 40i) z - 80i z = Θ(co sη+ isinη), Θ [0, 20 ], Η [0, 2Π) : e1 = 0. 00001, e2 = 0. 00001 = g - g gm ax= 100,,,
66 2004 6 2 2 1. 000000 1. 000001+ 0. 000001i 0. 000001-1. 000000-0. 999999+ 0. 000000i 0. 000001 2. 000000+ 2. 000000i 2. 000001+ 1. 999999i 0. 000001 2. 000000-2. 000000i 1. 999999-1. 999998i 0. 000002-10. 000000i 0. 000001-9. 999997i 0. 000003 2, GA,, 10 GA PGA 3 23 7 23g7 3. 286, 4 PGA 3. 286 3 6 PGA,,,, 2 GA : [1 ]. [J ]., 2003, 26 (2): 312-317. [2 ],,. [J ]. ( ), 1998, 44 (5): 577-580. [3 ] Grefenstette J J. Parallel adap tive algo rithm s fo r function op tim ization [R ]. T echnical R epo rt NO cs - 81-19, N ashville: V anderbilt U niversity, Computer Science D epartm ent, 1981. [4 ] M uh lenbein H. Evo lution in tin and space: the parallel genetic algo rithm [A ]. R aw line G. Foundation of Genetic A lgo rithm s[c ]. San M ateo, CA :M o rgan Kanfm ann, 1991. [5 ] Sp iessens P,M andrake B. A m assively parallel genetic algo rithm: imp lem entation and first analysis[a ]. Belew R K, Booker L B. P roc of the Fourth Int Conf on Genetic A lgo rithm s[c ]. San M A T EO, CA :M o rgan Kanfm ann, 1991, 279-286. [6 ] Po th s J C, Giddens T D, Yadaw S B. T he developm ent and evalution of an imp roved genetic algo rithm based on m igration and artificial selection [J ]. IEEE T rans SM C, 1994, 24 (1): 73-8. [7 ] Ho lland J H. A dap tation in N atural and A rtificial System [M ]. T he U niversity of M ich igan P ress, 1975. [8 ],. [M ]. :, 1996. [9 ]. [M ]. :, 1995. [10 ] F. John, L ectures on A dvanced N um erical A nalysis[m ]. T hom as N elson and Sons, 1996. [11 ],. ( ) [M ]. :, 1994. [12 ]. [J ]., 2001, (1): 1-2. [13 ] M ichalew icz Z. Genetic A lgo rithm s+ D ata Structures= Evo lution P rogram s[m ]. Sp ringer2v erlag,berlin, 1992.