Random walk on a graph

Starting with a vertex, the algorithm takes the specified number of steps by selecting another vertex at random. Let us see a random walk:

> random_walk(simple.graph, start = "alice", steps = 3)

+ 3/6 vertices, named, from 7432b4a:
[1] alice eli alice

We see that the algorithm moved to eli and came back to alice.

We hope this gives you an overview of how to use the igraph package. Let's now move to our use case and see how we can leverage the igraph package to solve our problem.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset