All Questions
77 questions
0
votes
0
answers
50
views
Fixed BIDDFS (bidirectional iterative deepening depth first search) in Java
Intro
I have this GitHub repository for doing pathfinding in directed unweighted graphs. This post is about BIDDFS proposed by Richard Korf in his paper.
Code
...
1
vote
0
answers
29
views
LibID: a Java library containing some iterative deepening algorithms for pathfinding on directed unweighted graphs
Intro
I have this GitHub repository containing some iterative deepening pathfinding algorithms.
Code
...
3
votes
1
answer
317
views
Non-recursive topological ordering, starting from given nodes, for Guava graphs
This method returns the topological ordering of a Guava graph starting from a given set of nodes. It's from my personal project github.com/jbduncan/guava-graph-utils, where I'm exploring utilities for ...
2
votes
0
answers
124
views
Iterating over all simple unique cycles in an undirected graph in Java - brute-force approach
This post is about an Iterator iterating over simple loops of an undirected graph.
In the above graph, the cycle \$\langle 1, 2, 3, 4, 5, 3, 1 \rangle\$ is not ...
3
votes
2
answers
177
views
Much more efficient trisexual genetic algorithm for TSP in Java
(The entire project lives there.)
This time, I have made the previous version of the GA for TSP run faster by around the factor of 6+. The idea is to cache the tour costs with the actual tour objects ...
1
vote
0
answers
68
views
Genetic trisexual algorithm for TSP in Java [duplicate]
(A more efficient version of the GA.)
This is my the very first take ever on GA:
GeneticTSPSolverV1.java:
...
1
vote
1
answer
110
views
Genetic TSP in Java with graph expansion
This post presents my take on TSP (travelling salesman problem). The idea is to:
Take an input node i,
Compute the entire graph ...
1
vote
3
answers
113
views
DFS search that returns "not found" or distance
Assuming I've the following code:
...
0
votes
1
answer
67
views
is my Prim's MST implementation terse enough?
I did research because I want to learn Kruskal's and Prim's MSTs. I did research and after a solid understanding, I went to my textbook and got their libraries:
https://algs4.cs.princeton.edu/code/...
0
votes
1
answer
195
views
Recursive DFS to find Euler Cycle
I have referred to this for what constitutes as an Euler Cycle: https://xlinux.nist.gov/dads/HTML/eulercycle.html
This assignment required me to use Depth First Search and have the methods I have ...
0
votes
1
answer
126
views
Graph coloring problem with Spark (JAVA)?
I am trying to create the algorithm described in the image from this link
Simply put any two adjacent nodes must not share tuples and if they do they are colored with the same color. If there's a ...
1
vote
1
answer
83
views
Loan graph simplification in Java: the recursive DFS for searching for directed cycles
The class in this post returns a directed cycle in a financial loan graph. A financial loan graph consists of nodes and directed arcs. If there is an arc \$(u, v)\$ with weight \$w = w(u, v)\$, then ...
2
votes
0
answers
69
views
Generic Graph Traverser
I have built this Generic Graph traverser, I have this implemented with DFS, I feel it will work equally fine with BFS too.
What do you think of this implementation?
I want help in reviewing the <...
5
votes
1
answer
468
views
Finding Build Order For Packages With Dependencies
I gave a shot to infamous finding dependency problem. I highly encourage to give it a go yourself before seeing the solution I came up with.
Here is the problem statement:
Given a list of projects ...
2
votes
1
answer
189
views
Kruskal MST algorithm
I came up with the following code by following Prof. Sedgewick's lecture on Coursera.
Please review this code and let me know if there is anything that I got wrong in implementing Kruskal's ...