最新文章列表

Minimum Spanning Tree

1.  Definition: Given an undirected graph G with positive edge weights (connected). A spanning tree of G is a subgraph T that is connected and acyclic. A minimum spanning tree is a min weight spannin ...
leonzhx 评论(0) 有1302人浏览 2014-01-07 19:11

Huffman Codes

1.  Binary Codes:     -- Maps each character of an alphabet Sigma to a binary string.     -- Example: Sigma = a-z and various punctuation (size 32 overall, say)                        Obvious enco ...
leonzhx 评论(0) 有681人浏览 2013-10-04 13:04

Prim's MST Algorithm

1.  Informal Goal: Connect a bunch of points together as cheaply as possible.       Blazingly Fast Greedy Algorithms:      - Prim's Algorithm      - Kruskal's algorithm      O(m log n)  m is the ...
leonzhx 评论(0) 有1245人浏览 2013-09-10 15:19

a scheduling application

1. Problem Scenario :     - One shared resource (e.g., a processor).     - Many "jobs" to do (e.g., processes).     Assume: Each job has a:     - weight wj ("priority")     - ...
leonzhx 评论(0) 有1126人浏览 2013-09-10 14:11

Introduction to Greedy Algorithm

1.  Greedy Algorithms : Iteratively make "myopic" decisions, hope everything works out at the end.     Example: Dijkstra's shortest path algorithm (processed each destination once, irrevoca ...
leonzhx 评论(0) 有1104人浏览 2013-09-10 12:25

hdu3894

source: http://acm.hdu.edu.cn/showproblem.php?pid=3894 title :    East and West 这道题贪心就可以解决了,首先找到一条把东西部的点分割开的边 (est, wst),然后从wst开始bfs,直到找到西部的p个点,并把这p个点 到wst的距离放到minp数组里。对于东部里最初有train的点也做类似的操作,但把 这p ...
goAheadtw 评论(0) 有930人浏览 2011-09-30 15:32

最近博客热门TAG

Java(141747) C(73651) C++(68608) SQL(64571) C#(59609) XML(59133) HTML(59043) JavaScript(54918) .net(54785) Web(54513) 工作(54116) Linux(50906) Oracle(49876) 应用服务器(43288) Spring(40812) 编程(39454) Windows(39381) JSP(37542) MySQL(37268) 数据结构(36423)

博客人气排行榜

    博客电子书下载排行

      >>浏览更多下载

      相关资讯

      相关讨论

      Global site tag (gtag.js) - Google Analytics