Powers to The People

“You say logarithms and exponents have to do with growth, Mr Moire?”Log Exp and slide rule captioned

“Mm-hm.  Did they teach you about compound interest in that Modern Living class, Jeremy?”

“Yessir.  Like if I took out a loan of say $10,000 at 10% interest, I’d owe $11,000 at the end of the first year and, um…, $12,100 after two years because the 10% applies to the interest, too.”

“Nice mental arithmetic.  So what you did was multiply that base amount by 1+10% the first year and (1+10%)² the second, right?”

“Well, that’s not the way I thought of it, but that’s the way it works out, alright.”

“So it’d be (1+10%)³ the third year and in general (1+rate)n after n years, assuming you don’t make any payments.”

“Sure.”

“OK, how do we have to revise that formula if the interest is compounded daily and you get lucky and pay it off in a lump sum after 19 months?”

“Can I use your whiteboard?”

“Go ahead.”

“OK, first thing to change is the rate, because the 10% was for the whole year.  We need to use 10%/365 inside those parentheses.  But then we’re counting time by days instead of years.  Each day we multiply the previous amount by another (1+10%/365), which makes the exponent be the number of days the loan is out, which is 19 times whatever the average number of days in a month is.”

“Why not just use 19×(365÷12)?”

“Can we do that?  In an exponent?”

“Perfectly legal, done in all the best circles.”

“So what we’ve got is
10000×[1+(10%/365)]19×(365÷12).

“Try poking that into your smartphone’s spreadsheet app and format it for dollars.”

“In spreadsheet-ese that’d be
=10000*(1+(0.1/365))^(19*(365/12)).
Hah!  The app took it, and comes up with … $11,715.31.  Lemme try that with two years that’s 24 months.  Now it’s $12,213.69.  Hey, that’s $123 more than two years compounded once-a-year.  Compounding more often generates more interest, doesn’t it?”

“Which is why daily compounding is the general rule in consumer lending.  But there’s a couple more lessons to be learned here.  One, you can do full-on arithmetic inside an exponent.  That’s what the log log scales are for on a slide rule.  Two, the expression you worked up has the form
base×(growth factor)(time function).
Any time you’re modeling something that grows or shrinks in some percentage-wise fashion, you’re going to have exponential expressions like that.”

“Hey, I tried compounding more often and it didn’t make much difference.  I put in 3650 instead of 365 and it only added 30¢ to the total.”

“Which gives me an idea.  Load up cells A1:A7 in your spreadsheet with this series: 1, 3, 10, 30, 100, 300, 1000.  Got it?”

“Ahhh … OK.  Now what?”

“Now load cell B1 with +10000*(1+(0.1/A1))^(24*(A1/12)).”

“Says $12,100.”

“Fine.  Now copy that cell down through B7.”

“Hmm…  The answers go up but by less and less.”

“Right.  Now highlight A1:B7 and tell your spreadsheet to generate a scatter plot connected by straight lines.”

“Gimme a sec … OK.  The line goes straight up, then straight across almost.”

“Final step — click on the x-axis and tell the program to use a logarithmic scale.”diminishing returns

“Hey, the x-numbers scrunch and wrap like on the A, B and K scales on Dad’s slide-rule.”

“Which is what you’d expect, right?  They both use logarithmic scales.  The slide-rule uses logarithms to do its arithmetic thing.  The graphing software lets you use logarithms to display big numbers together with small numbers.  But the neat thing about this graph is that it shows two different flavors of a general pattern.  Adding something, say 20, to a number to the left on the x-axis moves you a longer distance than adding the same amount somewhere over on the right.  That’s diminishing returns.”

“Look, the heeling-over curve shows diminishing returns from compounding interest more and more often.”

Exploding returns“Good.  Now copy A1:A7 by value into C1:C7 and generate a scatter plot of B1:C7. This time apply the logarithmic scale to the y-axis. This’ll show us how often we’d need to compound to get the yield on the x-axis.”

“Whoa, it blows up, like there’s no way to get up to $12,300.”

