Cisco Knowledge Suite Cisco SystemsCisco Press
   

   
Home
MyCKS
Cutting Edge
Certification
Core Reference
Guided Learning
   
Networking Architecture
LAN
WAN
Switching
Internet Protocols (IP)
Network Protocols
Transport and Application Protocols
Desktop Protocols
Security and Troubleshooting
Network Resources and Management
Integrated Services
 

4. The Napoleon Method: Divide and Conquer

   

< Back Contents Next >

4. The Napoleon Method: Divide and Conquer

  

 

The Numbers Game

  

 

Your Waterloo: The Network Is Down!

  

 

Segment Searching

  

 

Division of Labor

  

 

Summary

  

 

Workshop

Save to MyCKS

 
Sams Teach Yourself Network Troubleshooting in 24 Hours

From: Sams Teach Yourself Network Troubleshooting in 24 Hours
Author: Jonathan Feldman
Publisher: Sams
More Information

4. The Napoleon Method: Divide and Conquer

After Napoleon crowned himself Emperor, it's said that Beethoven changed the dedication of his Eroica symphony, originally dedicated to Bonaparte, to read "To the memory of a great hero." I'll try not to swell your head to that extent, but the divide-and-conquer methods in this hour are going to make you into a really great troubleshooter; it worked for Napoleon, and it's going work for you.

Divide and conquer refers to the concept that the location of a given problem can be found more easily by splitting the problem area into smaller, manageable pieces. When you know that a problem is within a given area (say, a certain physical network or within a certain PC or user configuration), you can figure out which portion of that area it's in by splitting the area into pieces.

NOTE

Nine times out of ten, only one network problem is at work at any given time. Unless you've been struck by lightning recently, the odds of you having more than one problem simultaneously are very slim. (That's not to say that domino effects don't exist, though.)

The Numbers Game

Because only one problem usually exists at a time, it should be easy to search for (even in a large network). For example, let's say that I'm thinking of a number from one to one million, and you want to guess what that number is. If you proceed sequentially and guess every number, you could potentially go through 999,999 numbers before getting it right. However, if you divide the maximum number in half, and I tell you “higher” or “lower,” and you keep dividing that result in half, you will take at most only 23 guesses. That's quite an improvement. Don't believe me? Here's an example:

Me: Okay, I'm thinking of a number from 1 to 1,000,000.

You: 500,000?

Me: No, lower.

You: 250,000?

Me: No, higher.

You: (pausing to calculate 250,000 / 2 + 250,000) 375,000?

Me: No, lower.

You: (getting mad at me for picking a number between 250,000 and 375,000) Let's see, there are 125,000 numbers between 250,000 and 375,000, so the middle of that would be...312,500?

Me: No, lower.

You: (whipping out your calculator) 281,250?

Me: No, lower.

You: (getting good at this now) 265,625?

Me: (astonished) How'd you guess?

In truth, this would probably go on for a couple of more guesses, but you get the idea. The range is initially a 1,000,000—a huge range. Then it goes to 500,000, then 250,000, then 125,000, then 62,500, then 31,250, then 15,625, then 7812, and so on. You can see that you lose zeros pretty fast in only seven guesses; by the time you guess another seven times, you're down to only about 60 possibilities. That should come as no surprise. You can see in Figure 4.1 how fast dividing an area in half cuts down your search.

NOTE

If you want to impress your boss or look cool at a geek convention, you can refer to this method of guessing as a binary search. As a bonus, you can scrawl its mathematical representation onto the overhead projector:

 n=log2 (x) 

NOTE

Here, x is the maximum number in the sequence, and n is the maximum number of guesses.

Figure 4.1. In a binary search, the search area gets smaller and smaller as the number of guesses progress.
   

< Back Contents Next >

Save to MyCKS

 

Breaking News

One of the primary architects of OpenCable, Michael Adams, explains the key concepts of this initiative in his book OpenCable Architecture.

Expert Advice

Ralph Droms, Ph.D., author of The DHCP Handbook and chair of the IETF Dynamic Host Configuration Working Group, guides you to his top picks for reliable DHCP-related information.

Just Published

Residential Broadband, Second Edition
by George Abe

Introduces the topics surrounding high-speed networks to the home. It is written for anyone seeking a broad-based familiarity with the issues of residential broadband (RBB) including product developers, engineers, network designers, business people, professionals in legal and regulatory positions, and industry analysts.

             
     

From the Brains at InformIT

|

Contact Us

|

Copyright, Terms & Conditions

|

Privacy Policy

 

© Copyright 2000 InformIT. All rights reserved.