Monday, April 16, 2012

Well, shoot. I guess I'd better tackle this one while I've got two hours left in the weekend, and I've been putting it off for long enough: gear ratios. (Dun dun dun.) I'll admit that I'm treating this topic a bit like I treat the calculus I've forgotten: it'll probably be fine once I've read through it once or twice, but I don't want to admit how much I don't know about it. And don't worry...I hear you. "Gear ratios?" you're saying. "Why don't you just write about taxes or spreadsheets or spark plugs or something maybe minimally more exciting than gear ratios?" My response is: I KNOW. And I have a counter-response, which is this:


http://www.lisaboyer.com/Claytonsite/swoopypage1.htm
Which is to say, I WANT one, and also to say that wooden clock plans are free and available online, and they're not gonna make themselves. So: on to mathy things.

Very generally, you want to have a firm grasp of gear ratios when:
  • you have one thing spinning very quickly and you want to slow it down
  • you have something spinning very slowly and you want to speed it up
  • you own a bike and live in a very hilly area
  • you own a manual-transmission car and live in a very hilly area
  • you want to transmit rotational motion from point A to point B, which are fixed
Picture two gears, of equal size. the first one is connected to a motor (the driver gear) and the second one (the driven gear) meshes with the first. When the first one rotates - let's say at 1 revolution per second - the second one follows suit exactly. That's the trivial case - the ratio is 1:1, because both gears are rotating at the same speed. Here's a non-trivial case: 

