Mahoney maps
From here on I found very little material online. Even so, I found it very interesting to discover that there are other ways of laying out the values on the map, and that they still work with the same grouping rules.
The Mahoney map (or M-Map for short) is attributed to Matthew V. Mahoney, who around 1963, a decade after Karnaugh's paper, described the map as a series of reflections [1, 2]. Wikipedia describes it as a reflection-symmetrical extension of the K-Map for functions with more inputs. It is a variant of the K-Map: the cells are the same, neighbours are defined the same way and you group with the same rules. What changes is where each cell goes.
A fair warning: I could not find Mahoney's original publication, and it hardly appears in digital design textbooks (Bonal points this out when comparing his tutorial with Daniels's book). What follows comes from the few secondary sources that explain it [1, 3, 4], and from how the solver builds it. Still, the M-Map is not just a curiosity: it still shows up as a point of comparison in recent work on Boolean function minimization [5].
# A mirrored Z
The easiest way to see it is to write the numbers in order. In a 4-variable M-Map, 0, 1, 2 and 3 make a Z: top left, top right, bottom left and bottom right. From 4 to 7 the Z appears mirrored from right to left; from 8 to 11, mirrored from bottom to top; and from 12 to 15, mirrored both ways. And those four blocks, seen from afar, make another Z [1]. That Z is so characteristic that Bonal titled his section on the M-Map "Implementing the Sign of Zoro": the mark of Zorro [4]. In the map below each 2 × 2 block carries its Z, and the number in the middle tells the order in which the blocks are filled: block 1 with 0 to 3, block 2 with 4 to 7, and so on.
# How it is built
The Z is no accident: it comes from how the map is built. You start with a single cell, 0. To add a variable you mirror everything you have to the right and add 1 to the new cells. For the next one you mirror everything downwards and add 2. Then to the right again adding 4, downwards adding 8, and so on: always alternating and adding the weight of the new variable, 2n-1 [1, 3]. Move the slider to see each step.
Notice something that does not happen in the K-Map: when you add a variable, the cells you already had do not move. The 3-variable map is the top-left corner of the 4-variable one, which in turn is the corner of the 5-variable one. In the K-Map, on the other hand, cell 2 is in the second column and first row of the 3-variable map, and in the first column and last row of the 4-variable one.
# And where do the variables go?
Since each mirroring alternates between right and down, the variables also alternate between columns and rows. In a 4-variable M-Map, B and D go on the columns and A and C on the rows, instead of AB on top and CD on the side as in the K-Map. Bonal describes it from the labels: every time you fold the map, the name of the new variable is placed one turn counterclockwise from the previous one, around the map [4].
But each axis is still a reflected Gray code of its own variables, so neighbours are found just as in the K-Map: next to each other, across the border or, with 5 or more variables, by mirror. That is why the same group gives the same term in both maps, even though it looks different.
K-Map: the central block.
M-Map: the same cells are a whole column.
K-Map: the four corners.
M-Map: the first column.
# The same rules
All the grouping rules still hold as they are: groups of 2n cells, rectangles, touching edges and, with 5 or more variables, neighbours by mirror. There is a way of saying it that works for both maps and for any number of variables: a group must be symmetric about every mirror axis that crosses it, counting the border as one more axis. Pick the number of variables and tap a cell to see its neighbours in the M-Map.
Neighbours of 5 (00101): 3 next to it, 1 across the border, 1 by mirror.
# K-Map or M-Map?
Both do the same job, and each has its strengths [1].
- M-Map: it is easier to draw, especially in large sizes, because you only need to mirror and number following the Z's, without writing the Gray code. And every cell stays in the same place whatever the size of the map.
- K-Map: it is the one everybody knows, so it is easier to share, and its variables stay in order (AB on top, CD on the side) instead of alternating.
Bonal goes further: he says the M-Map can be extended to any number of inputs and that it is more flexible than the K-Map [4]. It is true that it is easy to draw at any size, but the neighbours by mirror do not go away: from 5 variables on you have to look for them in both maps alike, and the Tcler's Wiki itself warns that the neighbours become hard to see there [3].
Neither escapes the mirrors from 5 variables on: they are the same cube of combinations, arranged in two ways. In the solver you can see the same function as a K-Map, as 4-variable sub-maps and as an M-Map.
# References
- K. Mann, "Karnaugh Maps and their use in Digital Logic Design", tutorial on Physics Forums, 2005.
- "Karnaugh map", section Related graphical methods, Wikipedia (retrieved November 2026). The Mahoney map entry cites no source.
- "Mahoney Map", The Tcler's Wiki, 2012.
- D. Bonal, "Karnaugh and Mahoney – Map Methods for Minimizing Boolean Expressions", davidbonal.com, October 19, 2013 (copy on archive.org). Tutorial based on chapter 3 of J. D. Daniels, Digital Design from Zero to One, John Wiley & Sons, 1996; it also cites a personal communication from Paul Krehbiel (1996).
- V. Riznyk, M. Solomko, P. Tadeyev, V. Nazaruk, L. Zubyk and V. Voloshyn, "The algorithm for minimizing Boolean functions using a method of the optimal combination of the sequence of figurative transformations", Eastern-European Journal of Enterprise Technologies, vol. 3, no. 4 (105), pp. 43-60, 2020. doi:10.15587/1729-4061.2020.206308.
