Princeton University
|
Computer Science 598A
|
|
In minsum.elf is a program (described in Huth and Ryan) that computes the minimum subsequence sum of an array a:
minsum = ( k gets two ;
t gets (a @ one) ;
s gets (a @ one) ;
while (neq k (plus n one))
(t gets (min @ plus t (a @ k) @ (a @ k)) ;
s gets (min @ s @ t) ;
k gets plus k one)).
Your task is to prove the theorem You can find some substitutions and lemmas to get you started in minsol.elf.