[fedora gears]
Licensed under a Creative Commons license from here:
http://howto.nicubunu.ro/gears
Let's call the gear at the lower left the driver gear. It has 12 teeth. The next gear in the train has 25 teeth, and is correspondingly bigger. Ignoring the third gear for the moment, what's going on with these two? Say the small gear still spins at a constant rate of 1 revolution/second (that would be omega, for those of you with a physics textbook). When all 12 teeth have gone around once, the bigger gear has advanced by 12 teeth as well - only about half of a full revolution. It takes the bigger gear longer to make a full revolution, so it has a slower rotational velocity. How much slower? A gear ratio is defined as Omegadriven:Omegadriver or Nteethdriven:Nteethdriver. (Omega and N - the number of teeth - are proportional, so which equation you use doesn't matter.) So for this example, 
Ndriven:Ndriver = 25/12 = 2.08

The small gear spins 2.08 times faster than the big one. Put another way, the small gear has to make 2.08 revolutions to get the big gear to turn once.

Let's isolate the second and third gears, now. We know that the second gear has 25 teeth. The third has 18. Now the equation gets us:
Ndriven:Ndriver = 18/25 = 0.72
So the third gear spins one revolution for every 0.72 turns of the middle one. New question, then: how many turns of the driver gear does it take for the third gear to make one revolution? Wikipedia says that you can just multiply the individual gear ratios in the train to get the overall ratio for the entire train, provided all the gears contact each other. (I'm not sure I understand mathematically why that's so, but I'll run with it for now.) That leaves us with:
 2.08*0.72 = 1.4976
The driver gear makes 1.4976 revolutions for every one turn of the third gear. And now you should be getting suspicious, because the first gear has 12 teeth and the third gear has 18, and 18/12 is awfully close to 1.4978. It turns out that, provided the gears contact each other, you can simply take the ratio of the first and last gears to get the total gear ratio between them. (The discrepancy between the answer calculated above and the 1.5 you'd get from dividing 18/12 is because I rounded 2.083333333...into something easier to type.)

So...err....not that bad after all, at least not yet. Some questions I can think of (namely, "If my escapement gear has 12 teeth, how many leaves should my fourth wheel pinion have, and how many teeth should my fourth gear have, and how many leaves should my third wheel pinion have (etc., etc.), so that the center wheel makes one revolution every hour?") might be considerably more complicated. I'm sure you have exactly the same questions.

Are you done with gear ratios for now? I'm done.


Friday, April 13, 2012

Clockwork and Cryptography: Angelmaker Code Hints, Part 5


Welcome back, Detachment 2702. How goes the codebreaking? Hopefully you've made some progress. Have you checked the classifieds yet? *wink wink*

Hint 0/1
Hint 2
Hint 3
Hint 4

So when I was at this point in the code, I was able to read ciphertext where I knew the plaintext equivalent - namely, the hint pages that Knopf put out, like this one:

\

If I were a gung-ho codebreaker, and I decided I didn't want any 3rd-party hints (i.e., those from this blog), and that I just wanted to use what Knopf provided (good for you!), I think that the most valuable ones to look at are probably the one above and the "Soot and sorrow, I know it" one. Just sayin'.

As I think I mentioned before, this image was pretty key in my realization that 1) the text in the hint pages was reflected in the disks and 2) the disks were not 1:1 with either letters or words.  In five of the first six images, the code reiterates some of the text on the page. I'm not saying which ones, but if you haven't figured that bit out yet...happy birthday. Free hint. Since I last posted, Knopf put up an extra three hint pages (here), and they're perhaps slightly trickier. Although come to think of it, when I first tackled the hint pages, I spent some time considering that the code disks could spell out (MAJOR HINT) the speaker of the quote, and not the quote itself. 


Look at me, rambling on, and that's not even what I brought you all here to say. Like I mentioned above, if you sort of half-understand how the disks break up the plaintext, you can read things like the hint pages, but not anything useful - like the text on the dust jacket. This hint might help:


What's up with the gap?
Straight up: the "gap" in the outer ring (where it exists) represents the beginning of a word. Where there's no gap, that means that the disk continues the word started by the prior disk. 
 Just like this bit of linguistic and etymological sleight of hand, yuo cna rdae tihs qtieu esaiyl, as lngo as teh itniail ltetsre aer in teh prorep pcael. Knowing where that first letter goes will go a long way towards clarifying the plaintext. 


That said, there don't seem to be totally explicit rules as to how the plaintext is broken up across the disks. Based on Hint 1, I initially thought it was purely syllabic, but based on something apocalyptic (*wink wink nudge nudge*), I think it may be just a matter of convenience. Certainly, you can find disks that hold more or less than one syllable by the official definition.

Hope that helps you...and please do drop me a note! If you've cracked the thing wide open, I'd love to hear about it, and if you're hopelessly stuck, leave a comment and I'll see what I can do to help. Has anyone made it all the way down the rabbit hole yet? If so, I don't believe I caught your name...?  ;)

Happy codebreaking!

That's all I've got for now...if you need more help, feel free to leave a comment, and I'll see what I can do.

Sunday, April 8, 2012

Clockwork and Cryptography: Angelmaker Code Hints, Part 4

Welcome back! Before you read this hint, make sure you take a look at the preceding ones:

Hint 0/1
Hint 2
Hint 3

We've gotten to the point where the things I point out as hints may be old news to you. On the other hand, who knows? It's time to consider one of three (possibly four) features of this code that I'm going to call "non-core" - i.e., they modify the code's basic functionality to improve its comprehensiveness. I'm sure that the basic codebreaking literature addresses this (and maybe has a different term for it), but for my purposes, I'm going to define "comprehensive" as "the ability of a code to represent all elements of the plaintext as ciphertext." This code is about 98% comprehensive. For comparison, a non-comprehensive code might represent the plaintext
ATTACK AT DAWN, SIGNED PATTON
like this:
TTCK T DWN SGND PTTN
which is 1) not a very good code, and 2) unable to represent words such as "a" or "I". It's not as comprehensive as a Caesar cipher (95-100% comprehensiveness, depending on the plaintext) because there are letters in the original message - the vowels and the punctuation - which simply can't be written in the code.  (For interested parties: you could figure out the comprehensiveness of this code by adding up all the letter frequencies of A, E, I, O, and U and subtracting from 100.)

Assuming that you've figured out the basics of how the Angelmaker code works, I'm going to estimate its comprehensiveness at around 85%, depending on what you've realized about certain other features. You could definitely read the message(s) if you couldn't figure this bit out, but there would be some ambiguity. If you add in the feature I'm pointing out here, you'd be at around 88% - maybe as much as 90 or 91, although I haven't done the research. So: what's the deal with this?


Well?

