A Graph Based Algorithm for Optimal Buffer Insertion Under Accurate Delay Models
Analyzing the Scalability of Algorithms

Analyzing the Scalability ofAlgorithmsAlgorithms are essential tools used in various fields such as computer science, data analysis, and machine learning. The scalability of algorithms refers to their ability to handle increasing amounts of data or growing computational demands efficiently without compromising performance. In this article, we will delve into the concept of scalability of algorithms and discuss various factors that influence it.One of the key factors that affect the scalability of algorithms is the input size. As the amount of data increases, the algorithm should be able to process it within a reasonable time frame. The efficiency of an algorithm can be measured in terms of its time complexity, which describes how the running time of the algorithm grows with the size of the input. Algorithms with a lower time complexity are more scalable as they can handle larger inputs without a significant increase in processing time.Another important factor to consider is the space complexity of an algorithm. Space complexity refers to the amount of memory or storage space required by the algorithm to solve a problem. As the input size grows, the algorithm should not consume an excessive amount of memory, as this can lead to performance degradation or even failure to complete the computation. Algorithms with lower space complexity are more scalable as they can operate efficiently even with limited memory resources.Moreover, the structure and design of an algorithm can greatly impact its scalability. Algorithms that are well-structured and modularized are easier to scale as they can be optimized or parallelized to improve performance. Additionally, the choice of data structures and algorithms used within the main algorithm can influence its scalability. For example, utilizing efficient data structures such as arrays or hash tables can improve the scalability of the algorithm by reducing the time and space required for processing.Furthermore, the scalability of algorithms can also be affected by external factors such as hardware limitations or network constraints. Algorithms that are designed towork in a distributed system or parallel computing environment are more scalable as they can distribute the workload across multiple processing units. However, algorithms that rely on a single processor or have high communication overhead may not scale well when faced with increasing computational demands.In conclusion, analyzing the scalability of algorithms is crucial for ensuring optimal performance in handling large datasets or complex computational tasks. Understanding the factors that influence scalability, such as time complexity, space complexity, algorithm structure, and external constraints, can help developers and researchers design and implement scalable algorithms. By considering these factors and optimizing the algorithm accordingly, we can improve efficiency, reduce resource consumption, and achieve better performance in various applications.。
An efficient A based algorithm for optimal graph matching applied to computer vision

An Efficient based Algorithm for OptimalGraph Matching applied to Computer Vision Douglas Antony Louis Piriyakumar and Paul Levi Institute for Parallel and Distributed High-Performance Systems Department of Computer Science,University of StuttgartD-70565Stuttgart,GermanyPhone:+49-711-7816-358or387,Fax:+49-711-7816-250 E-Mail:piriyaku levi@informatik.uni-stuttgart.de Abstract.Many of the problems in artificial intelligence including computer vision demand expensive and computationally intensive searches.Particularly incomputer vision,the crux of the problem is usually to match two abstractrepresentation,mostly graphs.Eventhough several approaches are used,toascertain optimality the strategy is chosen.In this paper,we have pre-sented an efficient based algorithm for optimal graph matching with theincorporation of two techniques additionally.The lower and upper boundtechniques help to reduce the number of nodes generated to the appreciableamount and thereby the computation time.The heuristics used in this algo-rithms provides further reductions asserting the proper choice.Keywords:Computer vision,Graph matching,Optimal matching,Heuristicmethods,Algorithm1IntroductionIn most of the core application problems viz.artificial intelligence,code optimization in compilers,CAD and computer vision,manouvring the combinatorial search remains still to be solved efficiently.Especially in computer vision,the crux of the problem is to match two abstract representations(Graphs)[SlHr81].As early as in1964[StHU64],a heuristic program for testing pairs of directed line graphs for isomorphism was ing representative graphs and reordered graph, another efficient algorithm for graph isomorphism was presented in[CDGC70].With backtrack procedure,directed graph isomorphism was solved in[BeAT73].Following this,a fast backtracking algorithm for the same not necessarily running in polynomial1time was developed[ScDC76].An algorithm for subgraph isomorphism using graph theoretical methods is presented in[UlJR76].Mostly,two approaches viz.state-space method with branch and bound techniques [LeWd96]and nonlinear optimization methods with heuristic approximations[CKPm95] are employed to match graphs efficiently.Recently,noise included graph matching[GsRa96] and parallel algorithms[ACTS97]are also investigated.Various strategies and applica-bility of graph matching to computer vision is explained in[BDBC82].However,here we combine the two methods to efficiently get the optimal matching always.The optimality is guaranteed by using algorithm[PMPL98]with the proper function aptly suiting to this problem.This demands the formulation of the problemin terms of approach and developing heuristics for supplanting the upper bound for matching.The results of optimality have been verified by the enumeration of permuta-tions method.2The Matching Problem2.1The DefinitionGiven two graphs,and with vertices sets and along with edges sets and ,we consider here the number of vertices in both the graphs to be same(say n).A cost matrix C is defined with as the cost involved in matching of and of.There are several issues taken into consideration for incorporating them in the process of match-ing viz.degree of mismatch[ACTS97]and such others like difference between indegree and outdegree.The problem is tofind a matching vector M where is the vertex in matched with the vertex in such thatis minimal i ranging from1..n.2.2The FormulationEach child node in the state-space of(explained in the next section)denotes a par-tial assignment i.e.,assigning a non-assigned vertex in with a non-assigned vertex apart from the already available such assignments made in the parent node.Here,where is the cost of the node,is the cost of getting this node from the start node i.e.,the cost of the parent node and is the lower bound on the cost of arriving at a solution node from this node i.e.,the sum of the static levels of the non-assigned vertices in.The rest is the same as the general strategy[PMPL98].23The New Based Algorithm for Graph Matching3.1General AlgorithmAs our algorithm is based on the algorithm,for the sake of clarity and explaining our algorithm,the general algorithm used in most of the artificial intelligence problems is given here as in[NiNJ80].In algorithm,the state space graph is a tree called search tree.Each node in the tree corresponds to the assignment of a particular vertex in a graph with a specific vertex.All the internal nodes in the tree correspond to partial (or incomplete)matching and all external(leaf)nodes in the tree,correspond to either pruned node or complete graph matching.Our problem here is tofind the goal node,a leaf node corresponding to the optimal matching.Associated with a node v in the search tree is a cost function f(v)=g(v)+h(v),which is an underestimate for the minimum cost of an assignment,given that it includes the partial matching.The function g(v)is the cost of the path from the root to v and the function h(v)is a lower bound estimation of the minimum cost function(v),from the node v to a leaf node which corresponds to an optimal matching in the subtree rooted at node v.3.2The Heuristics SolutionTo set the upper bound so that any node with the cost of partial matching or together with also can be pruned,an effective heuristic is defined here.We define a priority list based on the following partial order,has more priority than provided is not less than.The heuristic chooses each time,a vertex from set of all non-assigned vertices such that no other vertex is having a higher priority.And,this vertex is assigned with a vertexin the set of all non-assigned vertices in such that is minimal considering all such non-assigned vertices.We have also tried separately with N-Queen problems solutions as heuristics.3.3The Heuristics FunctionThe heuristic function define here as follows.At node x,let there be vertices already assigned.Then,,i.Now,tofind the f(x)value,we need h(x),heuristic function.To produce always optimal solution,indeed is required.The is defined as,,i,where be the minimum in the row i.In fact,it is easy to verify thatto ascertain the optimality.33.4New Techniques for Reducing Space and Time3.4.1Lower BoundThe lower bound is for the solution which is the minimum possible attainable solution.In the algorithm,the algorithm has to continue even afterfinding a solution as it need not necessarily be optimal.Now the question lies how can it be proved that the given solution is the optimal solution so that the algorithm can be stopped atonce.The only possible way is that when the given solution is equal to the lower bound solution,obviously there could not be a better solution.Hence,the algorithm can stop.Now,the problem boils down to finding the lower bound solution to the problem which is normally difficult in the general case,is not so in graph matching.Let be the minimum in the row i.Then,the lower bound is defined as the sum of all such row minima.i.e.,.The major problem with lower bound is that the possibility of many to many mapping is probable.However,in case of multiple similar objects,denoted as several occurrences of the same subgraph,this will indeed be more desirable.One should be always careful that all feasible optimal solutions need not necessarily be lower bound solutions.The main advantage is that if the given problem has the lower bound solution,the algorithm terminates atonce itfinds such solution,thereby reducing both the memory space required by the further expansions and the time to compute the same.3.4.2Upper BoundThe upper bound is a solution which the already available minimum solution.In the algorithm,the algorithm has to evaluate the function f(x)at every node.Supposing that f(x)is greater than upper bound,that node need not to be expanded further.This will not affect the optimality as anyhow by expanding this node,the solution obtained will be more than that of the already available solution.However it start with,one should have a heuristic solution.So,this algorithm ob-viously need a heuristic method to solve the problem.This also helps in another way drastically.Supposing that the heuristic solution is equal to the lower bound solution, then the algorithm stops without creating even a single node in using the general al-gorithm.Even otherwise,this heuristic solution found initially will serve as the upper bound.So,using upper bound,the number of nodes generated are minimized thereby reducing the memory space and CPU time.3.5Our Algorithm for Optimal Graph Matchingpute the lower bound solution,LB.2.Find a heuristic solution,UB using say N-queen problem.3.IF()THEN44.Construct the priority list of vertices.5.c=0(*node count*).6.Build the initial node and insert it in the list with f()=0.7.REPEAT8.Select the node with smallest f value.9.IF(is not a solution)THEN(a)Generate the successors i.e.,trying with all unassigned vertices.(b)Do the following for each such verticescompare the vertex with all other vertices and assign.(c)FOR each such assignment DOCheck whether it is already there in the list to eliminate the duplicationIF(already available)THENDon't add the nodeELSECompute f()=g()+h()for this node.IF(f(UB)c=c+1Insert it in the listIF(is a solution)THENIF(f(=LB)THENPrint the solution and quit.IF(f(UB)THENUB=f().ENDIFENDIFENDIFELSEPrune the nodeENDIFENDIFENDIFELSEPrint the solution and quit10.UNTIL(is solution OR list is empty).53.6The Algorithms Developed with VariationsWe have developed four variations of the algorithm with our new techniques[PMPL98] of lower bound and upper bound.Variation A is a simple without employing any tech-nique.Variation B is a simple with the above techniques.Variation C is at each level of state-space tree only one vertex is selected based on the priority list.Variation D is the same as variation C together with these techniques.TABLE IComparison of the variations of and permutation AlgorithmsAlgorithm CPU time in sec28545362880than Variation B,eventhough both produces the lower bound solution due to the power of the effective heuristic defined whenever possible.We would like to also inform that these variations are only for those who long for the optimality.The heuristic defined here in this paper as well as the N-Queen problem will also serve the purpose of those who are not interested in optimal solution,but a quick reasonable sub-optimal solution.As these algorithms are highly parallelizable,we are proceeding now with parallelization.We have tried to do permutation of the input cost matrix.However,the results are almost the same for the cases we have tried.To check,the number of nodes were reduced from9to7and the whole procedure is repeated.Table II portrays the same vividly.TABLE IIComparison of the variations of and permutation Algorithms for lesser number ofnodesAlgorithm CPU time in sec140285040[BeAT73]Berztiss, A.T.,”A Backtrack Procedure for Isomorphism of Directed Graphs,”Journal of Association of Computing Machinery,vol.20,no.3,pp.365-377,July1973.[CKPm95]Christmas,W.J.,Kittler,J.and Petrou,M.,”Structural Matching in Computer Vision using Probabilistic Relaxations,”IEEE Trans.PAMI,vol17,no.8,pp.749-764,Aug.1995.[CDGC70]Corneil,D.G.and Gotleib,C.C.,”An Efficient Algorithm for Graph Isomor-phism,”Journal of the Association for Computing Machinery,vol.17,no.1,pp.51-64,January1970.[GsRa96]Gold,S.and Rangarajan,A.,”A Graduated Assignment Algorithm for Graph Matching”IEEE Trans.PAMI,vol18,no4,pp.377-388,April.1996.[LeWd96]Lawler,E.and Wood,D.,”Branch and Bound Methods:A Survey,”Opera-tions Research,vol14,pp.699-719,July-Aug.1966.[NiNJ80]Nilson,N.J.Principles of Artificial Intelligence,Palo Alto,Calif,Tiaga Pub-lications,1980.[PMPL98]Piriyakumar,D.A.L.,Murthy,C.S.R.and Levi,P.”A new Based Optimal Task Scheduling in Heterogeneous Multiprocessor Systems Applied to Com-puter Vision,”HPCN'98International conference,Amsterdam,April21-23,1998.[ScDC76]Schmidt,D.C.,”A Fast Backtracking Algorithm to Test Directed Graphs for Isomorphism Using Distance Matrices,”Journal of Association of ComputingMachinery,vol.23,no.3,pp.433-445,July1976.[SlHr81]Shapiro,L.G.and Haralick,R.M.,”Structural Descriptions and Inexact matching,”IEEE Trans.PAMI,vol3,pp.504-519,sept.1981.[UlJR76]Ullmann,J.R.,”An Algorithm for Subgraph Isomorphism,”Journal of Asso-ciation for Computing Machinery,vol.23,no.1,pp.31-42,January1976. [StHU64]Unger,S.H.,”GIT-A Heuristic Program for Testing Pairs of Directed Line Graphs for Isomorphism,”Communications of the ACM,vol.7,no.1,pp.26-34,January1964.8。
初中阶段最短路径问题总结

