I have created a simple implementation of DFS that takes input from the user. It simply just runs through the terminal in Eclipse.

Here's a brief idea of what the input looks like:

Map of Nodes:
s1 a1
a1 b1
b1 c1

So in this case, s1, a1, b1, c1 all represent nodes. The order matters, so for example the line "s1 a1" means that s1 has a link to a1. It's essentially similar to a singly-linked list. The nodes can be named anything, it's just a simple string. Just as long as they're separated by 1 space, it will count it as a node.

The user also inputs a starting and ending location, and it prints out all the nodes it must visit to get there. Its possible the map can have cycles and no possible paths to the ending location.

I am looking to test my program with 100 nodes, then 10000 nodes. The number of edges don't matter, and the nodes don't have to be connected to the graph.

Are there any good websites/programs that can generate a random text file for me that represent a directed graph? I just simply want to be able to copy and paste the contents of it in my program and see how it performs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.