Keys and locks are an omnipresent fixture in our daily life, limiting physical access to privileged resources or spaces. While most of us may have marveled at the intricate shape of a key, the usually hidden mechanical complexity within a cylinder lock is even more awe-inspiring, containing a multitude of tiny movable parts such as springs and pins that have been precision-manufactured from highly customized materials using specialized fabrication techniques. It is perhaps unknown that mechanical cylinder locks possess a number of important design constraints that uniquely distinguish them from their electronic counterparts. Aside from manufacturing costs, a cylinder's most significant limitations are the upper bound on its outer dimensions as well as the lower bound on the size of its internal mechanical security features (pins). Cylinders cannot be very large so that they still fit into doors and avoid the need for large keys. Pins cannot be too small in order to withstand wear and tear and provide appropriate physical security. Even more complex than a single cylinder is the design of an ensemble of "related" locks as may occur in an apartment, office building, factory, or hospital, for example. Instead of controlling access to one resource, the set of open/not open relationships between all the keys and locks of such a lock system may encode a complex and diverse hierarchy of privileges for each individual key, from the benign opening of the front entrance by all staff to heavily restricted access to confidential documents or hazardous materials by selected personnel only. For the mathematician or computer scientist, lock system design poses a fascinating array of theoretical and computational challenges. Abstraction via an algebraic model shows that cylinders and keys of a lock system can be represented within an upper semilattice, where the induced partial ordering establishes the must open/must not open functions. Finding an "equivalent" sub-semilattice within the semilattice over the set of those cylinders that are mechanically realizable then embodies the heart of the lock system calculation problem. From the graph-Theory point of view, finding such a sub-semilattice is exactly the famous graph subgraph isomorphism problem, which is known to be NP hard. As problem size increases, the solution via deterministic algorithms from combinatorial optimization quickly becomes intractable. In particular, conventional branch-And-bound strategies such as pruning, designed to limit systematic examination of the full search space, are ineffective for the graphs arising from lock systems. For this reason, a pragmatic approach has to resort to randomized search space exploration via probabilistic heuristics that are by their very nature not guaranteed to work in all cases, but do yield results quickly enough to be useful for many relevant practical cases. Among the class of randomized optimization algorithms, simulated annealing proves to be particularly relevant for our setting. However, the vast available search space makes a vanilla algorithm impractical and adaptations are necessary. Parameters such as the cooling strategy have to be carefully tuned and the design of the error function for evaluating the quality of the tentative isomorphisms must weigh the tradeoff between expressiveness and runtime costs. Finally, in order to steer the algorithm toward promising choices in the search space, we combine annealing with a prefilter that guides selection based on an encoding computed in a preprocessing step. The research described within this article was conducted in a research partnership between academia and industry; its goal is to develop a formalized model and an automated lock system calculation approach suitable for commercial use. Moreover, we wish to spark interest in the broader mathematics and computer science community in the challenging questions arising from this exciting industrial application.
CITATION STYLE
Vömel, C., De Lorenzi, F., Beer, S., & Fuchs, E. (2017). The secret life of keys: On the calculation of mechanical lock systems. SIAM Review, 59(2), 393–422. https://doi.org/10.1137/15M1030054
Mendeley helps you to discover research relevant for your work.