McCarthy 91 function

The McCarthy 91 function is a recursive function, defined by the computer scientist John McCarthy as a test case for formal verification within computer science. The McCarthy 91 function is defined as M ( n ) = { n − 10 , if n > 100 M ( M ( n + 11 ) ) , if n ≤ 100 {\displaystyle M(n)={\begin{cases}n-10,&{\mbox{if }}n>100{\mbox{ }}\\M(M(n+11)),&{\mbox{if }}n\leq 100{\mbox{ }}\end{cases}}} The results of evaluating the function are given by M(n) = 91 for all integer arguments n ≤ 100, and M(n) = n − 10 for n > 100.

Source: Wikipedia — McCarthy 91 function (CC BY-SA 4.0)

McCarthy 91 function

The McCarthy 91 function is a recursive function, defined by the computer scientist John McCarthy as a test case for formal verification within computer science. The McCarthy 91 function is defined as M ( n ) = { n − 10 , if n > 100 M ( M ( n + 11 ) ) , if n ≤ 100 {\displaystyle M(n)={\begin{cases}n-10,&{\mbox{if }}n>100{\mbox{ }}\\M(M(n+11)),&{\mbox{if }}n\leq 100{\mbox{ }}\end{cases}}} The results of evaluating the function are given by M(n) = 91 for all integer arguments n ≤ 100, and M(n) = n − 10 for n > 100.

This neuron ends here.

Source: Wikipedia "McCarthy 91 function" · CC BY-SA 4.0

Privacy Policy