In his stimulating, occasionally daunting collection, "Group Theory in the Bedroom," Brian Hayes discusses how he got caught up in figuring out how to precisely locate the Continental Divide. He began pondering the issue in Idaho during a road trip, and, as he puts it, he was unusually compelled to work it out in his head: "For a week or so I had no choice but to think about the problem."

Not the sort of person who might take a random detour to a flea market or roadhouse, perhaps. But Hayes, a columnist and former editor for American Scientist magazine, has a knack for making knotty questions of calculation and computation interesting. Although his chosen topics are concrete matters of clocks, gears, warfare, DNA and more, what he really writes about is thinking -- how a problem announces itself and how the brain learns to navigate toward an answer. The journey matters more than the destination; process fascinates him more than solutions.

That's a good thing, because clear solutions aren't always forthcoming. For instance, the title of the book hints at salacious fare, but in that essay Hayes is merely hunting for a "golden rule" of mattress flipping -- a set of moves you can perform on a regular basis to avoid a lumpy night's sleep over time. Though no such rule is forthcoming, his investigations do produce an interesting discussion of the mathematics involved. In the same sense, his essay on the history of the search for the double helix works because it focuses not on how it was discovered but on the blind alleys where scientists wound up while looking.

Hayes isn't a mathematician, which is often to his credit: His best pieces have a journalistic looseness that dovetails nicely with the academic rigor he brings to the subject matter. Indeed, the opening essay, on the immense (and immensely complex) clock at Strasbourg Cathedral, is a masterpiece of science writing. Hayes stands in awe of the clock's capabilities -- the 160-plus years-old timepiece has an error rate of "less than a second per century" and can accurately account for leap years, Easter and other temporal changes. But he's also willing to provide some detail on how the clock literally ticks, and insert some insightful riffing on the notion of clocks that last for millennia. ("To assume that the values of our own age embody eternal verities and virtues is foolish and arrogant," he writes.)

Like any science writer who successfully writes for the layperson, Hayes has an ear for the poetic. Discussing a book on the "mathematics of armed conflict" by Lewis Fry Richardson, Hayes smartly calls out a lovely two-word sentence about how difficult it is to locate the start- and endpoints of wars: "Thinginess fails." Occasionally, though, Hayes' reader is somebody who, if not already in possession of a degree in math or computer science, has the temperament of a person who'd very much like to acquire one. Though Hayes tries to bring a casual feel to such subjects as partitioning (breaking up numbers into equal subsets) and base-three counting, he's in deep woods.

"You might stumble onto the sequence 0102010, which is square free but cannot be extended without creating a square," he writes, before enthusing, "Try it!" Must I?

Better this, though, than the many lesser inheritors of "The Tipping Point" and "Freakonomics," writers who figure that writing on science is largely a matter of finding a provocative study and asserting wide-reaching applications from it. While Hayes is an assured and genial guide through the often thorny wilds of computation and mathematics, he never promises more than he can deliver. When discussing the complexities of wealth-distribution models, he claims no fix for economic injustice; there and elsewhere, he's content to simply present the terms of discussion and argue that the numbers and graphs at his command are beautiful, playful things. Quite often, he's right.

Mark Athitakis is the arts editor at Washington City Paper. He blogs at