Too much recursion

The Ackermann function is defined as

A ( m , n ) = { n + 1 if m = 0 A ( m 1 , 1 ) if m > 0 and n = 0 A ( m 1 , A ( m , n 1 ) ) if m > 0 and n > 0. A(m,n) = \begin{cases} n+1 & \mbox{if } m =0 \\ A(m-1,1) & \mbox{if } m>0 \mbox{ and } n=0\\A(m-1,A(m,n-1)) & \mbox{if } m > 0 \mbox{ and } n>0. \end{cases}

For all integers n > 1 n > 1 , the value of A ( 4 , n ) A(4,n) all have the same remainder when divided by 1000. What is this remainder?


The answer is 733.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

The function A ( 4 , n ) A(4,n) cannot be computed for n > 2 n>2 in one's lifetime. However, A ( 4 , 2 ) = 2003529930....56733 A(4,2)=2003529930....56733

You need to show that A ( 4 , 2 ) A ( 4 , 3 ) A ( 4 , 4 ) A ( 4 , 5 ) 733 ( m o d 1000 ) A(4,2) \equiv A(4,3) \equiv A(4,4) \equiv A(4,5) \equiv \ldots \equiv 733 \pmod{1000} .

Pi Han Goh - 5 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...