Professional Documents
Culture Documents
Gefei Zhang
Celonis GmbH
2014-02-18
1/13
Gefei Zhang
2/13
Celonis
The leading vendor for the analysis of operative process data created by IT systems [IBM] Interactive, process-based Business Intelligence Next level of transparency in enterprise process mining http://www.celonis.de
3/13
Celonis
4/13
Content
Dynamic Programming Warming up: Fibonacci Introduction: Maximum weighted independent set in a path Application: Knapsack
5/13
Fibonacci
6/13
Fibonacci
f (n) = f (n 1) + f (n 2) simple, but horrible complexity better: bottom up a = 1; b = 1 for i in 3..n a, b = b, a+b return b
6/13
7/13
Example Index set I = 1, n Array arri > 0, i I Wanted: set S I , such that
x , y S , x > y , x y > 1
7/13
Example Index set I = 1, n Array arri > 0, i I Wanted: set S I , such that
x , y S , x > y , x y > 1 s S arrs max
7/13
Example Index set I = 1, n Array arri > 0, i I Wanted: set S I , such that
x , y S , x > y , x y > 1 s S arrs max
7/13
8/13
8/13
8/13
8/13
8/13
8/13
8/13
Knapsack Problem
9/13
Knapsack Problem
9/13
Knapsack Problem
Index set I = 1, , n Given: {vi }, {wi }, i I , K > 0 Wanted: set S I , such that
i S
wi K
9/13
Knapsack Problem
Index set I = 1, , n Given: {vi }, {wi }, i I , K > 0 Wanted: set S I , such that
i S
wi K i S vi max
9/13
Knapsack Problem
Index set I = 1, , n Given: {vi }, {wi }, i I , K > 0 Wanted: set S I , such that
i S
wi K i S vi max
9/13
Knapsack Problem
Index set I = 1, , n Given: {vi }, {wi }, i I , K > 0 Wanted: set S I , such that
i S
wi K i S vi max
Example
9/13
Knapsack Problem
Sn,k optimal n / Sn,k Sn,k = Sn1,k n Sn,k Sn,k = Sn1,k wn {n} Vn,k the sum n Sn,k Vn1,k > Vn1,k wn + vn Recursion Vn,k = max (Vn1,k , Vn1,k wn + vn )
10/13
Knapsack Problem
Bottom up for i in 1..n for c in 1..K V[i,c] = max(V[i-1,c], V[i-1, c-w[i]] + v[i]) Backtracking Vn,k = Vn1,k i n /S
11/13
Summary
Dynamic Programming Recursion bottom up Evil mostly in nding recursion Applications in Graph Theory, Computer Linguistics, Bioinformatics, etc.
12/13
Summary
Dynamic Programming Recursion bottom up Evil mostly in nding recursion Applications in Graph Theory, Computer Linguistics, Bioinformatics, etc. Challenge Egg Dropping
12/13
Thanks
Danke
13/13