{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

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

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

View Full Document Right Arrow Icon
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 defines 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 defining 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 infinite de- creasing chain of elements: that is, for every infinite 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 . For 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.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}