Puzzle Solutions

This section contains solutions to the logic puzzles.

Puzzle 1: Remainders

When solving such a problem, try first to relax the limitations and simplify the problem. Then add complexity layers. For example, first ignore the requirement to find the minimum integer n that qualifies. Try to find a solution for any integer n that would yield the remainder i – 1 for any i value. Obviously, if you multiply all i values (2 × 3 × 4 × 5 × 6 × 7 × 8 × 9 × 10) and subtract 1, the result meets the puzzle’s requirement (except for the requirement to find the minimum n). You can express the same result as the product of the prime factors of the various i values: (2 × 3 × [2 × 2] × 5 × [2 × 3] × 7 × [2 × 2 × 2] × [3 × 3] × [2 × 5]) – 1. Next, tackle ...

Get Inside Microsoft® SQL Server® 2008: T-SQL Querying now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.