初中阶段最短路径问题总结As a student in junior high school, one of the most commonly encountered problems in mathematics is the shortest path problem. This problem involves finding the most efficient route between two points while taking into account various factors such as distance, time, and obstacles. It is a practical and challenging problem that requires critical thinking and problem-solving skills.作为初中生,数学中经常遇到的问题之一是最短路径问题。
这个问题涉及在考虑到距离、时间和障碍物等各种因素的情况下,在两点之间找到最有效的路径。
这是一个实际且具有挑战性的问题,需要批判性思维和解决问题的能力。
One common application of the shortest path problem is in navigation systems, where the goal is to find the quickest route from one location to another. By using algorithms such as Dijkstra's algorithm or the A algorithm, these systems can calculate the shortest path based on various factors such as distance, traffic conditions, and road closures. This technology has revolutionized theway we navigate and has become an essential tool for drivers and pedestrians alike.最短路径问题的一个常见应用是在导航系统中,其目标是找到从一个位置到另一个位置的最快路径。
基于序列特征预测蛋白质编码基因及其启动子

华中科技大学硕士学位论文基于序列特征预测蛋白质编码基因及其启动子姓名:***申请学位级别:硕士专业:计算机应用技术指导教师:***20060510摘 要识别出蛋白质编码基因及其启动子是基因组研究中的重要论题。
然而,面对急剧膨胀的基因组序列数据,传统的生物学方法已很难满足需要,采用计算的方法高通量地预测蛋白质编码基因及其启动子序列显得至关重要。
为此,利用DNA序列特性对基因组中的蛋白质编码基因及其启动子进行了预测。
首先,研制了启动子及其转录起始位点预测系统。
通过构建启动子的线性对数模型,有效利用了近端启动子序列特征和距转录起始点的相对位置不同的启动子序列在序列特征上存在的显著差异性,开发了哺乳动物蛋白质编码基因启动子及其转录起始点预测软件ProKey。
在人类和小鼠基因组序列上对该系统进行了大规模的测试。
比较测试结果显示,系统的综合预测精度优于著名软件DGSF和Eponine。
然后,研制了蛋白质编码基因预测系统。
通过分析蛋白质编码基因的序列特性,将复杂的多个蛋白质编码基因的预测问题划分为基因级、元件级、特征级等多个层次上的一系列较简单子问题,建立了用于蛋白质编码基因预测的多级模型,设计了基因结构寻优的动态规划算法, 开发了脊椎动物蛋白质编码基因预测系统GeneKey。
采用广泛使用的数据集对该系统进行测试的结果表明, GeneKey的预测精度在核苷酸、外显子和基因水平上均高于著名系统GENSCAN。
最后,分析了序列C+G含量与蛋白质编码基因的关联性。
结果表明,蛋白质编码基因的序列特性与该蛋白质编码基因所处于的序列的C+G含量密切相关。
利用低序列C+G含量数据训练预测模型,能提高对低C+G含量序列中的蛋白质编码基因的预测精度。
关键词: 基因组序列,蛋白质编码基因,启动子,多级优化AbstractIdentification of protein coding genes and related promoters becomes a crucial problem. However, the biologic methods hardly tackle the whole problem with the explosion of genomic sequences. The computational prediction of protein coding genes and related promoters becomes an issue of consequence. The study of predicting protein coding genes and related promoters based on sequence characteristics is presented.Firstly, implemented a computational system for predicting promoters and related transcription start sites (TSSs). A logitlinear model is designed to model the promoters for effectively integrating the proximal promoter information and the different sequence characteristics of promoters with different distances to the TSS. On the basis of the promoter model, an advanced system called ProKey to locate TSSs and promoters in mammalian genomes was developed. The system was evaluated on the whole human and mouse genome. The comparison of the ability to predict TSSs with leading programs, DGSF and Eponine, demonstrated that the prediction accuracy of ProKey is significant higher than that of the well known programs, DGSF and Eponine.Furthermore, implemented a computational system for predicting protein-coding genes. By analyzing sequence characteristics of protein-coding genes, the complicated problem of predicting several protein-coding genes in eukaryotic DNA sequence containing multiple genes was decomposed into a series of sub-problems at several levels with decreasing complexity, including the gene level, the element level, and the feature level. On the basis of this decomposition, a multilevel model for the prediction of protein-coding genes was created. Based on the multilevel model, a dynamic programming algorithm was designed to search for optimal gene structures from DNA sequences, and a new program GeneKey for the prediction of vertebrate protein-coding genes was developed. Testing results with widely used datasets demonstrate that the prediction accuracies of GeneKey at the nucleotide level, exon level and gene level are all higher than that of the well known program GENSCAN.Finally, investigated the relationship of the C+G content of sequences andprotein-coding genes. The results demonstrate that the sequence characteristics of protein-coding genes are correlated to the C+G content of sequences. For CG-poor genes, the prediction accuracy could be improved prominently, when CG-poor genes are utilized to train the model for prediction.Key words: genomic sequence, protein-coding gene, promoter, multilevel optimization独创性声明本人声明所呈交的学位论文是我个人在导师指导下进行的研究工作及取得的研究成果。
一种大规模稀疏中国邮递员问题快速求解方法

