Analytics & Woodworking
My professional and educational background was in system optimization and business economics. Queue the jokes about bad economic decision making in leaving that field for a life as a woodworker!
But despite the much greater personal satisfaction and flexibility my current field as a furniture building provides over the prior more-traditional full time engineering roles I held, I do miss some of the interesting mathematics, optimization, and engineering challenges of my former roles - and I don’t mean the basic trigonometry needed for the occasional odd angle.
To scratch this mental itch, I periodically delve into a math or design problem as part of a personal project that is loosely connected to my woodworking creations, often going far more deeply than is necessary!
Past examples of this are the computer-generated geometric drawings and mazes I did as part of my research into building a Sisyphus-like sand drawing, and the messy math to estimate the minimum distance between a plane’s vector and my home as part of the flight tracking system I built.
This post will outline two other uselessly deep math problems, how I came to be interested in them, and where they currently stand!
Three Dimensional & Massively Large Sudoku Puzzles
While contemplating different ideas to use some of the Nixie tubes in inventory, I came across this awesome project, which then led me on a Sudoku deep dive. Can a 16x16, 25x25, or even 36x36 board work? Are three-dimensional boards possible? Sure, there are some clever orthogonal drawings, such as in this puzzle book, but how about a truly three-dimensional puzzle, with nine interlinked 9x9 grids?
The first steps to creating such a puzzle would be coming up with a finished board, and while I was fairly certain an arbitrarily large two dimensional grid could be created, I was less certain about a three dimensional grid. So I went to work on a brute force depth first search dynamic programming approach to see what was possible - and, after a few hours of processing time, I’ve found that indeed 9x9x9 grids exist (as well as 36x36 grids, of course).
Unfortunately, however, visualizing a three dimensional grid would be pretty tough - for both cost and complexity, we’re definitely outside the realm of building something with Nixie tubes. Perhaps there’s an iOS app to be built for diehard Sudoku players, where you can easily visualize different slices of the Sudoku cube? But with 729 “voxels” or spaces for those numbers, this isn’t a puzzle for the faint of heart.
Toy Blocks
With a new baby girl in the extended family, I was contemplating a “name” toy for her parents in celebration of the growing family. One idea I had explored, inspired by a gift I had received a few years ago, was a set of lettered blocks that could be reconfigured to spell different names in the family. But it is not as simple as providing a block for each letter in the alphabet, since many names have repeated letters like the “Y” in Sydney or “D” in David. And regardless I’m sure my cousins wouldn’t want to receive a gift with 52 blocks to cover all the bases! - nor would I want to create such a gift.
However, with a different letter on each of the six faces of the block, and a holder to keep the properly rotated blocks in place, I could create just a few custom blocks that could spell any of a set of predetermined names. In fact, I could potentially get by which as few blocks as the longest name I need to spell - so long as I choose the letters on each face carefully!
This seems like an opportunity for an optimization technique could “integer programming” - and indeed, I spent a few hours formulating the mathematical constraints that could capture this problem and beginning to code it up in Python.
Binary decision variables:
B[i]: indicates whether block i needs to have any letters assigned to its faces at all
L[i][j]: indicates whether the j-th letter of the alphabet is engraved on one of the faces of the i-th block
W[i][k][l]: indicates whether block i is used to spell for the l-th letter of the k-th word
Objective function: minimize the number of blocks used to spell all the names, and secondarily, the number of faces on those blocks with letters
Constraints:
at most 6 letters on a block
for a given name, a block can be used at most once
for each letter in a given name, it must be assigned to one block that has that letter on one of the faces
a block can be assigned to at most one letter in a name
… and so on
Alas, my enthusiasm for implementing the robust analytical solution dimmed as I worked through the mechanics of the programming interfaces - for instance, whereas I have decision variables (and data) with three indices, the Python linear programming interface I was using (cvxpy) only supported two indices. So I used a brute force trial-and-error approach, finding a solution fairly quickly that has the minimum number of blocks (albeit perhaps not the minimum number of engraved block faces).
And it all became moot when I decided on a different style of name toy for my cousins! But I enjoyed the journey, and might resurrect the approach for a potential future product idea, customized for every order!
No Shame in Geeking Out
Perhaps my evenings would be better spent watching some TV or walking in a park - I’m not ashamed to admit that I’ve “wasted” a few hours geeking out on approaches to problems that I know are way too complicated for the need or the potential customer demand. Yet finding elegant solutions to these types of analytical problems generates the same excitement in me that I recall having when first introduced to the world of optimization in my freshman year in college.
So if you have an unusual product in mind that requires a bit of math to figure the right design - or even if you just want to noodle on how to approach a problem that has absolutely zero practical applications - please do not hesitate in reaching out, or leave a comment below!