In Hint 1, I think I pooh-poohed the idea of comparing the relative frequencies of each disk (and rightly so, as you'll probably have realized by now). Now I'm going to tell you to bring that strategy back. Where does that extra line appear? How often? Does it ever appear in the inner ring? How many sections (out of the total 12 outer + 6 inner  = 18) does it bisect? I'd also suggest that you just browse around here for a bit. Just sayin'. 

And there you go! That's three hints in one, for those keeping score at home. Oh...I only put in two? I'm so terribly sorry, I must be mistaken. Bwahahahaha. 

Have fun!

(Or for extra help, read the next hint here.)




Wednesday, April 4, 2012

Clockwork and Cryptography: Angelmaker Code Hints, Part 3

My dear fellow cryptographer,

May I congratulate you on your perseverance? You've been plugging away at this code for quite some time now, it appears. Well, perhaps you haven't - perhaps you've just googled "Angelmaker code hints," blew right past my admonitions to not read the hints, and started reading hints 0, 1, and 2 straight away - but I'll give you the benefit of the doubt. 

Some suspicions about the nature of this code should be forming in your mind, and you may even be starting to test out a few theories. This is a good thing, and all the more reason that you should IGNORE THIS HINT AND SOLVE IT YOURSELF. You'll be so proud of yourself! This is a code that was meant to be broken, and it was meant to be broken by the likes of YOU. Go solve it, you young Champollion, you, and let me know when you're done. 

Still here? All right, then. I did imply that you were dedicated. Here's the third hint:
You're looking at a monoalphabetic cipher with a twist.
In a monoalphabetic cipher, one ciphertext symbol stands for one plaintext symbol. The very first code you ever broke was probably a monoalphabetic cipher, and most likely a Caesar cipher at that (you know, where you shift the alphabet however many letters to the right, so that A is encoded as E, B as F, C as G, and so forth). This is obviously not a Caesar cipher (there's no alphabet to shift), but the ciphertext symbols have a one-to-one mapping with the plain text. Now, that's a gigantic hint if you haven't made a particular realization yet, so I won't elaborate any more. (If you have made that realization...er, sorry. Getcha next time.) Go look at the picture I posted in Hint 1, then come back and read this hint again. Hopefully, you'll have one of those lovely "aha" moments that make codebreaking so satisfying. 

Oh, what's the twist? Not telling (yet). Sorry.

Happy codebreaking!

(If you need more help, here's Hint 4.)


Tuesday, April 3, 2012

Clockwork and Cryptography: Angelmaker Code Hints, Part 2

So here's the situation: you've read Nick Harkaway's Angelmaker, found out there's a code (!) on the American dust jacket, you've tried to solve it, and you're stuck. Presumably you've also read hints 0 and 1 here, and didn't make a whole lot of progress. In that case, you're in the right spot. Ready for hint number two? Here it is (want to have one more go on your own? Go ahead, I'll wait. If not, highlight to read):
Trust in Knopf.
 As part of the marketing campaign for the book, Knopf released a couple of images meant to help you along. I suppose if you already knew about those, this isn't a very good hint, so here's more: initially, I found this one to be especially helpful.  Later on, this one was very useful, particularly in conjunction with the image of the back of the dust jacket that I posted in part 1. 


You might also want to watch that little video clip of Harkaway talking about writing, as it does have a tiny clue in it, but if you've made it this far, it won't tell you much you don't know.

Happy codebreaking!

If you're still stuck, here's the next hint.

Sunday, April 1, 2012

Clockwork and Cryptography: Angelmaker Code Hints, Part 1

Nick Harkaway's witty, whimsical, energetic Angelmaker was released in the US a little over a week ago (you'd better believe I pre-ordered it), approximately a month behind the British/UK release. If you are, like me,  both 1) American and 2) a ginormous Nick Harkaway fan, this was an irksome (if expected) delay.(Taking a moment to note that spell-check takes issue with "pre-order" and "preorder," but not "ginormous.") It turns out that the wait was worth it, because the good people at Knopf and AAS Graphic Design have gifted us with a dust jacket design worthy of the book itself.


I will assume that if you're here, you already know that those discs are a code. (When I found this out, I took a moment to make an offering to the gods of clockwork, steampunk, difference engines, for they are good to us. Also to Ada Lovelace, oft-forgotten programmer extraordinaire.) I'll also assume that you're having trouble cracking it. To that end, I've put together a few hints to help you out, because the reward really is intriguing. 

My first hint is: STOP LOOKING FOR HINTS AND START SOLVING IT YOURSELF. SLACKER.

Seriously. Your self-esteem and your ego will thank me. This is a code that is meant to be broken (what good is it in this context otherwise?), so you know that it's not terribly difficult. Clever, yes. Difficult, no.

Ok, fine. We'll call that Hint 0. You won't be much happier with Hint 1, but here it is (last chance to do it yourself! Turn back now!) : 
Look with your eyes.
Courtesy of Arya Stark, via Syrio Forel, of course. Take a new look at the dust jacket. There are clues there to get you started - even clues to suggest the existence of a code, if you hadn't known there was one there. Look closely. Take it off the book, if you need to. The heart of codebreaking is in recognizing patterns where there don't seem to be any, so let your pattern-sensitive human brain take over for a minute, and go with your gut.



Start there.


More hints to come. Enjoy!

Ready for more? Hint 2 is here.