An interactive, dynamic knowledgebase of canonical Computer Science problems, solutions, and reductions
- Website: https://redux.portneuf.cose.isu.edu/
- API Documentation: https://api.redux.portneuf.cose.isu.edu/swagger/index.html
- About Redux
- Features
- Quick Start
- Documentation
- Architecture
- Contributing
- Contributors
- Additional Resources
Redux is an extensible, interactive web-based platform designed for Computer Science pedagogy. It provides:
- Interactive Problem Visualization: Explore problems across complexity classes, from P to NP-Hard and beyond
- Reduction Framework: Understand how problems reduce to one another
- Solver & Verifier Tools: Execute and verify solutions to computational problems
- Educational Resource: Built on Karp's 21 NP-Complete problems and expanded across multiple complexity classes The backend is designed to be adaptable and can work with different frontends. The default frontend can be found at Redux_GUI.
- .NET 10 SDK
- Node.js (for frontend)
- Visual Studio or your preferred IDE
-
Clone the repositories
# Backend git clone https://github.com/ReduxISU/Redux.git # Frontend (optional, for full local setup) git clone https://github.com/ReduxISU/Redux_GUI.git
-
Run the Backend
Navigate to the Redux directory and run:
dotnet run
The API will be available at
http://127.0.0.1:27000/ -
Access Swagger API Documentation
Open your browser to:
http://127.0.0.1:27000/swagger/index.html
For automatic reloading during development:
dotnet watch --project API.csproj run -- --project API.csprojdocker build -t reduxapi .
docker run -it --rm -p 27000:80 --name reduxapi reduxapiAll problems are located in Problems/NPComplete/. Each problem follows a standardized structure:
NPC_PROBLEMNAME/
├── PROBLEMNAME_class.cs # Implements IProblem interface
├── Reductions/ # Reduction implementations
├── Solvers/ # Solver implementations
├── Verifiers/ # Verifier implementations
└── Visualizations # Visualization implementations
Redux uses five main interfaces that problems must implement:
- IProblem - Main problem interface with solver, verifier, and visualization
- ISolver - Solves problem instances
- IVerifier - Verifies solution certificates
- IVisualization - Creates visual representations
- IReduction - Maps one problem to another
For detailed interface documentation, see the Interfaces section below.
SPADE is used for parsing instance strings into usable data structures and should be used in problem class constructors where supported. Note that SPADE may not support all input types — verify compatibility before use.
Documentation: SPADE GitHub
Example usage can be found in the Clique problem class.
Redux/
├── Problems/
│ └── NPComplete/ # NP-Complete problem implementations
├── Interfaces/ # Core interfaces and graph utilities
├── AdditionalControllers/
│ └── Navigation/ # API controllers for problem retrieval
└── API.csproj # Main project file
For graph-based problems, use UtilCollectionGraph from the Interfaces folder. It includes:
- Automatic handling of directed/undirected graphs
- Weight management
ToAPIGraph()conversion for API responses
Located in AdditionalControllers/Navigation/, these controllers handle:
- Retrieving available problems
- Listing algorithms
- Problem metadata
** Caution**: The frontend heavily relies on these controllers. Changes should be made carefully.
We welcome contributions! Join our community:
- Discord: https://discord.gg/sEC3rTXn2Z
- Production Branch:
CSharpAPI - Development Branch:
develop
Workflow:
- Fork the Redux API repo and clone it
- Create a feature branch on your forked repo
- Implement changes
- Create a pull request to CSharpAPI
- Assign a reviewer
- After code review, merge into CSharpAPI
** Important**: DO NOT complete pull requests before they are reviewed.
- Correctly implements all interfaces
- Includes at least one solver
- Includes at least one verifier
- Tests created and passing
- Filled out all metadata fields
- Correctly implements all interfaces
- Includes working solution mapping function
- Includes working gadget mapping function
- Filled out all metadata fields
-
Create folder:
Problems/NPComplete/NPC_PROBLEMNAME/ -
Implement required files:
Folder Structure:
Each problem folder should include 4 files/folders:
PROBLEMNAME_class.cs(implementsIProblem)Solvers/folder with at least one solverVerifiers/folder with at least one verifierVisualizations/folder if applicableReductions/folder if applicable
- Write tests
- Submit pull request
Testing uses Xunit. All new problems should include tests for:
- Verifier correctness
- Solver correctness
- Reduction algorithms if applicable
Run tests with:
dotnet testFor comprehensive interface details see Problem Template README.
- Install service file to
/etc/systemd/system/redux.service - Configure paths for your environment
- Enable and start:
systemctl daemon-reload
systemctl enable redux.service
systemctl start redux.servicecd [working directory]
git pull origin
sudo systemctl restart redux.servicejournalctl -xeu reduxFor complete production setup instructions, see the production documentation in the repository.
This project is developed by students and faculty at Idaho State University's Computer Science Department.
For a complete list of contributors, visit our About Us page.
- GitHub Repository
- Wikipedia: What is NP-Complete?
- Karp's 21 NP-Complete Problems
- Redux GUI Documentation
- SPADE Parser
- Frontend: Redux_GUI
- Quantum Solver: quantumsolver
This project is licensed under the BSD 3-Clause License. See LICENSE.md for details.
- Issues: Please use GitHub Issues for bug reports and feature requests
- Discord: Join our community
- Email: Contact the Reudx email redux@isu.edu
