A New Exact Algorithm for Traveling Salesman Problem with Time Complexity Interval (O(n^4), O(n^3 2^n))

Size: px
Start display at page:

Download "A New Exact Algorithm for Traveling Salesman Problem with Time Complexity Interval (O(n^4), O(n^3 2^n))"

Transcription

1 A New Exact Algorthm for Travelng Salesman roblem wth Tme Complexty Interval (O(n^4), O(n^3 2^n)) 39 YUNENG LI, Southeast Unversty Travelng salesman problem s a N-hard problem. Untl now, researchers have not found a polynomal tme algorthm for travelng salesman problem. Among the exstng algorthms, dynamc programg algorthm can solve the problem n tme O(n 2 2 n ) where n s the number of nodes n the graph. The branch-and-cut algorthm has been appled to solve the problem wth a large number of nodes. However, branch-and-cut algorthm also has an exponental worst-case runnng tme. In ths paper, a new exact algorthm for travelng salesman problem s proposed. The algorthm can be used to solve an arbtrary nstance of travelng salesman problem n real lfe and the tme complexty nterval of the algorthm s (O(n 4 +k n 2 ), O(n 3 2 n + k n 2 n max )). The k s equal to 1 where max and are respectvely the maxmum and mum values of the shortest path dstances between two arbtrary nodes n the graph. It means that for some nstances, the algorthm can fnd the optmal soluton n polynomal tme although the algorthm also has an exponental worst-case runnng tme. In other words, the algorthm tells us that not all the nstances of travelng salesman problem need exponental tme to compute the optmal soluton. The algorthm of ths paper can not only assst us to solve travelng salesman problem better, but also can assst us to deepen the comprehenson of the relatonshp between N and. Therefore, t s consderable n the further research on travelng salesman problem and Nhard problem. Categores and Subect Descrptors: F.2.2 [Analyss of Algorthms and roblem Complexty]: Nonnumercal Algorthms and roblems; G.2.2 [Dscrete Mathematcs]: Graph Theory graph algorthms General Terms: Algorthms, Desgn, Theory, Verfcaton Addtonal Key Words and hrases: Travelng salesman problem, postvely weghted graph, tme complexty nterval 1. INTRODUCTION The travelng salesman problem s a classcal combnatoral optmzaton problem. The research on the exact algorthm for travelng salesman problem s sgnfcant not only because the research has suffcent practcal sgnfcance but also because the research results concern the reasonable cognton on the relatonshp between N and. Untl now, researchers have not found a polynomal tme algorthm for travelng salesman problem. Among the exstng algorthms, dynamc programg algorthm [Held and Karp 1962] can solve the problem n tme O(n 2 2 n ) where n s the number of nodes n the graph. The branch-and-cut algorthm has been appled to solve the problem wth a large number of nodes [adberg and Rnald 1987]. However, branch-and-cut algorthm also has an exponental worst-case runnng tme [Cook and Hartmann 1990]. It s stll dffcult to mprove the tme bound of exact algorthm for travelng salesman problem. And t has not been detered whether an exact algorthm for travelng salesman problem that runs n tme O( n ) exsts [Woegnger 2003]. In ths paper, a new exact algorthm for travelng salesman problem s proposed. The algorthm can be used to solve an arbtrary nstance of travelng salesman problem n real lfe, namely, the algorthm s a general exact algorthm for travelng salesman problem n real lfe. In the algorthm, ths paper adopts nformaton Ths work was supported by the Natonal Natural Scence Foundaton of Chna (No , and No ), the Funds for Dstngushed Young Scholars of Jangsu rovnce of Chna (No.BK ), and the rogram for Dstngushed Talents of Sx Domans n Jangsu rovnce of Chna (No.2011-DZ023). Author s addresses: Y.. L, School of Computer Scence and Engneerng, Southeast Unversty, e-mal: yunpengl.seu@gmal.com.

2 39:2 Y.. L. dffuson mode to search the optmal soluton of travelng salesman problem. Frstly, the algorthm chooses a node of the graph as the source node. Then the source transmts nformaton to every other node. In the algorthm, every pece of nformaton travels at the same speed vstep and along the shortest path between the nformaton transmsson node and the destnaton node. Meanwhle, each pece of nformaton records the number and traversal sequence of the nodes t has traveled n the process of nformaton transfer and computes the total travelng dstance n the travelng process. When a pece of nformaton arrves at the destnaton node, the nformaton wll be retransmtted to every node whch the nformaton has not traveled f the nformaton s the frst arrvng nformaton among the all the peces of nformaton whch have traveled the same node set. If a pece of nformaton has traveled all the nodes n the graph, t wll be retransmtted back to the source node and the frst returnng nformaton wll brng back the shortest crcle traversal sequence whch the algorthm nts to search f the graph s connected. Ths s because every pece of nformaton travels at the same speed. Therefore, when the algorthm fnds that a pece of nformaton returns to the start node or there s no more nformaton to transmt and receve n the node system of the graph G f graph G s dsconnected, the algorthm terates. Based on the theoretcal analyss, we fnd that the algorthm can obtan correct results only f vstep s equal to whch s respectvely the mum value of the shortest path dstances between two arbtrary nodes n the graph, namely, the weght value of the shortest edge n the graph. The concrete demonstraton process wll be expounded n the latter part of ths paper. It should be noted that the algorthm runs n the orgnal graph of the problem nstance, not n the transformed complete graph whch most of the exstng algorthms usually run n. Based on the theoretcal analyss, the tme complexty nterval of the algorthm s (O(n 4 +k n 2 ), O(n 3 2 n + k n 2 n max )). The k s equal to 1 where max and are respectvely the maxmum and mum values of the shortest path dstances between two arbtrary nodes n the graph. It means that for some nstances, the algorthm can fnd the optmal soluton n polynomal tme although the algorthm also has an exponental worst-case runnng tme. In other words, the algorthm tells us that not all the nstances of travelng salesman problem need exponental tme to compute the optmal soluton. The algorthm of ths paper can not only assst us to solve travelng salesman problem better, but also can assst us to deepen the comprehenson of the relatonshp between N and. Therefore, t s consderable n the further research on travelng salesman problem and N-hard problem. The remander of ths paper s organzed as follows: n Secton 2, we compare our work wth the related work on the subect; n Secton 3, we present the problem descrpton; n Secton 4, we present a smple algorthm consderng unform speed dffuson; n Secton 5, we ext the smple algorthm by usng Fbonacc heap; n Secton 6, we dscuss some remarks on travelng salesman problem and the algorthm of ths paper; fnally, we dscuss and conclude ths paper n Secton RELATED WORK The travelng salesman problem s a classcal problem n the research feld of graph algorthm. Rchard M. Karp [1972] has proven that the Hamltonan cycle problem was N-complete, whch mples the N-hardness of travelng salesman problem. Untl now, researchers have not found a polynomal tme algorthm for travelng salesman problem. It remans an open problem whether the travelng salesman problem can be solved n tme O(1.999n) [Woegnger 2003].

3 A New Exact Algorthm for Travelng Salesman roblem 39:3 In 1954, Dantzg, Fulkerson, and Johnson [1954] demonstrated that lager nstances of the travelng salesman problem could be solved by lnear program. In 1962, Held and Karp [1962] proposed a dynamc programg algorthm for travelng salesman problem, whch can solve the travelng salesman problem n O(n 2 2n ) tme. The tme complexty s stll the best one that s known today. For large-scale travelng salesman problem, the branch-and-cut algorthm s usually appled to compute the optmal soluton. However, t also has an exponental worstcase runnng tme. In ths paper, we propose a new exact algorthm for travelng salesman problem. The algorthm can be used to solve an arbtrary nstance of travelng salesman problem n real lfe. The tme complexty nterval of the algorthm s (O(n 4 +k n 2 ), O(n 3 2 n + k n 2 n max )). And the k s equal to 1where max and are respectvely the maxmum and mum values of the shortest path dstances between two arbtrary nodes n the graph. It means that for some nstances, the algorthm can fnd the optmal soluton n polynomal tme although the algorthm also has an exponental worst-case runnng tme. Based on the characterstc, the algorthm of ths paper can not only assst us to solve travelng salesman problem better, but also can assst us to deepen the comprehenson of the relatonshp between N and. Therefore, t s consderable n the further research on travelng salesman problem and N-hard problem. 3. ROBLEM DESCRITION The travelng salesman problem can be smply descrbed as follows: gven a fnte number of ctes along wth the cost of travel between each par of them, fnd the cheapest way of vstng all of the ctes and returnng to the startng pont. The travel costs are symmetrc n the sense that travelng from cty X to cty Y costs ust as much as travelng from Y to X [Applegate et al. 1998]. If we descrbe travelng salesman problem based on the concepts of graph theory, the problem can be stated as follows: for an undrected graph G=(V,E), where V s the set of nodes and E s the s W whch represents the length or set of edges. The weght of ts edge (, ) E cost of the edge (, ) E adacent ctes s postve, namely, W >0 ( (, ) E. In practcal problems, the travel cost of arbtrary two shortest traversal dstance between node v and v (, ).We use to represent the v v V ) and use to represent the mum n graph G. In realty, s equal to W whch represents the shortest edge weght n graph G. Defnton 1 (crcle traversal sequence). For an undrected graph G=(V,E) whose start node s v0, a crcle traversal sequence of V s a traversal sequence whch starts and s wth start node v0, and ncludes each node of V. Besdes, each node only has one sequence poston n a crcle traversal sequence except the start node. For the node set V (V={v0, v1,,vn-1} (n>2)), s s a crcle traversal sequence of V. If s=<v0, v1,,vn-1, v0>, the traversal dstance (traversal dstance can be also called traversal cost) of s n graph G can be expressed as follow: n 1 1, n 1,0 (1) 1 L() s Where Ls () represents the traversal dstance of s. Theorem 1. For graph G, Ls () s the shortest traversal dstance of crcle traversal sequence s.

