MahatKC / mochila_binaria

Comparison of greedy algorithm and dynamic programming for the binary knapsack problem

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mochila_binaria

Project developed by @MahatKC, @AmandaIsrael and @igorFNegrizoli in 2022.

This project was an assignment for the Algorithm Analysis and Design course we took in our 4th year of Computer Science.

Coded entirely in Python, it compares two possible solutions for the binary knapsack problem: a greedy algorithm and dynamic programming.

Different files were provided by the course's professor with different lengths in order to compare each solution in regards to time taken to find the solution and the best value found by each.

Matplotlib and Pandas were used to create a CSV with the results of different runs and plot graphs comparing the runs.

About

Comparison of greedy algorithm and dynamic programming for the binary knapsack problem

License:Mozilla Public License 2.0


Languages

Language:Python 100.0%