What is the problem name for Traveling salesman problem(TSP) without considering going back to starting point?

I’ve found the answer to my question in this book. It is the same with Computer wiring problem which occurs repeatedly in the design of computers and other digital systems. The purpose is to minimize the total wire length. So, it is indeed a minimum length Hamiltonian path. What the book suggests is to create … Read more

Relaxation of an edge in Dijkstra’s algorithm

Here’s a nice description of the Algorithm that also explains the notion of relaxation. The notion of “relaxation” comes from an analogy between the estimate of the shortest path and the length of a helical tension spring, which is not designed for compression. Initially, the cost of the shortest path is an overestimate, likened to … Read more

A* Algorithm for very large graphs, any thoughts on caching shortcuts?

You should be able to make it much faster by trading off optimality. See Admissibility and optimality on wikipedia. The idea is to use an epsilon value which will lead to a solution no worse than 1 + epsilon times the optimal path, but which will cause fewer nodes to be considered by the algorithm. … Read more

Comparing object graph representation to adjacency list and matrix representations

objects and pointers These are just basic datastructures like hammar said in the other answer, in Java you would represent this with classes like edges and vertices. For example an edge connects two vertices and can either be directed or undirected and it can contain a weight. A vertex can have an ID, name etc. … Read more

Why does Dijkstra’s algorithm use decrease-key?

The reason for using decrease-key rather than reinserting nodes is to keep the number of nodes in the priority queue small, thus keeping the total number of priority queue dequeues small and the cost of each priority queue balance low. In an implementation of Dijkstra’s algorithm that reinserts nodes into the priority queue with their … Read more

Finding all cycles in a directed graph

I found this page in my search and since cycles are not same as strongly connected components, I kept on searching and finally, I found an efficient algorithm which lists all (elementary) cycles of a directed graph. It is from Donald B. Johnson and the paper can be found in the following link: http://www.cs.tufts.edu/comp/150GA/homeworks/hw1/Johnson%2075.PDF A … Read more