4 39:4 Y.. L. roof n Ls (), the traversal dstance of arbtrary two neghbor nodes of s s the shortest traversal dstance, namely, the travelng salesman travels along the shortest path between the neghbor nodes of s and Ls () s equal to the summaton of all the traversal dstances of neghbor nodes of s. As a result, Ls () be the shortest traversal dstance of crcle traversal sequence s n graph G. The shortest traversal dstance of crcle traversal sequence of V n graph G can be defned as follow: L( s): ssacrcletravesal sequenceof V f there sacrcletraversal sequenceof V (2) L ( ) V otherwse The shortest crcle traversal sequence of V n graph G s defned as the crcle L V f there s a crcle traversal sequence whose traversal dstance s equal to ( ) traversal sequence of V. The travelng salesman problem s fndng the shortest crcle traversal sequence of V n graph G. For node set V, every node can be the start node of a shortest crcle traversal sequence and L ( ) V s ndepent of the selecton of start node. In practcal problems, the dstrbuton map of the ctes s not always a complete graph, namely, the graph G of travelng salesman problem s not always a complete graph. 4. A SIMLE ALGORITHM BASED CONSIDERING UNIFORM SEED DIFFUSION 4.1 Algorthm Descrpton Let us magne the scene as follows: each node n graph G has a node manager who decdes how to retransmt nformaton. The travelng salesman stands at a node (.e. start node v0) n graph G and acts as the node manager. Frstly, the travelng salesman transmts n-1 peces of nformaton to all the other nodes n graph G. Then, when a pece of nformaton reaches ts destnaton node, the node manager wll decde how to retransmt the nformaton. The node manager obeys two retransmsson prncples: (1) for a pece of selected nformaton, smultaneously retransmt the nformaton to all the nodes whch the nformaton has not traveled. If the nformaton has traveled all the nodes n graph G, t wll be retransmtted to the start node; (2) f the manager fnds that there s another pece of nformaton whch has traveled the same node set and has no longer traversal dstance, the ust arrvng nformaton wll not be retransmtted to any other node. If G s a connected graph, t can be proved that at least one shortest crcle traversal sequence wll be completely traveled n the process of nformaton transfer. The concrete udgng foundaton and proof procedure wll be explaned n the latter part of ths paper. In all the processes of nformaton transfer, every pece of nformaton travels at the same speed vstep and along the shortest path between the nformaton transmsson node and the destnaton node. Meanwhle, each pece of nformaton records the number and traversal sequence of the nodes t has traveled n the process of nformaton transfer and computes the total travelng dstance n the travelng process. Because at least one shortest crcle traversal sequence wll be completely traveled n the process of nformaton transfer f G s a connected graph and all the nformaton travels at the same speed, the nformaton whch travels along the shortest crcle traversal sequence must return to the start node frstly. Then, based on the returnng sequence, the travelng salesman can udge whch crcle traversal sequence s the shortest crcle traversal sequence. Based on the aforementoned thought, the algorthm of ths paper s desgned. The basc descrpton of the algorthm s as follows: at the begnnng, the travelng

5 A New Exact Algorthm for Travelng Salesman roblem 39:5 salesman transmts n-1 peces of nformaton at the start node to all the other nodes n graph G. The orgnal traversal dstance, ds, of each pece of nformaton s set as zero when t s transmtted at the start node. Every pece of nformaton travels at the same speed vstep and along the shortest path between the transmsson node and the destnaton node. Meanwhle, each pece of nformaton records the number, Tn and traversal sequence of the nodes t has traveled and computes the total travelng dstance n the travelng process. When a pece of nformaton reaches ts destnaton node, the nformaton manager of the destnaton node wll udge whether there s another pece of nformaton whch has traveled the same node set and has no longer traversal dstance. If there s such a pece of nformaton, the arrvng nformaton wll not be retransmtted. On the contrary, the nformaton wll be smultaneously retransmtted to all the nodes whch the nformaton has not traveled. If a pece of nformaton has traveled all the nodes n graph G, t wll be retransmtted to the start node. After that, the node manager wll record the traversal state of the arrvng nformaton whch ncludes the traversal sequence of the nodes t has traveled and the total travelng dstance n the travelng process. When the travelng salesman fnds that a pece of nformaton returns to the start node or there s no more nformaton to transmt and receve n the node system of the graph G, the algorthm terates. If G s a connected graph, the traversal sequence of the nodes whch the frstly returnng nformaton has recorded s the shortest crcle traversal sequence of V n graph G. In the concrete mplement of the algorthm, a global clock t s adopted to calculate the globally dentcal travellng dstance, dsu, of all the spreadng nformaton. The travellng dstance, dsu s equal to t*vstep. When a pece of nformaton s transmtted, t wll drectly confrm the traversal state whch t wll pass through f t arrves at the destnaton node. The traversal state ncludes the traversal sequence of the nodes, the number of traversal nodes, the traversal state d and the total path dstance, dst. If we use ds to represent the dstance whch the nformaton has pass through when the nformaton arrve at node v and the nformaton s retransmtted to node v, dst s equal to the sum of ds and whch s the shortest traversal dstance between node v and v ( v, v V ).In addton, every pece of nformaton wll record the traversal nodes n the shortest path between node v and v. If vk s a node n the shortest path whch the nformaton travels along and the nformaton has not travelled node vk, node vk wll be added to the of the traversal sequence the nformaton has recorded and the number of traversal nodes of the nformaton, Tn, ncreases by one, namely, Tn= Tn+1. Then Tn corresponds to the ordnal poston of vk n the traversal sequence of the nformaton. In contrast, f the nformaton has travelled node vk, node vk wll not be added to the traversal sequence. In other word, one node s added to the traversal sequence of a pece of nformaton only when the nformaton travels the node for the frst tme. After confrg the traversal state, the nformaton wll access the arrvng nformaton record of destnaton node to udge f there s a record whose traversal node set s the same. If there s not such a record, the nformaton wll make the manager of the destnaton node record ts arrvng traversal state. Conversely, f there s such a record, the nformaton wll compare dst wth the traversal dstance of the record. If dst s shorter, the nformaton wll reset the record and make the record keep an account of the arrvng traversal state of the nformaton. However, f dst s equal or longer, the nformaton does nothng. In each round, the node manager wll transmt nformaton for the nformaton record whose traversal dstance s no longer than dsu and s longer than

6 39:6 Y.. L. dsu-vstep. Namely, the node manager only transmts nformaton for the nformaton whch has ust arrved n each round. And the node manager only transmts nformaton to the nodes whch the traversal sequence of the record does not nclude. Based on the theoretcal analyss, we can udge that only f, the traversal v step dstance of the selected record s the shortest traversal dstances of all the possble traversal sequences whch start wth the start node, wth the nformaton transmsson node and has the same travelng node set when the dstance s no longer than dsu and s longer than dsu-vstep. We wll gve the rgorous demonstraton n the latter part of ths paper. The more detaled descrpton of the algorthm s gven as follows: For an undrected graph G=(V,E) ( V =N), we use Dkstra s algorthm to compute the shortest path between arbtrary two nodes and store the result n a three dmensonal array shortestpath[n][n][2]. For arbtrary two nodes and, shortestpath[][][0] stores the dstance of the shortest path from node to node, and shortestpath[][][1] stores the d of the frst node whch the nformaton wll travel f t spreads along the shortest path from node to node. shortestpath[n][n][2] s a necessary nput for the algorthm of ths paper. In the paper, we establsh an nformaton class to convenently mplement the algorthm. The basc descrpton of class nformaton s as follows: Class nformaton { nt traversal_sequence[n]; nt traversal_sze; nt traversal_state_d; double dstance; nt Node_d; publc: nformaton * s_ponter_re; nformaton * s_ponter_next; nformaton(double); vod settraversal_sequence(nt a,nt b){traversal_sequence[a]=b;} nt gettraversal_sequence(nt a){return traversal_sequence[a];} vod compute_traversal_state_d(); nt gettraversal_state_d(){return traversal_state_d;} vod settraversal_sze(nt sze){traversal_sze=sze;} nt gettraversal_sze(){return traversal_sze;} vod setnode_d(nt d){node_d=d;} nt getnode_d(){return Node_d;} vod setdstance(double d){dstance=d;} double getdstance(){return dstance;} vod addtraversal_sequence(nt); }; The functon nformanton(double) s the constructed functon: nformaton::nformaton (double d) { for =0 to N-1 do traversal_sequence[]=0; traversal_sze=0; traversal_state_d=-1; dstance=d;

7 A New Exact Algorthm for Travelng Salesman roblem 39:7 Node_d=-1; s_ponter_re=null; s_ponter_next=null; } The functon compute_traversal_state_d() s used to compute the traversal state of a pece of nformaton. In ths paper, we make each knd of traversal sequence correspond to a bnary number and transform the bnary number nto the correspondng decmal number as the traversal state d of the traversal sequence. vod nformaton:: compute_traversal_state_d() { traversal_state_d=0; for =0 to N-1 do f traversal_sequence[]>0 then value=1; else value=0; traversal_state_d+=value*pow(2,); } The functon addtraversal_sequence(nt) s used to add a new traversal node nto the traversal sequence of a pece of nformaton. It adusts the traversal_sze and records the traversal order of the new traversal node. In the paper, a pece of nformaton records the traversal order of a node only when the node s travelled for the frst tme. vod nformaton:: addtraversal_sequence(nt a) { f traversal_sequence[a]<=0 then traversal_sze++; traversal_sequence[a]=traversal_sze; } In ths paper, we establsh an ndex AVL tree [Adelson-Velsky and Lands 1962] for each node based on the traversal state d to mprove the searchng and comparng effcency of the nformaton. In the AVL tree, each AVL tree node has four attrbutes {state_data, nfo_ponter, left_node_ponter, rght_node_ponter}, where the state_data stores the traversal state d of the nformaton whch the node s nformaton ponter, nfo_ponter ponts to and the left_node_ponter and rght_node_ponter respectvely pont to left chld node and rght chld node. In the node ntalzaton, all the ponter attrbutes wll be set as NULL. In ths paper, we defne a nsert functon, InsertAVL_tree( AVL_tree T, nformaton I). In the mplement of the functon, frstly, t searches the AVL tree to udge whether there s a node whose state_data s equal to the traversal_state_d of I. If there s such a node, t returns a ponter of the node. If there s no such a node, t establshes an AVL tree node whose state_data s equal to the traversal_state_d of I, nserts the node nto AVL tree T and returns a ponter of the new establshng node. ALGORITHM 1. Travelng Salesman roblem Computaton Input: the three-dmensonal array shortestpath[n][n][2] of graph G, the source node d, S and the propagaton speed, Vstep.

8 39:8 Y.. L. Output: output the dstance and the traversal sequence of a shortest crcle traversal sequence of graph G. dstance_out=0; N= V ; dstance_lable= ; flag=true; Create Doublelnkedlst(s_lst); AVL_tree T[N]; /*Create a AVL tree array T[N]*/ nformaton Is(0); Is.settraversal_sequence(S,1); Is.settraversal_sze(1); Is.setNode_d(S); Is.compute_traversal_state_d(); AVL _node_ponter= InsertAVL_tree(T[S], Is); AVL _node_ponter-> nfo_ponter=& Is; Insert Doublylnkedlst(s_lst, Is); /*Insert the nformaton n the lst tal*/ Whle ((dstance_lable>dstance_out) and flag) do Current_ponter=head_ponter(s_lst); Lst_tal_ponter=tal_ponter(s_lst); Whle (Current_ponter!=0) do f (Current_ponter->dstance<=dstance_out) then /*The nformaton has travelled all the nodes*/ f (Current_ponter->gettraversal_sze()==N) then destnaton_d=s; s_d=current_ponter->getnode_d(); dstance_n=current_ponter->getdstance(); dstance_n +=shortestpath[s_d][destnaton_d][0]; f (dstance_n== ) then flag=false; break; nformaton I(dstance_n); /*Duplcate the traversal sequence*/ for 0 to N-1 do I.settraversal_sequence(,Current_ponter->gettraversal_sequence()); I.settraversal_sze(N); I.setNode_d(S); I.compute_traversal_state_d(); AVL _node_ponter= InsertAVL_tree(T[S], I); f (AVL _node_ponter->nfo_ponter==null) then AVL _node_ponter->nfo_ponter=&i; dstance_label=i.getdstance(); else f (AVL_node_ponter->nfo_ponter->getdstance()>I.getdstance()) then dstance_label=i.getdstance(); AVL_node_ponter->nfo_ponter->setdstance(I.getdstance()); p= AVL_node_ponter->nfo_ponter; for 0 to N-1 do p->settraversal_sequence(,i.gettraversal_sequence()); else /*The nformaton has not travelled all the nodes*/ for k 0 to N-1 do f (Current_ponter->gettraversal_sequence(k)<=0) then destnaton_d=k; s_d=current_ponter->getnode_d(); dstance_n= Current_ponter->getdstance(); dstance_n+= shortestpath[s_d][destnaton_d][0];

