Electric bike!

Last week, Bob's old mountain bike (which he gave me when he stopped riding, and which I didn't ride all that much in Hobart but made my regular commute after moving to Sydney) had died. I say "died," but in fairness, it's just a bit wonky and in need of repair.

Having fallen in lesbians with some of the loaner electric bikes at work (BH E-motion, very fun premium electric bikes), I figured it was time to get something similar. On the weekend I walked over to Sydney Electric Bikes and test-rode a few, before finally choosing the model I wanted. Having parted with a chunk of money via bank transfer on Monday, it arrived and was ready on Tuesday afternoon. I excitedly hurried  to the store to get my paws on it because it's awesome.

The model I got is the SmartMotion e20 folding electric bike. It's made by a New Zealand company (going to visit the country soon!) who devised the electric system they use on the postie bicycles there. This bike is fun. It has five levels of pedal assist, throttle, integrated lights, clicky-shifter derailleur sprockets, and a freaking USB port on the 12Ah battery for charging my other devices. It's all mine and I'm going to ride it all over the place—the electric system is apparently good for 40-60km on a charge.

The folding part is interesting. I've not owned a folding bike before. Benefit, the first: I can take it travelling far more easily. It also has 20-inch diameter wheels. These are ostensibly to take up less space, but mechanically the bike has better torque than standard size bikes, which is good for hill-climbing. (Sydney's no Hobart, but it's no Melbourne either.) The only downside seems to be the increased bumpiness, but I'd be a whinger to complain about that seriously.

Oh, and it's red. :D


Dear Sorbent


Hi, Sorbent.

How are you?

This morning I was in my bathroom and couldn't help but read the advertising spiel on the back of the plastic wrapping on the rolls of toilet paper. For reference, here's what it says:

"Always soft, always strong.
What makes Sorbent so soft, yet still so strong?
It's a very clever combination of two different types
of paper. The top layer is air-dried for softness and
thickness, the bottom layer (no pun intended!) is
thick creped paper, for added strength. And Sorbent Long Roll
means 50% more sheets on every roll.
Which means you only need to change it half as often!"

Let's talk about the last two sentences there. If a Sorbent Long Roll has 50% more sheets on every roll, then you need to change it two-thirds as often, not half as often.

I know you are a toilet paper company, and not the Australian Bureau of Statistics. But I feel that this sort of dishonest marketing may have just been an honest mistake, so I'll explain it for you.

Let's suppose a regular roll has 100 sheets, and I use on average 5 sheets per day. This means you would expect me to replace the roll after 20 days (20 days = 100 sheets / 5 sheets per day).

If a Long Roll has 50% more, then it has 100 sheets + 50% of 100 sheets = 150 sheets total. Cool! But I'm still using 5 sheets per day. Therefore I will change the roll after 150 sheets / 5 sheets per day = 30 days.

In 60 days time, I will have used three regular rolls of 100 sheets, or two Long Rolls of 150 sheets. That means I'm replacing the Long Rolls two-thirds as often as the regular ones.

To replace the rolls half as often, each roll would need to be twice as long, i.e. have 100% more sheets, not 50% more sheets.

Note that you can swap out the size of a regular roll and the rate of use, and the maths still works out (as long as you're consistent)---a Long Roll, if it has 50% more sheets than a regular roll, will be replaced two-thirds as often.

Other than to have even bigger rolls, the only way I can see to get long rolls replaced half as often as regular rolls would be to have reusable toilet paper, and nobody wants that.

In reality, we don't use toilet sheets at a fixed rate, so your mileage may vary (no pun intended). But I would contend hypothetically that the availability of more toilet paper would encourage people to use it more quickly. This means in practice that Long Rolls get replaced even more often than two-thirds as often as regular rolls.

I realise that this highly advanced analysis using basic arithmetic may be confusing to you, but fortunately you should be able to confirm my working by asking the average third year primary school student. However, please note that to maintain accuracy, you may wish to ask them before the Abbott government brings in yet more national curriculum changes.



PS: The plus symbol + is a valid character in the email field, but your form rejected it. Please refer to internet RFC 822 (issued in 1982) as the relevant standard. www.ietf.org/rfc/rfc0822.txt

Number shuffler addition

My current diversion of late has been Threes. You may have heard of the rip-off that spawned a thousand similar rip-offs, 2048. I will call this kind of game "number shufflers" even though the tiles don't have to be numbers.

In both the original, and superior, game Threes, and the many derivations, you have a board of fixed size and a number of tiles. A tile is added after each move, and the game ends when no space remains, therefore it is in the player's interest to eliminate tiles. The only way to do so is to combine "twins"---tiles with the same number/type. (Threes has the wrinkle that there are special "1" and "2" tiles that can only be combined as 1+2.) Combining two twins gives you a tile of the next type. With numbers, the resulting tile usuallly has the value of the sum of the previous two tiles. Thus as you create higher and higher tiles, you have fewer chances to combine them, and the tile values increase exponentially.

I got thinking about the large numbers possible in these games. It is known that presenting a gamer with huge numbers leads to reduced ability to compare them quickly. Who is going to sit down and compare all the digits for their three gajillion fantillion power level character against some other bazillionty level character, especially in the middle of an action-fight sequence? This is a problem avoided with Threes (et al) simply because the higher tiles are much rarer, and it is a puzzle game where you can take as much time as you like.

You could represent the tiles with simpler numbers---1, 2, 3, 4, etc, instead of the exponentially increasing 3, 6, 12, 24, and so on. But then the "addition" breaks. "Adding" two tiles of the same kind just gives you the next tile, not the sum of the two. For example, instead of 1+1=2, 2+2=4, 4+4=8, one has 1\oplus1 = 2, 2\oplus2 = 3, 3\oplus3 = 4. With a little thought it turns out it's very easy to implement \oplus with a kind of twisted addition defined as follows:

   a \oplus b := \log_2( 2^a + 2^b ) \quad\text{ for all } a, b.

For example,

  2 \oplus 2 = \log_2( 2^2 + 2^2 ) = \log_2(4+4) = \log_2 8 = 3.

It is easy to see that \oplus is commutative (swap inside the logarithm) and even associative:

  (a \oplus b) \oplus c = \log_2\left(2^{a\oplus b} + 2^c \right) = \log_2\left( 2^{\log_2(2^b + 2^c)} + 2^c \right) = \log_2(2^a + 2^b + 2^c)

(similarly for the other arrangement). Most pleasingly, however, regular addition distributes over \oplus:

  a + (b\oplus c) = a + \log_2(2^b + 2^c) = \log_2 2^a + \log_2(2^b + 2^c) = \log_2 2^a(2^b + 2^c) = \log_2 (2^{a+b} + 2^{a+c}) = (a+b)\oplus (a+c).

You get "fun" results if you add two different numbers, and it seems that there's no identity element unless you include -\infty and assert that 2^{-\infty} = 0 (alternatively, \log 0 = -\infty). Thus

  x \oplus (-\infty) = \log_2(2^x + 2^{-\infty}) = \log_2 (2^x + 0) = x.

Furthermore there are no inverse elements unless you escape the extended real line entirely. For example, \log_2(-1) = \frac{i\pi}{\ln 2}, and therefore

 0 \oplus \frac{i\pi}{\ln 2} = \log_2\left( 2^0 + e^{i\pi} \right) = \log_2(1 - 1) = -\infty.

I should be doing work.

Leaves your eyeballs feeling minty-fresh.