• 沒有找到結果。

Divide and Conquer II

N/A
N/A
Protected

Academic year: 2022

Share "Divide and Conquer II"

Copied!
41
0
0

全文

(1)

Michael Tsai 2011/09/23

(2)

矩陣相乘

(3)

矩陣相乘 – 基本法

n個 n個

Running time = ?

(4)

矩陣相乘 – D&C嘗試一

Recursive case:

(5)

矩陣相乘 – D&C嘗試一

Base case:

(6)

矩陣相乘 – D&C嘗試一

(7)

Base case

Recursive case

Combine

(8)

矩陣相乘 – Strassen’s method

德國數學家 Volker Strassen 攝於2009年

(9)

矩陣相乘 – Strassen’s method

(10)

矩陣相乘 – Strassen’s method

Not at all obvious

(11)

矩陣相乘 – Strassen’s method

Not at all obvious

(12)

矩陣相乘 – Strassen’s method

(13)

接下來…

問題: 我們要怎麼解遞迴式?

取代法

遞迴樹法

大師定理法

http://www.origin-zero.com/senzi/JOKE1.jpg

(14)

取代法

猜答案的形式 用數學歸納法證明此

形式成立 得到遞迴式的解 成功

失敗

(15)

取代法-例子

(16)

取代法-例子

(17)

取代法-例子

(18)

取代法-例子

(19)

取代法-怎麼猜?

靠經驗.

跟沒講一樣.

一些小方法:

1. 根據以前看過類似的遞迴式來猜測

2. 使用等一下要介紹的遞迴樹

3. 證明比較鬆的upper bound或lower bound來慢慢 接近tight bound

老工匠

(20)

取代法-小技巧1

(21)

取代法-小技巧1

(22)

取代法–小技巧2

暫時不管flooring

(23)

遞迴樹法

畫出遞迴樹

用數學歸納法證明此 解成立

用比較不嚴謹的方法 加總得到解

(24)

………

(25)

(26)

遞迴樹法–例子1

(27)

遞迴樹法–例子2

(28)

遞迴樹法–例子2

(29)

(30)

大師定理

Which one is polynomially larger/smaller?

The same order

(31)

(32)

大師定理-例子2

(33)

大師定理-更多例子

上台解題時間…

(34)

取數問題

(35)

取數問題

(36)

取數問題

n個數

小於等於a的

某數a (pivot)

大於a的

(37)

取數問題

(38)

取數問題

差不多的中位數:

1. 把n個數分成很多大小為5個的sub list (大約共 有n/5個sub list

2. 這些sub list中各自找中位數

3. 找出n/5個中位數中的中位數

此為差不多的中位數

(39)

取數問題

中位數的中位數

(40)

取數問題

(41)

作業一上線

5 problem sets, 100 points

1 programming assignment, 4 writing assignments

Judge girl system accounts are sent last night

Please give it a try

Due 2 weeks from next Tuesday (Oct. 11)

參考文獻

相關文件

Then, we extend LinUCB to a novel algorithm, called Linear Upper Confidence Bound with Pseudo Reward (LinUCBPR), which digests the observed contexts to choose actions more

We adapt some existing contextual bandit algorithms for our CBMA problem, and developed the new Pairwise Regression with Upper Confidence Bound (PairUCB) algorithm which addresses

Textbook Chapter 4.3 – The substitution method for solving recurrences Textbook Chapter 4.4 – The recursion-tree method for solving recurrences Textbook Chapter 4.5 – The master

Textbook Chapter 33.4 – Finding the closest pair of points.. Closest Pair of

Textbook Chapter 4.3 – The substitution method for solving recurrences Textbook Chapter 4.4 – The recursion-tree method for solving recurrences Textbook Chapter 4.5 – The master

Algorithm Design Methods Divide & Conquer..

• Schemes for bounded path length minimal spanning tree with upper (and lower) bound control are presented. – With applications to

(a) In a compact metric space X, every sequence contains a subsequence converging to a point in X, i.e... Then X has the leat-upper-bound property if and only if every Cauchy

– Determine whether it is possible to design a distributed exact MST algorithm with better work complexity than GHS and obt ain a lower bound on work

Lower bound on the cost of any algorithm in the GST model is generalized from the interleave lower bound of BST 3 to search trees on

• Progress of using circuit complexity to prove exponential lower bounds for NP-complete problems has been slow.. – As of January 2006, the best lower bound is 5n

The performance guarantees of real-time garbage collectors and the free-page replenishment mechanism are based on a constant α, i.e., a lower-bound on the number of free pages that

Other vegetable materials plaits and similar products, whether or not assembled into strips; products of other vegetable materials, bound together in parallel strands or woven,

For periodic sequence (with period n) that has exactly one of each 1 ∼ n in any group, we can find the least upper bound of the number of converged-routes... Elementary number

If the subset has constant extrinsic curvature and is a smooth manifold (possibly with boundary), then it has an explicit intrinsic lower curvature bound which is sharp in

The function f (m, n) is introduced as the minimum number of lolis required in a loli field problem. We also obtained a detailed specific result of some numbers and the upper bound of

Proposition 3.2.21 以及 Proposition 3.2.22, metric space 的 compact subset closed bounded.. least upper bound 以及 greatest lower

if left_sum>=right_sum and left_sum>=cross_sum return (left_low,left_high,left_sum). else if right_sum>=left_sum and right_sum>=cross_sum

Let and be constants, let be a function, and let be defined on the nonnegative integers by the recu rrence. where we interpret to mean either

Strassen’s method is not as numerically stable as 基本法..

主定理 (Master Theorem) 主定理 (Master Theorem). reference:

Convex optimization, compressed sensing, ℓ 1 -regularization, nuclear/trace norm, regression, variable selection, sensor network localization, approximation accuracy, proximal

Inferring a chemical structure from a feature vector based on frequency of labeled-paths and small fragments, Branch-and-Bound Chemical compound Inference from