Skip to content

SimoneRemoli/K-Map-Solver

Repository files navigation

K-Map Solver

React TypeScript Vite Tailwind CSS Framer Motion MathJax License: GPL-3.0

An educational web application for Boolean minimization and sequential-machine design.

K-Map Solver combines an interactive Karnaugh-map workflow with automatic logic simplification, circuit visualization, and a recognizer-automaton section for Moore and Mealy machines. The goal is to provide a clean academic tool for studying digital logic, computer architecture, and sequential networks in a single interface.

Overview

The project currently offers two main workflows:

  • Karnaugh Map Solver for 2 to 5 variables
  • Recognizer Automaton generation from an input string

The application is fully client-side and focuses on clarity, visual feedback, and educational value.

K-Map Solver Interface Overview

After simplification, the app displays canonical forms, simplified expressions, Karnaugh groupings, and logic circuits.

Equivalent Logic Circuit Overview

Main Features

  • Interactive Karnaugh-map editing
  • Truth-table based editing and synchronization
  • SOP and POS simplification
  • Client-side Boolean minimization with Quine-McCluskey
  • MathJax rendering for symbolic expressions
  • Logic-circuit generation from simplified formulas
  • Moore and Mealy recognizer automata generation
  • Binary state/transition tables
  • Karnaugh maps for next-state and output functions
  • Complete sequential-machine diagrams with D flip-flops and feedback lines
  • Support for overlapping string recognition

Recognizer Automaton Workflow

The Recognizer Automaton section turns a target word into a sequential machine that recognizes the pattern.

From a single input string, the application can:

  • build the automaton as Moore or Mealy
  • encode states in binary
  • generate the state and transition table
  • derive each next-state output y' and the external output z
  • construct the related Karnaugh map for every output
  • simplify each Boolean function
  • draw both the combinational logic and the complete sequential circuit

This makes the project useful not only for Karnaugh-map exercises, but also for exam-oriented sequential-machine design.

Why This Project

This repository is meant to be both practical and didactic:

  • it helps students move from truth tables to simplified logic quickly
  • it shows how symbolic simplification maps to real circuits
  • it connects automata theory with sequential hardware design
  • it provides visual outputs that are useful for study, demos, and documentation

Technology Stack

  • React 19
  • TypeScript
  • Vite
  • Tailwind CSS
  • Framer Motion
  • MathJax
  • Mermaid

Mobile Version

The project also includes a mobile application package built for Android only.

An APK version has been prepared as a lightweight Android WebView wrapper around the deployed application, allowing the project to be used directly on mobile devices while preserving the same online experience.

At the moment, the mobile package is available exclusively for Android.

Project Structure

  • src/components/ contains UI components and visual panels
  • src/lib/ contains minimization, automata, Karnaugh, and circuit logic
  • src/types/ contains shared TypeScript types
  • public/ contains static assets
  • config/ contains Vite and project configuration
  • docs/images/ contains README screenshots

Local Development

Clone the repository and install dependencies:

git clone https://github.com/SimoneRemoli/K-Map-Solver.git
cd K-Map-Solver
npm install

Run the development server:

npm run dev

Build the project:

npm run build

Credits

The basic algorithmic foundation originates from Marco Marulli.
This repository extends that work with a later development focused on interface design, recognizer automata, Karnaugh-map generation for sequential outputs, and full sequential-circuit visualization.

Development and project extension by Simone Remoli.
GitHub: https://github.com/SimoneRemoli

Academic Reference

Tor Vergata University, Faculty of Engineering
https://inginformatica.uniroma2.it/

License

This project is released under the GNU General Public License v3.0 (GPL-3.0).
See LICENSE for the full license text.

About

A web-based toolkit for designing, analyzing and minimizing finite state machines, featuring Karnaugh map simplification and automatic logic circuit generation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors