Empirical Study on Finding Minimal Spanning Tree S. J. Shyu 4/29/2012.

Slides:



Advertisements
Similar presentations
: Arrange the Numbers ★★★☆☆ 題組: Contest Archive with Online Judge 題號: 11481: Arrange the Numbers 解題者:李重儀 解題日期: 2008 年 9 月 13 日 題意: 將數列 {1,2,3, …,N}
Advertisements

布林代數的應用--- 全及項(最小項)和全或項(最大項)展開式
: ACM CONTEST AND BLACKOUT ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10600: ACM CONTEST AND BLACKOUT 解題者:洪光燦 解題日期: 2006 年 6 月 12 日 題意:每個學校都需要電力,但是只有一台發電.
Instructor: Ching-Chi Lin 林清池 助理教授
生科二 謝朝茂 生科二 朱利亞 Final project 1.
序列分析工具:MDDLogo 謝勝任 林宗慶 指導教授:李宗夷 教授.
指導教授:陳淑媛 學生:李宗叡 李卿輔.  利用下列三種方法 (Edge Detection 、 Local Binary Pattern 、 Structured Local Edge Pattern) 來判斷是否為場景變換,以方便使用者來 找出所要的片段。
: Boxes ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11003: Boxes 解題者:蔡欣燁 解題日期: 2007 年 3 月 19 日.
 Pearson Education, Inc. All rights reserved Formulating Algorithms: Sentinel- Controlled Repetition Example: – 計算任意數目個學生的平均成績 Sentinel-controlled.
