47 - This program is a well-known example in computer...

This preview shows page 1. Sign up to view the full content.

This program is a well-known example in computer science, since the func- tion computed by this program grows extremely rapidly. We wish to prove that this program always terminates, and therefore deFnes a total function. Counting down from x is not good enough, since the third equation does not decrease x + 1 , because of the embedded Ack ( x + 1 ,y ) . We will devise a different way of counting down, by deFning a well-founded partial order with the property that it always decreases to a terminating state. D EFINITION 5.9 (W ELL - FOUNDED P ARTIAL O RDERS ) A partial order ( A, ) is well-founded if and only if it has no inFnite de- creasing chain of elements: that is, for every inFnite sequence a 1 ,a 2 ,a 3 ,... of elements in A with a 1 a 2 a 3 ... , there exists m N such that a n = a m for every n m . ±or example, the conventional numerical order on N is a well-founded partial order. This is not the case for on Z , which can decrease for ever. P
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Ask a homework question - tutors are online