traxaber / cs435-p2

0 stars 0 forks source link

Comment 2 #12

Open ak2253 opened 4 years ago

ak2253 commented 4 years ago

My knowledge about the random.sample algorithm in the following code below is not the best but try increasing the frequency of the rate to connect the nodes or to create a new algorithm where each node has a 25%-50% chance of connecting with every other node. https://github.com/angdav/cs435-p2/blob/7773ebbbc02f04d5968b58217efb4db4635591ad/p123.py#L108-L115 This method is not wrong and the search algorithms work but the chances for a dfs algorithm to get to the source is around half for creating a randomized graph of size 100 when running in a for loop of 10 iterations.

traxaber commented 4 years ago

createRandomUnweightedGraphIter is not supposed to randomize the insertion of edges, per the assignment instructions.