18
1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu L ab.), the University of Tokyo IFIP WG2.1 @ Kyoto

1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

Embed Size (px)

Citation preview

Page 1: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

1

A New Calculational Law for Combinatorial Optimization Problems

Akimasa MorihataPhD student of IPL (Takeichi/Hu Lab.),

the University of Tokyo

IFIP WG2.1 @ Kyoto

Page 2: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

2

Maximum Segment Sum

(Maximum segment sum problem)Given a list of numbers, find the segmentthat has the maximum weight-sum.

Page 3: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

3

Resource ConstrainedShortest Path Problem

(Resource constrained shortest path problem)Given an edge-weighed graph and a resource function , find the shortest path between given two nodes such that .

s t

5

11

3 1

-3

4

-2

4

22

Page 4: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

4

Our Contribution

• Proposing a new calculational lawfor combinatorial optimization problems– Generic– Easy to use

• Suitable for automation

Page 5: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

5

Calculational Laws for Combinatorial Optimization Problems• Greedy theorems (Bird and de Moor, Curtis)

– Generic but not automatic

• Maximum marking problems (Sasano et al.: ICFP 2000)– Automatic but specific

• Derivation of the result of Sasamo.et.al (Bird, JFP 2001)– Based on the thinning law (» greedy theorem)

Page 6: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

6

Notations

• map :

• union: • filter :

• means minimals (not “least elements”)

where is a preorder

Page 7: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

7

FormalizingCombinatorial Optimization Problems• Combinatorial optimization problems

» each solution is given by a sequence of decisions– a decision: – enumeration of all solutions:

Greedy Theorem (Bird and de Moor, Curtis): 

If ,

then .

Page 8: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

8

Example: Maximum Segment Sum

(MSS as a Maximum Marking Problem)Compute the Maximum marking problem on listswhere marking should be accepted by the automaton:

MMN

NN M: marked

N: not marked

Page 9: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

9

Problem:Greedy Theorem is HARD to use

How do we find an appropriate order?

Page 10: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

10

A New Calculational Law

Theorem:  

If and

then where .

Monotonic

Fusible

Page 11: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

11

Why Correct?

Lemma:  

if

Lemma:  

if and only if

Lemma:  

Page 12: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

12

Deriving an Algorithm for MSS

• M and N is monotonic for · ? ) Yes! (trivial)

• is fusible? ) Yes! (it’s an automaton!)

Page 13: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

13

Next Example:Shortest Path Problem

(Shortest path problem)Given an edge-weighed graph , find the shortest path from to .

Page 14: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

14

Derivation of Bellman-Ford Algorithm

•       is monotonic for · ? ) Yes! (trivial)

• is fusible for !(you can easily confirm it by a small calculation)

Page 15: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

15

Final Example: Resource Constrained Shortest Path

(Resource constrained shortest path problem)Given an edge-weighed graph and a resource function , find the shortest path between given two nodes such that .

s t

5

11

3 1

-3

4

-2

4

22

Page 16: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

16

Deriving DP Algorithm forResource Constrained Shortest Path• is fusible for

• is fusible for

) is fusible for

Page 17: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

17

Conclusion

• We propose a new caluclational law for deriving dynamic programming algorithms– Fusion » Dynamic programming– Generic– Suitable for automation

Page 18: 1 A New Calculational Law for Combinatorial Optimization Problems Akimasa Morihata PhD student of IPL (Takeichi/Hu Lab.), the University of Tokyo IFIP

18

Future Work

• General recursion schema?

• Giving a DSL for dynamic programming– Generate efficient program automatically

• Derivation of greedy algorithms