This is the pseudo-code from the problem:
procedure Foo(A,f,L)
Precondition: A[f..L] is an array of integers, f,L, are
two naturals >=1 with f<=L.
if (f=L) then
return A[f]
else
m <-- [(f+L)/2]
return min(Foo(A,f,m), Foo(A, m+1,L))
endif
The Question:
Using induction, argue that Foo invokes min
at most $n-1$ times.
I am a little lost on how to continue my proof for part (iii). I have the claim written out as well as the base case. Which I believe it to be $n\geq2$. But how do I do it for $k + 1$ terms? Since this is a proof by induction.
Thanks