Chapter  Page  Details  Date  Print Run 

12 
Error in Text The end of the first paragraph after the "Logarythms" box currently reads:
It's a sorted tree because every node's value lies between the values of its left and right child nodes.
It is true that a sorted tree has this property but more precisely the text should say:
It's a sorted tree because every node's value is at least as large as its left child and no larger than its right child.

09/20/2013 


14 
Error in Text The fourth paragraph currently reads:
A full complete binary tree of height H has 2H nodes.
This text was trying to be approximate so it should have said:
The tree has approximately 2H nodes.
More precisely a full complete binary tree of height H has 2H+1  1 nodes. (This fact is mentioned in the second bullet point on page 232.) Given this change, the sentence that follows on page 14 should also be corrected. Again if you're looking at Big O notation, a full complete binary tree containing N nodes has height roughly log2(N). More precisely the height is log2(N + 1)  1. (See the third bullet point on page 232.)

09/20/2013 


32 
Errata in Text Text currently reads:
inside the box "A Fairly Random Array", the calculation printed in large test before the penultimate paragraph ends with (N1)/(N(k1)), it should be 1/(N(k1)) as the probability of Pk defined in the general case a few lines above as Pi = 1/(Ni1). As it stands, the claimed simplification to 1/N is not mathematically correct when based on the printed calculation, when it should be, the printed calculation simply being wrong.
This is correct. It was that way in the original text and got changed somewhere along the way to print. I suggest the follow erratum:
Text should read:
in the box "A Fairly Random Array." The last term in large equation should be 1/(N(k1)).

11Oct16 

2 
36 
Error in Text The fourth paragraph on the page begins:
More generally, for the exponent P, the algorithm calculates log(P) powers of A. It then examines the binary digits of A to see which of those powers it must multiply together to get the final result.
This should read:
More generally, for the exponent P, the algorithm calculates log(P) powers of A. It then examines the binary digits of P to see which of those powers it must multiply together to get the final result.

09/05/2013 


39 
Error in Code The FindPrimes algorithm uses this code:
While (next_prime < stop_at)
This should be:
While (next_prime <= stop_at)

09/20/2013 


40 
Error in Text The fourth paragraph in the section "Testing for Primality" currently reads:
Fermat's "little theorem" states that if p is prime and 1 ≤ n ≤ p, np1 Mod p = 1.
This should say:
Fermat's "little theorem" states that if p is prime and 1 ≤ n < p, np1 Mod p = 1.

09/20/2013 


53 
Error in Text Exercise 14 currently reads:
In an infinite set of composite numbers called Carmichael numbers, every relatively prime smaller number is a Fermat liar. In other words, p is a Carmichael number if every n where 1 ≤ n ≤ p and GCD(p, n) = 1 is a Fermat liar.
This should read:
In an infinite set of odd composite numbers called Carmichael numbers, every relatively prime smaller number is a Fermat liar. In other words, p is a Carmichael number if p is odd and every n where 1 < n < p and GCD(p, n) = 1 is a Fermat liar.

09/20/2013 


53 
Error in Text The solution to Exercise 14 (the CarmichaelNumbers program)
Currently reads:
// Check for Carmichael numbers.
for (int i = 2; i < maxNumber; i++)
Should be the following (to check for only odd Carmichael numbers):
// Check for Carmichael numbers.
for (int i = 3; i < maxNumber; i += 2)

09/20/2013 


53 
Error in Text Inside the IsCarmichael method:
Currently reads:
// Check all possible witnesses.
for (int i = 1; i < number  1; i++)
Should be this:
// Check all possible witnesses.
for (int i = 2; i < number; i++)

09/20/2013 


238 
Text Correction First sentence on page 238 of the print edition reads:
Binary trees have four kinds of traversals: preorder, inorder, postorder, and depthfirst.
This should be:
Binary trees have four kinds of traversals: preorder, inorder, postorder, and breadthfirst.

04/02/15 

10 
243 
Error in Text Throughout this section, depthfirst traversal should be breadthfirst traversal. A breadthfirst traversal visits all of the nodes across the breadth of one level before moving down to the next level in the tree. All of the other algorithms (preorder, inorder, and postorder) are actually depthfirst traversals. 
09/05/2013 


487 
Errata in Text Text currently reads:
Table B1, Column SQRT(n), Row Week, the value 4x10^11 is obviously incorrect given the value immediately above it. I believe it should be about 4.9*10^22 (i.e. 7 times the value for the Days row), round as you will.
This is correct. I recommend the following erratum:
Text should read:
in Table B1 the second entry in the "Week" row should be 4x10^23.



App B 
488 
Error in Text The solution to exercise 13 has the roles of the two algorithms are reversed. The correct solution should be:
The question is, "For what N is 1,500 ? N > 30 ? N2?" Solving for N gives 50 < N, so the second algorithm is slower if N > 50. You would use the second algorithm if N ≤ 50 and the first if N > 50.

09/05/2013 
