I have a matrix on Z^2 with large dimensions (e.g. 20000 vectors of 200 elements). Each vector contains the same number of ones. I want to find minimal set of the vectors that gives a vector of ones in bitwise OR. This is solved by dynamic programming, but the time complexity of the solution is atrocious. I want to apply some optimization like annealing or genetic algorithm or something else to find less or more good approximation of the answer. But I have no experience in optimizing such functions and just don't know what to try first and what to start with. I want to learn some optimization in Python working on this problem, so some advice on pythonic way of discrete optimization here will be appreciated!
Asked
Active
Viewed 327 times
3
-
Interesting question, but can you share your code? Another good place to ask for optimization is codereview.stackexchange.com – lordingtar Mar 20 '17 at 21:24
-
Okay, I don't actually understand what to paste. I have a set of functions that generate this matrix (the problem I described is connected with graphs), but I really have no idea how to optimize, excluding the greedy algorithm. No really interesting code... – sooobus Mar 20 '17 at 21:27
-
How about posting a small subset (20?) of smaller vectors that exemplify your matrix, and with them what you expect the output to be? – Frank M Mar 22 '17 at 00:12