The pearl The algorithm Implementation
1
Verifying Richard Birds On building trees of The algorithm - - PowerPoint PPT Presentation
The pearl Verifying Richard Birds On building trees of The algorithm Implementation minimum height L.T. van Binsbergen J.P. Pizani Flor Department of Information and Computing Sciences, Utrecht University Wednesday 26 th June, 2013
The pearl The algorithm Implementation
1
The pearl The algorithm Implementation
2
◮ We want to minimize cost, where cost means:
◮ depthi is the length of a path from root to tip i ◮ hi is the height of the ith element of the input list
The pearl The algorithm Implementation
3
◮ hs = [h1, h2, . . . , hN] ◮ Each element of the list is then considered the height of
◮ We use this “simplified” form of the problem in an
The pearl The algorithm Implementation
4
◮ A pair (ti, ti+1) in a sequence ti(1 ≤ i ≤ N) with heights
◮ An alternative set of conditions, used in the proof of
The pearl The algorithm Implementation
5
◮ There is at least one LMP, the rightmost one. ◮ The algorithm combines the rightmost LMP at each stage. ◮ Example in the whiteboard. . .
The pearl The algorithm Implementation
6
The pearl The algorithm Implementation
6
◮ In the paper, the proof of this lemma is done by
The pearl The algorithm Implementation
7
The pearl The algorithm Implementation
8
◮ The first big issue we face is how to describe a total
The pearl The algorithm Implementation
8
◮ The first big issue we face is how to describe a total
◮ We modeled this by passing a proof that the list is
The pearl The algorithm Implementation
9
◮ “Function” keyword. ◮ Bove-Capretta
◮ Define step using structural recursion on a natural