“Call it exploding returns.  Increasing the exponent increases the growth factor’s impact.  Beyond a threshold, a small change in the growth factor can make a huge difference in the result.”

“Seriously huge.”

“Exponentially huge.”

~~ Rich Olcott

Log-rhythmic gymnastics

I recognized the knock.  “Come on in, Jeremy, the door’s open.”

“Hi, Mr Moire.  Can you believe this weather?  Did Miss Anne like her gelato?  What’s this funny ruler thing that my Dad sent me?  He said they used it to send men to the moon.”

log rhythm

“No, yes, it’s called a slide rule, and he’s right — back in the 1960s engineers used slip-sticks like that when they couldn’t get to a four-function mechanical calculator.  Now, though, they’re about as useful as a cast-iron bath towel.  Kind of a shame, because the slide rule is based on mathematical principles that are fundamental to just about all of mathematical physics.”

“Like what?”

“The use of exponents, for one.  Add exponents to multiply, subtract to divide.  Quick — what’s 100×100×100?”

“Uhh…  Ten million?”

“Nup.  But if I recast that as 102×102×102=102+2+2?”

“106.  Oh, that’s a million.”

“See how easy?  We’ve known that kind of arithmetic since Archimedes.  The big advance was in the early 1600s when John Napier realized that the exponents didn’t have to be integers.  Take square roots, for example.  What’s the square root of 100?”

“Ten.”

“Sure — √100=√(102)=102/2=101=10.  Now write √10 with exponents.”

“Would it be 101/2?”

“Let’s see.  Do you have a spreadsheet app on that tablet you carry?”

“Sure.”

“OK, bring it up.  Poke =10^(0.5) into cell A1, and =A1^2 into A2.  What do you get?”

“Gimme a sec … the first cell says 3.162278 and the second says … exactly 10.”

“Or as exact as that software is set up for.  So what we’ve got is that 0.5 is a perfectly good power of ten, and exponent arithmetic works the same with it and all the other rational numbers that it does with integers.  Too big a leap, or are you OK with that?”

“OK, I suppose, but what does that have to do with this gadget getting people to the Moon?”

“Take a good look at at the C scale, the lowest one on the middle ruler that slides back and forth.  Are the numbers evenly spaced out?”

“No, they’re stretched out at the low end, scrunched together at the high end.”Slide rule 3“Look for 3.16 on there.  You read it like a ruler — the number before the decimal point shows as a digit, then you locate the fractional part with the high and low vertical lines.”

“Got it.  About halfway across.”

“It’s exactly on center if that’s a good slide rule.  A number’s distance along the scale should be proportional to the exponent of 10 (we call it the logarithm) that gives you that number.  The C scale’s left end is 1.0, its right end is 10.0, and 3.162 is halfway.”

“Ah, I see how it works.  Adding distances is like adding exponents.  So if I want to multiply 2 by 3 I slide the middle ruler until its 1 is against 2 on the D scale, then I look for 3 on the C scale and, yes! it’s right next to 6 on the D scale!  Oh and the A and B scales wrap twice in the same distance so they must be logarithms for squares?  Hah, there’s 10 on B right above where I found 3.16 on CK wraps three times so it must be cubes, but why did they call it K?”

“Blame the Germans, who spell ‘cube‘ with a ‘k‘.  What do you suppose CI does?”

“Hmm, it runs backwards.  Adding with CI would be like subtracting distances which would be like dividing, so … I’ll bet it’s ‘C-Inverse‘!”

“You win the mink-lined frying pan.  So you see how even a simple 5- or 6-scale device can do a lot of calculation.  The really fancy ones had as many as a dozen scales on each side, ready for doing trigonometry, compound interest, all kinds of things.  That’s the quick compute power the rocket engineers used back in the 50s.”

“Logarithms did all that, eh?”

“Yup, that and the inverse operation, exponentiation.  Of course, you don’t have to build your log and exponent system around 10.  If you’re into information theory you might use powers of 2.  If you’re doing physics or pure math you’re probably going to use a different base, Euler’s number e=2.71828.  Looks weird, but it’s really useful because calculus.”

