11.01.2013 Views

Workshop

Workshop

Workshop

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

125,000 numbers between 250,000 and 375,000, so the middle of that would be…312,500?<br />

Me: No, lower.<br />

You: (whipping out your calculator) 281,250?<br />

Me: No, lower.<br />

You: (getting good at this now) 265,625?<br />

Me: (astonished) How’d you guess?<br />

In truth, this would probably go on for a couple of more guesses, but you get the idea. The range is<br />

initially a 1,000,000—a huge range. Then it goes to 500,000, then 250,000, then 125,000, then 62,500,<br />

then 31,250, then 15,625, then 7812, and so on. You can see that you lose zeros pretty fast in only seven<br />

guesses; by the time you guess another seven times, you’re down to only about 60 possibilities. That<br />

should come as no surprise. You can see in Figure 4.1 how fast dividing an area in half cuts down your<br />

search.<br />

Figure 4.1 In a binary search, the search area gets smaller and smaller as the number of guesses<br />

progress.<br />

If you want to impress your boss or look cool at a geek convention, you can refer to this method of<br />

guessing as a binary search. As a bonus, you can scrawl its mathematical representation onto the overhead<br />

projector:<br />

n=log2 (x)<br />

Here, x is the maximum number in the sequence, and n is the maximum number of guesses.<br />

Your Waterloo: The Network Is Down!<br />

Now, let’s look at what you might do when your network goes down. First of all, how do you know<br />

when the network is down? Is it a physical network problem or a server or router problem? The answer:<br />

divide and conquer. When you’re presented with a problem, logically work your way from the entirety of<br />

your network (the whole range of numbers from one to a million) to the specific problem (265,625).<br />

You’ll probably start by trying to figure out if there’s only a problem with one person (a local problem)<br />

or with a large group of people (a systemic problem).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!