Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Higher dimension Karnaugh maps (5 and 6 variables) #536

Open
maltaisn opened this issue Oct 19, 2020 · 3 comments
Open

Higher dimension Karnaugh maps (5 and 6 variables) #536

maltaisn opened this issue Oct 19, 2020 · 3 comments

Comments

@maltaisn
Copy link
Contributor

maltaisn commented Oct 19, 2020

The Karnaugh table concept can be extended with 5 and 6 variables, becoming some sort of Karnaugh cube. A cube isn't very practical for visualization though, so instead each layer can be shown in a separate 2D Karnaugh map. Extra variables headers are shown on the side.

I took a few hours to implement the concept with 5 variables, it looks like this:
demo

I can extend it to 6 variables and send a pull request if you're interested.

One issue is that with 6 variables there's a maximum of 32 covers possible, so a lot a different colors are needed. Even with 5 variables I didn't bother, the 8 colors just get reused. I thought maybe I could add a color effect when a group is hovered to differentiate them?

Also the two vertical headers in the middle could be omitted since they are already present on both sides. The result would be single big table instead, like this: https://www.mathematik.uni-marburg.de/~thormae/lectures/ti1/code/karnaughmap/, and would support up to 8 variables.

@hneemann
Copy link
Owner

hneemann commented Oct 22, 2020

I am unhappy with the quality of the code of the current K-Map implementation. So I don't want to complicate the code any further before I have cleaned it up. Unfortunately I don't really have the time to do this at the moment.
However, the idea is good and I also think that this would be a nice extension.
But an extension to more than 5 or maybe 6 variables doesn't make much sense to me. No student will ever create such a K-Map by hand. If you want to minimize equations with so many variables by hand, you will rather use QMC.
And to be honest, a student will probably implement QMC before he starts to do it by hand. I would have done that at least. :-)

@callegar
Copy link

callegar commented Nov 1, 2023

Would also be nice to have an option to collect the zeros rather than the ones, in order to visualize minimal product-of-sums expressions too.

@callegar
Copy link

callegar commented Nov 1, 2023

See also 1127

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants