4 ms·
I did this in a module called decision mathematics at A-level. This is a nice implementation of classical graph problems. Stuff like traveling salesman etc. D
by kingkongjaffa 8y ago
I did this in a module called decision mathematics at A-level.
This is a nice implementation of classical graph problems.
Stuff like traveling salesman etc. Dijkstras algorithm.
The bit I am missing is how does this help me solve a day to day problem?
how can this be applied in something modern other than say a shortest path / route finding algorithm?
I suppose it's a way to reach an end point most efficiently and that makes it useful for nueral nets which are essentially tree's with weighted edge values.
the easiest path through the tree is something you could find and that might illuminate a route to optimizing your "thing" whatever that is.
Am I getting the idea of this right or not? ....
- prepend 8y agoI find useful just for visualizing real-life organizational workflows. Building a graph then let’s you update and layout stuff like specimen transfer across jurisdictions. So it’s just a cleaner way of storing data relationships that allows for more questions to be asked like “show me all the labs with automated backups” or “show me how many nurses work weekends at more than one lab”
- daveFNbuck 8y agoIt's actually not even a nice implementation of a classical graph algorithm. They use a Python list as a queue. Python lists are only efficient when used as stacks. calling list.pop(0) or list.remove(list[0]) takes time proportional to the length of the list. This makes the algorithm take quadratic time, when it should be linear. For this to be a nice implementation, they should use the standard library deque for the BFS or just pop from the end of the list to do a more efficient DFS for the connected component algorithm.