MTH 221  Discrete Math for Information Technology
Exercise 5.2, problems 27(a & b); p 259  
One version of Ackermann’s function A(m,n) is defined recursively for m, n ∈ N by:  


A(0, n)= n + 1, n ≥ 0;  
A(m, 0) = A(m − 1, 1), m > 0; and  
A(m, n) = A(m − 1, A(m, n − 1)), m, n > 0.  
a.  Calculate A(1, 3) and A(2, 3).  
b.  Prove that A(1, n) = n + 2 for all n ∈ N.  
c.  For all n ∈ N show that A(2, n) = 3 + 2n  
d.  Verify that A(3, n) = 2^{n+3} − 3 for all n ∈ N.  
Exercise 5.8, problem 6; p 301 (take a look at problem 5 first)  
We first note how the polynomial in Exercise 5 can be written in the nested multiplication method:  
8 + x(−10 + x(7 + x(−2 + x(3 + 12x)))).  
Using this representation, the following pseudocode procedure (implementing Horner’s method) can be used to evaluate the given polynomial.  
procedure PolynomialEvaluation2  
(n: nonnegative integer;  
r,a_{0},a_{1},a_{2},. . .,a_{n}: real)  
begin  
value := a_{n}  
for j := n  1 down to 0 do  
value := a_{j} + r * value  
end  
a.  How many additions take place in the evaluation of the given polynomial? (Do not include the n − 1 additions needed to increment the loop variable i.) How many multiplications?  
b.  Answer the questions in part (a) for the general polynomial a_{0} + a_{1}x + a_{2}x^{2} + a_{3}x^{3} + · · · + a_{n−1}x^{n−1} + a_{n}x^{n}, where a_{0}, a_{1}, a_{2}, a_{3}, . . . , a_{n−1}, an are real numbers and n is a positive integer. 
Tutor Answer
Brown University
1271 Tutors
California Institute of Technology
2131 Tutors
Carnegie Mellon University
982 Tutors
Columbia University
1256 Tutors
Dartmouth University
2113 Tutors
Emory University
2279 Tutors
Harvard University
599 Tutors
Massachusetts Institute of Technology
2319 Tutors
New York University
1645 Tutors
Notre Dam University
1911 Tutors
Oklahoma University
2122 Tutors
Pennsylvania State University
932 Tutors
Princeton University
1211 Tutors
Stanford University
983 Tutors
University of California
1282 Tutors
Oxford University
123 Tutors
Yale University
2325 Tutors