N is Z loadet in a table T in the spots 1,2,...,N, arranged so that the number in spot i always is smaller og equal to the number on the spot i+1.
-1212 | -1002 | -800 | -545 | -123 | -54 | -2 | 0 | 4 | 321 | 324 | 501
(N = 12), We wish to determine wether 0 is part of this table og look at the following algorithm.
Psedu code picture by krakatau7 - Photobucket
Consider a random arranged table T with N entries (inputs?). Prove by induction this claim:
for every Z i,j,n with