第62卷 第2期吉林大学学报(理学版)V o l .62 N o .22024年3月J o u r n a l o f J i l i nU n i v e r s i t y (S c i e n c eE d i t i o n )M a r 2024d o i :10.13413/j .c n k i .jd x b l x b .2023165一种大规模稀疏中国邮递员问题快速求解方法唐继州,何丽莉,白洪涛(吉林大学计算机科学与技术学院,长春130012)摘要:针对现有中国邮递员问题求解方法在大规模稀疏路网图上求解效率的瓶颈,提出一种在可接受时间范围内求得可行解的基于蚁群优化的快速求解方法.该方法针对E u l e r 回路求解的奇偶点图上作业法的第二阶段,采用蚁群算法进行求解,同时根据大规模稀疏路网图的特性基于密度峰值聚类算法对方法进行改进:首先在蚁群算法求解前对大规模稀疏路网图进行聚类分割;其次根据邻近节点覆盖率对分割后的节点群进行合并;最后通过改变部分节点所属聚类使各节点群内部节点个数均为偶数.实验结果表明:在奇偶点图上作业法所能支持的节点规模下,该方法可求得与确定性算法相同的最优解,并在运算时间上达到约10倍的效率优化;且该方法在大规模稀疏路网图下可有效提高计算效率,并在可控时间范围内得到优化的可行解,针对5000个节点规模的路网图最快可在60s 内完成求解.关键词:中国邮递员问题;蚁群优化;密度峰值聚类;E u l e r 图中图分类号:T P 391 文献标志码:A 文章编号:1671-5489(2024)02-0311-09AF a s t S o l u t i o n M e t h o d f o rL a r ge -S c a l e S pa r s eC h i n e s eP o s t m a nP r ob l e m T A N GJ i z h o u ,H EL i l i ,B A IH o n gt a o (C o l l e g e o f C o m p u t e rS c i e n c e a n dT e c h n o l o g y ,J i l i nU n i v e r s i t y ,C h a n gc h u n 130012,C h i n a )收稿日期:2023-05-04.第一作者简介:唐继州(1999 ),男,汉族,硕士研究生,从事高性能计算的研究,E -m a i l :931515887@q q.c o m.通信作者简介:白洪涛(1975 ),男,汉族,博士,教授,从事高性能计算与机器学习的研究,E -m a i l :b a i h t @jl u .e d u .c n .基金项目:国家重点研发计划项目(批准号:2022Y F F 06069003).A b s t r a c t :A i m i n g a t t h eb o t t l e n e c ko f s o l v i n g e f f i c i e n c y o f e x i s t i n g C h i n e s e p o s t m a n p r o b l e ms o l v i n gm e t h o d s o n l a r g e -s c a l e s p a r s e r o a dn e t w o r k g r a p h ,w e p r o p o s e da f a s t s o l u t i o n m e t h o db a s e do na n t c o l o n y o p t i m i z a t i o nt oo b t a i nf e a s i b l es o l u t i o n s i na na c c e p t a b l et i m er a n ge .T h i s m e t h o du s e da n t c o l o n y a l g o r i t h m s t o s o l v e t h e s e c o n d s t a g e of t h e o d d e v e n p o i n tg r a p ho pe r a t i o nm e t h o df o rE u l e r s l o o p s o l u t i o n .A t t h e s a m e t i m e ,w e i m p r o v e d t h em e t h o db a s e d o nd e n s i t yp e a k c l u s t e r i ng a l go r i t h m a c c o r d i n g t o t h ec h a r a c t e r i s t i c so f l a r g e -s c a l es p a r s er o a dn e t w o r k g r a p h .F i r s t l y ,w ec l u s t e r e da n d s e g m e n t e d t h e l a r g e -s c a l es p a r s e r o a dn e t w o r k g r a p hb e f o r eu s i n g t h ea n t c o l o n y a l g o r i t h mt os o l v e t h e p r o b l e m.S e c o n d l y ,w em e r g e d t h e s e g m e n t e dn o d e g r o u p s a c c o r d i n g t o t h e c o v e r a g eo f a d j a c e n t n o d e s .F i n a l l y ,b y c h a n g i n g t h e c l u s t e r i n g of s o m en o d e s ,t h en u m b e r o f i n t e r n a l n o d e s i ne a c hn o d eg r o u p w a s e v e n .Th e e x p e ri m e n t a l r e s u l t s s h o wt h a t :u n d e r t h e n o d e s i z e s u p p o r t e db y t h e h o m e w o r k m e t h o do n t h e o d d e v e n p o i n t g r a p h ,t h e p r o p o s e dm e t h o d c a n o b t a i n t h e s a m e o p t i m a l s o l u t i o n a s t h e d e t e r m i n i s t i c a l g o r i t h ma n d a c h i e v e t h e e f f i c i e n c y o p t i m i z a t i o n o f a b o u t 10t i m e s i n t h e o pe r a t i o n t i m e .T h e p r o p o s e d m e t h o dc a n ef f e c t i v e l y i m p r o v ec o m p u t a t i o n a le f f i c i e n c y i nl a rg e -s c a l es p a r s er o a dn e t w o r k g r a p h s a n do b t a i no p t i m i z e d f e a s i b l e s o l u t i o n sw i t h i n a c o n t r o l l a b l e t i m e r a n g e .W h e n f a c i n gr o a dn e t w o r k g r a p h sw i t ha s c a l e o f 5000n o d e s ,t h e f a s t e s t s o l u t i o n c a nb e c o m p l e t e dw i t h i n60s .K e y w o r d s :C h i n e s e p o s t m e n p r o b l e m ;a n t c o l o n y o p t i m i z a t i o n ;d e n s i t yp e a k c l u s t e r i n g ;E u l e r d i a g r a m 中国邮递员问题(C h i n e s e p o s t m a n p r o b l e m ,C P P )也称为弧路由问题(a r cr o u t i n gpr o b l e m ,A R P ),是一个经典的组合优化问题,可描述为寻找一条从给定起点出发,遍历路网图上的所有边,然后回到起点,使总开销最小的路径.该问题应用广泛,如邮递员送信㊁道路勘探㊁警察巡逻[1]㊁垃圾车收集垃圾㊁扫雪车清扫街道[2]㊁街景图摄制等[3].这类问题从目的和效率方面均需一条从某一起点出发,遍历区域中所有边,最后回到起点的最短路径.C P P 问题求解的传统方法以管梅谷[4]提出的奇偶点图上作业法为代表,其核心思想为在原图上添加重复边消除奇数度节点.针对该方法第二步中最优重复边添加方案的寻找,E d m o n d s 等[5]进一步提出了一般图上的最大权匹配算法,通过不断寻找增广路径找出一个确定的最大匹配,得到最优解.近年来已提出了多种采用启发式方法求解C P P 问题的方案:文献[6]利用S h i n 等[7]的编码方案对实数进行编码,采用分子规划的算法以及遗传算法进行求解;R a l p h s [8]针对遗传算法求解中国邮递员问题的局限性,提出了一种边权动态混合的求解方案;于红斌等[9]引入蚂蚁算法,通过随机概率选择出行方向和最短路线激励策略,改善了常规情况下先进行奇点匹配再求回路的两步求解法,使得在设定目标的约束下可直接求出最优解.目前的工作大多数在节点数量最多只有几百的规模下进行.传统方法在路网图规模较小的情况下可得到最优路径.随着路网规模的扩大,节点数量快速增长,求解时间呈指数级增长,通常需要数小时,甚至数天,难以满足工作的时效性需求.启发式方法可有效缩短求解时长,得到满足要求的可行解,但随着路网规模的增大,可行解与最优解的偏差也随之增加.针对现有工作在大规模路网下求解问题的瓶颈,本文基于奇偶点图上作业法提出一种结合分治与启发式思想的中国邮递员问题快速求解方法(f a s t s o l u t i o nm e t h o d f o r l a r g e s c a l e s pa r s eC h i n e s e p o s t a l pr o b l e m m e t h o d ,F S -L S S C P P ).对于大规模路网存在的稀疏特性,该方法采用分治思想,将大规模节点群分割为多个小规模节点群[10],以降低每个节点群内部的计算规模,减少搜索空间,降低偏差;并采用启发式算法降低每个小规模节点群内部的求解时长,从而降低有效可行解的求解时间.1 问题描述设G =(V ,E )表示一个无向路网图,其中V (G )为顶点集合,E (G )为边集.任意顶点v ɪV ,表示路网图上路的交点或者起㊁止点.任意边e i j ɪE 表示两个顶点v i ,v j 之间的边.w (e )表示边e 的权值,即边的长度.V (e )表示边e 的顶点集合.在图G 上增加一条边e ᶄi j ,如果V (e ᶄi j )=V (e i j ),且w (e ᶄi j )=w (e i j ),则e ᶄi j 称为e i j 的重复边.图G 上增加的重复边集记为Eᶄ.G *=(V ,E *)称为图G 的扩展多重图,其中E *=E ɣE ᶄ.给定顶点序列v 1,v 2, ,v n ,使得(v i ,v i +1)ɪE (1ɤi <n ),则该顶点序列v 1,v 2, ,v n 表示点v 1到点v n 的一条路径R v 1,v n.U (R )表示路径R 的边集,L (R )表示路径R 所有边的权值总和.对于路径R v 1,v n ,如果v 1=v n ,则该路径称为一条回路,记为R v 1.如果对图G 的回路R v 1,E (G )中所有边在R v 1中出现且仅出现一次,则该回路为E u l e r 回路,记为E R v 1.中国邮递员问题可描述为:在无向连通图G 上,给定起点v 1(起点可任意选择),寻找一条回路R v 1使得U (R v 1)=E (G ),且L (R v 1)最小.若G 是E u l e r 图,则L (R v 1)最小的回路一定是图G 的E u l e r 回路.若G 不是E u l e r 图,则C P P 与下述问题等价:1)求G 的重复边集E ᶄ,使得图G 的扩展多重图G *为E u l e r 图,且L (E ᶄ)最小;2)求G *的E u l e r 回路.在大规模路网图上,基于奇偶点图上作业法思想,求解C P P 问题的基本过程如图1所示,包含如下两个阶段:1)找出图G 中奇数度节点集合V o d d ,构建由V o d d 中所有节点间最短路径形成的完全图G c[11];213 吉林大学学报(理学版) 第62卷图1 基于奇偶点图上作业法思想求解C P P 问题的基本过程F i g .1 B a s i c p r o c e s s o f s o l v i n g C P P p r o b l e m s b a s e do n i d e a o f h o m e w o r km e t h o do no d d e v e n p o i n t g r a ph s 2)在完全图G c 中寻找最短匹配边集E ᶄ,即在G c 中寻找重复边集Eᶄ,使得图G 的扩展多重图G *为E u l e r 图,且L (E ᶄ)尽可能最小.由于第二阶段的求解速度受大规模网络中奇数度顶点数量的制约,是求解整个C P P 问题的瓶颈,因此,本文主要针对该问题进行研究,提出了F S -L S S C P P 方法,确定大规模稀疏无向完全图的最小重复边集,从而将原始图扩展为具有最短E u l e r 回路的扩展多重图.2 F S -L S S C P P 方法框架2.1 基本思想针对给定路网图G 上由奇数度节点形成的无向完全图G c ,F S -L S S C P P 求解最短匹配边集的基本方法如下,流程如图2所示.图2 F S -L S S C P P 方法流程F i g.2 F l o wc h a r t o f F S -L S S C P Pm e t h o d 1)采用密度峰值聚类方法对奇数度节点群进行聚类分割,形成多个子节点群V c .2)通过计算V c 中各子节点群自身邻近节点覆盖率,以覆盖率阈值为标准,合并相关节点群,形成多个合并后的子节点群V m .3)计算V m 中节点个数为奇数的节点群之间的最小权完美匹配,并修改边界节点所属的类归属,形成节点个数均为偶数的多个子节点群V p .4)在V p 中各节点群中分别使用蚁群算法求得各节点群的最短匹配边集E ᶄ.后续根据各节点群的最短匹配边集E ᶄ在原路图上添加重复边,形成E u l e r 图G *,可使用F l e u r y 算法在G *中得到从任意起点开始的E u l e r 回路.2.2 奇数度节点群密度峰值聚类为有效且合理地缩小每个节点群的规模,本文采用密度峰值聚类算法对节点群进行分割.密度峰值聚类的流程如图3所示.对奇数度节点无向完全图G c 中任意奇数度点x i,计算该点局部密度ρi 和相对距离δi [12].奇数度点x i 的局部密度ρi 为节点周围节点疏密程度的量化标准[13],定义为ρi =ði ʂjχ(d i j -d c ), χ(x )=1,x <0,0,x ȡ0{,(1)其中d i j 为节点i 与节点j 的欧氏距离,d c 为节点的截断距离,χ(x )为截断核函数.相对距离δi 表示节点与其他密度更高的节点之间的最小距离[14],定义为313 第2期 唐继州,等:一种大规模稀疏中国邮递员问题快速求解方法图3 F S -L S S C P P 密度峰值聚类流程F i g .3 F l o wc h a r t o f F S -L S S C P Pd e n s i t yp e a k c l u s t e r i n g δi =m a x i ʂij (d i j ),ρi =ρm a x ,m i n j :ρj >ρi(d i j ),ρi ʂρm a x ìîíïïï.(2) 为直观地根据局部密度ρi 和相对距离δi 判断聚类中心,使用决策值γi 对两者进行结合,定义为γi =ρi -ρm i n ρm a x -ρm in ˑδi -δm i n δm a x -δm i n ,(3)其中ρm a x ,ρm i n 分别为所有节点局部密度的最大值和最小值,δm a x ,δm i n 分别为所有节点相对距离的最大值和最小值.决策值γi 可直观地看到每个节点作为聚类中心的特征情况,但原始密度峰值聚类算法并未给出自动选择相关聚类中心的方法,而是根据决策图人工选择,引入了一定的主观性和不确定性.基于此,F S -L S S C P P 方法将同时使用决策值阈值γt h r e s h o l d 和最大决策值邻近差γd m a x 自动选择聚类中心,以提高算法的可用性.对决策值γi 由大到小排序后,自动选择聚类中心的流程如下:1)使用决策值阈值确定聚类中心集合C P 1={V 1,V 2, ,V i },根据排序后的决策值γ序列,由前向后选择决策值γ超过决策值阈值γt h r e s h o l d 的节点作为聚类中心集合C P 1,一般阈值为0.5;2)使用最大决策值邻近差确定聚类中心集合C P 2={V 1,V 2, ,V j },根据排序后的决策值γ序列,由前向后选择具有最大决策值邻近差γd m a x 的节点与其之前的所有节点作为聚类中心集合C P 2,最大决策值邻近差γd m a x 定义为γd m a x =m a x {i ȡ1}ɘ{i ɤN -1}(γi +1-γi -1),(4)其表示节点处的决策值变化趋势.两种选择聚类中心的方法均对同一有序中心点序列进行顺序操作,因此C P 1和C P 2具有包含关系.选择C P 1和C P 2中节点数量较多的集合作为选定的聚类中心集合,其余节点按相对聚类中心点的距离进行聚类,形成N u m 个子节点群V c ={C 1,C 2,,C N u m }.2.3 子节点群合并最短匹配边集的有效性与子节点群包含的邻近节点数量有关.子节点群内邻近节点数量过少会导致节点匹配的选择范围减小,从而大概率增加E u l e r 回路路径长度[15],为有效提高最短匹配边集的有效性,本文采用子节点群合并提高节点群中邻近节点的个数.2.3.1 相关定义定义1(邻近节点集合C N i ) 子节点群C i 中每个节点和其邻近节点组成的节点集合,包括子节点群C i 中的全部节点和子节点群C i 中每个节点在G c 中前m 个最小权边对应的节点.定义2(邻近节点集合覆盖率C o v e r a g e ) e i j 表示子节点群C i 对邻近节点集合C N i 中节点的覆盖程度,用公式表示为C o v e r a g e i j =N i C N j,(5)其中N i 为同时属于子节点群C i 和C N j 的节点集合,N i 为节点集合N i 中节点的个数,C N j 为邻近节点集合C N j 的节点个数.定义3(邻近节点集合覆盖率阈值) 子节点群合并的参考标准,邻近节点集合覆盖率阈值与子节点群数量满足如下关系时最短匹配边集可用性较好:t h r e s h o l d c o v =1e N um /10,(6)413 吉林大学学报(理学版) 第62卷其中t h r e s h o l d c o v 为邻近节点集合覆盖率阈值,N u m 为聚类个数.子节点群合并目标是使各子节点群自身邻近节点集合覆盖率均超过邻近节点集合覆盖率阈值.子节点群内邻近节点数量m 的选取与路网图中总奇数度节点的数量有关,一般为总奇数度节点数量的1%[16];不同的子节点群个数会影响覆盖率阈值的大小,较少的子节点群数量,节点分布相对集中,需要较高的邻近节点覆盖率阈值才可保证最短匹配边集的可用性;若子节点群个数很多,则节点分布相对分散,每个子节点群内部节点较少,邻近节点覆盖率阈值要求应适当降低.2.3.2 子节点群合并子节点群合并流程如下:1)计算V c 中各子节点群邻近节点集合和邻近节点覆盖率;2)合并V c 中相关子节点群,直到各子节点群邻近节点覆盖率均满足邻近节点覆盖率阈值.设合并后的子节点群数量为n 个,合并后的子节点群记为V m ,合并流程如下:程序1 子节点群合并流程.输入:子节点群V c ={C 1,C 2,,C N u m };输出:子节点群V m ={C 1,C 2, ,C n };1)计算中各子节点群相邻节点覆盖率C o v e r a g e i i ,C o v e r a g e i j 2)f o r C i i n V c d o 3) w h i l eC o v e r a g e i i <t h r e s h o l d c o v d o 4) 选取下一个最大的C o v e r a g e j i 5) C o v e r a g e i i =C o v e r a g e i i +C o v e r a g e ji 6) 记录聚类点群i 需要和聚类点群j 合并7) e n dw h i l e 8)e n d f o r9)按照记录进行聚类合并,形成V m .2.4 子节点群节点数量偶数化V m 中各子节点群内部节点个数可能为奇数,而最短匹配边集E ᶄ的寻找要求集合的节点个数为偶数,故需对节点个数为奇数的节点群进行偶数化处理才可进行后续的匹配操作.群节点数量偶数化的过程如下:首先确定所有节点数量为奇数的子节点群的中心节点;然后确定群中心点之间的最小权完美匹配集合;最后在具有匹配关系的两个节点群之间,选择一个边界节点进行群间移动.边界节点是指具有匹配关系的两个节点群中,与两个群中心点的距离差值最小的节点.由于奇数度节点群的数量为偶数,所以调整后的子节点群节点数量均为偶数.子节点群节点数量偶数化流程如下.程序2 子节点群节点数量偶数化流程.输入:子节点群V m ={C 1,C 2, ,C n };输出:子节点群V p ={C 1,C 2, ,C n };1)使用蚁群算法求V m 各子节点群中心节点间最小权完美匹配E m 2)f o r i i n E m d o 3) 取出i 边对应的V m 中的子节点群C a ,C b 4) f o r j i n C a o r C b d o 5) 计算L j a 和L j b (j 点到C a ,C b 中心的距离)6) 找出具有m i n (L j a -L j b )的节点j (即边界节点)7) e n d f o r 8) i f j ɪCa t h e n 9) 修改j 所属ңj ∉C a ,j ɪCb 10) e l s e i f j ɪCb t h e n 513 第2期 唐继州,等:一种大规模稀疏中国邮递员问题快速求解方法11) 修改j 所属ңj ∉C b ,j ɪCa 12) e n d i f 13)e n d f o r14)合并后子节点群为V p .确立奇数度节点群中心点之间的最小权完美匹配集合的方法有很多,如果节点数量较多,可采用类似蚁群算法实现.群节点数量偶数化的流程如图4所示.图4 节点群数量偶数化F i g .4 E v e nn u m b e r o f n o d e g r o u ps 2.5 基于蚁群算法求解子节点群内最短匹配边集2.5.1 蚁群算法整体思路图5 F S -L S S C P P 蚁群算法流程F i g .5 F l o wc h a r t o f F S -L S S C P Pa n t c o l o n y a l go r i t h m 为保证构造出的E u l e r 图总路径长度最短,同时提高求解速率,本文应采用相关启发式方法进行求解.最短匹配边集的求解可视为寻找最短路径,为同时满足上述需求,本文采用蚁群算法求解各子节点群V p 内部最短匹配边集E ᶄ.V p 中各子节点群依次使用蚁群算法进行求解时,多只蚂蚁同时进行下述操作,具体流程如图5所示.1)随机选择一个未匹配节点,并根据相关信息素和节点间路径长度计算当前节点选择其余未匹配节点的概率.2)根据步骤1)中计算的概率从其余未选择节点中随机选择一个节点,两者进行匹配,若仍有节点未进行匹配则重复步骤1)和步骤2),直到所有节点均已匹配完成.3)所有蚂蚁均完成所有节点的匹配后,从多只蚂蚁所得的匹配结果中选择具有最短添加路径长度的匹配结果,并根据此结果对相关匹配路径上的信息素进行修改.4)若当次迭代的最佳匹配结果优于之前迭代的最佳匹配结果,则保存当前的最佳匹配结果作为整体最佳匹配结果;若未达到最大迭代次数,则重复步骤1)~4),直到达到最大迭代次数.5)当达到最大迭代次数后,用保存的整体最佳匹配结果作为最终结果.结合V p 中各子节点群的最短匹配边集和原路网图可得到从任意起点开始的最短E u l e r 回路.2.5.2 信息素更新方案在一次迭代结束后,需根据当次迭代结果对信息素进行更新.传统的信息素更新是每个蚂蚁对信息素更新的叠加,同时信息素的增加量和当前寻找的路径长度有关,该方案中信息素受不同长度的路径和固定的信息素总量影响,但不同长度的路径可613 吉林大学学报(理学版) 第62卷能会产生不同量级的信息素大小,从而使信息素可能会异常增大,导致整体收敛异常,而且所有蚂蚁均会对信息素进行更新,可用性较差的结果对信息素的更新会导致整体向错误的方向收敛,从而加大寻找可用解的难度.因此,改进方案中采用精英蚂蚁策略,一次迭代只有路径最短的蚂蚁才更新信息素.同时信息素的增加改为每次增加常量P x ,从而避免信息素不同数量级的问题:τi j =τi j +Px , i j ɪM A ,(7)其中:τi j 为节点i 和节点j 之间的信息素浓度;MA 为精英蚂蚁的匹配结果集;i j 为匹配结果集中的具体路径;P x 为信息素常量,大小在0.05~0.1内效果较好.3 实验结果及分析本文在W i n d o w s 10平台和V i s u a l S t u d i o 2019环境下进行实验,输入为奇数度节点完全图,其中所有节点均为奇数度节点,且奇数度节点完全图中各节点间路径长度均随机生成,以模拟实际路网环境中不同路径长度间的随机性,从而排除数据的特殊性导致实验结果的误差;输出为重复路径的添加长度和运行时间.3.1 小规模C P P 问题求解结果比较为证明F S -L S S C P P 算法所得匹配结果接近于具有最短路径长度的匹配结果,应将同等规模下F S -L S S C P P 算法结果与确定性算法所得结果进行比较,但限制于确定性算法所能处理问题规模较小,故此处比较确定性算法所能求解范围内的结果,并以此推广到大规模情况.确定性算法采用线性规划方法,在170个节点以下的路径长度比较结果列于表1(单位:m ),F S -L S S C P P 算法采用1000次迭代5次运行平均值.由表1可见,在较小规模下F S -L S S C P P 算法可得到与线性规划相同的重复路径长度,即F S -L S S C P P 算法可得到小规模下的最优解.表1 不同奇数度节点个数下F S -L S S C P P 算法和线性规划结果比较T a b l e 1 C o m p a r i s o no f F S -L S S C P Pa l g o r i t h ma n d l i n e a r p r o g r a m m i n g r e s u l t s u n d e r d i f f e r e n t o d dd e gr e e n o d e n u m b e r s m 算法节点个数9205196150170线性规划5253506164355949876517694F S -L S S C P P52535061643559498765176943.2 小规模C P P 问题求解时间比较在同等规模下1000次迭代F S -L S S C P P 算法和线性规划方法的计算时间比较如图6所示.由图6可见,在节点数量较小时,两种算法求解所需时长均较小且差距不大.随着节点个数的增加,F S -L S S C P P 算法的效率优势显著增加.在170个节点时,F S -L S S C P P 算法相比于线性规划方法有约8倍的提升效率.实验结果表明,确定性算法虽然能得到最优解,但整体计算时长随着节点规模的增大而快速增长,当节点规模过大时,将无法在可接受时间内得到所需解;而F S -L S S C P P 算法时长主要与迭代次数和单次蚁群时长有关,在节点规模上,随着节点规模的增大整体时长将会缓慢线性增加,即使在大规模情况下,也依然可在有限时间内得到可行解.3.3 大规模C P P 问题求解结果比较F S -L S S C P P 算法在使用蚁群算法进行求解前,采用聚类算法针对路网图中节点的稀疏特性对原始奇数度点群进行分割.下面给出引入聚类后的F S -L S S C P P 算法相比于单一蚁群算法在结果可用性和整体效率上的提升.F S -L S S C P P 算法通过聚类缩小节点群规模,有效提高运行效率,并通过聚类合并提高子节点群中邻近节点的覆盖率,从而有利于降低后续蚁群算法寻找的有效重复路径长度.图7为F S -L S S C P P 算法和单独蚁群算法在不同规模节点下运行结果的比较.由图7可见,随着节点规模的增大,F S -L S S C P P 算法在重复路径长度的结果上具有明显优势.3.4 大规模C P P 问题求解时间比较使用聚类方法后可将大规模节点群分割为多个小规模节点群,从而缩小求解空间,提高运行效713 第2期 唐继州,等:一种大规模稀疏中国邮递员问题快速求解方法图6 两种算法运行时间比较F i g .6 C o m p a r i s o no f r u n n i n gt i m e b e t w e e n t w o a l go r i t h ms 图7 蚁群算法和F S -L S S C P P 算法运行结果F i g .7 R u n n i n g r e s u l t s o f a n t c o l o n y a l go r i t h m a n dF S -L S S C P Pa l go r i t h m 率.图8为不同规模的节点群分别在蚁群算法和F S -L S S C P P 算法下的运行效率.由图8可见,随着节点规模的增加,F S -L S S C P P 算法的计算效率优势逐渐明显.图8 蚁群算法和F S -L S S C P P 算法运行效率F i g .8 O p e r a t i o n e f f i c i e n c y o f a n t c o l o n y a l go r i t h m a n dF S -L S S C P Pa l go r i t h m 由蚁群算法和F S -L S S C P P 算法运行效率的比较可见,不同节点规模下,F S -L S S C P P 算法的求解所需时间明显降低,且随着节点规模的增大,效率的提升也越来越明显.综上所述,针对现有中国邮递员问题求解方法在大规模稀疏路网图上求解效率的瓶颈,本文结合分治和启发的思想提出了一种有效降低所需时间,同时得到迭代次数内最优E u l e r 回路的大规模稀疏中国邮递员问题快速求解方法,通过分析㊁计算及实验比对,得到如下结论:1)在确定性算法可支持的节点规模下,本文方法可以极大概率得到最优E u l e r 回路的同时大幅度降低所需时间;2)在大规模节点情况下,可在保证结果有效性的前提下有效提高运算效率,降低所需时间.该方法主要针对无向E u l e r 图的第二阶段构造过程进行求解,针对有向E u l e r 图的构造方法和第一阶段奇数度节点间最短路径的快速求解[17]还有待进一步研究.参考文献[1] W I L L E M S EEJ ,J O U B E R TJ W.A p p l y i n g M i n -M a x k P o s t m e nP r o b l e m st ot h eR o u t i n g o fS e c u r i t y G u a r d s [J ].J o u r n a l o f t h eO p e r a t i o n a lR e s e a r c hS o c i e t y,2012,63(2):245-260.[2] S A L A Z A R -A G U I L A R M A ,L A N G E V I N A ,L A P O R T E G.S y n c h r o n i z e d A r c R o u t i n g f o rS n o w P l o w i n g O p e r a t i o n s [J ].C o m p u t e r s&O p e r a t i o n sR e s e a r c h ,2012,39(7):1432-1440.[3] 管梅谷.关于中国邮递员问题研究和发展的历史回顾[J ].运筹学学报,2015,19(3):1-7.(G U A N M G.AH i s t o r i c a lR e v i e wo f t h eR e s e a r c ha n dD e v e l o p m e n t o f t h eC h i n e s eP o s t m a nP r o b l e m [J ].J o u r n a l o fO pe r a t i o n a l R e s e a r c h ,2015,19(3):1-7.)[4] 管梅谷.奇偶点图上作业法[J ].数学学报,1960(3):263-266.(G U A N M G.W o r k i n g M e t h o do n O d da n d E v e nP o i n tG r a ph s [J ].J o u r n a l o fM a t h e m a t i c s ,1960(3):263-266.)[5] E D MO N D S J ,J OHN S O N E L .M a t c h i n g ,E u l e r T o u r s a n d t h e C h i n e s e P o s t m a n [J ].M a t h e m a t i c a l P r o g r a mm i n g,1973,5(1):88-124.[6] S U NJH ,M E N G Y K ,T A N GZ .A nI n t e g e rP r o g r a mm i n g A p p r o a c hf o r t h eC h i n e s eP o s t m a nP r o b l e m w i t h T i m e -D e p e n d e n tT r a v e lT i m e [J ].J o u r n a l o fC o m b i n a t o r i a lO p t i m i z a t i o n ,2015,29(3):565-588.[7] S H I NSY ,L E EIH ,K I M D ,e t a l .M u l t i o b j e c t i v eE v o l u t i o n a r y O p t i m i z a t i o no fD N A S e qu e n c e s f o rR e l i a b l e 813 吉林大学学报(理学版) 第62卷D N AC o m p u t i n g [J ].IE E ET r a n s a c t i o n s o nE v o l u t i o n a r y C o m pu t a t i o n ,2005,9(2):143-158.[8] R A L P H S T K.O n t h e M i x e d C h i n e s e P o s t m a n P r o b l e m [J ].O p e r a t i o n s R e s e a r c h L e t t e r s ,1993,14(3):123-127.[9] 于红斌,薛占熬.基于蚂蚁算法的中国邮路问题[J ].河南师范大学学报(自然科学版),2011,39(5):169-171.(Y U H B ,X U EZ A.C h i n a sP o s t a lR o u t eP r o b l e m B a s e do n A n tA l g o r i t h m [J ].J o u r n a l o fH e n a n N o r m a l U n i v e r s i t y (N a t u r a l S c i e n c eE d i t i o n ),2011,39(5):169-171.)[10] C O R B E R ÁN A ,P L A N AI ,R O D R ÍG U E Z -C H ÍA A M ,e t a l .A B r a n c ha n dC u tA l g o r i t h mf o r t h e M a x i m u m B e n e f i tC h i n e s eP o s t m a nP r o b l e m [J ].M a t h e m a t i c a l P r o g r a mm i n g,2013,141:21-48.[11] P E A R N W L ,C HO U JB .I m p r o v e dS o l u t i o n sf o rt h eC h i n e s eP o s t m a n P r o b l e m o n M i x e d N e t w o r k s [J ].C o m p u t e r s a n dO pe r a t i o n sR e s e a r c h ,1999,26(8):819-827.[12] 徐晓,丁世飞,丁玲.密度峰值聚类算法研究进展[J ].软件学报,2022,33(5):1800-1816.(X UX ,D I N GSF ,D I N G L .R e s e a r c h P r o g r e s si n D e n s i t y P e a k C l u s t e r i n g A l g o r i t h m s [J ].J o u r n a lo fS o f t w a r eS c i e n c e ,2022,33(5):1800-1816.)[13] 孙林,秦小营,徐久成,等.基于K 近邻和优化分配策略的密度峰值聚类算法[J ].软件学报,2022,33(4):1390-1411.(S U NL ,Q I NXY ,X UJC ,e t a l .D e n s i t y P e a kC l u s t e r i n g A l g o r i t h mB a s e d o n K -N e a r e s tN e i g h b o r a n dO p t i m a lA l l o c a t i o nS t r a t e g y [J ].J o u r n a l o f S o f t w a r e ,2022,33(4):1390-1411.)[14] 吴斌,卢红丽,江惠君.自适应密度峰值聚类算法[J ].计算机应用,2020,40(6):1654-1661.(WU B ,L U H L ,J I A N G HJ .A d a p t i v eD e n s i t y P e a kC l u s t e r i n g A l g o r i t h m [J ].C o m p u t e rA p pl i c a t i o n s ,2020,40(6):1654-1661.)[15] 李长明,张红臣,王超,等.一种高效的阴阳k -M e a n s 聚类算法[J ].吉林大学学报(理学版),2021,59(6):1455-1460.(L IC M ,Z HA N G H C ,WA N GC ,e t a l .A nE f f i c i e n tY i nY a n g k -M e a n sC l u s t e r i n g A l g o r i t h m [J ].J o u r n a l o f J i l i nU n i v e r s i t y (S c i e n c eE d i t i o n ),2021,59(6):1455-1460.)[16] 胡雅婷,陈营华,宝音巴特,等.一种增量式M i n M a x k -M e a n s 聚类算法[J ].吉林大学学报(理学版),2021,59(5):1205-1211.(HU Y T ,C H E N Y H ,B A O Y I N B ,e ta l .A nI n c r e m e n t a l M i n M a x k -M e a n sC l u s t e r i n g A l g o r i t h m [J ].J o u r n a l o f J i l i nU n i v e r s i t y (S c i e n c eE d i t i o n ),2021,59(5):1205-1211.)[17] 王玉,申铉京,周昱洲,等.一种求解交通网络中最短路径问题的人工蜂群算法[J ].吉林大学学报(理学版),2021,59(5):1144-1150.(WA N G Y ,S H E N XJ ,Z HO U Y Z ,e t a l .A nA r t i f i c i a lB e eC o l o n y A l g o r i t h mf o r S o l v i n g t h eS h o r t e s tP a t hP r o b l e mi nT r a f f i cN e t w o r k s [J ].J o u r n a l o f J i l i nU n i v e r s i t y (S c i e n c eE d i t i o n ),2021,59(5):1144-1150.)(责任编辑:韩 啸)913 第2期 唐继州,等:一种大规模稀疏中国邮递员问题快速求解方法。
解决数学问题英文作文

