Exercises
1. [15] What is the net effect of setting x ← x ⊕ y, y ← y ⊕ (x & m), x ← x ⊕ y?
2. [16] (H. S. Warren, Jr.) Are any of the following relations valid for all integers x and y? (i) x ⊕ y ≤ x | y; (ii) x & y ≤ x | y; (iii) |x – y| ≤ x ⊕ y.
3. [M20] If x = (xn – 1 . . . x1x0)2 with xn – 1 = 1, let . Thus we have 0M, 1M, 2M, 3M, . . . = –1, 0, 1, 0, 3, 2, 1, 0, 7, 6, . . ., if we let 0M = –1. Prove that (x ⊕ y)M < |x – y| ≤ x ⊕ y for all x, y ≥ 0.
4. [M16] Let , xN = –x, xS = x + 1, and xP = x – 1 denote the complement, the negative, ...
Get Art of Computer Programming, Volume 4A, The: Combinatorial Algorithms, Part 1 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.