Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
PTAS FOR SCHEDULING PROBLEM
Search
Lemma299
August 29, 2019
Science
180
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PTAS FOR SCHEDULING PROBLEM
JOIss2019
使用素材
・紲星あかり ロゴマーク(
https://commons.nicovideo.jp/material/nc177401
)
Lemma299
August 29, 2019
Other Decks in Science
See All in Science
「AIエージェントを作る」とは、何を設計することか
salt2
0
230
データベース02: データベースの概念
trycycle
PRO
2
1.4k
From Prediction to Understanding: Causal Discovery for Data Science and AI Applications
sshimizu2006
0
320
Conwayの法則を"ちゃんと"使うために — 原典でConwayは何を言っていたのか
bonotake
10
7.5k
データベース08: 実体関連モデルとは?
trycycle
PRO
0
1.7k
Where does the rigor go? Research software and the future of trustworthy science.
arfon
0
370
第67回コンピュータビジョン勉強会論文紹介「RoboWheel: A Data Engine from Real-World Human Demonstrations for Cross-Embodiment Robotic Learning」
x_ttyszk
0
240
データベース14: B+木 & ハッシュ索引
trycycle
PRO
0
970
[Relay webinaire eBIS actu n°16] Sélection pour la vitalité des jeunes bovins allaitants et laitiers
institutdelelevage
PRO
0
270
[Webinaire InnOvin] Coup de Chaud : Comment préserver la santé des animaux
institutdelelevage
PRO
0
230
Build your own LLM, Live, with MicroGPT
ianozsvald
0
160
機械学習 - SVM
trycycle
PRO
2
1.3k
Featured
See All Featured
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
410
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
360
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.2k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
The agentic SEO stack - context over prompts
schlessera
0
970
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
59k
Transcript
スケジューリング問題に対する多項式時間近似スキーム PTAS FOR SCHEDULING PROBLEM
PTAS • 多項式時間近似スキーム • 近似率 の解を多項式時間で求められる • APP := 近似解
• OPT := 最適解 2
Scheduling Problem • 終了時刻最小化スケジューリング問題 • 処理時間が設定された N 個のジョブを M 台
のマシンに割り当てるときの最小の終了時間 を求める問題 3
Scheduling Problem • P = {1, 2, 3, 4, 5,
6} • N = #P = 6 • M = 2 4
Scheduling Problem • P = {1, 2, 3, 4, 5,
6} • N = #P = 6 • M = 2 • M[1] = {1, 6, 3} • M[2] = {2, 5, 4} 最小終了時刻 = 11 5
Lower Bound • LB := 最適値のある程度良い下界 6
Lower Bound • LB := 最適値のある程度良い下界 • 全てのマシンに等しく分けられるとき 7
Lower Bound • LB := 最適値のある程度良い下界 • 全てのマシンに等しく分けられるとき • 大きすぎるジョブがある時
8
Lower Bound • LB := 最適値のある程度良い下界 • 全てのマシンに等しく分けられるとき • 大きすぎるジョブがある時
9
Greedy Algorithm • 各ジョブをその時点で一番総処理時間が少な いマシンに貪欲に割り当てるアルゴリズム 10
Greedy Algorithm • 各ジョブをその時点で一番総処理時間が少な いマシンに貪欲に割り当てるアルゴリズム • 高々最適値の二倍の解を求められる. 11
Greedy Algorithm • 最後のジョブ P を割り当てるとき • S := 割り当てる時点での総処理時間
• S ≤ LB ≤ OPT 12
Greedy Algorithm • 最後のジョブ P を割り当てるとき • S := 割り当てる時点での総処理時間
• S ≤ LB ≤ OPT • P ≤ LB ≤ OPT 13
Greedy Algorithm • 最後のジョブ P を割り当てるとき • S := 割り当てる時点での総処理時間
• S ≤ LB ≤ OPT • P ≤ LB ≤ OPT • ∴ S + P ≤ 2OPT 14
Bin Packing Problem • ビンパッキング問題 • 重み付けられた N 個の荷物を同じ大きさのビ ンに詰めるとき,必要なビンの最小本数を求
める問題 15
Bin Packing Problem • P = {1, 2, 3, 4,
5, 6} • N = #P = 6 • T = 7 16
Bin Packing Problem • P = {1, 2, 3, 4,
5, 6} • N = #P = 6 • T = 7 • B = {{1, 6}, {2, 5}, {3, 4}} 最小本数 = 3 17
Reduction • 終了時刻が T 以下であるようなスケジュール が存在する • ⇔ 容量 T
のビンを M 本用いることでビン パッキング可能 18
Reduction • bins(I, T) := 入力 I, ビンの容量 T のときの解
• bins(I, T) ≤ M のとき終了時刻 T 以下の解が存在 • 最悪でも終了時刻 2LB 以下の解が存在する • 区間 [LB, 2LB] を二分探索することで最小終了時 刻を求めることができる 19
(2) Algorithm • 実は,荷物の大きさの種類数が定数だと多項 式時間でビンパッキング問題を解くことがで きる • K := 荷物の大きさの種類数(定数)
• (2) 20
(2) Algorithm • 入力を書き換える • サイズごとの個数 = {1 , 2
, ⋯ , } を入力とする • サイズの昇順にしても一般性を失わないのでそうす る • P = {9, 9, 8, 2, 4, 4, 3, 5, 3} • I = {1, 2, 2, 1, 1, 2} • K = #I = 6 21
(2) Algorithm • BINS(I, T) := 書き換えられた入力 I と容量 T
の ビンに対するビンパッキングの最小本数 22
(2) Algorithm • BINS(I, T) := 書き換えられた入力 I と容量 T
の ビンに対するビンパッキングの最小本数 • ビン一本分取る方法全体の集合 • # = () 23
(2) Algorithm • DP をします 24
(2) Algorithm • DP をします 25
(2) Algorithm • DP をします • よって全体で(2)で解けた 26
PTAS Algorithm • サイズの種類数が定数個になるように丸める 27
PTAS Algorithm • サイズの種類数が定数個になるように丸める • サイズが [ 1 + ,
1 + +1) のとき 1 + に丸める • K = [ log1+ ] = [ log1+ 1 ] • 高々 1 + しか丸められない • 未満の荷物は一旦無視 28
PTAS Algorithm • サイズを丸めたものについて最適解を求める • BINS(I, T) を用いる 29
PTAS Algorithm • サイズを丸めたものについて最適解を求める • BINS(I, T) を用いる • ビンの容量を
T(1 + ) に増やしてから荷物の大 きさをもとに戻す • 一旦無視していた 未満の荷物を貪欲に詰め込 む,必要ならビンを増やす • このアルゴリズムを (, , ) と呼ぶ 30
PTAS Algorithm • , , ≤ (, ) • 未満の荷物を貪欲に詰め込むとき,最後に
増えたビン以外の全てのビンについて T より も多くの荷物が入っている,よって容量 T で はそれ以上の本数が必要 31
PTAS Algorithm • , , ≤ , • ただし ,
, ではビンの容量を T 1 + に 拡大しているので実際に求まる近似終了時刻 は T 1 + ≤ 1 + 32
PTAS Algorithm • , , を二分探索することで近似解を求め ていたが,T は実数を取るので一点に定まる ことはない •
よってどこかで打ち切る必要がある • 近似保証を維持したまま打ち切りたい 33
PTAS Algorithm • 二分探索の範囲長が 以下になったときに 打ち切り,そのときの右端 T* を近似解とする • 探索回数は
log2 2− = log2 1 34
PTAS Algorithm • 最後の二分探索の範囲は ∗ − , ∗ 35
PTAS Algorithm • 最後の二分探索の範囲は ∗ − , ∗ 36
PTAS Algorithm • 最後の二分探索の範囲は ∗ − , ∗ 37
PTAS Algorithm • , , がビンの容量を (1 + ) 倍していた
ことを思い出すと • 近似最小終了時刻は T∗ 1 + ≤ 1 + 2 ≤ (1 + 3) • 計算量は (2[log1+ 1 ][log2 1 ]) 38
PTAS Algorithm • , , がビンの容量を (1 + ) 倍していたこと
を思い出すと • 近似最小終了時刻は T∗ 1 + ≤ 1 + 2 ≤ (1 + 3) • 計算量は (2[log(1+) 1 ][log2 1 ]) • 多項式時間! 39
Experiment • ランダムケース • N = 100000 • M =
1000 • = 0.02 • 割と早い • が,これ以上 M や を良くすると無限時間かかってしまった 40
Experiment • 山登り法と対決させてみる • 初期解を 4 3 近似の貪欲法で生成 • N
= 100000, M = 100 • = 0.02 41
Approximation Algorithm 近似アルゴリズム V.V.ヴァジラー二 著 浅野孝夫 訳 第10章 終了時刻最小化スケジューリング 参考文献