162k views
2 votes
Prove that the McCarthy's 91 function satisfies that M(i)=91 for every 1≤i≤100.

1 Answer

2 votes

Final answer:

The McCarthy's 91 function can be proven to satisfy M(i) = 91 for every 1≤i≤100 using mathematical induction.

Step-by-step explanation:

The McCarthy's 91 function is defined as follows:

M(n) = n - 10 if n > 100, M(n + 11) if n ≤ 100

To prove that M(i) = 91 for every 1 ≤ i ≤ 100, we can use mathematical induction.

Base case:

For i = 1, M(1) = 1 + 11 = 12

Inductive step:

Assume M(k) = 91 for some k <= m (inductive hypothesis).

For k = m + 1, if k > 100, M(m+1) = m + 1 - 10 = m - 9.

If k ≤ 100, M(m + 1) = M(m + 1 + 11) = M(m + 12) = 91, using the inductive hypothesis M(m) = 91.

Since M(k) = 91 for k <= m implies M(m + 1) = 91, the McCarthy's 91 function indeed satisfies M(i) = 91 for every 1 ≤ i ≤ 100.

User Zielony
by
8.6k points