steiner树 matlab程序,ACO-Steiner :基于蚁群优化策略的最小直角 Steiner 树构造算法...

[1] Carden R C IV, Li J M, Cheng C K. A global router with a theoretical bound on the optimal solution. IEEE Trans. Computer-Aided Design , Feb. 1996, 15: 208--216.

[2] Jing T, Hong X L, Bao H Y, Xu J Y, Gu J. SSTT: Efficient local search for GSI global routing. J. Computer Science

and Technology , 2003, 18(5): 632--639.

[3] Jing T, Hong X L, Xu J Y, Bao H Y, Cheng C K, Gu J. UTACO: A unified timing and congestion optimization algorithm for standard cell global routing. IEEE Trans. CAD , 2004, 23(3): 358--365.

[4] Xiang H, Tang X P, Wong D F. An algorithm for integrated pin assignment and buffer planning. In Proc. ACM/IEEE Design Automation Conf. ( DAC ) , 2002, pp.584--589.

[5] Hong X L, Jing T, Xu J Y, Bao H Y, Gu J. CNB: A critical-network-based timing optimization method for standard cell

global routing. J. Computer Science and Technology , 2003, 18(6): 732--738.

[6] Xu J Y, Hong X L, Jing T, Cai Y C, Gu J. A novel timing-driven global routing algorithm considering coupling effects for high performance circuit design. IEICE Trans. Fundamentals of ECCS , 2003, E86-A(12): 3158--3167.

[7] Wang Y, Hong X L, Jing T, Yang Y, Hu X D, Yan G Y. An efficient low-degree RMST algorithm for VLSI/ULSI physical design. Lecture Notes in Computer Science ( LNCS ) 3254 -Integrated Circuits and System Design , Santorini, Greece, Sept. 2004, pp.442--452.

[8] Xu J Y, Hong X L, Jing T, Cai Y C, Gu J. An efficient hierarchical timing-driven Steiner tree algorithm for global routing. INTEGRATION, VLSI J ., 2003, 35(2): 69--84.

[9] Garey M R, Johnson D S. The rectilinear Steiner tree problem is NP-complete. SIAM Journal on Applied Mathematics , 1977, 32: 826--834.

[10] Hwang F K, Richards D S, Winter P. The Steiner Tree Problem, Annals of Discrete Mathematics. Amsterdam:

North-Holland, The Netherlands, 1992.

[11] Kahng A B, Robins G. A new class of iterative Steiner tree heuristics with good performance. IEEE Trans. Computer-Aided Design , July 1992, 11: 893--902,

[12] Borah M, Owens R M, Irwin M J. An edge-based heuristic for Steiner routing. IEEE Trans. Computer Aided Design , 1994, 13: 1563--1568.

[13] Kahng A B, Mandoiu I I, Zelikovsky A Z. Highly scalable algorithms for rectilinear and octilinear Steiner trees. In Proc. Asia and South Pacific Design Automation Conference ( ASP-DAC ) , Kitakyushu, Japan, 2003, pp.827--833.

[14] Zhou H. Efficient Steiner tree construction based on spanning graphs. In Proc. ACM ISPD , Monterey, CA, USA, 2003, pp.152--157.

[15] Qi Zhu, Hai Zhou, Tong Jing, Xianlong Hong, Yang Yang. Spanning graph-based nonrectilinear Steiner tree algorithms. IEEE Trans. CAD , 2005, 24(7): 1066--1075.

[16] Warme D M, Winter P, Zachariasen M. Exact algorithms for plane Steiner tree problems: A computational study. Technical Report DIKU-TR-98/11, Department of Computer Science, University of Copenhagen, April 1998.

[17] Zachariasen M. Rectilinear full Steiner tree generation. Technical Report DIKU-TR-97/29, Department of Computer Science, University of Copenhagen, December 1997.

[18] Dorigo M, Maniezzo V, Colorni A. The Ant System: Optimization by a colony of cooperating agents. IEEE Trans.

Systems, Man, and Cybernetics---Part B , 1996, 26(1): 1--13.

[19] Das S, Gosavi S V, Hsu W H, Vaze S A. An ant colony approach for the Steiner tree problem. In Proc. Genetic and

Evolutionary Computing Conference , New York City, New York, 2002.

[20] Ganley J L. Computing optimal rectilinear Steiner trees: A survey and experimental evaluation. Discrete Applied Mathematics , 1998, 89: 161--171.

[21] Hanan M. On Steiner's problem with rectilinear distance. SIAM Journal on Applied Mathematics , 1966, 14: 255--265.

[22] Yang Y Y, Wing O. Suboptimal algorithm for a wire routing problem. IEEE Trans. Circuit Theory , September 1972, 19: 508--510.