9 A New Exact Algorthm for Travelng Salesman roblem 39:9 f (dstance_n== ) then flag=false; break; nformaton I(dstance_n); for l 0 to N-1 do sequence_re=current_ponter->gettraversal_sequence(l); f (sequence_re>0) then I.settraversal_sequence(l, sequence_re); I.settraversal_sze(Current_ponter->gettraversal_sze()); I.setNode_d(k); /*Record the ntermedary node of the shortest path*/ Whle (s_d!=destnaton_d) do recever_d=shortestpath[s_d][destnaton_d][1]; I.addtraversal_sequence(recever_d); s_d=recever_d; I.computetraversal_state_d(); AVL _node_ponter= InsertAVL_tree(T[k], I); f (AVL _node_ponter->nfo_ponter==null) then AVL_node_ponter->nfo_ponter=&I; Insert Doublylnkedlst(s_lst, I); else p= AVL_node_ponter->nfo_ponter; f (p->getdstance()>i.getdstance()) then p->setdstance(i.getdstance); for 0 to N-1 do sequence_re= I.gettraversal_sequence(); p->settraversal_sequence(,sequence_re); Re_Current_ponter=Current_ponter; f (Current_ponter==Lst_tal_ponter) then Current_ponter=0; else Current_ponter=Current_ponter->s_ponter_next; Remove Doublelnkedlst(s_lst,Re_Current_ponter); else f (Current_ponter==Lst_tal_ponter) then Current_ponter=0; else Current_ponter=Current_ponter->s_ponter_next; dstance_out+=vstep; 4.2 Theoretcal roof of the Correctness In the algorthm, we adopt global clock t to calculate the globally dentcal propagaton dstance, dsu, of all the spreadng nformaton. The propagaton dstance, dsu s equal to t*vstep.

10 39:10 Y.. L. Theorem 2. For a connected graph, f every node manager transmts each pece of arrvng nformaton to any node whch has not retransmtted the nformaton and the algorthm terates when there s no more nformaton s transmtted, every possble crcle traversal sequence ncludng the shortest crcle traversal sequence wll be completely traveled by a pece of nformaton. roof Suppose that there s a crcle traversal sequence of V, s =<v0, v2, v1,,v0> whch s not completely traveled by a pece of nformaton. In other words, the nformaton whch was assgned to travel along s was terated n advance, before t completely travels the crcle traversal sequence. In the algorthm, a pece of nformaton can only be terated by a node manager. Then we suppose that the nformaton was terated by the node manager of v and the next neghbor node n the traversal sequence s v. It means that the node manager of v dd not transmt nformaton to node v. However, ths s n contradcton wth the premse n Theorem 2. In a crcle traversal sequence, one node only has one sequence poston. Because node v s behnd v, the node set whch the nformaton records does not nclude node v when t arrved at node v. Accordng to the premse n Theorem 2, every node manager transmts each pece of arrvng nformaton to any node whch has not retransmtted the nformaton. Then the node manager wll transmt the nformaton to node v. In other word, the nformaton wll not terate at node v. Namely, the prevous hypothetcal stuaton s not possble to appear. Then we can conclude that Theorem 2 s vald. It means that all the possble crcle traversal sequence wll be consdered and compared to fnd the shortest one n ths stuaton. Lemma 3. For an undrected graph G=(V,E), represents the shortest traversal dstance between node v and v ( v, v V ) n the graph. For an arbtrary node of the graph, vk, we have: k k (3) roof Suppose that k k. It means that the traversal dstance of the path v v k k v v v k s shorter than the traversal dstance of the path v v. Then the path s not the shortest path between node v and v and s not the shortest v v traversal dstance between node v and v (, V ) n graph G. Ths s n contract wth the premse that represents the shortest traversal dstance between node v and v ( v, v V ) n the graph. Ths llustrates that the prevous assumpton k k s nvald. Then we can conclude that Theorem 2 s correct. Theorem 4. If a pece of nformaton, I1 selects a node whch t has traveled as a new destnaton node, there must be another pece of nformaton whose traversal dstance s no longer than that of I1 when they return to the start node v0. roof Suppose that a pece of nformaton, I1 has the node sequence s1=<v0, vk, v> and arrves at node v. I1 s retransmtted to node vk before travelng the node set V, whch conssts of the nodes that have not been traveled by tself n graph G. Suppose that s2=<v, v v0> represents the shortest one of all the traversal sequences whch start at node v, wth v0 and nclude all the nodes of V and s3=<v,vk,va v v0> represents the shortest one of all the traversal sequences whch start wth the sequence <v,vk>, wth v0 and nclude all the nodes of V. Based on Lemma 3, we can udge that the traversal dstance of s4=<v,va v v0> s no longer than that of s3

11 A New Exact Algorthm for Travelng Salesman roblem 39:11. Because s2=<v, v v0> s the shortest one of all the because of a k ka traversal sequences whch start at node v, wth v0 and nclude all the nodes of V, the traversal dstance of s2 s no longer than that of s4. As a result, the traversal dstance of s2 s no longer than that of s3. It means that the traversal dstance of the nformaton whch travels along the sequence s 1 s 2 s no longer than the shortest traversal dstance whch I1 can travel when t returns to the start node. Consequently, we can conclude that Theorem 4 s vald. It means that for a pece of arrvng nformaton, the node manager only needs to transmt nformaton to the nodes whch t has not traveled. In other words, based on Theorem 4, we can udge whether a crcle traversal sequence s possble to be the shortest one at some retransmsson node and terate the nformaton whch cannot travel along a shortest crcle traversal sequence n advance. Theorem 5. There are two peces of nformaton, I1 and I2 whch start wth start node, wth the same nformaton transmsson node and travel the same node set. If the traversal dstance of I1 s no longer than that of I2, the possble shortest traversal dstance of I1 s no longer than that of I2 when they return to the start node v0. roof Suppose that I1 and I2 have traveled the same node set S1={v0, vk, v} and arrve at node v. The traversal dstance of I1 s d1 and the traversal dstance of I2 s d2. Based on the premse, d1 d2. V represents the node set whch conssts of the nodes that are not ncluded by S1 n graph G. Suppose that s2=<v, v v0> represents the shortest one of all the traversal sequences whch start at node v, wth v0 and nclude all the nodes of V and the traversal dstance s d. Then the possble shortest traversal dstance of I1 and I2 are respectvely equal to d1+d and d2+d when they return to the start node v0. Because d 1 d 2, d1 d d2 d. Ths llustrates that Theorem 5 s vald. It means that for all the arrvng nformaton that travels the same node set, the node manager only needs to transmt nformaton for the shortest one. Ths s because the algorthm only needs to fnd one shortest crcle traversal sequence. Theorem 6. For a drected graph G=(V,E), where V s the set of nodes and E s the set of edges. represents the shortest traversal dstance between node v and v ( v, v V ) n graph G. Suppose s=<v1, v2,,vk> s the shortest traversal sequence whch starts wth node v1, s wth node vk and whose travelng node set s Vs (Vs={v1, v2,,vk}). For arbtrary, (1 k ), suppose s=<v, v+1,,v> s the subsequence of s from v to v. Then s s the shortest traversal sequence whch starts wth node v, s wth node v and whose travelng node set s Vs (Vs ={v, v+1,,v}). roof f we dvde traversal sequence s as 1 k s s s 1 k v 1 v v v, k L( s) L( s ) L( s ) L( s ). Suppose that there s a traversal sequence s whch starts wth node v, s wth node v and whose travelng node set s Vs, and L s ' ( ) L( s ). Then s s ' s 1 k v 1 v v v k s a traversal sequence whch starts wth node v1, s wth node vk and whose travelng node set s Vs, and the traversal dstance L s L s L s s less than Lp ( ) ' ( 1 ) ( ) ( k ). Ths s n contradcton wth the assumpton that s s the shortest traversal sequence whch starts wth node v1, s

12 39:12 Y.. L. wth node vk and whose travelng node set s Vs. Then we can conclude that Theorem 6 s vald. Theorem 7. For a connected graph, at least one shortest crcle traversal sequence of V s completely traveled by a pece of nformaton n the algorthm. roof Based on Theorem 2, we know that the algorthm wll consder and compare all the possble crcle traversal sequence to fnd the shortest one. Based on the Theorem 4 and Theorem 5, we know that the node manager wll not terate all the shortest crcle traversal sequences f the node manager transmts nformaton followng the two retransmsson prncples whch are descrbed s secton 3. It means that at least one pece of nformaton travels along one shortest crcle traversal sequence of V and returns to the start node successfully n the algorthm. Then we know that Theorem 7 s vald. Theorem 8. Even f the algorthm runs n a seral system, only f, the v step traversal dstance of an nformaton record s equal to the shortest traversal dstances of all the possble traversal sequences whch start wth the start node, wth the nformaton record holder and has the same travelng node set when the traversal dstance s no longer than dsu and s longer than dsu-vstep. roof we use Vs to represent the subset of V and use ds->vs-> to represent the traversal dstance of the nformaton record whose travelng node set s Vs at node v ( v V ). And we use d->s->vs-> to represent the traversal dstance of the shortest traversal sequence whch starts wth the start node v0, s wth node v and whose travelng node set s Vs. Suppose that the ds vs d s vs (.e ds vs d s vs or ds vs d s vs ) when dsu vstep ds vs dsu on the condton of node, vstep. (I) Suppose that for arbtrary node v ( v d condton of s vs s vs v V ) whch s dfferent from the start d when dsu vstep ds vs dsu ( dsu t0* vstep, t0 1 ) on. We assume that shortest traversal sequence whch starts step wth the start node, s wth node v and whose travelng node set s Vs s s (s=<v0, v1,v, v>). Gven Theorem 6 and Equaton (1), we know that d d where Vs ={v0,,v} and s the shortest traversal s vs s vs ' v v dstance between node v and v (, V process of the algorthm, we can udge ds vs ' d s vs '. roof If ds vs ' d s vs ', d d d d ) n graph G. Based on the executon s vs' s vs' s vs' s vs d * s vs d su t0 vstep and vstep. d d t * v ( t 1)* v s vs' s vs' 0 step 0 step Ths means that node retransmtted nformaton to node at t0-1 clock and compare d s vs ' wth ds vs. The drected result s ds vs ds vs ' at t0 clock, whch s detered by the mechansm of algorthm. Then ds vs d s vs, t s n contradcton wth ds vs d s vs.

