Back to Relations and Functions

Problem 6

Avg difficulty 3.0

The McCarthy 91 function M:Z→ZM:\mathbb{Z}\to\mathbb{Z} is a recursive function created by computer scientist John McCarthy to test formal verification in computer science. It is defined as follows.

M(n)={n−10if n>100M(M(n+11))if n≤100M(n)=\begin{cases}n-10&\text{if }n>100\\ M(M(n+11))&\text{if }n\leq 100\end{cases}
  1. Show M(101)=91M(101)=91.

  2. Show M(n)=M(n+1)M(n)=M(n+1) for all 90≤n≤10090\leq n\leq 100.

  3. Deduce that M(n)=91M(n)=91 for all 90≤n≤10090\leq n\leq 100.

  4. Hence prove that M(n)=91M(n)=91 for all n≤100n\leq 100.

Kan, A Complete Introduction to Abstract Algebra, Preliminaries, Relations and Functions, Problem 6

AI Tutor

Adapted from A Complete Introduction to Abstract Algebra © 2022–2026 Kan Onn Kit. Licensed under CC BY-SA 4.0. Source: A Complete Introduction to Abstract Algebra. Imported at revision a559e8b.