In the realm of mathematics, solving intricate problems often necessitates more than mere application of formulas or algorithms. It requires an astute understanding of underlying principles, a creative perspective, and the ability to analyze problems from multiple angles. This essay will delve into a hypothetical complex mathematical problem and outline a multi-faceted approach to its resolution, highlighting the importance of analytical reasoning, strategic planning, and innovative thinking.Suppose we are faced with a challenging combinatorial optimization problem – the Traveling Salesman Problem (TSP). The TSP involves finding the shortest possible route that visits every city on a list exactly once and returns to the starting point. Despite its deceptively simple description, this problem is NP-hard, which means there's no known efficient algorithm for solving it in all cases. However, we can explore several strategies to find near-optimal solutions.Firstly, **Mathematical Modeling**: The initial step is to model the problem mathematically. We would represent cities as nodes and the distances between them as edges in a graph. By doing so, we convert the real-world scenario into a mathematical construct that can be analyzed systematically. This phase underscores the significance of abstraction and formalization in mathematics - transforming a complex problem into one that can be tackled using established mathematical tools.Secondly, **Algorithmic Approach**: Implementing exact algorithms like the Held-Karp algorithm or approximation algorithms such as the nearest neighbor or the 2-approximation algorithm by Christofides can help find feasible solutions. Although these may not guarantee the absolute optimum, they provide a benchmark against which other solutions can be measured. Here, computational complexity theory comes into play, guiding our decision on which algorithm to use based on the size and characteristics of the dataset.Thirdly, **Heuristic Methods**: When dealing with large-scale TSPs, heuristic methods like simulated annealing or genetic algorithms can offerpractical solutions. These techniques mimic natural processes to explore the solution space, gradually improving upon solutions over time. They allow us to escape local optima and potentially discover globally better solutions, thereby demonstrating the value of simulation and evolutionary computation in problem-solving.Fourthly, **Optimization Techniques**: Leveraging linear programming or dynamic programming could also shed light on the optimal path. For instance, using the cutting-plane method to iteratively refine the solution space can lead to increasingly accurate approximations of the optimal tour. This highlights the importance of advanced optimization techniques in addressing complex mathematical puzzles.Fifthly, **Parallel and Distributed Computing**: Given the computational intensity of some mathematical problems, distributing the workload across multiple processors or machines can expedite the search for solutions. Cloud computing and parallel algorithms can significantly reduce the time needed to solve large instances of TSP.Lastly, **Continuous Learning and Improvement**: Each solved instance provides learning opportunities. Analyzing why certain solutions were suboptimal can inform future approaches. This iterative process of analysis and refinement reflects the continuous improvement ethos at the heart of mathematical problem-solving.In conclusion, tackling a complex mathematical problem like the Traveling Salesman Problem involves a multi-dimensional strategy that includes mathematical modeling, selecting appropriate algorithms, applying heuristic methods, utilizing optimization techniques, leveraging parallel computing, and continuously refining methodologies based on feedback. Such a comprehensive approach embodies the essence of mathematical thinking – rigorous, adaptable, and relentlessly curious. It underscores that solving math problems transcends mere calculation; it’s about weaving together diverse strands of knowledge to illuminate paths through the labyrinth of numbers and logic.Word Count: 693 words(For a full 1208-word essay, this introduction can be expanded with more detailed explanations of each strategy, case studies, or examples showcasing their implementation. Also, the conclusion can be extended to discuss broader implications of the multi-faceted approach to problem-solving in various fields beyond mathematics.)。
基于改进A