13 A New Exact Algorthm for Travelng Salesman roblem 39:13 Consequently, we can udge ds vs ' d s vs ' f ds vs d s vs when dsu vstep ds vs dsu on condton of vstep. Based on the same argument, we can udge ds { v0, v1 } 1 d s { v0, v1 } 1 and ds { s} s d s { s} s. However, we set the orgnal traversal dstance, ds, of each pece of nformaton whch s transmtted by the travelng salesman at the begnnng of the algorthm as zero whch s equal to the shortest traversal dstance d s { s} s, namely, ds { s} s d s { s} s. Ths means that ds { s} s d s { s} s s not possble to appear n the algorthm because t s n contradcton wth the ntal settng. It also means that d d s not possble to appear n the algorthm s vs s vs d v d d. As a result, we can conclude that d d when su step s vs su d v d d on condton of vstep when su step s vs su. s vs s vs (II) Suppose that for arbtrary node whch s dfferent from the start node, ds vs d s vs when dsu vstep ds vs dsu ( dsu t0* vstep, t0 1 ) on condton of vstep. We assume that ds vs s the traversal dstance of the traversal sequence s(s=<v0, v1,,vk, v>). Then d d where s vs s vs '' k k Vs ={v0, v1,,vk} and k s the shortest traversal dstance between node vk and v ( v, v V ) n graph G. Based on the executon process of the algorthm, we can k d d. udge s vs '' k s vs '' k roof If ds vs '' k d s vs '' k, d d, s vs s vs" k k d d d d. s vs s vs '' k k s vs '' k k s vs Ths s n contradcton wth d d s vs s vs. Consequently, we can udge ds vs '' k d s vs '' k f ds vs d s vs when dsu vstep ds vs dsu on condton of vstep. Based on the same argument, we can udge ds { v0, v1 } 1 d s { v0, v1 } 1 and ds { s} s d s { s} s. However, we set ds { s} s d s { s} s at the begnnng of the algorthm. Ths means that ds { s} s d s { s} s s not possble to appear n the algorthm. It also means that d d s not possble to appear n the algorthm. As a s vs s vs result, we can conclude that d d s vs s vs n the algorthm. Combnng all the aforementoned analyses, we can conclude that for arbtrary node whch s dfferent from source node, ds vs d s vs when dsu vstep ds vs dsu on condton of vstep. Addtonally, we set d d at the begnnng of the algorthm. Then we can udge that s { s} s s { s} s Theorem 8 s vald.

14 39:14 Y.. L. Gven Theorem 5 and Theorem 8, every node manager only needs to transmt nformaton for ts nformaton record when the traversal dstance s no longer than dsu and s longer than dsu-vstep n the algorthm. And ths makes the algorthm have the least total frequency of nformaton transmsson. 4.3 Analyss of The Complexty Defnton 2 (shortest path graph). For an undrected graph G=(V,E), the shortest path graph s a spannng sub-graph of G, whch ncludes each node of V. And for arbtrarly two nodes v and v, the shortest path dstance between v and v n the shortest path graph s the same as that of G. Defnton 3 (mum shortest path graph). For an undrected graph G=(V,E), the mum shortest path graph s the shortest path graph whose number of edges s the least among all the shortest path graphs. In the mum shortest path graph, every edge s the unque shortest path between the two -nodes of the edge. For an undrected graph G=(V,E), the node number of V s n ( n 2 ) and the number of edges s m ( m 0 ). s the shortest traversal dstance between node v and v ( v, v V ) and s the mum n graph G. In the algorthm, for arbtrarly node v, the number of ts nformaton records deteres ts frequency of nformaton transmsson. And the total frequency of nformaton transmsson n the algorthm deteres the tme complexty of the algorthm. We use k (1 k n) to represent the travelng node number of a pece of nformaton when t arrves at node v. Theorem 9. If G s a complete graph and the mum shortest path graph s the same as tself, the total frequency of nformaton transmsson n the algorthm s O(n 2 2 n ). roof for arbtrarly node v whch s dfferent the start node, k can be arbtrarly postve nteger whch s more than one and no more than n. And node v wll have at most k 2 C n 2 nformaton records whose travelng node number s k. Ths s because the arrvng nformaton can have any possble node combned state when the mum shortest path graph of G s a complete graph. Then node v wll have 2 n-2 ( 2 C C... C ) nformaton records. For each nformaton records, n n 2 n 2 n 2 n 2 node manager of v transmts at most n-1 peces of nformaton. Gven the n-1 peces of nformaton whch are transmtted by the travelng salesman at the start node, the total frequency of nformaton transmsson n the algorthm s at 2 n 2 most n. Then we can conclude ( n 1) 2 n 1whch s less than n 2 2 n when 2 Theorem 9 s vald. Theorem 10. If G s a graph whose mum shortest path graph s a cyclc graph, the total frequency of nformaton transmsson n the algorthm s O(n 3 ). roof

15 A New Exact Algorthm for Travelng Salesman roblem 39: n n-1 Fgure 1 cyclc graph As Fgure 1 shows, G s a cyclc graph and the mum shortest path graph s the same as tself. For arbtrarly node v whch s dfferent the start node v0, the nformaton whch s transmtted by the travelng salesman has two canddate drectons to arrve at node v, the clockwse drecton and counter-clockwse drecton. Suppose that there are l( 0 l n 2) ntermedary nodes n the clockwse path from the start node v0 to node v. Suppose that the clockwse path s p=<v0,v1,v2,,v- 1,v>. If a pece of nformaton arrves at node v va node v-1, t must travel all the nodes whose node d s no more than because every pece of nformaton wll only be retransmt to nodes whch t has not travelled before. At the same tme, t also can travel some nodes whose node d s more than. Lemma 11. For the graph G n Fgure 1, a pece of nformaton arrves at node v va node v-1 and travels node v (>). If there are l ntermedary nodes n the counterclockwse path from the start node v0 to node v, the travelng node number of the nformaton s no less than l+l+3. roof because there are l ntermedary nodes n the counter-clockwse path from the start node v0 to node v, then the nformaton travels at least l+2 nodes ncludng node v0 when t arrves at node v along the counter-clockwse drecton. At the same tme, f the nformaton arrves at node v va node v-1, t has to travel the clockwse path p whose node number s l+2 ncludng node v0. Consequently, the total travelng node number of the nformaton s no less than l+l+3 n whch node v0 s counted only once. We can fnd that, n the stuaton of Lemma 11, there s at most one node combned state for each possble value of k. Ths s because every pece of nformaton travels along the shortest path between the transmsson node and destnaton node, every pece of nformaton records the traversal order of a node only when the node s travelled for the frst tme and for each selected nformaton record, every node manager only transmts nformaton to the nodes whch are not ncluded by the nformaton record. Then, there wll be at most n-l-1 nformaton records for all the possble nformaton whch arrves at node v va node v-1. Lemma 12. For the graph G n Fgure 1, a pece of nformaton arrves at node v va node v+1 and travels node v (<). If there are l ntermedary nodes n the clockwse path from the start node v0 to node v, the travelng node number of the nformaton s no less than n-l+l+1. roof because there are l ntermedary nodes n the clockwse path from the start node v0 to node v, then the nformaton travels at least l+2 nodes ncludng node v0 when t arrves at node v along the clockwse drecton. At the same tme, f the nformaton arrves at node v va node v+1, t has to travel the counter-clockwse path whose node number s n-l ncludng node v0. Consequently, the total travelng

16 39:16 Y.. L. node number of the nformaton s no less than n-l+l+1 n whch node v0 s counted only once. We can fnd that, n the stuaton of Lemma 12, there s also at most one node combned state for each possble value of k. Ths s also because every pece of nformaton travels along the shortest path between the transmsson node and destnaton node, every pece of nformaton records the traversal order of a node only when the node s travelled for the frst tme and for each selected nformaton record, every node manager only transmts nformaton to the nodes whch are not ncluded by the nformaton record. Then, there wll be at most l+1 nformaton records for all the possble nformaton whch arrves at node v va node v+1. Consderng the analyses of Lemma 11 and Lemma 12, we can conclude that node v has at most n nformaton records. For each nformaton records, node manager of v transmts at most n-1 peces of nformaton. Gven the n-1 peces of nformaton whch are transmtted by the travelng salesman at the start node, the total 2 ( n 1)( n n 1) frequency of nformaton transmsson n the algorthm s at most whch s less than n 3 when n 2. Then we can conclude Theorem 10 s vald. In the algorthm, when a pece of nformaton s transmtted, t wll drectly confrm the traversal state whch t wll pass through f t arrves at the destnaton node. The traversal state ncludes the traversal sequence of the nodes, the number of traversal nodes, the traversal state d and the total path dstance, dst. In these processes, we need O(n) operatons. Besdes, the nformaton wll try to reset the nformaton record at the destnaton node. In the process, the nformaton wll traverse the AVL tree of the destnaton node to fnd f there s AVL tree node whose state_data s equal to the traversal_state_d of the nformaton. If there s such an AVL tree node, the nformaton wll compare ts dstance wth the dstance of the nformaton record whch the nformaton ponter of the AVL tree node ponts to. If the dstance of the nformaton record whch the nformaton ponter of the AVL tree node ponts to s shorter, the algorthm does nothng. Then the dstance comparson and traversal state recordng only need O(1) operatons. Conversely, f the dstance of the nformaton record whch the nformaton ponter of the AVL tree node ponts to s longer, the correspondng nformaton record wll duplcate the traversal sequence of the nformaton and record the dstance. Then the dstance comparson and traversal state recordng need O(n) operatons. We can also make the nformaton ponter of the AVL tree node pont to the arrvng nformaton nstead of duplcatng the traversal sequence. Then we should guarantee that the arrvng nformaton wll be nserted nto the same poston of the comparng nformaton record n the s_lst. At the same tme, we should release the storage space of the comparng nformaton record. In the stuaton, the dstance comparson and traversal state recordng bascally need O(1) operatons. If there s not such an AVL tree node, the algorthm wll establsh a new AVL tree node whose nformaton ponter ponts to the arrvng nformaton and nsert t nto the approprate poston. At the same tme, the nformaton wll be nserted nto the tal of s_lst. The nsertng of doubly lnked lst needs O(1) operatons. Because every node has at most 2 n-2 nformaton records, the heght of every AVL tree s no more than n. As a result, the AVL tree searchng and nsertng only need O(n) operatons [Adelson-Velsky and Lands 1962]. Based on the aforementoned analyses, we can conclude that we need O(n) operatons to deal wth each pece of nformaton. Theorem 13. For an nformaton record whch corresponds to a travelng node set, t wll need at most max 1 (max s the maxmum n graph G) comparson

17 A New Exact Algorthm for Travelng Salesman roblem 39:17 frequences from the tme when t s establshed to the tme when the holdng node transmts nformaton for t n the algorthm. roof For arbtrary node v ( ), ths paper adopts doubly lnked lst to store the v V nformaton records whch the node manager has not transmtted nformaton for. Every nformaton record n the doubly lnked lst wll be checked to compare the traversal dstance wth dsu and udge f the node manager should transmt nformaton for t at every t (t s a postve nteger) clock. We suppose that at t0 ( 0 1 v V ) transmts a pece of nformaton to node v for ts t ) clock, node v ( ( t 1)* v d t * v ) and nformaton record whose traversal dstance s ds ( 0 step s 0 step establshes a correspondng nformaton record, r at node v. The traversal dstance of r s ds (ds =ds +) where s the shortest traversal dstance between node v and v ( v, v V ). Based on Theorem 8, we know that node v transmts nformaton for r and removes r from the record lnked lst only when ds=d, where d represents the shortest traversal dstance whch the traversal dstance of r can be. Based on the enactment of the algorthm, we know that d d. We use t1 clock s represent the tme when node removes r from the record lnked lst. Then t1 satsfes the condton of ( t 1)* v * 1 step d t v 1 step. And the total tme of r n the d ds d ds max lnked lst, t1-t0 s less than 1( 1 1 1).For reducng v v v v step step step step the tme complexty, we set vstep as whch s the mum n the graph G. As a result, t1-t0 s less than max frequency of an nformaton record s at most 1. Then n the record lnked lst, the comparng max 1. And Theorem 13 s vald. Based on aforementoned analyses, we can conclude that the tme complexty nterval of the algorthm s ( 4 max 2 3 n max n O( n ( 1) n ), O( n 2 ( 1) n 2 ) ). In the algorthm, the space complexty s also detered by the number of nformaton record. Based on Theorem 9 and Theorem 10, we can conclude that the space complexty nterval of the algorthm s (O(n 3 ), O(n 2 2n )), where each nformaton record need O(n) storage space. In realty, the algorthm of ths paper s also applcable to the travelng salesman problem n a drected graph whose edge weghts are all postve. And the tme complexty and space complexty are the same. 5. THE EXTENSION OF THE SIMLE ALGORITHM USING FIBONACCI HEA In the smple algorthm, we assume that all the nformaton spreads at the same speed vstep ( 0 vstep W ). Then n the executon process of the smple algorthm, f the mal traversal dstance of all the exstng nformaton records s dc after one round nformaton transmsson, the next clock t0 when there s some nformaton record transmttng nformaton must satsfy the condton of ). Based on Theorem 8, we know that f we ( t 1)* v d t * v ( t step c 0 step

18 39:18 Y.. L. assume that all the nformaton spreads at the same speed vstep ( 0 vstep W ), the nformaton records whose traversal dstances are n the same nterval ) can transmt nformaton at the same clock, ( t 1)* v d t * v ( t step c 0 step namely, n the same round loop and t does not affect the correctness of the fnal result. Based on the realty, we can optmze the smple algorthm usng Fbonacc heap. In the extenson algorthm, we establsh a Fbonacc heap based on all the exstng nformaton records. In the Fbonacc heap, every node corresponds to one exstng nformaton record of the extenson algorthm. We use H to represent the Fbonacc heap, use [H] to represent the ponter of the heap and use -node to represent the node whch [H] ponts to n H. We use k to represent the key value of -node whch [H] ponts to and use chld[x] to represent the ponter whch ponts to the chld node lst of node x. We add a Boolean quantty, flag as a new attrbute of H. The process n every round loop can be descrbed as follows: Fb-Extract-Mn-and-Transmt-Informaton (H, vstep) () If [H] s equal to NULL, go to (x). Otherwse, f flag s false, go to (), else f vstep s equal to zero, y=k, otherwse, y k / * v v y k, y y vstep. setp step, f Then go to (); () If the key value of the node, -node whch [H] ponts to s no more than y, go to (), else go to (v); () Transmt nformaton accordng to -node and the algorthm needs ether some nsert operatons or some decrease key operatons whch are both the basc operatons of Fbonacc heap n the process. In the process, every node whch s added to the root lst of H wll be added to the front of -node, namely, the node wll be the left brother of -node. (v) If flag s false, go to (v). Otherwse, f chld[-node] s not equal to NULL and the key value of the node, z whch chld[-node] ponts to s no more than y, go to (v), else go to (v); (v) Remove node z from the chld lst of -node and add t to the back of -node, namely, node z wll be the rght brother of -node. At the same, f node z has a rght brother, make the chld[-node] pont to the rght brother of node z. Then go to (v). If node z has no rght brother, set chld[-node] as NULL and go to (v); (v) If chld[-node] s not equal to NULL, drectly remove all the chldren of node from the chld lst and add them to the front of -node, namely, the last node of the chld lst wll be the left brother of -node f we regard the node whch chld[-node] ponts to as the frst node of the chld lst. In the process, every chld node does not compare ts key value wth y; (v) Remove -node from the root lst of H. If there s a rght brother of -node, make [H] pont to the rght brother. If there s not a rght brother, set [H] as NULL. If [H] s not equal to NULL and flag s true, go to (), else go to (v); (v) If H s not empty, merge the root lst of H to reduce the tree number and make [H] pont to the node whose key value s the mum. Ths process also belongs to the basc operaton process of Fbonacc heap. (x) If [H] s not equal to NULL and ether the key value of chld[-node] or the key value of the rght brother of -node s equal to k, set flag as true, else set flag as false. In the of every round loop, the extenson algorthm wll udge whether checkng the chld nodes and the rght brothers of -node n the next round loop. If

Course Introduction. Algorithm 8/31/2017. COSC 320 Advanced Data Structures and Algorithms. COSC 320 Advanced Data Structures and Algorithms

Course Introduction. Algorithm 8/31/2017. COSC 320 Advanced Data Structures and Algorithms. COSC 320 Advanced Data Structures and Algorithms Course Introducton Course Topcs Exams, abs, Proects A quc loo at a few algorthms 1 Advanced Data Structures and Algorthms Descrpton: We are gong to dscuss algorthm complexty analyss, algorthm desgn technques

More information

An Optimal Algorithm for Prufer Codes *

An Optimal Algorithm for Prufer Codes * J. Software Engneerng & Applcatons, 2009, 2: 111-115 do:10.4236/jsea.2009.22016 Publshed Onlne July 2009 (www.scrp.org/journal/jsea) An Optmal Algorthm for Prufer Codes * Xaodong Wang 1, 2, Le Wang 3,

More information

CSCI 104 Sorting Algorithms. Mark Redekopp David Kempe

CSCI 104 Sorting Algorithms. Mark Redekopp David Kempe CSCI 104 Sortng Algorthms Mark Redekopp Davd Kempe Algorthm Effcency SORTING 2 Sortng If we have an unordered lst, sequental search becomes our only choce If we wll perform a lot of searches t may be benefcal

More information

Sorting Review. Sorting. Comparison Sorting. CSE 680 Prof. Roger Crawfis. Assumptions

Sorting Review. Sorting. Comparison Sorting. CSE 680 Prof. Roger Crawfis. Assumptions Sortng Revew Introducton to Algorthms Qucksort CSE 680 Prof. Roger Crawfs Inserton Sort T(n) = Θ(n 2 ) In-place Merge Sort T(n) = Θ(n lg(n)) Not n-place Selecton Sort (from homework) T(n) = Θ(n 2 ) In-place

More information

The Greedy Method. Outline and Reading. Change Money Problem. Greedy Algorithms. Applications of the Greedy Strategy. The Greedy Method Technique

The Greedy Method. Outline and Reading. Change Money Problem. Greedy Algorithms. Applications of the Greedy Strategy. The Greedy Method Technique //00 :0 AM Outlne and Readng The Greedy Method The Greedy Method Technque (secton.) Fractonal Knapsack Problem (secton..) Task Schedulng (secton..) Mnmum Spannng Trees (secton.) Change Money Problem Greedy

More information

Parallelism for Nested Loops with Non-uniform and Flow Dependences

Parallelism for Nested Loops with Non-uniform and Flow Dependences Parallelsm for Nested Loops wth Non-unform and Flow Dependences Sam-Jn Jeong Dept. of Informaton & Communcaton Engneerng, Cheonan Unversty, 5, Anseo-dong, Cheonan, Chungnam, 330-80, Korea. seong@cheonan.ac.kr

More information

Programming in Fortran 90 : 2017/2018

Programming in Fortran 90 : 2017/2018 Programmng n Fortran 90 : 2017/2018 Programmng n Fortran 90 : 2017/2018 Exercse 1 : Evaluaton of functon dependng on nput Wrte a program who evaluate the functon f (x,y) for any two user specfed values

More information

Module Management Tool in Software Development Organizations

Module Management Tool in Software Development Organizations Journal of Computer Scence (5): 8-, 7 ISSN 59-66 7 Scence Publcatons Management Tool n Software Development Organzatons Ahmad A. Al-Rababah and Mohammad A. Al-Rababah Faculty of IT, Al-Ahlyyah Amman Unversty,

More information

Learning the Kernel Parameters in Kernel Minimum Distance Classifier

Learning the Kernel Parameters in Kernel Minimum Distance Classifier Learnng the Kernel Parameters n Kernel Mnmum Dstance Classfer Daoqang Zhang 1,, Songcan Chen and Zh-Hua Zhou 1* 1 Natonal Laboratory for Novel Software Technology Nanjng Unversty, Nanjng 193, Chna Department

More information

CSE 326: Data Structures Quicksort Comparison Sorting Bound

CSE 326: Data Structures Quicksort Comparison Sorting Bound CSE 326: Data Structures Qucksort Comparson Sortng Bound Steve Setz Wnter 2009 Qucksort Qucksort uses a dvde and conquer strategy, but does not requre the O(N) extra space that MergeSort does. Here s the

More information

Sequential search. Building Java Programs Chapter 13. Sequential search. Sequential search

Sequential search. Building Java Programs Chapter 13. Sequential search. Sequential search Sequental search Buldng Java Programs Chapter 13 Searchng and Sortng sequental search: Locates a target value n an array/lst by examnng each element from start to fnsh. How many elements wll t need to

More information

NUMERICAL SOLVING OPTIMAL CONTROL PROBLEMS BY THE METHOD OF VARIATIONS

NUMERICAL SOLVING OPTIMAL CONTROL PROBLEMS BY THE METHOD OF VARIATIONS ARPN Journal of Engneerng and Appled Scences 006-017 Asan Research Publshng Network (ARPN). All rghts reserved. NUMERICAL SOLVING OPTIMAL CONTROL PROBLEMS BY THE METHOD OF VARIATIONS Igor Grgoryev, Svetlana

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms Desgn and Analyss of Algorthms Heaps and Heapsort Reference: CLRS Chapter 6 Topcs: Heaps Heapsort Prorty queue Huo Hongwe Recap and overvew The story so far... Inserton sort runnng tme of Θ(n 2 ); sorts

More information

CSE 326: Data Structures Quicksort Comparison Sorting Bound

CSE 326: Data Structures Quicksort Comparison Sorting Bound CSE 326: Data Structures Qucksort Comparson Sortng Bound Bran Curless Sprng 2008 Announcements (5/14/08) Homework due at begnnng of class on Frday. Secton tomorrow: Graded homeworks returned More dscusson

More information

F Geometric Mean Graphs

F Geometric Mean Graphs Avalable at http://pvamu.edu/aam Appl. Appl. Math. ISSN: 1932-9466 Vol. 10, Issue 2 (December 2015), pp. 937-952 Applcatons and Appled Mathematcs: An Internatonal Journal (AAM) F Geometrc Mean Graphs A.

More information

Insertion Sort. Divide and Conquer Sorting. Divide and Conquer. Mergesort. Mergesort Example. Auxiliary Array

Insertion Sort. Divide and Conquer Sorting. Divide and Conquer. Mergesort. Mergesort Example. Auxiliary Array Inserton Sort Dvde and Conquer Sortng CSE 6 Data Structures Lecture 18 What f frst k elements of array are already sorted? 4, 7, 1, 5, 1, 16 We can shft the tal of the sorted elements lst down and then

More information

6.854 Advanced Algorithms Petar Maymounkov Problem Set 11 (November 23, 2005) With: Benjamin Rossman, Oren Weimann, and Pouya Kheradpour

6.854 Advanced Algorithms Petar Maymounkov Problem Set 11 (November 23, 2005) With: Benjamin Rossman, Oren Weimann, and Pouya Kheradpour 6.854 Advanced Algorthms Petar Maymounkov Problem Set 11 (November 23, 2005) Wth: Benjamn Rossman, Oren Wemann, and Pouya Kheradpour Problem 1. We reduce vertex cover to MAX-SAT wth weghts, such that the

More information

Problem Set 3 Solutions

Problem Set 3 Solutions Introducton to Algorthms October 4, 2002 Massachusetts Insttute of Technology 6046J/18410J Professors Erk Demane and Shaf Goldwasser Handout 14 Problem Set 3 Solutons (Exercses were not to be turned n,

More information

CS1100 Introduction to Programming

CS1100 Introduction to Programming Factoral (n) Recursve Program fact(n) = n*fact(n-) CS00 Introducton to Programmng Recurson and Sortng Madhu Mutyam Department of Computer Scence and Engneerng Indan Insttute of Technology Madras nt fact

More information

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz Compler Desgn Sprng 2014 Regster Allocaton Sample Exercses and Solutons Prof. Pedro C. Dnz USC / Informaton Scences Insttute 4676 Admralty Way, Sute 1001 Marna del Rey, Calforna 90292 pedro@s.edu Regster

More information

Today s Outline. Sorting: The Big Picture. Why Sort? Selection Sort: Idea. Insertion Sort: Idea. Sorting Chapter 7 in Weiss.

Today s Outline. Sorting: The Big Picture. Why Sort? Selection Sort: Idea. Insertion Sort: Idea. Sorting Chapter 7 in Weiss. Today s Outlne Sortng Chapter 7 n Wess CSE 26 Data Structures Ruth Anderson Announcements Wrtten Homework #6 due Frday 2/26 at the begnnng of lecture Proect Code due Mon March 1 by 11pm Today s Topcs:

More information

Load Balancing for Hex-Cell Interconnection Network

Load Balancing for Hex-Cell Interconnection Network Int. J. Communcatons, Network and System Scences,,, - Publshed Onlne Aprl n ScRes. http://www.scrp.org/journal/jcns http://dx.do.org/./jcns.. Load Balancng for Hex-Cell Interconnecton Network Saher Manaseer,

More information

CMPS 10 Introduction to Computer Science Lecture Notes

CMPS 10 Introduction to Computer Science Lecture Notes CPS 0 Introducton to Computer Scence Lecture Notes Chapter : Algorthm Desgn How should we present algorthms? Natural languages lke Englsh, Spansh, or French whch are rch n nterpretaton and meanng are not

More information

Complex Numbers. Now we also saw that if a and b were both positive then ab = a b. For a second let s forget that restriction and do the following.

Complex Numbers. Now we also saw that if a and b were both positive then ab = a b. For a second let s forget that restriction and do the following. Complex Numbers The last topc n ths secton s not really related to most of what we ve done n ths chapter, although t s somewhat related to the radcals secton as we wll see. We also won t need the materal

More information

CE 221 Data Structures and Algorithms

CE 221 Data Structures and Algorithms CE 1 ata Structures and Algorthms Chapter 4: Trees BST Text: Read Wess, 4.3 Izmr Unversty of Economcs 1 The Search Tree AT Bnary Search Trees An mportant applcaton of bnary trees s n searchng. Let us assume

More information

Sorting. Sorting. Why Sort? Consistent Ordering

Sorting. Sorting. Why Sort? Consistent Ordering Sortng CSE 6 Data Structures Unt 15 Readng: Sectons.1-. Bubble and Insert sort,.5 Heap sort, Secton..6 Radx sort, Secton.6 Mergesort, Secton. Qucksort, Secton.8 Lower bound Sortng Input an array A of data

More information

Support Vector Machines

Support Vector Machines /9/207 MIST.6060 Busness Intellgence and Data Mnng What are Support Vector Machnes? Support Vector Machnes Support Vector Machnes (SVMs) are supervsed learnng technques that analyze data and recognze patterns.

More information

Sorting: The Big Picture. The steps of QuickSort. QuickSort Example. QuickSort Example. QuickSort Example. Recursive Quicksort

Sorting: The Big Picture. The steps of QuickSort. QuickSort Example. QuickSort Example. QuickSort Example. Recursive Quicksort Sortng: The Bg Pcture Gven n comparable elements n an array, sort them n an ncreasng (or decreasng) order. Smple algorthms: O(n ) Inserton sort Selecton sort Bubble sort Shell sort Fancer algorthms: O(n

More information

A mathematical programming approach to the analysis, design and scheduling of offshore oilfields

A mathematical programming approach to the analysis, design and scheduling of offshore oilfields 17 th European Symposum on Computer Aded Process Engneerng ESCAPE17 V. Plesu and P.S. Agach (Edtors) 2007 Elsever B.V. All rghts reserved. 1 A mathematcal programmng approach to the analyss, desgn and

More information

Machine Learning: Algorithms and Applications

Machine Learning: Algorithms and Applications 14/05/1 Machne Learnng: Algorthms and Applcatons Florano Zn Free Unversty of Bozen-Bolzano Faculty of Computer Scence Academc Year 011-01 Lecture 10: 14 May 01 Unsupervsed Learnng cont Sldes courtesy of

More information

Quality Improvement Algorithm for Tetrahedral Mesh Based on Optimal Delaunay Triangulation

Quality Improvement Algorithm for Tetrahedral Mesh Based on Optimal Delaunay Triangulation Intellgent Informaton Management, 013, 5, 191-195 Publshed Onlne November 013 (http://www.scrp.org/journal/m) http://dx.do.org/10.36/m.013.5601 Qualty Improvement Algorthm for Tetrahedral Mesh Based on

More information

GSLM Operations Research II Fall 13/14

GSLM Operations Research II Fall 13/14 GSLM 58 Operatons Research II Fall /4 6. Separable Programmng Consder a general NLP mn f(x) s.t. g j (x) b j j =. m. Defnton 6.. The NLP s a separable program f ts objectve functon and all constrants are

More information

Kent State University CS 4/ Design and Analysis of Algorithms. Dept. of Math & Computer Science LECT-16. Dynamic Programming

Kent State University CS 4/ Design and Analysis of Algorithms. Dept. of Math & Computer Science LECT-16. Dynamic Programming CS 4/560 Desgn and Analyss of Algorthms Kent State Unversty Dept. of Math & Computer Scence LECT-6 Dynamc Programmng 2 Dynamc Programmng Dynamc Programmng, lke the dvde-and-conquer method, solves problems

More information

R s s f. m y s. SPH3UW Unit 7.3 Spherical Concave Mirrors Page 1 of 12. Notes

R s s f. m y s. SPH3UW Unit 7.3 Spherical Concave Mirrors Page 1 of 12. Notes SPH3UW Unt 7.3 Sphercal Concave Mrrors Page 1 of 1 Notes Physcs Tool box Concave Mrror If the reflectng surface takes place on the nner surface of the sphercal shape so that the centre of the mrror bulges

More information

For instance, ; the five basic number-sets are increasingly more n A B & B A A = B (1)

For instance, ; the five basic number-sets are increasingly more n A B & B A A = B (1) Secton 1.2 Subsets and the Boolean operatons on sets If every element of the set A s an element of the set B, we say that A s a subset of B, or that A s contaned n B, or that B contans A, and we wrte A

More information

Cluster Analysis of Electrical Behavior

Cluster Analysis of Electrical Behavior Journal of Computer and Communcatons, 205, 3, 88-93 Publshed Onlne May 205 n ScRes. http://www.scrp.org/ournal/cc http://dx.do.org/0.4236/cc.205.350 Cluster Analyss of Electrcal Behavor Ln Lu Ln Lu, School

More information

Optimization Methods: Integer Programming Integer Linear Programming 1. Module 7 Lecture Notes 1. Integer Linear Programming

Optimization Methods: Integer Programming Integer Linear Programming 1. Module 7 Lecture Notes 1. Integer Linear Programming Optzaton Methods: Integer Prograng Integer Lnear Prograng Module Lecture Notes Integer Lnear Prograng Introducton In all the prevous lectures n lnear prograng dscussed so far, the desgn varables consdered

More information

The Shortest Path of Touring Lines given in the Plane

The Shortest Path of Touring Lines given in the Plane Send Orders for Reprnts to reprnts@benthamscence.ae 262 The Open Cybernetcs & Systemcs Journal, 2015, 9, 262-267 The Shortest Path of Tourng Lnes gven n the Plane Open Access Ljuan Wang 1,2, Dandan He

More information

On Some Entertaining Applications of the Concept of Set in Computer Science Course

On Some Entertaining Applications of the Concept of Set in Computer Science Course On Some Entertanng Applcatons of the Concept of Set n Computer Scence Course Krasmr Yordzhev *, Hrstna Kostadnova ** * Assocate Professor Krasmr Yordzhev, Ph.D., Faculty of Mathematcs and Natural Scences,

More information

ON SOME ENTERTAINING APPLICATIONS OF THE CONCEPT OF SET IN COMPUTER SCIENCE COURSE

ON SOME ENTERTAINING APPLICATIONS OF THE CONCEPT OF SET IN COMPUTER SCIENCE COURSE Yordzhev K., Kostadnova H. Інформаційні технології в освіті ON SOME ENTERTAINING APPLICATIONS OF THE CONCEPT OF SET IN COMPUTER SCIENCE COURSE Yordzhev K., Kostadnova H. Some aspects of programmng educaton

More information

Sorting. Sorted Original. index. index

Sorting. Sorted Original. index. index 1 Unt 16 Sortng 2 Sortng Sortng requres us to move data around wthn an array Allows users to see and organze data more effcently Behnd the scenes t allows more effectve searchng of data There are MANY

More information

A Binarization Algorithm specialized on Document Images and Photos

A Binarization Algorithm specialized on Document Images and Photos A Bnarzaton Algorthm specalzed on Document mages and Photos Ergna Kavalleratou Dept. of nformaton and Communcaton Systems Engneerng Unversty of the Aegean kavalleratou@aegean.gr Abstract n ths paper, a

More information

Problem Definitions and Evaluation Criteria for Computational Expensive Optimization

Problem Definitions and Evaluation Criteria for Computational Expensive Optimization Problem efntons and Evaluaton Crtera for Computatonal Expensve Optmzaton B. Lu 1, Q. Chen and Q. Zhang 3, J. J. Lang 4, P. N. Suganthan, B. Y. Qu 6 1 epartment of Computng, Glyndwr Unversty, UK Faclty

More information

Solving two-person zero-sum game by Matlab

Solving two-person zero-sum game by Matlab Appled Mechancs and Materals Onlne: 2011-02-02 ISSN: 1662-7482, Vols. 50-51, pp 262-265 do:10.4028/www.scentfc.net/amm.50-51.262 2011 Trans Tech Publcatons, Swtzerland Solvng two-person zero-sum game by

More information

Brave New World Pseudocode Reference

Brave New World Pseudocode Reference Brave New World Pseudocode Reference Pseudocode s a way to descrbe how to accomplsh tasks usng basc steps lke those a computer mght perform. In ths week s lab, you'll see how a form of pseudocode can be

More information

Searching & Sorting. Definitions of Search and Sort. Linear Search in C++ Linear Search. Week 11. index to the item, or -1 if not found.

Searching & Sorting. Definitions of Search and Sort. Linear Search in C++ Linear Search. Week 11. index to the item, or -1 if not found. Searchng & Sortng Wee 11 Gadds: 8, 19.6,19.8 CS 5301 Sprng 2014 Jll Seaman 1 Defntons of Search and Sort Search: fnd a gven tem n a lst, return the ndex to the tem, or -1 f not found. Sort: rearrange the

More information

Type-2 Fuzzy Non-uniform Rational B-spline Model with Type-2 Fuzzy Data

Type-2 Fuzzy Non-uniform Rational B-spline Model with Type-2 Fuzzy Data Malaysan Journal of Mathematcal Scences 11(S) Aprl : 35 46 (2017) Specal Issue: The 2nd Internatonal Conference and Workshop on Mathematcal Analyss (ICWOMA 2016) MALAYSIAN JOURNAL OF MATHEMATICAL SCIENCES

More information

Hierarchical clustering for gene expression data analysis

Hierarchical clustering for gene expression data analysis Herarchcal clusterng for gene expresson data analyss Gorgo Valentn e-mal: valentn@ds.unm.t Clusterng of Mcroarray Data. Clusterng of gene expresson profles (rows) => dscovery of co-regulated and functonally

More information

Smoothing Spline ANOVA for variable screening

Smoothing Spline ANOVA for variable screening Smoothng Splne ANOVA for varable screenng a useful tool for metamodels tranng and mult-objectve optmzaton L. Rcco, E. Rgon, A. Turco Outlne RSM Introducton Possble couplng Test case MOO MOO wth Game Theory

More information

Fast Computation of Shortest Path for Visiting Segments in the Plane

Fast Computation of Shortest Path for Visiting Segments in the Plane Send Orders for Reprnts to reprnts@benthamscence.ae 4 The Open Cybernetcs & Systemcs Journal, 04, 8, 4-9 Open Access Fast Computaton of Shortest Path for Vstng Segments n the Plane Ljuan Wang,, Bo Jang

More information

Steps for Computing the Dissimilarity, Entropy, Herfindahl-Hirschman and. Accessibility (Gravity with Competition) Indices

Steps for Computing the Dissimilarity, Entropy, Herfindahl-Hirschman and. Accessibility (Gravity with Competition) Indices Steps for Computng the Dssmlarty, Entropy, Herfndahl-Hrschman and Accessblty (Gravty wth Competton) Indces I. Dssmlarty Index Measurement: The followng formula can be used to measure the evenness between

More information

Hermite Splines in Lie Groups as Products of Geodesics

Hermite Splines in Lie Groups as Products of Geodesics Hermte Splnes n Le Groups as Products of Geodescs Ethan Eade Updated May 28, 2017 1 Introducton 1.1 Goal Ths document defnes a curve n the Le group G parametrzed by tme and by structural parameters n the

More information

BOOSTING CLASSIFICATION ACCURACY WITH SAMPLES CHOSEN FROM A VALIDATION SET

BOOSTING CLASSIFICATION ACCURACY WITH SAMPLES CHOSEN FROM A VALIDATION SET 1 BOOSTING CLASSIFICATION ACCURACY WITH SAMPLES CHOSEN FROM A VALIDATION SET TZU-CHENG CHUANG School of Electrcal and Computer Engneerng, Purdue Unversty, West Lafayette, Indana 47907 SAUL B. GELFAND School

More information

A New Approach For the Ranking of Fuzzy Sets With Different Heights

A New Approach For the Ranking of Fuzzy Sets With Different Heights New pproach For the ankng of Fuzzy Sets Wth Dfferent Heghts Pushpnder Sngh School of Mathematcs Computer pplcatons Thapar Unversty, Patala-7 00 Inda pushpndersnl@gmalcom STCT ankng of fuzzy sets plays

More information

Mathematics 256 a course in differential equations for engineering students

Mathematics 256 a course in differential equations for engineering students Mathematcs 56 a course n dfferental equatons for engneerng students Chapter 5. More effcent methods of numercal soluton Euler s method s qute neffcent. Because the error s essentally proportonal to the

More information

Intra-Parametric Analysis of a Fuzzy MOLP

Intra-Parametric Analysis of a Fuzzy MOLP Intra-Parametrc Analyss of a Fuzzy MOLP a MIAO-LING WANG a Department of Industral Engneerng and Management a Mnghsn Insttute of Technology and Hsnchu Tawan, ROC b HSIAO-FAN WANG b Insttute of Industral

More information

Content Based Image Retrieval Using 2-D Discrete Wavelet with Texture Feature with Different Classifiers

Content Based Image Retrieval Using 2-D Discrete Wavelet with Texture Feature with Different Classifiers IOSR Journal of Electroncs and Communcaton Engneerng (IOSR-JECE) e-issn: 78-834,p- ISSN: 78-8735.Volume 9, Issue, Ver. IV (Mar - Apr. 04), PP 0-07 Content Based Image Retreval Usng -D Dscrete Wavelet wth

More information

Load-Balanced Anycast Routing

Load-Balanced Anycast Routing Load-Balanced Anycast Routng Chng-Yu Ln, Jung-Hua Lo, and Sy-Yen Kuo Department of Electrcal Engneerng atonal Tawan Unversty, Tape, Tawan sykuo@cc.ee.ntu.edu.tw Abstract For fault-tolerance and load-balance

More information

1 Introducton Gven a graph G = (V; E), a non-negatve cost on each edge n E, and a set of vertces Z V, the mnmum Stener problem s to nd a mnmum cost su

1 Introducton Gven a graph G = (V; E), a non-negatve cost on each edge n E, and a set of vertces Z V, the mnmum Stener problem s to nd a mnmum cost su Stener Problems on Drected Acyclc Graphs Tsan-sheng Hsu y, Kuo-Hu Tsa yz, Da-We Wang yz and D. T. Lee? September 1, 1995 Abstract In ths paper, we consder two varatons of the mnmum-cost Stener problem

More information

CHAPTER 2 DECOMPOSITION OF GRAPHS

CHAPTER 2 DECOMPOSITION OF GRAPHS CHAPTER DECOMPOSITION OF GRAPHS. INTRODUCTION A graph H s called a Supersubdvson of a graph G f H s obtaned from G by replacng every edge uv of G by a bpartte graph,m (m may vary for each edge by dentfyng

More information

Meta-heuristics for Multidimensional Knapsack Problems

Meta-heuristics for Multidimensional Knapsack Problems 2012 4th Internatonal Conference on Computer Research and Development IPCSIT vol.39 (2012) (2012) IACSIT Press, Sngapore Meta-heurstcs for Multdmensonal Knapsack Problems Zhbao Man + Computer Scence Department,

More information

An Entropy-Based Approach to Integrated Information Needs Assessment

An Entropy-Based Approach to Integrated Information Needs Assessment Dstrbuton Statement A: Approved for publc release; dstrbuton s unlmted. An Entropy-Based Approach to ntegrated nformaton Needs Assessment June 8, 2004 Wllam J. Farrell Lockheed Martn Advanced Technology

More information

All-Pairs Shortest Paths. Approximate All-Pairs shortest paths Approximate distance oracles Spanners and Emulators. Uri Zwick Tel Aviv University

All-Pairs Shortest Paths. Approximate All-Pairs shortest paths Approximate distance oracles Spanners and Emulators. Uri Zwick Tel Aviv University Approxmate All-Pars shortest paths Approxmate dstance oracles Spanners and Emulators Ur Zwck Tel Avv Unversty Summer School on Shortest Paths (PATH05 DIKU, Unversty of Copenhagen All-Pars Shortest Paths

More information

Greedy Technique - Definition

Greedy Technique - Definition Greedy Technque Greedy Technque - Defnton The greedy method s a general algorthm desgn paradgm, bult on the follong elements: confguratons: dfferent choces, collectons, or values to fnd objectve functon:

More information

The Codesign Challenge

The Codesign Challenge ECE 4530 Codesgn Challenge Fall 2007 Hardware/Software Codesgn The Codesgn Challenge Objectves In the codesgn challenge, your task s to accelerate a gven software reference mplementaton as fast as possble.

More information

User Authentication Based On Behavioral Mouse Dynamics Biometrics

User Authentication Based On Behavioral Mouse Dynamics Biometrics User Authentcaton Based On Behavoral Mouse Dynamcs Bometrcs Chee-Hyung Yoon Danel Donghyun Km Department of Computer Scence Department of Computer Scence Stanford Unversty Stanford Unversty Stanford, CA

More information

CS221: Algorithms and Data Structures. Priority Queues and Heaps. Alan J. Hu (Borrowing slides from Steve Wolfman)

CS221: Algorithms and Data Structures. Priority Queues and Heaps. Alan J. Hu (Borrowing slides from Steve Wolfman) CS: Algorthms and Data Structures Prorty Queues and Heaps Alan J. Hu (Borrowng sldes from Steve Wolfman) Learnng Goals After ths unt, you should be able to: Provde examples of approprate applcatons for

More information

11. APPROXIMATION ALGORITHMS

11. APPROXIMATION ALGORITHMS Copng wth NP-completeness 11. APPROXIMATION ALGORITHMS load balancng center selecton prcng method: vertex cover LP roundng: vertex cover generalzed load balancng knapsack problem Q. Suppose I need to solve

More information

Harvard University CS 101 Fall 2005, Shimon Schocken. Assembler. Elements of Computing Systems 1 Assembler (Ch. 6)

Harvard University CS 101 Fall 2005, Shimon Schocken. Assembler. Elements of Computing Systems 1 Assembler (Ch. 6) Harvard Unversty CS 101 Fall 2005, Shmon Schocken Assembler Elements of Computng Systems 1 Assembler (Ch. 6) Why care about assemblers? Because Assemblers employ some nfty trcks Assemblers are the frst

More information

Related-Mode Attacks on CTR Encryption Mode

Related-Mode Attacks on CTR Encryption Mode Internatonal Journal of Network Securty, Vol.4, No.3, PP.282 287, May 2007 282 Related-Mode Attacks on CTR Encrypton Mode Dayn Wang, Dongda Ln, and Wenlng Wu (Correspondng author: Dayn Wang) Key Laboratory

More information

A Five-Point Subdivision Scheme with Two Parameters and a Four-Point Shape-Preserving Scheme

A Five-Point Subdivision Scheme with Two Parameters and a Four-Point Shape-Preserving Scheme Mathematcal and Computatonal Applcatons Artcle A Fve-Pont Subdvson Scheme wth Two Parameters and a Four-Pont Shape-Preservng Scheme Jeqng Tan,2, Bo Wang, * and Jun Sh School of Mathematcs, Hefe Unversty

More information

Parallel Artificial Bee Colony Algorithm for the Traveling Salesman Problem

Parallel Artificial Bee Colony Algorithm for the Traveling Salesman Problem Parallel Artfcal Bee Colony Algorthm for the Travelng Salesman Problem Kun Xu, Mngyan Jang, Dongfeng Yuan The School of Informaton Scence and Engneerng Shandong Unversty, Jnan, 250100, Chna E-mal: xukun_sdu@163.com,

More information

Assignment # 2. Farrukh Jabeen Algorithms 510 Assignment #2 Due Date: June 15, 2009.

Assignment # 2. Farrukh Jabeen Algorithms 510 Assignment #2 Due Date: June 15, 2009. Farrukh Jabeen Algorthms 51 Assgnment #2 Due Date: June 15, 29. Assgnment # 2 Chapter 3 Dscrete Fourer Transforms Implement the FFT for the DFT. Descrbed n sectons 3.1 and 3.2. Delverables: 1. Concse descrpton

More information

Ontology Generator from Relational Database Based on Jena

Ontology Generator from Relational Database Based on Jena Computer and Informaton Scence Vol. 3, No. 2; May 2010 Ontology Generator from Relatonal Database Based on Jena Shufeng Zhou (Correspondng author) College of Mathematcs Scence, Laocheng Unversty No.34

More information

Conditional Speculative Decimal Addition*

Conditional Speculative Decimal Addition* Condtonal Speculatve Decmal Addton Alvaro Vazquez and Elsardo Antelo Dep. of Electronc and Computer Engneerng Unv. of Santago de Compostela, Span Ths work was supported n part by Xunta de Galca under grant

More information

FINDING IMPORTANT NODES IN SOCIAL NETWORKS BASED ON MODIFIED PAGERANK

FINDING IMPORTANT NODES IN SOCIAL NETWORKS BASED ON MODIFIED PAGERANK FINDING IMPORTANT NODES IN SOCIAL NETWORKS BASED ON MODIFIED PAGERANK L-qng Qu, Yong-quan Lang 2, Jng-Chen 3, 2 College of Informaton Scence and Technology, Shandong Unversty of Scence and Technology,

More information

A Clustering Algorithm for Chinese Adjectives and Nouns 1

A Clustering Algorithm for Chinese Adjectives and Nouns 1 Clusterng lgorthm for Chnese dectves and ouns Yang Wen, Chunfa Yuan, Changnng Huang 2 State Key aboratory of Intellgent Technology and System Deptartment of Computer Scence & Technology, Tsnghua Unversty,

More information

K-means and Hierarchical Clustering

K-means and Hierarchical Clustering Note to other teachers and users of these sldes. Andrew would be delghted f you found ths source materal useful n gvng your own lectures. Feel free to use these sldes verbatm, or to modfy them to ft your

More information

Non-Split Restrained Dominating Set of an Interval Graph Using an Algorithm

Non-Split Restrained Dominating Set of an Interval Graph Using an Algorithm Internatonal Journal of Advancements n Research & Technology, Volume, Issue, July- ISS - on-splt Restraned Domnatng Set of an Interval Graph Usng an Algorthm ABSTRACT Dr.A.Sudhakaraah *, E. Gnana Deepka,

More information

Classifier Selection Based on Data Complexity Measures *

Classifier Selection Based on Data Complexity Measures * Classfer Selecton Based on Data Complexty Measures * Edth Hernández-Reyes, J.A. Carrasco-Ochoa, and J.Fco. Martínez-Trndad Natonal Insttute for Astrophyscs, Optcs and Electroncs, Lus Enrque Erro No.1 Sta.

More information

A Saturation Binary Neural Network for Crossbar Switching Problem

A Saturation Binary Neural Network for Crossbar Switching Problem A Saturaton Bnary Neural Network for Crossbar Swtchng Problem Cu Zhang 1, L-Qng Zhao 2, and Rong-Long Wang 2 1 Department of Autocontrol, Laonng Insttute of Scence and Technology, Benx, Chna bxlkyzhangcu@163.com

More information

An Efficient Label Setting/Correcting Shortest Path Algorithm

An Efficient Label Setting/Correcting Shortest Path Algorithm An Effcent Label Settng/Correctng Shortest Path Algorthm Antono Sedeño-Noda, Carlos González-Martín Departamento de Estadístca, Investgacón Operatva y Computacón (DEIOC) Unversdad de La Laguna,38205- La

More information

Subspace clustering. Clustering. Fundamental to all clustering techniques is the choice of distance measure between data points;

Subspace clustering. Clustering. Fundamental to all clustering techniques is the choice of distance measure between data points; Subspace clusterng Clusterng Fundamental to all clusterng technques s the choce of dstance measure between data ponts; D q ( ) ( ) 2 x x = x x, j k = 1 k jk Squared Eucldean dstance Assumpton: All features

More information

Lecture 5: Multilayer Perceptrons

Lecture 5: Multilayer Perceptrons Lecture 5: Multlayer Perceptrons Roger Grosse 1 Introducton So far, we ve only talked about lnear models: lnear regresson and lnear bnary classfers. We noted that there are functons that can t be represented

More information

Feature Reduction and Selection

Feature Reduction and Selection Feature Reducton and Selecton Dr. Shuang LIANG School of Software Engneerng TongJ Unversty Fall, 2012 Today s Topcs Introducton Problems of Dmensonalty Feature Reducton Statstc methods Prncpal Components

More information

Unsupervised Learning

Unsupervised Learning Pattern Recognton Lecture 8 Outlne Introducton Unsupervsed Learnng Parametrc VS Non-Parametrc Approach Mxture of Denstes Maxmum-Lkelhood Estmates Clusterng Prof. Danel Yeung School of Computer Scence and

More information

Analysis on the Workspace of Six-degrees-of-freedom Industrial Robot Based on AutoCAD

Analysis on the Workspace of Six-degrees-of-freedom Industrial Robot Based on AutoCAD Analyss on the Workspace of Sx-degrees-of-freedom Industral Robot Based on AutoCAD Jn-quan L 1, Ru Zhang 1,a, Fang Cu 1, Q Guan 1 and Yang Zhang 1 1 School of Automaton, Bejng Unversty of Posts and Telecommuncatons,

More information

A Novel Adaptive Descriptor Algorithm for Ternary Pattern Textures

A Novel Adaptive Descriptor Algorithm for Ternary Pattern Textures A Novel Adaptve Descrptor Algorthm for Ternary Pattern Textures Fahuan Hu 1,2, Guopng Lu 1 *, Zengwen Dong 1 1.School of Mechancal & Electrcal Engneerng, Nanchang Unversty, Nanchang, 330031, Chna; 2. School

More information

Learning-Based Top-N Selection Query Evaluation over Relational Databases

Learning-Based Top-N Selection Query Evaluation over Relational Databases Learnng-Based Top-N Selecton Query Evaluaton over Relatonal Databases Lang Zhu *, Wey Meng ** * School of Mathematcs and Computer Scence, Hebe Unversty, Baodng, Hebe 071002, Chna, zhu@mal.hbu.edu.cn **

More information

Capacitated Domination and Covering: A Parameterized Perspective

Capacitated Domination and Covering: A Parameterized Perspective Capactated Domnaton and Coverng: A Parameterzed Perspectve Mchael Dom Danel Lokshtanov Saket Saurabh Yngve Vllanger Abstract Capactated versons of Domnatng Set and Vertex Cover have been studed ntensvely

More information

Querying by sketch geographical databases. Yu Han 1, a *

Querying by sketch geographical databases. Yu Han 1, a * 4th Internatonal Conference on Sensors, Measurement and Intellgent Materals (ICSMIM 2015) Queryng by sketch geographcal databases Yu Han 1, a * 1 Department of Basc Courses, Shenyang Insttute of Artllery,

More information

An Application of the Dulmage-Mendelsohn Decomposition to Sparse Null Space Bases of Full Row Rank Matrices

An Application of the Dulmage-Mendelsohn Decomposition to Sparse Null Space Bases of Full Row Rank Matrices Internatonal Mathematcal Forum, Vol 7, 2012, no 52, 2549-2554 An Applcaton of the Dulmage-Mendelsohn Decomposton to Sparse Null Space Bases of Full Row Rank Matrces Mostafa Khorramzadeh Department of Mathematcal

More information

Constructing Minimum Connected Dominating Set: Algorithmic approach

Constructing Minimum Connected Dominating Set: Algorithmic approach Constructng Mnmum Connected Domnatng Set: Algorthmc approach G.N. Puroht and Usha Sharma Centre for Mathematcal Scences, Banasthal Unversty, Rajasthan 304022 usha.sharma94@yahoo.com Abstract: Connected

More information

such that is accepted of states in , where Finite Automata Lecture 2-1: Regular Languages be an FA. A string is the transition function,

such that is accepted of states in , where Finite Automata Lecture 2-1: Regular Languages be an FA. A string is the transition function, * Lecture - Regular Languages S Lecture - Fnte Automata where A fnte automaton s a -tuple s a fnte set called the states s a fnte set called the alphabet s the transton functon s the ntal state s the set

More information

Minimum Cost Optimization of Multicast Wireless Networks with Network Coding

Minimum Cost Optimization of Multicast Wireless Networks with Network Coding Mnmum Cost Optmzaton of Multcast Wreless Networks wth Network Codng Chengyu Xong and Xaohua L Department of ECE, State Unversty of New York at Bnghamton, Bnghamton, NY 13902 Emal: {cxong1, xl}@bnghamton.edu

More information

Priority queues and heaps Professors Clark F. Olson and Carol Zander

Priority queues and heaps Professors Clark F. Olson and Carol Zander Prorty queues and eaps Professors Clark F. Olson and Carol Zander Prorty queues A common abstract data type (ADT) n computer scence s te prorty queue. As you mgt expect from te name, eac tem n te prorty

More information

News. Recap: While Loop Example. Reading. Recap: Do Loop Example. Recap: For Loop Example

News. Recap: While Loop Example. Reading. Recap: Do Loop Example. Recap: For Loop Example Unversty of Brtsh Columba CPSC, Intro to Computaton Jan-Apr Tamara Munzner News Assgnment correctons to ASCIIArtste.java posted defntely read WebCT bboards Arrays Lecture, Tue Feb based on sldes by Kurt

More information

Outline. Type of Machine Learning. Examples of Application. Unsupervised Learning

Outline. Type of Machine Learning. Examples of Application. Unsupervised Learning Outlne Artfcal Intellgence and ts applcatons Lecture 8 Unsupervsed Learnng Professor Danel Yeung danyeung@eee.org Dr. Patrck Chan patrckchan@eee.org South Chna Unversty of Technology, Chna Introducton

More information

Security Vulnerabilities of an Enhanced Remote User Authentication Scheme

Security Vulnerabilities of an Enhanced Remote User Authentication Scheme Contemporary Engneerng Scences, Vol. 7, 2014, no. 26, 1475-1482 HIKARI Ltd, www.m-hkar.com http://dx.do.org/10.12988/ces.2014.49186 Securty Vulnerabltes of an Enhanced Remote User Authentcaton Scheme Hae-Soon

More information

AADL : about scheduling analysis

AADL : about scheduling analysis AADL : about schedulng analyss Schedulng analyss, what s t? Embedded real-tme crtcal systems have temporal constrants to meet (e.g. deadlne). Many systems are bult wth operatng systems provdng multtaskng

More information