IBM Interview Question
Software Engineer / DevelopersIf the graph doesn't fit into memory, how can I assume where A and B are, or even know? By the line you stated, "the graph doesn't fit into memory" I should assume that I would need a infinite amount of memory, therefore a infinite amount of processing power. With so many infinite things, this problem is impossible. Unless I just assume that there is no cheapest path, but yet, a path with infinite possibilities. Therefore unsolvable.
Unless of course you define what exactly you mean when you say "the line doesn't fit into memory.".
This Means that for example: if the system memory is 2GB, then graph uses 8GB for its storage ( adjacency matrix format) . In this case we would need to have a sub optimal solution. Take 1/4 of the graph + A and B, put it into memory and try to find a solution. Save the solution somewhere and then repeat with rest of graph.
Using Dykstra’s Algorithm
- Helen May 17, 2011what does it mean "the graph doesnt fit in memory"?