Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
DrCBeatz authored Mar 13, 2024
1 parent 953ab4e commit d0d30f4
Showing 1 changed file with 69 additions and 1 deletion.
70 changes: 69 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,69 @@
# master-theorem
# Master Theorem Evaluation Web App

This web application allows users to evaluate recursive divide and conquer algorithms using the Master Theorem and determine their time complexity, providing valuable insights into algorithm performance.

Algorithms with the following recurrence relation (known as the Master Recurrence) can be evaluated using the Master Theorem:

`T(n) = aT(n/b) + f(n)`

where a > 0 and b > 1

- a = the number of recursive subproblems
- b = the factor by which the problem size is reduced
- k = the exponent of the work outside the recursion

## Features

- Evaluate the time complexity of divide and conquer algorithms.
- Visualization of algorithm performance.
- Comparison between different algorithms through preset options.
- Python code and description of preset algorithms.

## How to use the app:

1. Enter your own values for a, b, and k in the respective input fields.
2. Ensure the 'User Input' option is selected under 'Algorithm Presets'.
3. Click the 'Evaluate' button to see the results.

Try the following sample inputs:

- a = 4, b = 2, k = 1
- a = 4, b = 2, k = 2
- a = 4, b = 2, k = 3

You can also choose from various preset algorithms (e.g., binary search or merge sort) by clicking one of these options, then click 'Evaluate'. You'll be able to see sample code and a description of the algorithm below the evaluation.

## How to install locally

### Installation requirements:
- Docker CLI
- NPM

At the command line/terminal, type the following commands.
```bash
git clone https://github.com/drcbeatz/master-theorem.git

cd master-theorem

docker compose build

docker compose up -d

cd frontend

npm install

npm run dev
```

(then click on the link to view the React front end in your web browser).

You can also run tests in the root directory with the following command:

```bash
docker compose exec web pytest
```

## References

- Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2022). *Introduction to Algorithms* (4th ed.). MIT Press.

0 comments on commit d0d30f4

Please sign in to comment.