A quick project regarding algorithms and complexity. Written in Python.
The problem is a 0-1 knapsack problem.
-
bruteforce.py explores all possible combinations of actions across the dataset. Complexity 0(2^n).
-
optimized.py offers the classic resolution by building a m(0...n, 0...W) profit matrix maximizing gain. Greedy approximation is also available, to compare results and discuss its pros and cons.
Clone in the directory of your choice :
git clone https://github.com/mjeammet/OCP7_AlgoInvest-Trade.git