۱۳۹۰ شهریور ۲۵, جمعه

Multiple Answers in Dynamic Programming

I was to code a dynamic programming to find a solution to a problem. That was straight forward until they wanted me to output multiple best solutions. At first I tried to solve if using that dynamic table but then I modeled the problem into a graph.

The problem was though modeled as k-shortest paths in a directed acyclic graph (DAG) which is well studied between graph algorithms designers.

Finally I decided to use this "Finding k shortest paths" paper by Eppstein and existing source codes. Amazing, I completely satisfied and enjoyed reading the paper.

۱ نظر:

ناشناس گفت...

like nadare ke :D! inja