Skip to content

ganeshsankaran/system-solver-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

System Solver API

by Ganesh Sankaran


Overview

This Flask API provides an endpoint to solve systems of linear equations with two variables using the Z3 SMT solver.

An example of such a system is {3x + 2y = 6, x - 4y = 5}, whose unique solution is (x, y) = (17/7, -9/14).

In general, these systems are of the form {a_1_1 * x + a_1_2 * y = b_1, a_2_1 * x + a_2_2 * y = b_2} and can be

  • inconsistent systems (no solution)
  • independent systems (unique solution)
  • dependent systems (infinitely many solutions)

This API identifies the type of system and provides a solution if the system is independent.


API Endpoints

GET /api/v1/solve

Request Parameters

  • a_1_1: a floating point number
  • a_1_2: a floating point number
  • a_2_1: a floating point number
  • a_2_2: a floating point number
  • b_1: a floating point number
  • b_2: a floating point number

Response Parameters

  • x: null or a string representing the x-value
  • y: null or a string representing the y-value
  • notes: a string identifying the type of system

About

A Flask API for solving systems of linear equations with two variables

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published