第 22卷第 11期2023年 11月Vol.22 No.11Nov.2023软件导刊Software Guide基于改进A*算法的物流无人机航迹规划研究陈继伟,包长春,赵子恒(内蒙古工业大学航空学院,内蒙古呼和浩特 010051)摘要:针对A*算法在无人机物流配送环境下,路径规划存在地图庞大导致运算内存消耗大、计算时间长等问题,提出一种改进A*算法。
该方法包括融入跳点搜索算法搜索策略、设计起点搜索方法、改进算法启发函数,通过构建不同尺寸的地图对A*算法、跳点搜索算法、改进A*算法进行仿真分析。
结果表明,改进A*算法保持了A*算法的最优路径,搜索时间相较于A*算法平均减少90%,相较于跳点搜索算法平均减少55%,证实了改进A*算法的高效性和可行性。
关键词:物流配送;路径规划;A*算法;跳点搜索算法;最优路径DOI:10.11907/rjdk.222449开放科学(资源服务)标识码(OSID):中图分类号:V279;TP18 文献标识码:A文章编号:1672-7800(2023)011-0123-06 Research on Route Planning of Logistics UAV Based on Improved A * AlgorithmCHEN Jiwei, BAO Changchun, ZHAO Ziheng(College of Aviation, Inner Mongolia University of Technology, Hohhot 010051, China)Abstract:An improved A * algorithm is proposed to address the problems of large map size, high computational memory consumption, and long computational time in path planning for unmanned aerial vehicle logistics delivery environments. This method includes incorporating a jump point search algorithm search strategy, designing a starting point search method, improving the algorithm heuristic function, and simulat‑ing and analyzing the A * algorithm, jump point search algorithm, and improved A * algorithm by constructing maps of different sizes. The re‑sults show that the improved A * algorithm maintains the optimal path of A * algorithm, with an average reduction of 90% in search time com‑pared to A * algorithm and 55% in jump point search algorithm, confirming the efficiency and feasibility of the improved A * algorithm. Key Words:logistics distribution; path planning; A* algorithm; jump point search algorithm; optimal path0 引言随着科学技术和人民生活水平提高,无人机不仅广泛应用在航拍、特技表演等领域,而且应用在物流配送领域,具有配送效率高、成本低、适应性强等突出优点,在低空飞行中不易受复杂路况影响,可实现较快速度运输,极大节约了人力成本。
基于改进遗传算法的继电保护一体化图形拼接厂站最优布局

第43卷第10期电力系统保护与控制V ol.43 No.10 2015年5月16日Power System Protection and Control May 16, 2015 基于改进遗传算法的继电保护一体化图形拼接厂站最优布局高 旭1,杜丽艳1,李雪冬2,孟庆彬2,于 乐2(1.国网冀北电力有限公司,北京 100053;2.北京中恒博瑞数字电力科技有限公司,北京 100085)摘要:继电保护整定计算在电力系统广泛采用分布式整定计算模式,在继电保护整定计算模型拼接中,图形拼接部分存在着接线混乱的问题。
深入研究了一体化继电保护图形拼接的特点,结合厂站电压等级,提出了基于改进遗传算法的继电保护一体化图形拼接方法。
为了提高图形拼接的效率,采用按电压等级分层寻优的方式确定最优厂站布局。
最后通过实际算例验证了该方法的快速性及有效性。
关键词:一体化图形拼接;厂站布局;改进遗传算法Substation locating method in integrated relay graph splicing based onimproved genetic algorithmGAO Xu1, DU Liyan1, LI Xuedong2, MENG Qingbin2, YU Le2(1. State Grid Jibei Power Company Limited, Beijing 100053, China; 2. Beijing Join Bright DigitalPower Technology Company, Beijing 100085, China)Abstract: Distributed protection relay value setting is applied in China. There is a graph chaos problem in protection relay model splicing process. The characteristic of integrated relay splicing is studied deeply, and combined with the substation voltage level, a substation locating method based on improved genetic algorithm is proposed. To enhance the graph splicing, a voltage level based method is applied. At last, a practical example is used to validate the effectiveness of the method.Key words: integrated relay graph splicing; substation locating; improved genetic algorithm中图分类号:TM771 文献标识码:A 文章编号:1674-3415(2015)10-0074-050 引言我国电力系统的继电保护整定计算工作由电网公司各级调度部门负责。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
A Graph Based Algorithm for Optimal Buffer InsertionUnder Accurate Delay Models∗Youxin Gao D.F.WongAvant!Corporation Department of Computer Sciences46871Bayside Parkway University of Texas at AustinFremont,CA94538Austin,TX78712Tel:+1-510-413-7170Tel:+1-512-471-9527Fax:+1-510-413-8080Fax:+1-512-471-8885 e-mail:gao@ e-mail wong@AbstractBuffer insertion is an efficient technique in interconnect op-timization.This paper presents a graph based algorithm for optimal buffer insertion under accurate delay models.In our algorithm,a signal is accurately represented by afinite ramp which is characterized by two parameters,shift time and tran-sition time.Any accurate delay model,such as delay mod-els based on the transmission line model and SPICE simula-tions,can be incorporated into our algorithm.The algorithm determines the optimal number of buffers and their locations on a wire such that some optimization objective is satisfied. Two typical examples of such optimization objectives are min-imizing the50%threshold delay and minimizing the transi-tion time.Both can be easily determined in our algorithm. We show that the buffer insertion problem can be reduced to a shortest path problem.The algorithm can be easily extended for simultaneous buffer insertion and wire-sizing,and complex-ity is still polynomial.The algorithm can also be extended to deal with problems such as buffer insertion subject to transition time constraints at any position along the wire.1.IntroductionAs the VLSI technology shrinks down to nanometer range, interconnect delay becomes the bottleneck in achieving high performance circuits.Techniques which are aiming at reduc-ing interconnect delay are necessary and important.These techniques,including buffer insertion,wire-sizing and simulta-neous buffer insertion and wire-sizing,have been extensively studied in recent years.By inserting buffers in a wire,not only delay can be greatly reduced,but also the output wave-form can be improved in terms of the reduced transition time. Under the Elmore delay model and a linear gate model,some efficient algorithms for simultaneous buffer insertion and wire-sizing have been proposed in[6,5].van Ginneken in[15]pro-poses a dynamic programming based algorithm for the optimal buffer insertion.The algorithm has also been extended for si-multaneous buffer insertion and wire-sizing in[11],and noise avoidance in[2,4].However,it is well known that both the Elmore delay model and the linear gate model are inaccurate. Furthermore,both models are not aware of the input wave-forms,which is becoming increasingly important in today’s deep sub-micron design.Therefore the optimal solution under these simple models may be inferior[1].Only recently,the authors in[1,12]extend van Ginneken’s algorithm by using both accurate interconnect and gate delay models.In calculat-ing delay for a wire,both use the moment matching technique based on a lumped circuit approximation.However,in[1], the signal waveform is not actually taken into account.The authors assume afixed input slope in calculating delay for a buffer.In[12],the signal waveform is considered in buffer in-sertion.But its pruning process,which is similar to the one in Ginneken’s algorithm,only allows one waveform to survive to the next stage.As we already know,a signal waveform is characterized by two parameters,the shift time and transition ∗This work was partially supported by the National Science Foundation under grant CCR-9912390,by the Texas Advanced Re-search Program under Grant No.003658288,and by grants from Avant!,Intel and IBM.time.If two waveforms have different shift times and transi-tion times,it is hard to tell which one is better than the other (except for some special cases,e.g.,same transition time but different shift times).Therefore some potential non-inferior waveforms can be removed by this pruning process.Further-more,the lumped circuit approximation presented in[1,12]is not as accurate as the transmission line model or simulations based on SPICE especially in high frequency[17].In this paper,we present a graph based algorithm for opti-mal buffer insertion under accurate delay models.In our algo-rithm,a signal is accurately represented by afinite ramp which is characterized by two parameters,shift time and transition time.Any accurate delay model,such as delay models based on the transmission line model and SPICE simulations,can be incorporated into our algorithm.The algorithm determines the optimal number of buffers and their locations on a wire such that some optimization objective is satisfied.Two typ-ical examples of such optimization objectives are minimizing the50%threshold delay and minimizing the transition time. Both can be easily determined in our algorithm.We show that the buffer insertion problem can be reduced to a shortest path problem.The algorithm can be easily extended for simulta-neous buffer insertion and wire-sizing,and complexity is still polynomial.The algorithm can also be extended to deal with problems such as buffer insertion subject to transition time constraints at any position along the wire.Comparing with previous approaches on buffer insertion, our algorithm has the following advantages:1.Our graph based algorithm is simpler and easier to under-stand and implement.The optimal solution can be found through the shortest path algorithm.2.In our algorithm,a signal is accurately represented by afinite ramp.Any accurate delay model such as the trans-mission line model and the model based on SPICE simu-lations can be used.This makes our algorithm general of use.3.The traditional optimization objective in buffer insertiononly aims at reducing the signal delay.Our algorithm can not only deal with this objective,but also deal with some other objectives,such as optimal buffer insertion for min-immum transition time,and/or subject to transition time constraints at any position.Both are shown as shortest path problems.The rest of the paper is organized as follows.Section2in-troduces an analytical delay model used in our algorithm.In section3,we show that the optimal buffer insertion is a short-est path problem.Section4presents an efficient algorithm which combines graph construction with the shortest path al-gorithm.In section5,we present some experimental results.2.Accurate Delay ModelsSince a single delay value(e.g.,50%delay)in a general delay model can not fully characterize the waveform of a signal,we approximate each signal as afinite ramp which is characterized by two parameters,shift time S and transition time T(see Figure1).Any arbitrary signal is represented by afinite ramp by connecting two points at10%and90%threshold voltages,respectively.The usual 50%delay is thus S +1T .To simplify the notation,we use a pair (S,T )to represent a finite ramp.In the rest of the paper,we show how to use an analytical delay model,where wire delay is based on the transmission line model and buffer delay is characterized by k -factorequations.V tFigure 1.An arbitrary signal is represented by a finite ramp withshift time S and transition time T .In buffer insertion,a typical wire-buffer system is shown inFigure 2(a),where a wire is connecting two buffers.In Figure 2(b),the buffer is represented by a circuit which contains a input capacitance C B and a voltage source V B .The waveform calculation is cascaded in terms of a pair (S,T )through each wire-buffersystem.(a)BBuffer Model Buffer ModelInput (S, T)Output (S, T)(b)Figure 2.(a).A wire connecting two buffers.(b).Signal wave-form calculation is cascaded in terms of a pair (S ,T ).We use the transmission model to model the interconnect wire,which is found more accurate than methods based on lumped circuit approximation [9,17].Under the transmission line model,voltage and current at any position are described by the telegraph’s equations.In modeling the interconnect wire,we take both fringing capacitance and inductance into consideration.Both effects are found important in today’s design [3,8].The waveform calculation for a wire consists of the following steps (details can be found in [8,9]):e transmission line model to derive ABCD parameters for an interconnect wire by solving telegraph’s equations.2.Delay model is based on three pole approximation.3.Obtain analytical forms for calculating the first three terms b 1,b 2and b 3in the transfer function H (s )=11+b 1s +b 2s 2+b 3s 3+···,and derive the time domain response by assuming a finite ramp input.e analytical delay expressions to calculate delay at any threshold voltage [9,10],as well as the output waveform (S out ,T out ).To calculate the output waveform (S out ,T out )for a buffer,we make use of k -factor equations.Delays at threshold volt-ages 10%and 90%are expressed in terms of the followingempirical equations [16]:T 10=(k 1+k 2C w )T in +k 3C 2w+k 4C w +k 5(1)T 90=(k1+k 2C w )T in +k 3C 2w +k 4C w +k 5(2)where T in is the transition time of an input slope,C w =C L /w ,C L is the buffer’s load capacitance,and w is the buffer’s channel width.Therefore the waveform of the volt-age source V B can be calculated in terms of a pair (S,T )as:S =(9T 10−T 90)/8,T =(T 90−T 10)/0.8for a rising ramp;and S =(9T 90−T 10)/8,T =(T 10−T 90)/0.8for a falling ramp.Without loss of generality,throughout the rest of the paper we assume that PMOS and NMOS have the same driving capabil-ity.Therefore it is not necessary to distinguish between rising transition and falling transition.Since k -factor equations need a load capacitance,the interconnect wire which is connected to the buffer has to be approximated by a load capacitance.Because of resistance shielding,the buffer can not see the total capacitance of its down stream interconnects [14].Therefore using total capacitance is not a good approximation.A widely used method is to calculate an effective capacitance for the wire,and connect it as a load to the buffer.The calculation consists of following steps (details see [9]):1.For the wire which is connected to the buffer as a load,use analytical expressions to calculate the input admittance Y (s ).2.Expand Y (s )into Taylor series and keep first three terms,i.e.,Y (s )=y 1s +y 2s 2+y 3s3.e the technique in [13]to determine an equivalent CRC Π-model which matches Y (s ).4.Calculate the effective capacitance C eff for this CRC Π−model using technique in [14].For the delay model we described,we have the following observation.Observation 1Shift time S is additive,i.e.,if an input wave-form (0,T in )causes an output waveform (S out ,T out ),then an-other input waveform (S in ,T in )will cause an output waveform (S in +S out ,T out ).For the buffer macro-model in equations (1-2),this is obvi-ous,since delays are not depending on input shift time.In the delay calculation for a wire,suppose the final voltage response is:V out (s )=V in (s )H (s ),where V in (s )is the input voltage response,and H (s )is the transfer function.Assume the cor-responding voltage response in the time domain is v out (t ).If the input signal is shifted by S ,the new input signal will be Vin(s )=e −s S V in (s ).The corresponding output voltage is then Vout (s )=e −s S V in (s )H (s )=e −s S V out (s ).The new volt-age response in the time domain is thus the original voltage response v out (t )shifted by S .2A direct result of this observation is that we can specify an input waveform as (0,T in )instead of (S in ,T in )for either a buffer or a wire,or a system contains both.This is especially useful when we use SPICE simulations in our buffer insertion algorithm.For the wire-buffer system shown in Figure 2(a),the output waveform is uniquely determined by the wire length and the input waveform (thus T in only).Because of buffer in-sertion,wires are divided into smaller segments,where each segment is connecting two buffers.Suppose a wire has L max possible buffer locations which are uniformly distributed.For any possible buffer insertion scheme,the wire length of any segment can be any from 1to L max +1in some units.There-fore we can build a lookup table for each wire-buffer system of length from 1to L max +1.The input to the lookup table is a set of transition times {(T in )1,(T in )2,···},and the out-put is a set of pairs {(S out ,T out )1,(S out ,T out )2,···}.For any possible wire connection encountered in buffer insertion,given an input waveform (0,T in )we can easily determine its output waveform by table lookup.3.Buffer Insertion is a Shortest Path Prob-lemThe problem we want to solve can be stated as follows:Given :a wire of length L ,width W ,driver resistance R D ,and load capacitance C L .Determine :the optimal number of buffers and their positions on the wire such that delay through the wire is minimized.We claim that this problem can be formulated as a shortest path problem,therefore the optimal solution can be deter-mined through the shortest path algorithm.Although we will use accurate delay models for buffer insertion,to illustrate this claim,we first start from the simple Elmore delay ter on in this section,we show that the claim is true under accurate delay models.3.1.Buffer Insertion under the Elmore De-lay ModelFor a wire shown in Figure 3(a),it has three possible buffer locations.Buffers can be inserted at these locations depending on whether it helps to reduce delay.We will determine the optimal buffer insertion through a graph.CLR D(a)(b)C LR DFigure 3.(a).A wire has three buffer locations.(b).Bufferinsertion is a shortest path problem.Weights on edges represent delays.The highlighted path a-b-c-e is the shortest path.(c).Buffer insertion scheme corresponds to the shortest path a-b-c-e .As shown in Figure 3(b),we construct a graph where a is the source node which represents the driver end,e is the sink node represents the load end.Nodes b,c,d represent three possible buffer locations.Starting from left to right,we con-nect the current node to all the nodes on its right by directed edges.Each edge corresponds to a possible wire connection between two buffers (hereafter,for notational convenience,we treat both driver and load as buffers).For each edge we are going to connect,its wire length,driver and load are known,so it is straight forward to calculate its delay using the El-more delay model.We assign the delay value as a weight to the edge.For example,the edge connecting node a and c has weight 3.5,which means the delay for the wire connecting from the source to the second buffer is 3.5units.After all edges areassigned with weights,the graph construction is complete.We therefore obtain a direct acyclic graph (DAG).In the DAG,each path from the source node a to the sink node e represents a buffer insertion scheme.For example,the highlighted path a-b-c-e represents a buffer insertion scheme shown in Figure 3(c),where two buffers are inserted into first two buffer locations,and there is no buffer at the third posi-tion.By summing up all the edge weights along the path,each path is thus associated with a path delay,which represents the delay of the correspondent buffer insertion scheme.Among all paths,the path a-b-c-e has the shortest delay.Therefore the buffer insertion scheme represented by the path a-b-c-e is the optimal solution.3.2.Buffer Insertion under Accurate Delay ModelsUnder accurate delay models,signals can not be fully char-acterized by a single delay value like in the Elmore delay model.As we mentioned in section 2.,a signal can be ac-curately represented by a finite ramp (S,T ).Therefore those edge weights shown in Figure 3(b)are no longer meaningful under accurate delay models.For the buffer insertion in Fig-ure 3(a),we will construct a similar but more complicated graph and show that the buffer insertion problem can still be described as a shortest path problem.For notational convenience,we use level 0to represent the driver position,and level 4to represent the load position.Lev-els 1to 3represent three possible buffer locations.Level 5represents the position where we insert a sink node f .There will be more than one node at each level.Note that if there is a wire connecting from a node at level l 1to l 2,the wire length is l 2−l 1.Before we construct the DAG,we assume there are T max number of transition time bins TIME[1..T max ]which are num-bered from 1to T max .TIME[1]represents the fastest transi-tion time,and TIME[T max ]represents the slowest transition time.All these transition times are in ascending order.We then create T max nodes at each level from 0to 4,and these nodes at the same level are numbered from 1to T max .Each node with index i at a certain level is associated with an out-put transition time for a possible connection from a node on its left to this level.The output transition time of such con-nection is TIME[i ].Furthermore,TIME[i ]also serves as the input transition time of a connection from this level to a node on its right.We construct the graph in the topological order.First we assume a input transition time T in for the source.We then pick a node i as the source node at level 0such that TIME[i ]is the closest to T in .Assume there exist connections from this node to a node at each level on its right.We can calculate the output waveform (S out ,T out )for each assumed connection (not yet connected),since the wire length and input waveform (0,T in )are known.The calculation can be done either through the analytical delay model or through the lookup table based on SPICE simulations (see section 2.).Then we make the real connection from the source node to a node at each level.The node index k at each level is determined such that T out matches TIME[k ].The edge weight is assigned with S out .By repeating a similar process to nodes level by level,all the nodes except for those at level 4can be connected to some nodes on its right levels.In Figure 4,all nodes which have been connected through edges are shown as small circles,and those nodes which are not connected by any edges are shown as dots.Finally,we connect all small circles at level 4(nodes e1,e2,...,e7)to the sink node f .Since each circle really represents a transition time,we can assign each edge with a weight which is a half of the transition time.We thus have a DAG shown in Figure 4.Note that except for those edges connecting from level 4to level 5where the edge weights are half of the transition times,all the weights represent shift times.By summing up all the weights along a path from the source to the sink,we will obtain a delay value associated with this path,since delay is equal to the shift time plus a half of the transition time.For exam-ple,the highlighted path a-b1-c1-e2-f in Figure 4has delayLevel 01324512::::aTmaxFigure 4.Direct acyclic graph for buffer insertion under accuratedelay models.Except for these edges connecting from level 4to 5whose weights denote half of transition times,all edge weights represent shift times.6,which is the shortest path in the graph.Therefore its cor-respondent buffer insertion scheme (for illustration purpose,it is the same as the one shown in Figure 3(c))is the optimal solution.Note that there is no guarantee that this buffer inser-tion scheme happens to have the fastest transition.In fact,a different path a-b1-c1-d1-e1-f has the fastest transition paring two DAGs shown in Figures 3(denote it as DAG Elmore)and Figure 4(denote it as DAG Accurate),re-spectively,they have the following different features.1.DAG Accurate has a lot more nodes than DAG Elmore,but not all of them are connected with other nodes.In DAG Elmore,all nodes are connected with edges.2.In DAG Accurate,edge weights represent shift times or transition times,where as in DAG Elmore,edge weights represent delays.Despite these difference,both graphs can be used to determine the optimal solution through the shortest path algorithm.Remark 1So far the optimization objective for buffer inser-tion is to minimize delay.In fact since our approach has taken both transition time and shift time into consideration,it is easy to consider some other optimization objectives.We can minimize the final transition time (i.e.,require a fastest tran-sition).This can be also shown as a shortest path problem.We need modify the graph in Figure 4such that only these edges from level 4to level 5are assigned with weights (half of the transition times),and all other edges are assigned with weights 0.The shortest path is thus the path a-b1-c1-d1-e1-f (see Figure 4).It corresponds to a buffer insertion scheme where buffers are inserted at all possible locations.Remark 2It is also easy to consider a constraint on the final transition time.For example,for the problem in Figure 3(a),we require that the final transition time should be less than 14units.In this case,nodes e6and e7at level 4which have transition times greater than 14are not allowed in the solution path.We assign ∞as weights for edges connecting from e6and e7to f .In this example,the shortest path is still a-b1-c1-e2-f .In fact,the transition time constraint can be considered anywhere in the graph.4.Efficient Algorithm for Buffer InsertionWe can follow the idea in the previous section by construct-ing the graph in topological order,then using the shortest path algorithm to find the optimal solution.However,as we have already seen in Figure 4,lots of nodes are wasted in this way,since they will not be connected to any other nodes.Those unconnected nodes will waste lots of memory.In this section,we present an efficient algorithm,where nodes are created only when they are needed.At the same time,the shortest pathalgorithm is implicitly implemented in our algorithm.After the graph is constructed,we only have to look at these nodes at level L max +1and choose one according to the optimiza-tion objective we use.The shortest path can then be obtained by backtracking.A pseudo-code of our algorithm is shown in Figure 5.Input:L max -#of buffer locationsTIME[1..T max ]-transition time binsOutput:S [0..L max +1]-sets of nodes Algorithm BUILD GRAPH1.let all sets S [0..L max +1]be empty2.create source node n 03.S [0]={n 0}4.for i =0to L max +15.while (S [i ]=0)6.pick a node n ∈S [i ]7.S [i ]=S [i ]−n8.let l be level of node n9.let (s in ,t in )be waveform of n 10.for k =l to L max +pute output (s out ,t out )for a wireof length k −l and input (0,t in )12.if(∃x ∈S [k ]&&x.(t x )=t out )13.if(s out +s in <x.(s x ))14.x.(s x )=s out +s in 15.let n be predecessor of x 16.else 17.create node y of level k andoutput (s out +s in ,t out )18.let n be predecessor of y 19.S [k ]=S [k ]∪y Figure 5.Pseudo-code of Algorithm BUILD GRAPH .In algorithm BUILD GRAPH ,a node contains informa-tion such as its level,the predecessor node and waveform (S,T ),where S is the shift time,and TIME[T ]is the tran-sition time.The waveform of a node n can be extracted as n.(S,T ),or n.(S )and n.(T ).The running time complexity ofour algorithm is O (L 2max T 2max ).Remark 3In lines 12-15,if there are two edges connecting to the same node (i.e.,these two waveforms have the same transition time),we only keep the one which has faster shift time.The one which has slower shift time will be removed or not be connected,since it definitely causes inferior waveform in later stages.As a result,we can keep as many as possible potential good connections,and this is a better improvement than [12].Moreover,by doing this,the backtracking path is uniquely determined in our algorithm.Remark 4It is easy to extend our algorithm for simultane-ous buffer insertion and wire-sizing.For wire-sizing,we specify a width library from which a width is chosen for each wire seg-ment.For example,the width library has N different choices {W 1,W 2,...W N }.To accommodate wire-sizing,we have the following modifications.1.Every connection in the graph has a width which can be chosen from library {W 1,W 2,...W N }.2.For each wire-buffer system in Figure 2(a),given the wire length,width and an input waveform (0,T in ),we can com-pute the output waveform (S out ,T out ).This can be done using either the analytical delay model or a lookup table based on SPICE simulations.3.Modify the algorithm BUILD GRAPH by adding a loop between step 10and 11as follows.10.for k =l to L max +111.for w =1to N12.compute output (s out ,t out )for a wire of length k −l ,width W w and input (0,t in )By considering wire-sizing,the graph will be more compli-cated,since each edge in the original graph will be split into N different edges.However,the shortest path still gives the optimal solution.The running time complexity of the al-gorithm for simultaneous buffer insertion and wire-sizing is O(L2max T2max N2).By using the similar idea,we can extend our algorithm fur-ther to considering buffer sizing with simultaneous buffer in-sertion and wire-sizing.The running time complexity is still polynomial.5.Experimental ResultsIn this section,we present some experimental results on buffer insertion.The wire parameters are chosen as fol-lows:wire width w=1.035µm,unit square resistance r0= 0.092Ω/2,unit area capacitance c0=0.03205fF/µm,driver resistance R D=28.3Ω,load capacitance C L=0.016pF, wire length L=16,000µm,unit length fringing capaci-tance c f=0.0877fF/µm,and unit length self inductance l0=0.73913pH/µm.For buffers,we choosefixed channel width and length for the NMOS transistor as5µm and0.5µm, respectively.For such a long wire,we assume it has L max number of locations where we can insert buffers.We choose T max=200,i.e.,there are200transition time bins.For the input signal,we specify a ramp by choosing S=0,T=1ps. Throughout our experiments,we use the analytical delay mod-els outlined in section2..Without inserting buffers,the wire has delay T50%=1.6179ns and transition time T=3.4298ns.In the following experiments,we study two different opti-mization objectives.One is to minimize50%delay(i.e.,short-est delay),and the other is to minimize the transition time (i.e.,fastest transition).Both shift time and transition time are measured at thefinal load end.L max#T50%(ns)T(ns)Running Time(s)72 1.2601 1.13940.01152 1.2028 1.20080.03312 1.19810.97340.15633 1.16660.9237 1.061273 1.14440.9237 5.90Table1.Optimal buffer insertion to minimize50%delay.For the results in Table1,we determine the optimal buffer insertion such that delay is minimized.As L max increases,the optimal solution seems converge,and the optimal number of buffers is3.The optimal buffer insertion scheme for L max= 127is shown in Figure6(a).The running times shown in Table 1do not include the time to build a lookup table.However, since we use the analytical delay model outlined in section2., building a lookup table is very fast.For L max=127which is the most time consuming experiment,the running time is about6s.Notice that all problems can be solved within a few seconds,therefore our algorithm is very efficient.L max#T50%(ns)T(ns)73 1.33810.3592155 1.28150.1635314 1.32170.1635636 1.30180.09671278 1.29700.0670Table2.The optimal buffer insertion to minimize transition time.In Table2,we summarize the result where the optimal buffer insertion is chosen such thatthefinal transition time is mini-mized.It is interesting to note that if we cantolerate a little bit longer delays,we can obtain results which have much faster transition times than those shown in Table1,with the cost of adding few more buffers.The buffer insertion scheme for L max=127is shown in Figure6(b).6.ConclusionWe have presented a graph based algorithm for optimal buffer insertion.The optimal buffer insertion problem can(a)(b)Figure6.The optimal buffer insertion results.(a).Minimal delay.(b).Minimal transition time.All lengths are in mm.be reduced to a shortest path problem.In our algorithm,sig-nals are accurately represented by afinite ramp which has two parameters,shift time and transition times.Any accurate delay model including SPICE simulations can be used in our algorithm.Our algorithm can be easily extended to deal with simultaneous buffer insertion and wire-sizing.Our algorithm is very efficient,and the optimal solution can be obtained within a few seconds.References[1] C.J.Alpert,A.Devgan and S.T.Quay,Buffer Insertion withAccurate Gate and Interconnect Delay Computation,Proc.ACM/IEEE Design Automation Conf.,pp.479-484,1999. [2] C.J.Alpert,A.Devgan and S.T.Quay,Buffer Insertion for Noiseand Delay Optimization,Proc.ACM/IEEE Design Automation Conf.,pp.362-367,1997.[3] C.-P.Chen and D.F.Wong,Optimal Wire-sizing Function withFringing Capacitance Consideration,Proc.ACM/IEEE Design Automation Conf.,pp.604-607,1997.[4] C.-P.Chen and N.Menezes,Noise-Aware Repeater Insertionand Wire Sizing for On-Chip Interconnect Using Hierarchi-cal Moment-Matching,Proc.ACM/IEEE Design Automation Conf.,pp.502-506,1999.[5] C.C.N.Chu and D.F.Wong,Closed Form Solution to Simulta-neously Buffer Insertion/Sizing and Wire Sizing,Int.Symp.on Physical Design,pp.192-197,1997.[6] C.C.N.Chu and D.F.Wong,A New Approach to SimultaneousBuffer Insertion and Wire Sizing,Proc.IEEE Int.Conf.on Computer Aided Design,pp.614-621,1997.[7]W.C.Elmore,The Transient Response of Damped Linear Net-work with Particular Regard to Wide-band Amplifier,Journal of Applied Physics,vol.19,pp.55-63,1948.[8]Y.Gao and D.F.Wong,Wire-Sizing Optimization with In-ductance Consideration Using Transmission Line Model,IEEE Trans.on Computer-Aided Design,1999.[9]Y.Gao and D.F.Wong,A Fast and Accurate Delay EstimationMethod for Buffered Interconnects,Proc.IEEE Asia and South-Pacific Design Automation Conf.,2001.[10] A.B.Kahng and S.Muddu,Delay Models for MCM Intercon-nects When Response is Non-monotone,IEEE Multi-Chip Mod-ule Conf.,pp.102-107,1997.[11]J.Lillis,C.-K.Cheng and T.-T.Lin,Optimal and EfficientBuffer Insertion and Wire Sizing,Proc.Custom Integrated Cir-cuits Conf.,pp.259-262,1995.[12]N.Menezes and C.-P.Chen,Spec-Based Repeater Insertionand Wire Sizing for On-Chip Interconnect,Proc.Intl.Conf.on VLSI Design,pp.476-483,1999.[13]P.R.O’Brien and T.L.Savarino,Modeling the Driving PointCharacteristic of Resistive Interconnect for Accurate Delay Es-timation,Proc.IEEE Intl.Conf.on Computer Aided Design, pp.512-515,1989.[14]J.Qian,S.Pullela and L.Pillage,Modeling the“EffectiveCapacitance”for the RC Interconnect of CMOS Gates,IEEE Trans.on Computer-Aided Design,Vol.13,No.12,pp.1526-1535,1994.[15]L.P.P.P.van Ginneken,Buffer Placement in Distributed RC-tree Networks for Minimal Elmore Delay,Intl.Symp.Circuits and Systems,pp.865-868,1990.[16]N.H.E.Weste and K.Eshraghian,Principles of CMOS VLSIDesign,2nd Edition,Addison-Wesley Publishing Company, 1993.[17]Q.Yu and E.S.Kuh,Exact Moment Matching Model of Trans-mission Lines and Application to Interconnect Delay Estima-tion,IEEE Trans.on VLSI,Vol.3,No.2,pp.311-322,1995.。