[23] Ganley J L, Cohoon J P. Routing a multi-terminal critical net: Steiner tree construction in the presence of obstacles. In Proc. IEEE International Symposium on Circuits and Systems , London, UK, 1994, pp.113--116.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是用Matlab实现Prim算法求解最小生成的代码: ```matlab function [MT, cost] = prim(graph) % Prim算法求解最小生成 % 输入:图的邻接矩阵graph % 输出:最小生成MT和生成的权值cost n = size(graph, 1); % 图中节点数 cost = Inf(1, n); % cost(i)表示节点i到生成的最短距离 visited = false(1, n); % visited(i)表示节点i是否已在生成中 parent = zeros(1, n); % parent(i)表示节点i在生成中的父节点 MT = zeros(n); % 最小生成的邻接矩阵 % 从节点1开始,将其加入生成 visited(1) = true; cost(1) = 0; for i = 2:n cost(i) = graph(1, i); parent(i) = 1; end % 重复执行n-1次 for i = 1:n-1 % 选取未加入生成且到生成距离最短的节点j min_cost = Inf; for j = 1:n if ~visited(j) && cost(j) < min_cost min_cost = cost(j); k = j; end end % 将节点k加入生成 visited(k) = true; MT(k, parent(k)) = graph(k, parent(k)); MT(parent(k), k) = graph(parent(k), k); % 更新cost和parent for j = 1:n if ~visited(j) && graph(k, j) < cost(j) cost(j) = graph(k, j); parent(j) = k; end end end % 计算生成的权值 cost = sum(cost); ``` 接下来,我们根据Steiner最短性质,将Prim算法求解出的最小生成MT进行分解。 首先,我们需要找到MT中的所有叶节点,即度数为1的节点。这可以通过以下代码实现: ```matlab degrees = sum(MT, 2); leaves = find(degrees == 1)'; ``` 然后,对于每个叶节点,我们需要找到与其相连的最近的非叶节点,即其父节点。这可以通过以下代码实现: ```matlab parents = zeros(1, length(leaves)); for i = 1:length(leaves) node = leaves(i); parent = find(MT(node, :)); while degrees(parent) == 2 % 如果父节点是叶节点,则继续向上找 parent = find(MT(parent, :)); end parents(i) = parent; end ``` 最后,我们需要将MT中的每个非叶节点都替换为其与其子中所有叶节点的Steiner点。这可以通过以下代码实现: ```matlab for i = 1:length(parents) parent = parents(i); subtree = find(MT(parent, :)); subtree(subtree == parent) = []; % 去掉父节点 steiner = subtree(1); for j = 2:length(subtree) steiner = steiner_point(graph, steiner, subtree(j)); end MT(parent, subtree) = 0; MT(subtree, parent) = 0; MT(parent, steiner) = graph(parent, steiner); MT(steiner, parent) = graph(steiner, parent); end ``` 其中,steiner_point函数是计算两个节点之间的Steiner点的函数,可以使用任何已知的Steiner算法实现。 最终,MT中的每个非叶节点都被替换为其与其子中所有叶节点的Steiner点,即得到了MT的分解。完整的代码如下: ```matlab function [MT, cost] = steiner_prim(graph) % Prim算法求解最小生成 % 输入:图的邻接矩阵graph % 输出:最小生成MT和生成的权值 n = size(graph, 1); % 图中节点数 cost = Inf(1, n); % cost(i)表示节点i到生成的最短距离 visited = false(1, n); % visited(i)表示节点i是否已在生成中 parent = zeros(1, n); % parent(i)表示节点i在生成中的父节点 MT = zeros(n); % 最小生成的邻接矩阵 % 从节点1开始,将其加入生成 visited(1) = true; cost(1) = 0; for i = 2:n cost(i) = graph(1, i); parent(i) = 1; end % 重复执行n-1次 for i = 1:n-1 % 选取未加入生成且到生成距离最短的节点j min_cost = Inf; for j = 1:n if ~visited(j) && cost(j) < min_cost min_cost = cost(j); k = j; end end % 将节点k加入生成 visited(k) = true; MT(k, parent(k)) = graph(k, parent(k)); MT(parent(k), k) = graph(parent(k), k); % 更新cost和parent for j = 1:n if ~visited(j) && graph(k, j) < cost(j) cost(j) = graph(k, j); parent(j) = k; end end end % 计算生成的权值 cost = sum(cost); % 分解MT degrees = sum(MT, 2); leaves = find(degrees == 1)'; parents = zeros(1, length(leaves)); for i = 1:length(leaves) node = leaves(i); parent = find(MT(node, :)); while degrees(parent) == 2 % 如果父节点是叶节点,则继续向上找 parent = find(MT(parent, :)); end parents(i) = parent; end for i = 1:length(parents) parent = parents(i); subtree = find(MT(parent, :)); subtree(subtree == parent) = []; % 去掉父节点 steiner = subtree(1); for j = 2:length(subtree) steiner = steiner_point(graph, steiner, subtree(j)); end MT(parent, subtree) = 0; MT(subtree, parent) = 0; MT(parent, steiner) = graph(parent, steiner); MT(steiner, parent) = graph(steiner, parent); end ``` 需要注意的是,由于Steiner点的计算通常比较耗时,因此在实际应用中可能需要使用更高效的算法来计算Steiner点。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值