“So logarithms do calculating.  You said something about physical principles?”

“Calculating growth, for instance…”

~~ Rich Olcott

Two Sharp Dice

<further along our story arc>  “Want a refill?”

“No, I’ve had enough.  But I could go for some dessert.”

“Nothing here in the office, care for some gelato?”

We take the elevator down to Eddie’s on 2.  Things are slow.  Jeremy’s doing homework behind the gelato display.  Eddie’s at the checkout counter, rolling some dice.  He gives the eye to her white satin.  “You’ll fit right in when the theater crowd gets here, Miss.  Don’t know about you, Sy.”White satin and dice

“Fitting in’s not my thing, Eddie.  This is my client, Anne.  What’s with the bones?”

“Weirdest thing, Sy.  I’m getting set up for the game after closing (don’t tell nobody, OK?) but these dice gotta be bad somehow.  I roll just one, I get every number, but when I roll the two together I get nothin’ but snake-eyes and boxcars.”

I shoot Anne a look.  She shrugs.  I sing out, “Hey, Jeremy, my usual chocolate-hazelnut combo.  For the lady … I’d say vanilla and mint.”

She shoots me a look.  “How’d you know?”

I shrug.  “Lucky guess.  It’s a good evening for the elephant.”

“Hey, no livestock in here, Sy, the Health Department would throw a fit!”

“It’s an abstract elephant, Eddie.  Anne and I’ve been discussing entropy.  Which is an elephant because it’s got so many aspects no-one can agree on what it is.”

“So it’s got to do with luck?”

“With counting possibilities.  Suppose you know something happened, but there’s lots of ways it could have happened.  You don’t know which one it was.  Entropy is a way to measure what’s left to know.”

“Like what?”

“Those dice are an easy example.  You throw the pair, they land in any of 36 different ways, but you don’t know which until you look, right?”

Dice odds

“Yeah, sure.  So?”

“So your uncertainty number is 36.  Suppose they show 7.  There’s still half-a-dozen ways that can happen — first die shows 6, second shows 1, or maybe the first die has the 1 and the second has the 6, and so on.  You don’t know which way it happened.  Your uncertainty number’s gone down from 36 to 6.”

“Wait, but I do know something going in.  It’s a lot more likely they’ll show a 7 than snake-eyes.”

“Good point, but you’re talking probability, the ratio of uncertainty numbers.  Half-a-dozen ways to show a 7, divided by 36 ways total, means that 7 comes up seventeen throws out of a hundred.  Three times out of a hundred you’ll get snake-eyes.  Same odds for boxcars.”

“C’mon, Sy, in my neighborhood little babies know those odds.”

“But do the babies know how odds combine?  If you care about one event OR another you add the odds, like 6 times out of a hundred you get snake-eyes OR boxcars.  But if you’re looking at one event AND another one the odds multiply.  How often did you roll those dice just now?”

“Couple of dozen, I guess.”

“Let’s start with three.  Suppose you got snake-eyes AND you got snake-eyes AND you got snake-eyes.  Odds on that would be 3×3×3 out of 100×100×100 or 27 out of a million triple-throws.  Getting snake-eyes or boxcars 24 times in a row, that’s … ummm … less than one chance in a million trillion trillion sets of 24-throws.  Not likely.”

“Don’t know about the numbers, Sy, but there’s something goofy with these dice.”

Anne cuts in.  “Maybe not, Eddie.  Unusual things do happen.  Let me try.”  She gets half-a-dozen 7s in a row, each time a different way.  “Now you try,” and gives him back the dice.  Now he rolls an 8, 9, 10, 11 and 12 in order.  “They’re not loaded.  You’re just living in a low-probability world.”

“Aw, geez.”

“Anyway, Eddie, entropy is a measure of residual possibilities — alternate conditions (like those ways to 7) that give identical results.  Suppose a physicist is working on a system with a defined number of possible states.  If there’s some way to calculate their probabilities, they can be plugged into a well-known formula for calculating the system’s entropy.  The remarkable thing, Anne, is that what you calculate from the formula matches up with the heat capacity entropy.”

