100 likes | 117 Views
Explore extreme limits, manipulate problem space, and analyze special cases to refine solutions. Apply heuristics in problem-solving approaches for intricate scenarios. Example problems and techniques included.
E N D
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. 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)sin(theta). Q Light
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.
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.
Find the Diagonal • You are given A, B, C. Calculate X. • What is the simpler problem? • How does it relate? x C A B
Real Interview Questions http://www.sellsbrothers.com/fun/msiview/default.aspx?content=question.htm Thanks to Val Komarov for pointing it out to me.