Karnaugh map simplification software, used to visually simplify boolean expressions
Karnaugh Map Simplification Software - visually simplifies expressions using efficient algorithms.
There are two versions included in this repository. You can find the original simplifier here or under the deprecated folder while the new JavaFX application is under development using Java 8.
Current Features:
This application makes use of algorithms and data-structures to power a pattern recognition engine. For Karnaugh Maps, this application uses a unique non-standardized algorithm. Here's a quick overview of the steps:
1
's in the truth-table with a value of 1
in the matrix2D prefix sum
array from the matrix
Prefix sums
are a powerful technique dervived from the fundemental theorem of calculusprefix sums
are similar to integration in calculus - finding the area (sum) under a curveƒ(b) - ƒ(a)
to quickly find the sum, allowing us to have O(1)
summationprinciple of inclusion-exclusion
to extend prefix sums to be 2D1
value execute the group finding algorithm[-1, N]
where N = # of columns or rows, and checking to see if the prefix sum is equal to x * y
.
O(1)
complexity since if there are pairs, the following is true: prefixSum(x1, y1, x2, y2) == (abs(x1-x2)+1)*(abs(y1-y2)+1)
!groupings
in a special disjoint set
1
upon a merge
or find
groupings
in a PriorityQueue
(abs(x1-x2)+1)*(abs(y1-y2)+1)
, the size of the groupinghashset
that indicates if a grouping was already made, and if it was merge the current coordinate pointer to that disjoint set
LinkedList
)drawArc
and drawRoundRect
where appropriate; use a circularly linked list to traverse colors for RGB and increment pointer each time