A Modfed Genec Algorh Coparable o Quanu GA Tahereh Kahookar Toos Ferdows Unversy of Mashhad _k_oos@wal.u.ac.r Habb Rajab Mashhad Ferdows Unversy of Mashhad h_rajab@ferdows.u.ac.r Absrac: Recenly, researchers proposed an evoluonary algorh, QGA based on quanu conceps.i have shown ha QGA's convergence and global search ably are superor o convenonal GA's. Ths paper proposed a odfed genec algorh ha uses genec operaors effecvely o have ore advanages han QGA whou eployng any quanu feaure. Keywords: Quanu Genec Algorh, A Hybrd GA, Knapsack Proble Inroducon Recenly, researchers have appled genec algorhs (GAs) o address soe probles n quanu copuaon. Also, here has been soe works n he desgnng of genec algorhs based on quanu heorecal conceps and echnques. The so-called Quanu Evoluonary Prograng has wo ajor sub-areas: Quanu Inspred Genec Algorhs (QIGAs) and Quanu Genec Algorhs (QGAs). The forer adops qub chroosoes as represenaons and eploys quanu gaes for he search of he bes soluon. The laer res o solve a key queson n hs feld: wha GAs wll look lke as an pleenaon on quanu hardware? There s no a coplee answer for hs queson. An poran pon for QGAs s o buld a quanu algorh ha akes advanage of boh he GA and quanu copung parallels as well as rue randoness provded by quanu copuers. There are wo sgnfcan dfferences beween a classcal copuer and a quanu copuer. The frs s n sorng nforaon, classcal bs versus quanu bs. The second s he quanu echancal feaure known as enangleen, whch allows a easureen on soe quanu bs o affec he values of oher quanu bs. The presen QGAs use only he frs feaure. In fac, hey are GAs ha s usng soe quanu conceps. So, an proved GA (or a knd of hybrd GA) can be nroduced whch works ore effcenly whle doesn' use any quanu conceps. Ths paper s organzed as follows. Secon descrbes he QGA and s srucural analyss. Secon 3 nroduces he HGA and s srucure. Secon 4 conans a descrpon of he experen wh convenonal GA, QGA, and HGA and he experenal resuls. Concludng rearks follow n Secon 5. Quanu Genec Algorh QGA s based on he conceps of qubs and superposon of saes of quanu echancs.. Qub The salles un of nforaon sored n a quanu copuer s called a quanu b or qub [5].A qub ay be n he '' sae, n he '0' sae or n any superposon of he wo. The sae of a qub can be represened as Ψ = α 0 + β () α gves he probably ha he qub wll found n '0' sae and β gves he probably ha he qub wll found n he '' sae. If here s a syse of -qubs (quanu regser) he syse can represen saes a he sae e. α α... α, () β β... β 3h ICEE005, Vol. Zanjan, Iran, May 0-, 005.
s a -qub qregser. When he qregser s observed (.e. easured) only one sae can be seen. Ths s he "collapse" of he superposon [] []. QGA uses he qegsers as chroosoes. Ths enables he chroosoe o sore exponenally ore daa han a classcal chroosoe of he sae sze.. Analyss of he QGA The ajor advanage for a QGA s he ncreased dversy of a quanu populaon. A quanu populaon can be exponenally larger han a classcal populaon of he sae sze because each quanu ndvdual s a superposon of ulple classcal ndvduals. Convergence can be obaned wh he quanu represenaon. As α or β approaches o or 0,he quanu chroosoe converges o a sngle sae and he propery of dversy dsappears gradually. Tha s, he quanu represenaon s able o possess he wo characerscs of exploraon and exploaon, sulaneously. As QGA has dversy caused by he quanu represenaon, here s no need o use he genec operaors. However, soe genec operaors can be appled, such as uaon ha creaes new ndvduals by a sall change n a sngle ndvdual, and crossover ha creaes new ndvduals by cobnng pars fro ow or ore ndvduals. Muaon and crossover can ake he probably of lnear superposon of saes change. Thus, f he probables of uaon and crossover are hgh, he perforance of QGA can be decreased noably..3 The Srucure of QGA Procedure QGA 0 nalze Q() ake P() by observng Q() saes whle (no ernaon-condon) do + ake P() by observng Q(-) saes updae Q() usng quanu gaesu() QGA anans a populaon of qub chroosoes, Q() = {q, q,,q n. } a generaon, where n s he sze of populaon, and q s a qub chroosoe defned as α α... α, (3) β... β β where s he nuber of qubs,.e., he srng lengh of he qub chroosoe, and j=,,,n. In 'nalze Q ()' sep we nalze all probably apludes of all chroosoes wh / o have he lnear superposon of all possble saes wh he sae probably: ψ 0 = (4) q S k j k = where S k s he k-h sae represened by he bnary srng x=(x x ),where x,=,,,, s eher 0 or. In he sep of 'ake P()', a se of bnary soluons, P()= {x, x,,x n. }, s ade by observng Q (). saes. x j s a bnary soluon srng of lengh,and s fored by selecng each b usng he probably of qub, eher α or β of q j.then each soluon x j s evaluaed o gve soe easure of s fness. The nal bes soluon s hen seleced and sored aong he bnary soluons, P(). The sep of 'updae Q ()' s added n he whle loop o have fer saes of he qub chroosoe. In hs sep, a se of qub chroosoe Q() s updaed by applyng soe approprae quanu gae U(),whch s fored by usng he bnary soluons P() and he sored bes soluon. The approprae quanu gaes can be desgned n coplance wh praccal probles. Soe Q- gaes are NOT gae, conrolled NOT gae, or Hadaard gae and Roaon gae. NOT gae changes he probably of he (or0) sae o ha of he 0 (or) sae.i can be used o escape a local opu. In conrolled NOT gae, one of he wo bs should be a conrol b. If he conrol b s, he NOT operaon s appled o he oher b. I can be used for he probles ha have a large depency of wo bs. The Hadaard gae s suable for he algorhs whch use he phase nforaon of Q-b, as well as he aplude nforaon [4] []. The Roaon gae s used as a Q-gae n QGA such as cos( Δθ) sn( Δθ) U ( Δ θ ) = (5) sn( Δθ) cos( Δθ) 3h ICEE005, Vol. Zanjan, Iran, May 0-, 005.
where Δθ, =,,,, s a roaon angle of each Q-b oward eher 0 or sae depng on s sgn as shown n fgure. unfor crossover beween he seleced ndvdual (ch ) and he bes ndvdual of he prevous generaons uaon 4 Experen Fg..Polar plo of he roaon gae 3 Hybrd Genec Algorh The global search perfors well n QGA due o s probablsc characerscs. Also, hs algorh uses he roaon gae o updae he populaon n order o search soluons near he opu (local search). A knd of "Hybrd Genec Algorh" can be developed o have hese wo benefs whou usng quanu conceps. Insead of sochasc selecon, he fes ndvdual, he HGA, shares s genec nforaon wh all ohers usng sple GA operaors. For hs purpose, a crossover operaon beween he ndvduals of a generaon and he bes ndvduals of he prevous generaons s appled. So, he new ndvduals converge o fer ndvduals, jus lke he roaon gae operaon n updae procedure of he QGA. 3. The Srucure of HGA Procedure HGA 0 nalze P() whle (no ernaon-condon) do + selec an ndvdual randoly ch updae P() usng operaons where Procedure updae (P) 3h ICEE005, Vol. Zanjan, Iran, May 0-, 005. The knapsack proble s consdered o copare hree ypes of genec algorh descrbed above. I can be descrbed as selecng fro aong varous es hose es, whch are os profable, gven ha he knapsack has led capacy. The 0- knapsack proble s descrbed as: gven a se of es and a knapsack, selec a subse of he es so as o axze he prof f(x): f ( x) = p x, (6) subjec o = = w x C (7) where x=(x x ), x s 0 or,p s he prof of e,w s he wegh of e, and C s he capacy of he knapsack. 4. Convenonal GA for he knapsack proble Three ypes of convenonal algorhs (algorhs based on decoders, algorhs based on penaly funcons, and algorhs based on repar ehods) are descrbed and esed n [] [0]. The os successful ehod was a cobnaon of he algorh based on lnear penaly funcon wh he algorh based on rando repar ehod []. So, we use hs cobned algorh for he experen. 4. QGA for he knapsack proble The algorh of QGA for he knapsack proble s based on he srucure of QGA proposed n Sec.3 and conans a repar procedure ha perfors afer each ake procedure n he QGA procedure. The ake, repar, and updae procedures are as follows: Procedure ake (x ) 0 whle ( < ) do + f rando [0,] > α hen x else x 0
) The bnary srng x,j=,,,n,of P() represens a j-h soluon o he proble. For every b n he bnary srng, we generae a rando nuber r fro he rang [0, ]; f r > α, we se he b of he bnary srng. The -h e s seleced for he knapsack ff x =,where x s he -h b of x j (). Procedure repar (x) knapsack-overflled false f hen knapsack-overflled rue whle (knapsack-overflled) do selec an -h e fro he knapsack x 0 f hen knapsack-overflled false whle (no knapsack-overflled) do selec an j-h e fro he knapsack x j f hen knapsack-overflled rue x j 0 The repar procedure s perfored o assure ha he capacy consran s sasfed. Procedure updae (q) 0 whle (<) do + deerne θ wh he LUT oban (α', β' ) as: [α' β' ] T =U(θ )[ α β ] T q q' In hs procedure he -h qub value (α,β ) s updaed as α cos( Δθ) sn( Δθ) α (8) β = sn( θ) cos( θ) β Δ Δ In he knapsack proble θ s gven as sgn(α β )*Δθ.The paraeers used are shown n Table [] [4]. The agnude of Δθ has an effec 3h ICEE005, Vol. Zanjan, Iran, May 0-, 005. on he speed of convergence, bu f s oo bg he soluons ay dverge or converge preaurely o a local opu. Thus he lookup able can be used as a sraegy for convergence. The sgn of Δθ deernes he drecon of convergence. Table : Lookup able of θ, where s (α β ) s he sgn of θ and b and x are he -h bs of he bes soluon b and he bnary soluon x, respecvely. 4.3 HGA for he knapsack proble HGA for he knapsack proble can be oban wh he sall changes n convenonal GA for solvng he knapsack proble. Insead of applyng crossover beween he wo seleced ndvduals of a generaon, crossover s ade beween a seleced ndvdual of a generaon and he bes ndvdual of he prevous generaons (he bes ndvdual over prevous generaons s saved by els). Procedure HGA 0 nalze P() repar P() whle (no ernaon-condon) do + selec an ndvdual randoly ch updae P() usng operaons repar P() 4.4 Experenal Resuls As a perforance easure of he HGA, we used he proble specfcaons were used n prevous
researches and colleced he bes soluon found whn 500 generaons over 5 runs. The daa used n he experens were as follows: The weghs of es :w =unforly rando[,0) The profs of he es: p = w +5, The average knapsack capacy: C = w (9) = The populaon sze of CGA and HGA was equal o 00.Probables of crossover and uaon were 0.65 and 0.005 respecvely. The populaon sze of QGA was 0.We wroe he progra codes n Malab. Table shows he experenal resuls of he knapsack probles wh 00,50 and 500 es. In all cases HGA yelded superor resuls as copared o all he oher algorhs. #of es 00 50 500 CGA bes ean wors 574.0 549.49 530.9 34.7 30.4 97.8 QGA bes ean wors HGA bes ean wors 567.93 538.89 55.36 608.7 594.7 580.90 39.7 35.5 30. 465. 445. 44.3 683.0 644.3 598.4 698.0 650.5 600. 948.0 930.3 88. proble, nproc.000congressonevoluonary Copuaon.Pscaaway, NJ: IEEEPress, July000, vol., pp.354 360. [3] A.Narayanan and M.Moore, Quanunspred genec algorhs, nproc.996 IEEE In. Conf. Evoluonary Copuaon. Pscaaway, NJ: IEEE Press, May996, pp.6 66. [4] K. -H. Han and J. -H. K, Quanu-nspred Evoluonary Algorh for a Class of Cobnaoral Opzaon, IEEE Transacons on Evoluonary Copuaon, Pscaaway, NJ: IEEE Press, vol.6, no.6, pp.580-593, Dec. 00. [5] K. -H. Han and J. -H. K, Quanu-Inspred Evoluonary Algorhs wh a New Ternaon Creron, H_ Gae, and Two- Phase Schee, IEEE Transacons on Evoluonary Copuaons, vol. 8, no., Aprl 004 5 Conclusons Ths paper presened a hybrd genec algorh, HGA ha uses genec operaons effecvely, whou usng quanu feaures o solve cobnaoral opzaon probles. HGA eploys crossover o sulae he updae procedure n QGA. The knapsack proble, a knd of cobnaoral opzaon probles, s used o dscuss he perforance of HGA, copare o CGA and QGA. I was shown ha HGA reaches hgher aoun of prof han he wo oher algorhs a he sae generaon. References [] J.Foser, B.Rylander e al., Quanu Evoluonary Prograng [] K.H.Han and J.H.K, Genec quanu algorh and s applcaon o cobnaoral opzaon 3h ICEE005, Vol. Zanjan, Iran, May 0-, 005.