Minimum Spanning Trees. 2 有權重的圖 * 很多圖形演算法的問題都假設其輸入為有權重 的圖形. * 這裡我們假設權重都定在邊上面, 且權重值都 為正, 例如請參考上圖所顯示的圖形. a b c d e f gh G=(V,E)
: Road Construction ★★★☆☆ 題組: Contest Archive with Online Judge 題號: 10724: Road Construction 解題者:徐文宏 解題日期: 2011 年 4 月 20 日 題意:給一個座標圖 (-1000~1000)
Lecture 8 Median and Order Statistics. Median and Order Statistics2 Order Statistics 問題敘述 在 n 個元素中,找出其中第 i 小的元素。 i = 1 ,即為找最小值。 i = n ,即為找最大值。 i = 或 ,即為找中位數。
Graph V(G 1 )={0, 1, 2, 3, 4, 5, 6, 7, 8, 9} E(G 1 )={(0, 2), (0, 3), (1, 4), (2, 3), (2, 5), (2, 6), (3, 6), (3, 7), (4, 7), (5, 6), (5,
8.1 何謂高度平衡二元搜尋樹 8.2 高度平衡二元搜尋樹的加入 8.3 高度平衡二元搜尋樹的刪除
: The Playboy Chimp ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10611: The Playboy Chimp 解題者:蔡昇宇 解題日期: 2010 年 2 月 28 日 題意:給一已排序的數列 S( 升冪.
Graph Theory Graph theory is the study of the properties of graph structures. It provides us with a language with which to talk about graphs.
: Nails ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 11096:Nails 解題者:蘇育彣 解題日期: 2007 年 3 月 13 日 題意:給定一個正整數 n (0
 Pearson Education, Inc. All rights reserved break and continue Statements Break and continue statements – Alter flow of control break.
10215: The Largest/Smallest Box... ★ 題組: Problem Set Archive with Online Judge 題號: 10215: The Largest/Smallest Box... 解題者:張維珊 解題日期: 2006 年 4 月 17 日 題意:
All-Pairs Shortest Paths
第一章 演算法:效率、分析與量級 1.1演算法 1.2發展有效率演算法的重要性 1.3演算法的分析 1.4量級(Order)
南投縣社區大學 Excel 實務應用入門 講師 : 林泉成
Java class Outline for loop while loop do while loop How to choose? Nested loop.
: Walking on a Grid ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 10913: Walking on a Grid 解題者:陳盈村 解題日期: 2008 年 5 月 2 日 題意:給定一個 N*N 矩陣,題目要求依照.
1 結合 Hull-White 模型與求面積法 評價雪球型債劵 報告者 : 顏妤芳. 2 大綱 簡介雪球型債劵契約 研究方法 評價雪球型債劵 -第一步驟:計算各節點的最大最小可能債息 -第二步驟:考慮票面利率不得低於 0% -第三步驟:計算債劵現值及考慮贖回條款.
Modern Information Retrieval 第三組 陳國富 王俊傑 夏希璿.
: Make a Crystal ★★★★★ 題組: Problem Set Archive with Online Judge 題號: 11094: Make a Crystal 解題者:呂彥澂 解題日期: 2007 年 4 月 17 日 題意:在 N*N*N 的空間中 (N 為偶數.
: The largest Clique ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11324: The largest Clique 解題者:李重儀 解題日期: 2008 年 11 月 24 日 題意: 簡單來說,給你一個 directed.
: Next Same-Factored ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: : Next Same-Factored 解題者:蔡宗翰 解題日期: 2008 年 5 月 9 日 題意: 給一個整數 X ,求出.
: IIUC HexWorld ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11092: IIUC HexWorld 解題者:江秀桂 解題日期: 2007 年 3 月 6 日.
: Happy Number ★ ? 題組: Problem Set Archive with Online Judge 題號: 10591: Happy Number 解題者:陳瀅文 解題日期: 2006 年 6 月 6 日 題意:判斷一個正整數 N 是否為 Happy Number.
7.1 背景介紹 7.2 多解析度擴展 7.3 一維小波轉換 7.4 快速小波轉換 7.5 二維小波轉換 7.6 小波封包
: Playing War ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11061: Playing War 解題者:陳盈村 解題日期: 2008 年 3 月 14 日 題意:在此遊戲中,有一類玩家一旦開始攻擊, 就會不停攻擊同一對手,直到全滅對方或無法再.
Johnson’s algorithm Johnson’s演算法可用於計算All pairs shortest path問題。
: Ahoy, Pirates! ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11402: Ahoy, Pirates! 解題者:李重儀 解題日期: 2008 年 8 月 26 日 題意:有一個海盜島有 N 個海盜,他們的編號 (id)
Single-Source Shortest Paths
LLL 演算法 張圻毓. Outline Algorithm Example Algorithm Input : Linearly independent column vector f 1 ……f n Z n Output : A reduced basis (b 1 ……b n ) of the.
: Placing Lampposts ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10859: Placing Lampposts 解題者:陳志瑜 解題日期: 2011 年 5 月 10 日 題意:美化為 Dhaka City.
: Robot Motion ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: : Robot Motion 解題者:鄭昀旻 解題日期: 2009 年 5 月 20 日 題意:有一機器人會從網格的上(N)方進入, 依網格上之E、W、S、N之指令來行走,題目.
: Efficient Solutions ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11020: Efficient Solutions 解題者:陳宜佐 解題日期: 2007 年 4 月 24 日 題意:給定 M 個 case.
1 An algorithm for finding a shortest vector in a two- dimensional modular lattice An algorithm for finding a shortest vector in a two- dimensional modular.
: A-Sequence ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10930: A-Sequence 解題者:陳盈村 解題日期: 2008 年 5 月 30 日 題意: A-Sequence 需符合以下的條件, 1 ≤ a.
: Beautiful Numbers ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11472: Beautiful Numbers 解題者:邱經達 解題日期: 2011 年 5 月 5 日 題意: 若一個 N 進位的數用到該.
: 05-2 Rendezvous ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11015: 05-2 Rendezvous 解題者:池明洋 解題日期: 2006 年 4 月 16 日 題意: 給 node N 個 , edge.
Minimum Spanning Trees CIS 606 Spring Problem A town has a set of houses and a set of roads. A road connects 2 and only 2 houses. A road connecting.
: GCD - Extreme II ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11426: GCD - Extreme II 解題者:蔡宗翰 解題日期: 2008 年 9 月 19 日 題意: 最多 20,000 組測資,題目會給一個數字.
: Expect the Expected ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11427: Expect the Expected 解題者:李重儀 解題日期: 2008 年 9 月 21 日 題意:玩一種遊戲 (a game.
資料結構實習-十 Binary Tree Traversal.
Chapter 10 m-way 搜尋樹與B-Tree
: Function Overloading ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11032:Function Overloading 解題者:許智祺 解題日期: 2007 年 5 月 8 日 題意:判對輸入之數字是否為.
第7章 圖形與網路 資料結構設計與C++程式應用
Dynamic Programming.
: Help My Brother ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 11033: Help My Brother 解題者: 呂明璁 解題日期: 2007 年 5 月 14 日.
T,  e  T c(e) = 50 G = (V, E), c(e) Minimum Spanning Tree.
5 重複迴圈 5.1 增減運算符號 增量運算符號 減量運算符號
: Problem E Antimatter Ray Clearcutting ★★★★☆ 題組: Problem Set Archive with Online Judge 題號: 11008: Problem E Antimatter Ray Clearcutting 解題者:林王智瑞.
第 6 章 迴圈結構 6-1 計數迴圈 6-1 計數迴圈 6-2 條件迴圈 6-2 條件迴圈 6-3 巢狀迴圈 6-3 巢狀迴圈 6-4 While/End While 迴圈 6-4 While/End While 迴圈 6-5 跳出迴圈 6-5 跳出迴圈 6-6 VB.NET 的錯誤處理 6-6 VB.NET.
Teacher : Ing-Jer Huang TA : Chien-Hung Chen 2015/6/30 Course Embedded Systems : Principles and Implementations Weekly Preview Question CH7.1~CH /12/26.
: Searching for Nessy ★☆☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 11044: Searching for Nessy 解題者:王嘉偉 解題日期: 2007 年 5 月 22 日 題意: 給定 case 數量.
Course 7 貪婪法則 Greedy Approach
: SAM I AM ★★★★☆ 題組: Contest Archive with Online Judge 題號: 11419: SAM I AM 解題者:李重儀 解題日期: 2008 年 9 月 11 日 題意: 簡單的說,就是一個長方形的廟裡面有敵人,然 後可以橫的方向開砲或縱向開砲,每次開砲可以.
:Count the Trees ★★★☆☆ 題組: Problem Set Archive with Online Judge 題號: 10007:Count the Trees 解題者:楊家豪 解題日期: 2006 年 3 月 題意: 給 n 個點, 每一個點有自己的 Label,
: Bee Maja ★★☆☆☆ 題組: Contests Hosting Service with Online Judge 題號: 10182: Bee Maja 解題者:林祺光、李哲宇 解題日期: 2006 年 3 月 26 日 題意:現有兩種六邊形座標系,將甲座標系的某一點轉 為相對應的乙座標系。
:Rings and Glue ★★☆☆☆ 題組: Problem Set Archive with Online Judge 題號: 10301: Rings and Glue 解題者:施博修 解題日期: 2011 年 5 月 18 日 題意:小約翰有了個大麻煩,他不小心將 rings.
Compression and Security of Surveillance Videos Exercise 4 – Line Detection M 陳威佑.
Graph Theory Chapter 8 Hamiltonian Graphs 大葉大學 (Da-Yeh Univ.) 資訊工程系 (Dept. CSIE) 黃鈴玲 (Lingling Huang)
Activity Networks AOV 網路 AOE 網路. AOV 網路 (Activity on Vertx Networks)  為了表示一件工作中,各子工程間的先後 關係,我們可以利用有向圖中的有向邊代 表事情進行的順序,位於一條有向邊終點 的事件必須要等待起點的事情完成後,才 可以進行。
Minimum Spanning Tree Chapter 13.6.
Chapter 10 Independence, Dominance, and Matchings
Minimum Spanning Trees (MSTs)
Presentation transcript:

Empirical Study on Finding Minimal Spanning Tree S. J. Shyu 4/29/2012

演算法 6-5 Kruskal 演算法求最小延展樹 輸入:加權圖形 G = ( V, E ) , | V |= n ; w ( e ) 為邊 e 上的權重值 輸出: T , T 為 G 的最小延展樹 1 T =  ; 2 while (( T 中少於 n  1 條邊 ) && ( E !=  )) 3 { ( u, v ) = E 中最小權重的邊 ; 4 E = E \{( u, v )} ; 5 if (( u, v ) 加入 T 後不致形成迴圈 ) 6 T = T  {( u, v )} ; 7 } 8 if ( T 中邊數 <( n  1)) 印出 ” G 無延展樹! ”; 9 else 輸出 T ; using Loop using Heap using Loop using Union&Find

Questions What are the performances of Kruskal’s algorithm when selecting min. by loop vs. by heap? What are the performances of Kruskal’s algorithm when detecting cycles by loop vs. by union-find?

Experiments CPU: Intel Core i GHz RAM: 4GB OS: Windows 7 Program: BCB 2010

Comparison of Selecting Min. by Loop and Heap in Kruskal’s Algorithm 2% 9% 18%29% 44%90% 1%

Remarks In Kruskal’s algorithm, selecting min. by heap is better than by loop? The superiority of using heap (over loop) grows as %edge increases. – Problems with more edges receive more benefit when using heap (than loop). Detecting cycles by union-find outperforms those by loop? The superiority of using union-find (over loop) grows as %edge decreases. – When %edge decreases, the edges incurring cycles grows so that union-find conquers loop for cycle detection.

Question What are the performances of Kruskal’s and Prim’s algorithms?

Remarks The performance of Prim’s algorithm is robust w.r.t. all kinds of problem instances. The execution time of Kruskal’s algorithm decreases as %edge decreases. Apply Prim’s algorithm when %edge is large, say >0.1 for |V|=10000; whereas Kruskal’s, otherwise.

Programs = Data Structures + Algorithms