Sudoku Puzzles

Problem
A man leaves his camp by traveling due north for 1 mile. He then
makes a right turn (90 degrees) and travels due east for 1
mile. He makes another right turn and travels dues south for 1
mile and finds himself precisely at the point he departed
from, that is, back at his campsite. Where is the campsite
located?
This is searching the space of the solutions for special cases.
What are the special cases worth considering?
Go to Extremes
• Manipulate the problem space
• Look at extreme limits of the problem space.
The “analyze extreme cases” heuristic is often useful in
testing of solutions/algorithms.
• Example problem: find the illumination I
(amount of energy ) that light brings into the
room.
Light
Q
Here Q is the angle that the blades of the
blinds make with the window plane.
Choices: cos^2(theta), sin^2(theta),
cos(2theta)
Eliminate wrong choices.
N-bit string example:
N-bit string: a string that contains a total of
N elements, each being either “0” or “1”.
N-bit string example (solution)
Example Problem
Two flagpoles are standing, each 100 feet tall. A
150-foot rope is strung from the top of one of
the flagpoles to the top of the other and
hangs freely between them. The lowest point
of the rope is 25 feet above the ground. How
far apart are the two flagpoles?
Hint: Start by drawing pictures.
The two extreme cases are:
Another example
• What is the length of k?
• Important fact: k remains the same no matter
what rectangle is inscribed.
k
r = 1 inch
Another Example
You have a large, solid sphere of gold. A cylinder of
space is “bored” (drilled) through this sphere,
producing a ring. The length of that cylindrical line is
6 inches. You want to know how much gold you have
left in the ring. Specifically, what is the volume of the
ring? Fact: the amount of gold in the ring does not
depend on the width of the bored cylinder.
Note: For any sphere,
V = pD3/6.
Solution sketch:
Can choose any ring width W – the amount of gold is
the same. Choose W = 0. The entire sphere becomes the
ring.
Yet another one (difficult):
• Let {B} and {W} be finite stes of black and
white points, respectively, in the plane, with
the property that every line segment that
joins two points of the same color contains a
point of the other color. Prove that both sets
must lie on a single line segment.
Yet another one:
•
Let {B} and {W} be finite stes of black and white points, respectively, in the plane, with the property that
every line segment that joins two points of the same color contains a point of the other color. Prove that
both sets must lie on a single line segment.
• Experiment. Draw a few examples.
Yet another one:
•
Let {B} and {W} be finite stes of black and white points, respectively, in the plane, with the property that
every line segment that joins two points of the same color contains a point of the other color. Prove that
both sets must lie on a single line segment.
• Experiment. Draw a few examples.
• Solution: Assume the opposite: at least 3 points do
not lie on the line.
• Then, there exists a triangle made from these points (shown).
Choose the one with smallest possible area.
• But, according to the problem statement, there is always a
white point between two black ones, so there exist two even
smaller triangle. Contradiction with the choice made!
Find the Diagonal
• You are given A, B, C. Calculate X.
• What is the simpler problem?
• How does it relate?
x
C
B
A
Real Interview Questions
http://www.sellsbrothers.com/fun/msiview/default.aspx?content=question.htm
Thanks to Val Komarov for pointing it out to me.