Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 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?

2 Go to Extremes Manipulate the problem space Look at extreme limits of the problem space.

3 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. Here  is the angle that the blades of the blinds make with the window plane. Choices: cos^2(theta), sin^2(theta), cos(2theta) sin(theta).  Light

4 Eliminate wrong choices.

5 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.

6 The two extreme cases are:

7 Another example What is the length of k? Important fact: k remains the same no matter what rectangle is inscribed. k r = 1 inch

8 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 =  D 3 /6.

9 Find the Diagonal You are given A, B, C. Calculate X. What is the simpler problem? How does it relate? x A B C

10 Real Interview Questions http://www.sellsbrothers.com/fun/msiview/default.aspx?content=question.htm Thanks to Val Komarov for pointing it out to me.


Download ppt "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."

Similar presentations


Ads by Google