Question: Write a Java Program that does the following: Generate a graph with 100,000 nodes, where each node randomly has between 1 and 5 connections to

Write a Java Program that does the following:

Generate a graph with 100,000 nodes, where each node randomly has between 1 and 5 connections to other nodes.

Each node should contain within it a value between 1 and 300,000. (So generally about 1 in 3 searches will yield a query match)

Allow the user to enter a number to search for, and choose from the following three types of searching algorithms to utilize as the search routine.

Breadth-First.

Depth-First.

Dijkstra's Algorithm.

Do not allow back-tracking in your searches. (Mark nodes that you already searched as complete, and do not re-visit them in the same search)

Each search should return the following:

The Success/Failure of your search.

The length of the shortest path to the found node.

The total number of nodes examined during the search.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!