“Here’s your gelato, Mr Moire.   Sorry for the delay, but Jennie dropped by and we got to talking.”

Anne and I trade looks.  “That’s OK, Jeremy, I know how that works.”

~~ Rich Olcott

Enter the Elephant, stage right

Anne?”

“Mm?”

“Remember when you said that other reality, the one without the letter ‘C,’  felt more probable than this one?”

“Mm-mm.”

“What tipped you off?”

Now you’re asking?”

“I’m a physicist, physicists think about stuff.  Besides, we’ve finished the pizza.”

<sigh> “This conversation has gotten pretty improbable, if you ask me.  Oh, well.  Umm, I guess it’s two things.  The more-probable realities feel denser somehow, and more jangly. What got you on this track?”

“Conservation of energy.  Einstein’s E=mc² says your mass embodies a considerable amount of energy, but when you jump out of this reality there’s no flash of light or heat, just that fizzing sound.  When you come back, no sudden chill or things falling down on us, just the same fizzing.  Your mass-energy that has to go to or come from somewhere.  I can’t think where or how.”

“I certainly don’t know, I just do it.  Do you have any physicist guesses?”

“Questions first.”

“If you must.”

“It’s what I do.  What do you perceive during a jump?  Maybe something like falling, or heat or cold?”

“There’s not much ‘during.’  It’s not like I go through a tunnel, it’s more like just turning around.  What I see goes out of focus briefly.  Mostly it’s the fizzy sound and I itch.”

“Itch.  Hmm…  The same itch every jump?”

“That’s interesting.  No, it’s not.  I itch more if I jump to a more-probable reality.”

Very interesting.  I’ll bet you don’t get that itch if you’re doing a pure time-hop.”

“You’re right!  OK, you’re onto something, give.”

“You’ve met one of my pet elephants.”

“Wha….??”White satin and elephant

“A deep question that physics has been nibbling around for almost two centuries.  Like the seven blind men and the elephant.  Except the physicists aren’t blind and the elephant’s pretty abstract.  Ready for a story?”

“Pour me another and I will be.”

“Here you go.  OK, it goes back to steam engines.  People were interested in getting as much work as possible out of each lump of coal they burned.  It took a couple of decades to develop good quantitative concepts of energy and work so they could grade coal in terms of energy per unit weight, but they got there.  Once they could quantify energy, they discovered that each material they measured — wood, metals, water, gases — had a consistent heat capacity.  It always took the same amount of energy to raise its temperature across a given range.  For a kilogram of water at 25°C, for instance, it takes one kilocalorie to raise its temperature to 26°C.  Lead and air take less.”

“So where’s the elephant come in?”

“I’m getting there.  We started out talking about steam engines, remember?  They work by letting steam under pressure push a piston through a cylinder.  While that’s happening, the steam cools down before it’s puffed out as that classic old-time Puffing Billy ‘CHUFF.’  Early engine designers thought the energy pushing the piston just came from trading off pressure for volume.  But a guy named Carnot essentially invented thermodynamics when he pointed out that the cooling-down was also important.  The temperature drop meant that heat energy stored in the steam must be contributing to the piston’s motion because there was no place else for it to go.”

“I want to hear about the elephant.”

“Almost there.  The question was, how to calculate the heat energy.”

“Why not just multiply the temperature change by the heat capacity?”

“That’d work if the heat capacity were temperature-independent, which it isn’t.  What we do is sum up the capacity at each intervening temperature.  Call the sum ‘elephant’ though it’s better known as Entropy.  Pressure, Volume, Temperature and Entropy define the state of a gas.  Using those state functions all you need to know is the working fluid’s initial and final state and you can calculate your engine.  Engineers and chemists do process design and experimental analysis using tables of reported state function values for different substances at different temperatures.”

“Do they know why heat capacity changes?”

“That took a long time to work out, which is part of why entropy’s an elephant.  And you’ve just encountered the elephant’s trunk.”

“There’s more elephant?”

“And more of this.  Want a refill?”

~~ Rich Olcott