<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><!-- generator="wordpress/2.0" --><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>BetterExplained</title>
	<link>http://betterexplained.com</link>
	<description>Learning shouldn't hurt. Let's share the insights that made difficult ideas click.</description>
	<pubDate>Mon, 01 Jun 2009 03:30:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/Betterexplained" type="application/rss+xml" /><feedburner:emailServiceId>Betterexplained</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Learning How to Count (Avoiding The Fencepost Problem)</title>
		<link>http://feedproxy.google.com/~r/Betterexplained/~3/Wz4nXPXOMs0/</link>
		<comments>http://betterexplained.com/articles/learning-how-to-count-avoiding-the-fencepost-problem/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 13:00:00 +0000</pubDate>
		<dc:creator>Kalid</dc:creator>
		
	<dc:subject>Math</dc:subject><dc:subject>Math</dc:subject>
		<guid isPermaLink="false">http://betterexplained.com/articles/learning-how-to-count-avoiding-the-fencepost-problem/</guid>
		<description><![CDATA[    Counting isn&#8217;t easy. Suppose your boss wants you to work from 8am to 11am, and mop floors 8 to 11. Simple - it&#8217;s one floor per hour, right?  Nope! There are 4 floors to mop (8, 9, 10 and 11) but only 3 hours to work (8-9, 9-10, and 10-11). [...]]]></description>
			<content:encoded><![CDATA[ <p>   <br />Counting isn&#8217;t easy. Suppose your boss wants you to work from 8am to 11am, and mop floors 8 to 11. Simple - it&#8217;s one floor per hour, right?</p>  <p>Nope! There are 4 floors to mop (8, 9, 10 and 11) but only 3 hours to work (8-9, 9-10, and 10-11).</p>  <p>Whoa &#8212; we count floors 8-11 and hours 8-11 differently? You bet. And somehow, if the boss said &#34;Mop floors 8 to 11 on April 8th to 11th&#34; everything would be ok.</p>  <p>Today let&#8217;s unravel this counting mystery.</p>  <h2>Basic Counting</h2>  <p>Numbers help us know &#34;how many&#34;. Take a numbered list of houses:</p>  <p><img src="http://betterexplained.com/wp-content/uploads/counting/counting-basic.png" /> </p>  <p>There&#8217;s 52 houses there. Don&#8217;t count each one: the addresses count for us! The numbers label the houses one by one, just as we&#8217;d do. We can just read the last item - 1 to 52 is 52 houses.</p>  <p><strong>Examples:</strong></p>  <ul>   <li>Employee ID cards from 1 to 3493. There are 3493 employees. </li>    <li>Days of the month from 1 to 31. There are 31 days in that month. </li> </ul>  <h2>What Does Subtraction Mean?</h2>  <p>We often see numbers as points on a line:</p>  <p><img src="http://betterexplained.com/wp-content/uploads/counting/numberline.png" /> </p>  <p>These points can be houses, floors, or plain integers. Whatever they are, they&#8217;re labeled so we can count them easily. 1 to 10 means ten items. </p>  <p>But what about a range like 8 to 11? How many items are there?</p>  <p><img src="http://betterexplained.com/wp-content/uploads/counting/spanvsdistance.png" /> </p>  <p>We&#8217;d probably try subtraction: 11 - 8 = 3, right? But here&#8217;s the key: </p>  <ul>   <li><strong>Subtraction is a span between numbers, not a count </strong></li> </ul>  <p>The equation 11 - 8 = 3 means there are 3 &#34;spans&#34; between 8 and 11, but four numbers in that range!</p>  <p>A span is a <em>distance measure</em>, like time from 8am and 11am (3 hours) or the distance between 8 and 11 inches (3 inches).</p>  <p>But when counting floors, we aren&#8217;t asking for the distance between floors 8 to 11 (which is in fact 3 floors or 30 feet, assuming 10 feet per floor). We want a count of how many items the range &#34;8 to 11&#34; includes!</p>  <h2>Working With Spans and Counts</h2>  <p>Realizing there are <strong>two types of counting</strong> was a big mental shift. We have two possible choices when &#34;counting&#34; from a to b:</p>  <ul>   <li><strong>Distance from a to b:</strong> b - a [regular subtraction] </li>    <li><strong>Number of items from a to b:</strong> b - a + 1 (span touches extra element) </li> </ul>  <p>Ok, the formulas work. But why does a count need an extra element?</p>  <p>Well, the shortest span (distance 1) actually touches two numbers:</p>  <p><img src="http://betterexplained.com/wp-content/uploads/counting/span_detail1.png" /> </p>  <p>A span is a line segment with a start and end; a span of distance 1 covers 2 points. As we grow the span, we gobble up more points and are always &#34;one ahead&#34;.</p>  <p><img src="http://betterexplained.com/wp-content/uploads/counting/span_detail2.png" /> </p>  <p>Here&#8217;s another way to think about it. A span of 3 means we start with an item (#8) and count out 3 more (#9, #10, #11). So, a span of N includes 1 original item and N new items, for a total of N + 1 items.</p>  <p>I like seeing new viewpoints; use what works for you. </p>  <h2>The Fencepost Problem</h2>  <p>The confusion between spans and counts is commonly called the fencepost problem. Are you counting the posts (points) or the distance between them (fence spans)?</p>  <p>The question goes like this:</p>  <blockquote>   <p>You&#8217;re building a fence 100 feet long, with posts every 10 feet. How many posts do you need?</p> </blockquote>  <p>Here&#8217;s how to think about it with our new mental model:</p>  <blockquote>   <p><em>Hrm, we want a fence 100 feet long. Ok: that&#8217;s a span of ten, 10-foot segments. But we want the number of <strong>posts</strong>: how many posts do those ten segments touch? Well, a span always touches an extra point, so ten segments means 11 posts.</em></p> </blockquote>  <p>11 fenceposts it is. But the problem isn&#8217;t natural for me - I have to think about spans vs points. I&#8217;d double-check with a smaller example - a fence of length 10 would have 2 posts, so yes, we need an &#34;extra post&#34;.</p>  <p>A few more examples:</p>  <ul>   <li><strong>Working Days:</strong> I worked April 8th to April 11th. How many days did I work? Well, that&#8217;s a span of 3 (11-8), but we &#34;touch&#34; 4 days: April 8, 9, 10, 11. So I worked 4 days. </li>    <li><strong>Hours: </strong>Hours are like spans. Working from 8 to 11 means you are covering the <em>spans</em> 8-9, 9-10, and 10-11. 8 to 11 means a &#34;time&#34; of 3 hours. </li>    <li><strong>Seconds:</strong> I start a race, and the start time at 12:01:08 (12 hours, 1 minute, 8 seconds). It ends at 12:01:11.<strong> </strong>How did it go? 11 - 8 = 3 seconds. (Short race) </li> </ul>  <p>Interesting, eh? Some units of time are measured with spans (seconds) and others are items to be counted (days).</p>  <p>The measuring type depends on the context. We see small units of time as &#34;instants&#34; and want the duration between those instants, not the &#34;number&#34; of instants we touched.</p>  <p>We see days as a large fuzzy blob covering a time period (9am-5am) &#8212; and we want to know how many blobs we covered. Saying you worked April 8 to April 9th implies you worked a timespan of 9am-5pm on two days.</p>  <p>The counting type depends on the context - but at least you know <em>why</em> we count them differently. </p>  <h2>Final Thoughts</h2>  <p>Counting isn&#8217;t simple. The fencepost problem and other &#34;off by one&#34; boundary errors are notoriously common. But don&#8217;t just remember a special trick (add 1) - remember there are two ways to measure something:</p>  <ul>   <li><strong>Are we measuring a difference (distance, time)?</strong> Then do regular subtraction to get a span. </li>    <li><strong>Are we counting items?</strong> Then subtract and add 1 (b - a + 1) - we want the number of items the span touches. </li> </ul>  <p>It&#8217;s not easy to recognize the difference - used to having one way to measure. Try a simple example (a fence 10 feet long) to test if you&#8217;ve got a count or span.</p>  <p>I&#8217;ve run into the fencepost problem many times, but the articles I read just told me how to fix it. No, no, no - <em>why does it happen</em>?</p>  <p>It turns out we often use the same approach for two different types of counting. And while the right method may not be obvious, at least we know to try both approaches. Happy math.</p> <img src="http://feeds.feedburner.com/~r/Betterexplained/~4/Wz4nXPXOMs0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRSS>http://betterexplained.com/articles/learning-how-to-count-avoiding-the-fencepost-problem/feed/</wfw:commentRSS>
		<feedburner:origLink>http://betterexplained.com/articles/learning-how-to-count-avoiding-the-fencepost-problem/</feedburner:origLink></item>
		<item>
		<title>A Simple Introduction To Computer Networking</title>
		<link>http://feedproxy.google.com/~r/Betterexplained/~3/O50Wvsx7kGU/</link>
		<comments>http://betterexplained.com/articles/a-simple-introduction-to-computer-networking/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 16:00:30 +0000</pubDate>
		<dc:creator>Kalid</dc:creator>
		
	<dc:subject>Guides</dc:subject>
	<dc:subject>Programming</dc:subject><dc:subject>Guides</dc:subject><dc:subject>programming</dc:subject>
		<guid isPermaLink="false">http://betterexplained.com/articles/a-simple-introduction-to-computer-networking/</guid>
		<description><![CDATA[Most networking discussions are a jumble of acronyms. Forget the configuration details -- what are the insights?

Networking is about communication
Text is the simplest way to communicate
Protocols are standards for reading and writing text

Beneath the details, networking is an IM conversation. Here's what I wish someone told me when learning how computers communicate.
TCP: The Text Layer

The [...]]]></description>
			<content:encoded><![CDATA[<p>Most networking discussions are a jumble of acronyms. Forget the configuration details -- what are the insights?
<ul>
<li><strong>Networking is about communication</strong>
<li><strong>Text is the simplest way to communicate</strong>
<li><strong>Protocols are standards for reading and writing text</strong></li>
</ul>
<p>Beneath the details, networking is an IM conversation. Here's what I wish someone told me when learning how computers communicate.<br />
<h2>TCP: The Text Layer</h2>
<h2></h2>
<p>The Transmission Control Protocol (TCP) provides the handy illusion that we can "just" send text between two computers. TCP relies on <a href="http://en.wikipedia.org/wiki/Internet_Protocol">lower levels</a> and can send binary data, but ignore that for now:
<ul>
<li><strong>TCP lets us Instant Message between computers</strong></li>
</ul>
<p>We IM with Telnet, the 'notepad' of networking: telnet sends and receives plain text using TCP. It's a chat client peacefully free of ads and unsolicited buddy requests.</p>
<p>Let's talk to Google using <a href="http://support.microsoft.com/kb/279466">telnet</a> (or <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">putty</a>, a better utility):</p>
<pre>telnet google.com 80
[connecting...]
Hello Mr. Google!
</pre>
</p>
<p>We connect to google.com on port 80 (the default for web requests) and send the message "Hello Mr. Google!". We press Enter a few times and await the reply: </p>
<pre>&lt;html&gt;
...
&lt;h1&gt;Bad Request&lt;/h1&gt;
Your client has issued a malformed or illegal request
...
&lt;/html&gt;</pre>
<p>Malformed? Illegal? <em>The mighty Google is not pleased</em>. It didn't understand us and sent HTML telling the same. </p>
<p>But, we had a conversation: text went in, and text came back. In other words:&nbsp;
<p><img src="http://betterexplained.com/wp-content/uploads/networking/tcp_chat.png">&nbsp;<br />
<h2>Protocols: The Forms To Fill Out </h2>
<p>Unstructured chats is too carefree -- how does the server know what we want to do? We need a <em>protocol</em> (standard way of communicating) if we're going to make sense. </p>
<p>We use protocols all the time </p>
<ul>
<li>Putting to: and from: addresses in certain places on an envelope
<li>Filling out bank forms (special place for account number, deposit amount, etc.)
<li>Saying "Roger" or "10-4" to indicate a radio request was understood</li>
</ul>
<p>Protocols make communication clear. </p>
<h2>Case Study: The HTTP Protocol</h2>
<p>We see HTTP in every url: <a href="http://google.com/">http://google.com/</a>. What does it mean? </p>
<ul>
<li>Connect to server google.com (Using TCP, port 80 by default)
<li>Ask for the resource "/" (the default resource)
<li>Format the request using the Hypertext Transport Protocol</li>
</ul>
<p>HTTP is the "form to fill out" when asking for the resource. Using the HTTP format, the above request looks like this: </p>
<pre>GET / HTTP/1.0</pre>
<p>Remember, <em>it's just text</em>! We're asking for a file, through an IM session, using the format: [Command] [Resource] [Protocol Name/Version]. </p>
<p>This command is "IM'd" to the server (your browser adds extra info, a detail for another time). Google's server returns this response: </p>
<pre>HTTP/1.0 200 OK
Cache-Control: private, max-age=0
Date: Sun, 15 Mar 2009 03:13:39 GMT
Expires: -1
Content-Type: text/html; charset=ISO-8859-1
Set-Cookie: PREF=ID=5cc6...
Server: gws
Connection: Close

&lt;html&gt;
(Google web page, search box, and cute logo)
&lt;/html&gt;
</pre>
<p>Yowza. The bottom part is HTML for the browser to display. But why the junk up top? </p>
<p>Well, suppose we just got the raw HTML to display. But what about errors: if the server crashed, the file wasn't there, or google just didn't like us? </p>
<p>Some <em>metadata</em> (data about data) is useful. When we order a book from Amazon <strong>we expect a packing slip</strong> describing the order: the intended recipient, price, return information, etc. You don't want a naked book just thrown on your doorstep. </p>
<p>Protocols are similar: the recipient wants to know if everything was OK. Here we see infamous status codes like 404 (resource not found) or 200 (everything OK). These headers aren't the real data -- they're the packing slip from the server. </p>
<h2>Insights From Protocols</h2>
<p>Studying existing, popular systems is a great way to understand engineering decisions. Here are a few: </p>
<p><strong>Binary vs Plain Text</p>
<p></strong><a href="http://betterexplained.com/articles/a-little-diddy-about-binary-file-formats/">Binary data</a> is more efficient than text, but more difficult to debug and generate (how many hex editors do you know to use?). Lower-level protocols, the backbone of the internet, use binary data to maintain performance. Application-level protocols (HTTP and above) use text data for ease of interoperability. You don't have religious wars about endian issues with HTTP. </p>
<p><strong>Stateful vs. Stateless </strong></p>
<p>Some protocols are stateful, which means the server remembers the chat with the client. With SMTP, for example, the client opens a connection and issues commands one at a time (such as adding recipients to an email), and closes the connection. Stateful communication is useful in transactions that have many steps or conditions.</p>
<p>Stateless communication is simpler: you send the entire transaction as one request. Each "instant message" stands on its own and doesn't need the others. HTTP is stateless: you can request a webpage without introducing yourself to the server.</p>
<p><strong>Extensibility</strong></p>
<p>We can't think of everything beforehand. How do we extend old protocols for new users?</p>
<p>HTTP has a simple and effective "header" structure: a metadata preamble that looks like "Header:Value".</p>
<p>If you don't recognize the header sent (new client, old server) just ignore it. If you were expecting a header but don't see it (old client, new server), just use a default. It's like having an "Anything else to tell us?" section in a survey.</p>
<p><strong>Error Correction &amp; Reliability</strong></p>
<p>It's the job of lower-level protocols like TCP to make sure data is transmitted reliably. But higher-level protocols (like HTTP) need to make sure it's the <em>right</em> data. How are errors handled and communicated? Can the client just retry or does the server need to reset state?</p>
<p>HTTP comes with its own set of error codes to handle a variety of situations.</p>
<p><strong>Availability</strong></p>
<p>The neat thing about networking is that works on one computer. Memcached is a great service to cache data. And guess what? It uses plain-old text commands (over TCP) to save and retrieve data.</p>
<p>You don't need complex COM objects or DLLs - you start a Memcached server, send text in, and get text out. It's language-neutral and easy to access because any decent OS supports networking. You can even telnet into Memcached to debug it. </p>
<p>Wireless routers are similar: they have a control panel available through HTTP. There's no "router configuration program" -- you just connect to it with your browser. The router serves up webpages, and when you submit data it makes the necessary configuration changes. </p>
<p>Protocols like HTTP are so popular you can <em>assume</em> the user has a client.</p>
<p><strong>Layering Protocols</strong> </p>
<p>Protocols can be layered. We might write a resume, which is part of a larger application, which is stuffed into an envelope. Each segment has its own format, blissfully unaware of the others. Your envelope doesn't care about the resume -- it just wants the to: and from: addresses written correctly.</p>
<p>Many protocols rely on HTTP because it's so widely used (rather than starting from scratch, like Memcached, which needs efficiency). HTTP has well-understood methods to define resources (URLs) and commands (GET and POST), so why not use them?</p>
<p>Web services do just that. The SOAP protocol crams XML inside of HTTP commands. The REST protocol embraces HTTP and uses the existing verbs as much as possible.</p>
<h2>Remember: It's All Made Up </h2>
<p>Networking involves <em>human conventions</em>. Because plain text is ubiquitous and easy to use, it is the basis for most protocols. And TCP is the simplest, most-supported way to exchange text.</p>
<p><strong>Remembering that everything is a plain text IM conversation</strong> helps me wrap my head around the inevitable networking issues. And sometimes you need to jump into HTTP to understand <a href="http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/">compression</a> and <a href="http://betterexplained.com/articles/how-to-optimize-your-site-with-http-caching/">caching</a>.</p>
<p>Don't just memorize the details; see protocols as strategies to solve communication problems. Happy networking.</p>
<img src="http://feeds.feedburner.com/~r/Betterexplained/~4/O50Wvsx7kGU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRSS>http://betterexplained.com/articles/a-simple-introduction-to-computer-networking/feed/</wfw:commentRSS>
		<feedburner:origLink>http://betterexplained.com/articles/a-simple-introduction-to-computer-networking/</feedburner:origLink></item>
		<item>
		<title>Understanding Exponents (Why does 0^0 = 1?)</title>
		<link>http://feedproxy.google.com/~r/Betterexplained/~3/OaFtjPRxGHI/</link>
		<comments>http://betterexplained.com/articles/understanding-exponents-why-does-00-1/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 15:36:01 +0000</pubDate>
		<dc:creator>Kalid</dc:creator>
		
	<dc:subject>Math</dc:subject><dc:subject>e</dc:subject><dc:subject>exponents</dc:subject><dc:subject>growth</dc:subject><dc:subject>Math</dc:subject>
		<guid isPermaLink="false">http://betterexplained.com/articles/understanding-exponents-why-does-00-1/</guid>
		<description><![CDATA[ We&#8217;re taught that exponents are repeated multiplication. This is a good introduction, but it breaks down on 3&#94;1.5 and the brain-twisting 0&#94;0. How do you repeat zero zero times and get 1 &#8212; without melting your brain?

You can&#8217;t, not while exponents are repeated multiplication. Today our mental model is due for an upgrade.



Viewing arithmetic [...]]]></description>
			<content:encoded><![CDATA[<p> We&#8217;re taught that exponents are repeated multiplication. This is a good introduction, but it breaks down on 3&#94;1.5 and the brain-twisting 0&#94;0. How do you repeat zero zero times and get 1 &#8212; without melting your brain?</p>

<p>You can&#8217;t, not while exponents are repeated multiplication. Today our mental model is due for an upgrade.</p>

<p><img src="http://betterexplained.com/wp-content/uploads/exponents/mental_models.png" /></p>

<h2>Viewing arithmetic as transformations</h2>

<p>Let&#8217;s step back &#8212; how do we learn arithmetic? We&#8217;re taught that numbers are counts of something (fingers), addition is combing counts (3 + 4 = 7) and multiplication is repeated addition (2 times 3 = 2 + 2 + 2 = 6).</p>

<p>This interpretation works for nice round numbers like 2 and 10. Strange concepts like -1 and sqrt(2) don&#8217;t work. Why? </p>

<p>Our model was incomplete. Numbers aren&#8217;t just a count; a better viewpoint is a <em>position on a line</em>. This position can be negative (-1), between other numbers (sqrt(2)), or in another dimension (i).</p>

<p>Arithmetic became a way to <a href="http://betterexplained.com/articles/rethinking-arithmetic-a-visual-guide/">transform a number</a>: Addition was sliding (+3 means slide 3 units to the right), and multiplication was scaling (times 3 means scale it up 3x).</p>

<p>So what are exponents?</p>

<h2>Enter the Expand-o-tron&#8482;</h2>

<p>Let me introduce the Expand-o-tron 3000.</p>

<p><img src="http://betterexplained.com/wp-content/uploads/exponents/expandotron.png" /></p>

<p>Yes, this device <em>looks</em> like a shoddy microwave &#8212; but instead of heating food, it grows numbers. Put a number in and a new one comes out. Here&#8217;s how:</p>


<ul>
<li>Start with 1.0</li>
<li>Set the <em>growth</em> to the desired change after one second (2x, 3x, 10.3x)</li>
<li>Set the <em>time</em> to the number of seconds</li>
<li>Push the button</li>
</ul>



<p>And shazam! The bell rings and we pull out our shiny new number. Suppose we want to change 1.0 into 9:</p>


<ul>
<li>Put 1.0 in the expand-o-tron</li>
<li>Set the change for &#8220;3x&#8221; growth, and the time for 2 seconds</li>
<li>Push the button</li>
</ul>



<p>The number starts transforming as soon as we begin: We see 1.0, 1.1, 1.2&#8230; and just as finish the first second, we&#8217;re at 3.0. But it keeps going: 3.1, 3.5, 4.0, 6.0, 7.5. As just as we finish the 2nd second we&#8217;re at 9.0. Behold our shiny new number!</p>

<p>Mathematically, the expand-o-tron (exponent function) does this:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/01a411221398b04d3913a89d4502ed2d.gif' title='\displaystyle{original \cdot growth^{duration} = new}' alt='\displaystyle{original \cdot growth^{duration} = new}' align=absmiddle /></p>

<p>or </p>

<p><img src='http://betterexplained.com/latexrender/pictures/3262815fb7f02edc32f0936f1ee0904e.gif' title='\displaystyle{growth^{duration} = \frac{new}{original}}' alt='\displaystyle{growth^{duration} = \frac{new}{original}}' align=absmiddle /></p>

<p>For example, 3&#94;2 = 9/1. The base is the amount to grow each unit (3x), and the exponent is the amount of time (2). A formula like 2&#94;n means &#8220;Use the expand-o-tron at 2x growth for n seconds&#8221;.</p>

<p><strong>We always start with 1.0 in the expand-o-tron to see how it changes a single unit.</strong> If we want to see what would happen if we started with 3.0 in the expand-o-tron, we just scale up the final result. For example: </p>


<ul>
<li>&#8220;Start with 1 and double 3 times&#8221; means 1 * 2^3 = 1 * 2 * 2 * 2 = 8</li>
<li>&#8220;Start with 3 and double 3 times&#8221; means 3 * 2^3 = 3 * 2 * 2 * 2 = 24</li>
</ul>



<p>Whenever you see an plain exponent by itself (like 2^3), we&#8217;re starting with 1.0.</p>

<h2>Understanding the Exponential Scaling Factor</h2>

<p>When multiplying, we can just state the final scaling factor. Want it 8 times larger? Multiply by 8. Done.</p>

<p>Exponents are a bit&#8230; finnicky:</p>

<blockquote>
<strong>You:</strong> I&#8217;d like to grow this number.<br />
<strong>Expand-o-tron:</strong> Ok, stick it in.<br />
<strong>You:</strong> How big will it get?<br />
<strong>Expand-o-tron:</strong> Gee, I dunno. Let&#8217;s find out&#8230;<br />
<strong>You:</strong> Find out? I was hoping you&#8217;d kn-<br />
<strong>Expand-o-tron:</strong> Shh!!! It&#8217;s growing! It&#8217;s growing!<br />
<strong>You:</strong> &#8230;<br />
<strong>Expand-o-tron:</strong> It&#8217;s done! My masterpiece is alive!<br />
<strong>You:</strong> Can I go now?<br />
</blockquote>

<p>The expand-o-tron is indirect. Just looking at it, you&#8217;re not sure what it&#8217;ll do: What does 3&#94;10 mean to you? How does it make you feel? Instead of a nice tidy scaling factor, exponents want us to feel, relive, even smell the growing process. Whatever you end with is your scaling factor.</p>

<p>It sounds roundabout and annoying. You know why? <strong>Most things in nature don&#8217;t know where they&#8217;ll end up!</strong></p>

<p>Do you think bacteria <em>plans</em> on doubling every 14 hours? No &#8212; it just eats the moldy bread you forgot about in the fridge as fast as it can, and as it gets more it starts growing even faster. To predict the behavior, we use how fast they&#8217;re growing (current rate) and how long they&#8217;ll be changing (time) to figure out their final value.</p>

<p>The answer has to be worked out &#8212; exponents are a way of saying &#8220;Begin with these conditions, start changing, and see where you end up&#8221;. The expand-o-tron (or our calculator) does the work by crunching the numbers to get the final scaling factor. But someone has to do it.</p>

<h2>Understanding Fractional Powers</h2>

<p>Let&#8217;s see if the expand-o-tron can help us understand exponents. First up: what does at 2&#94;1.5 mean?</p>

<p>It&#8217;s confusing when we think of repeated multiplication. But the expand-o-tron makes it simple: 1.5 is just the amount of time in the machine.</p>


<ul>
<li>2&#94;1 means 1 second in the machine (2x growth)</li>
<li>2&#94;2 means 2 seconds in the machine (4x growth)</li>
</ul>



<p>2&#94;1.5 means 1.5 seconds in the machine, so somewhere between 2x and 4x growth (more later). The idea of &#8220;repeated counting&#8221; had us stuck.</p>

<h2>Multiplying exponents</h2>

<p>What if we want to two growth cycles back-to-back? Let&#8217;s say we use the machine for 2 seconds, and then use it for 3 seconds at the exact same power:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/78b0d7353c19af20787ea5af382799db.gif' title='\displaystyle{x^2 \cdot x^3 = ?}' alt='\displaystyle{x^2 \cdot x^3 = ?}' align=absmiddle /></p>

<p>Think about your regular microwave &#8212; isn&#8217;t this the same as one continuous cycle of 5 seconds? It sure is. As long as the power setting (base) stayed the same, we can just add the time:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/2f9aff97e47f2ba2fda5792635728294.gif' title='\displaystyle{x^y \cdot x^z = x^{y + z}}' alt='\displaystyle{x^y \cdot x^z = x^{y + z}}' align=absmiddle /></p>

<p>Again, the expand-o-tron gives us a <em>scaling factor</em> to change our number. To get the total effect from two consecutive uses, we just multiply the scaling factors together.</p>

<h2>Square roots</h2>

<p>Let&#8217;s keep going. Let&#8217;s say we&#8217;re at power level a and grow for 3 seconds:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/d2e80881a007d91b7b05c5aa213fef60.gif' title='\displaystyle{a^3}' alt='\displaystyle{a^3}' align=absmiddle /></p>

<p>Not too bad. Now what would growing for half that time look like? It&#8217;d be 1.5 seconds:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/56e4c11cb0231bd4e355cc67a3b76951.gif' title='\displaystyle{a^{1.5}}' alt='\displaystyle{a^{1.5}}' align=absmiddle /></p>

<p>Now what would happen if we did that twice?</p>

<p><img src='http://betterexplained.com/latexrender/pictures/8306f2d72a2a7a5ca09ec1e8705eb7ab.gif' title='\displaystyle{a^{1.5} \cdot a^{1.5} = a^3}' alt='\displaystyle{a^{1.5} \cdot a^{1.5} = a^3}' align=absmiddle /></p>

<p>partial growth * partial growth = full growth</p>

<p>Looking at this equation, we see &#8220;partial growth&#8221; is the square root of full growth! If we divide the <em>time</em> in half we get the <em>square root</em> scaling factor. And if we divide the time in thirds?</p>

<p><img src='http://betterexplained.com/latexrender/pictures/a4f12a7129dbb423b42b7769ea8d13fb.gif' title='\displaystyle{a^1 \cdot a^1 \cdot a^1 = a^3}' alt='\displaystyle{a^1 \cdot a^1 \cdot a^1 = a^3}' align=absmiddle /></p>

<p>partial growth * partial growth * partial growth = full growth</p>

<p>And we get the cube root! For me, this is an <em>intuitive</em> reason why dividing the exponents gives roots: we split the time into equal amounts, so each &#8220;partial growth&#8221; period must have the same effect. If three identical effects are multiplied together, it means they&#8217;re each a cube root.</p>

<h2>Negative exponents</h2>

<p>Now we&#8217;re on a roll &#8212; what does a negative exponent mean? Negative seconds means going back in time!  If going forward grows by a scaling factor, going backwards should shrink by it. </p>

<p><img src='http://betterexplained.com/latexrender/pictures/dd58410fc110b4a546842eebfe821162.gif' title='\displaystyle{2^{-1} = \frac{1}{2^1}}' alt='\displaystyle{2^{-1} = \frac{1}{2^1}}' align=absmiddle /></p>

<p>The sentence means &#8220;1 second ago, we were at half our current amount (1/2&#94;1)&#8221;. In fact, this is a neat part of any exponential graph, like 2&#94;x:</p>

<p><img src="http://betterexplained.com/wp-content/uploads/exponents/2tothex.png" /></p>

<p>Pick a point like 3.5 seconds (2&#94;3.5 = 11.3). One second in the future we&#8217;ll be at double our current amount (2&#94;4.5 = 22.5). One second ago we were at half our amount (2&#94;2.5 = 5.65).</p>

<p>This works for any number! Wherever 1 million is, we were at 500,000 one second before it. Try it below:</p>

<p><iframe width="425" height="300" frameborder="0" marginwidth="0" marginheight="0" src="http://tinyurl.com/atl5cv"></iframe></p>

<h2>Taking the zeroth power</h2>

<p>Now let&#8217;s try the tricky stuff: what does 3&#94;0 mean? Well, we set the machine for 3x growth, and use it for&#8230; <em>zero seconds</em>. Zero seconds means we don&#8217;t even use the machine!</p>

<p>Our new and old values are the same (new = old), so the scaling factor is 1. Using 0 as the time (power) means there&#8217;s no change at all. The scaling factor is always 1.</p>

<h2>Taking zero as a base</h2>

<p>How do we interpret 0&#94;x? Well, our growth amount is &#8220;0x&#8221; &#8212; after a second, the expand-o-tron obliterates the number and turns it to zero. But if we&#8217;ve obliterated the number after 1 second, it really means any amount of time will destroy the number:</p>

<p>0&#94;(1/n) = nth root of 0&#94;1 = nth root of 0 = 0</p>

<p>No matter the tiny power we raise it to, it will be <em>some</em> root of 0.</p>

<h2>Zero to the zeroth power</h2>

<p>At last, the dreaded 0&#94;0. What does it mean?</p>

<p>The expand-o-tron to the rescue: 0&#94;0 means a 0x growth for 0 seconds!</p>

<p>Although we <em>planned</em> on obliterating the number, we never used the machine. No usage means new = old, and the scaling factor is 1. 0&#94;0 = 1 * 0&#94;0 = 1 * 1 = 1 &#8212; it doesn&#8217;t change our original number. Mystery solved!</p>

<p>(For the math geeks: Defining 0&#94;0 as 1 makes many theorems work smoothly. In reality, 0&#94;0 depends on the scenario (continuous or discrete) and is under debate. The microwave analogy isn&#8217;t about rigor &#8212; it helps me see why it <em>should</em> be 1, in a way that &#8220;repeated counting&#8221; does not.)</p>

<h2>Advanced: Repeated Exponents (a to the b to the c)</h2>

<p>Repeated exponents are tricky. What does</p>

<p><img src='http://betterexplained.com/latexrender/pictures/41e295c614990ac696ebf5692ff40413.gif' title='\displaystyle{\Large (2^a)^b}' alt='\displaystyle{\Large (2^a)^b}' align=absmiddle /></p>

<p>mean? It&#8217;s &#8220;repeated multiplication, repeated&#8221; &#8212; another way of saying &#8220;do that exponent thing once, and do it again&#8221;. Let&#8217;s dissect it:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/0fa908c83c3768494db037f33bfe0937.gif' title='\displaystyle{(2^3)^4}' alt='\displaystyle{(2^3)^4}' align=absmiddle /></p>


<ul>
<li>First, I want to grow by doubling each second: do that for 3 seconds (2&#94;3)</li>
<li>Then, whatever my number is (8x), I want to grow by <em>that new amount</em> for 4 seconds (8&#94;4)</li>
</ul>



<p>The first exponent (&#94;3) just knows to take &#8220;2&#8243; and grow it by itself 3 times. The next exponent (&#94;4) just knows to take the previous amount (8) and grow it by itself 4 times. Each time unit in &#8220;Phase II&#8221; is the same as repeating all of Phase I:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/0fa908c83c3768494db037f33bfe0937.gif' title='\displaystyle{(2^3)^4}' alt='\displaystyle{(2^3)^4}' align=absmiddle />
<img src='http://betterexplained.com/latexrender/pictures/9d3a2689e0073d851dc4035eda1a0cf1.gif' title='\displaystyle{= 2^{3} \cdot 2^{3} \cdot 2^{3} \cdot 2^{3} }' alt='\displaystyle{= 2^{3} \cdot 2^{3} \cdot 2^{3} \cdot 2^{3} }' align=absmiddle />
<img src='http://betterexplained.com/latexrender/pictures/bd3810b886e9c3da710736ff3b39ebe5.gif' title='\displaystyle{= 2^{3 + 3 + 3 + 3}}' alt='\displaystyle{= 2^{3 + 3 + 3 + 3}}' align=absmiddle />
<img src='http://betterexplained.com/latexrender/pictures/d6a1bf0ed5e474f3b7328111b3401124.gif' title='\displaystyle{= 2^{12}}' alt='\displaystyle{= 2^{12}}' align=absmiddle /></p>

<p>This is where the repeated counting interpretation helps get our bearings. But then we bring out the expand-o-tron: we grow for 3 seconds in Phase I, and redo that for 4 more seconds. It works for fractional powers &#8212; for example,</p>

<p><img src='http://betterexplained.com/latexrender/pictures/085b335cdceb2741d7b86f29ea131a67.gif' title='\displaystyle{(2^{3.1})^{4.2}}' alt='\displaystyle{(2^{3.1})^{4.2}}' align=absmiddle /></p>

<p>means &#8220;Grow for 3.1 seconds, and use that new growth rate for 4.2 seconds&#8221;. We can smush together the time (3.1 &#215; 4.2) like this:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/a2c1baffa7c2dc1d883bc9854e071966.gif' title='\displaystyle{(a^b)^c = a^{b\cdot c} = (a^c)^b}' alt='\displaystyle{(a^b)^c = a^{b\cdot c} = (a^c)^b}' align=absmiddle /></p>

<p>It&#8217;s different, so try some examples:</p>


<ul>
<li>(2&#94;1)&#94;x means &#8220;Grow at 2 for 1 second, and &#8216;do that growth&#8217; for x more seconds&#8221;.</li>
<li>7 = (7&#94;0.5)&#94;2 means &#8220;We can jump to 7 all at once. Or, we can plan on growing to 7 but only use half the time (sqrt(7)). But we can do that process for 2 seconds, which gives us the full amount (sqrt(7) squared = 7).&#8221;</li>
</ul>



<p>We&#8217;re like kids learning that 3 times 7 = 7 times 3. (Or that <a href="http://betterexplained.com/articles/mental-math-shortcuts/">a% of b = b% of a</a> &#8212; it&#8217;s true!).</p>

<h2>Advanced: Rewriting Exponents For The Grower</h2>

<p>The expand-o-tron is a bit strange: numbers start growing the instant they&#8217;re inside, but we specify the desired growth at the <em>end</em> of each second.</p>

<p>We say we want 2x growth at the <em>end</em> of the first second. But how do we know what rate to start off with? How fast should we be growing at 0.5 seconds? It can&#8217;t be the full amount, or else we&#8217;ll overshoot our goal as our interest compounds.</p>

<p>Here&#8217;s the key: <strong>Growth curves written like 2&#94;x are from the observer&#8217;s viewpoint, not the grower.</strong></p>

<p>The value &#8220;2&#8243; is measured at the <em>end</em> of the interval and we work backwards to create the exponent. This is convenient for us, but not the growing quantity &#8212; bacteria, radioactive elements and money don&#8217;t care about lining up with our ending intervals!</p>

<p>No, these critters know their <em>current, instantaneous growth rate</em>, and don&#8217;t try to line it up with our boundaries. It&#8217;s just like <br />
understanding radians vs. degrees&#8221;:http://betterexplained.com/articles/intuitive-guide-to-angles-degrees-and-radians/ &#8212; radians are &#8220;natural&#8221; because they are measured from the mover&#8217;s viewpoint.</p>

<p>To get into the grower&#8217;s viewpoint, we use the <a href="http://betterexplained.com/articles/an-intuitive-guide-to-exponential-functions-e/">magical number e</a>. There&#8217;s much more to say, but we can convert any &#8220;observer-focused&#8221; formula like 2&#94;x into a &#8220;grower-focused&#8221; one:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/c610af394d5623be622365fa59df67e9.gif' title='\displaystyle{2^x = (e^{ln(2)})^x = e^{ln(2)x} }' alt='\displaystyle{2^x = (e^{ln(2)})^x = e^{ln(2)x} }' align=absmiddle /></p>

<p>In this case, ln(2) = .693 = 69.3% is the instantaneous growth rate needed to look like 2&#94;x to an observer. When you enter &#8220;2x growth at the end of each period&#8221;, the expand-o-tron knows to grow the number at a rate of 69.3%. </p>

<p>We&#8217;ll save these details for another day &#8212; just remember the difference between the grower&#8217;s instantaneous growth rate (which the bacteria controls) and the observer&#8217;s chart that&#8217;s measured at the end of each interval. Underneath it all, every exponential curve is a scaled version of e&#94;x:</p>

<p><img src='http://betterexplained.com/latexrender/pictures/2d076a90f03d9588b0e197abaf862dc5.gif' title='\displaystyle{a^x = (e^{ln(a)})^x = e^{ln(a)x} }' alt='\displaystyle{a^x = (e^{ln(a)})^x = e^{ln(a)x} }' align=absmiddle /></p>

<p>Every exponent is a variation of e, just like every number is a scaled version of 1. </p>

<h2>Why use this analogy?</h2>

<p>Does the expand-o-tron exist? Do numbers really gather up in a line? Nope &#8212; they&#8217;re ways of looking at the world.</p>

<p>The expand-o-tron removes the mental hiccups when seeing 2&#94;1.5 or even 0&#94;0: it&#8217;s just 0x growth for 0 seconds, which doesn&#8217;t change the number. Everything from slide rules to Euler&#8217;s formula begins to click once we recognize the core theme of growth &#8212; even beasts like i&#94;i can be tamed.</p>

<p>Friends don&#8217;t let friends think of exponents as repeated multiplication. Happy math. </p><img src="http://feeds.feedburner.com/~r/Betterexplained/~4/OaFtjPRxGHI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRSS>http://betterexplained.com/articles/understanding-exponents-why-does-00-1/feed/</wfw:commentRSS>
		<feedburner:origLink>http://betterexplained.com/articles/understanding-exponents-why-does-00-1/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 1.553 seconds --><!-- Cached page served by WP-Cache -->
