Problem

Watts–Strogatz graph model. (See Exercise 4.5.27 and Exercise 4.5.28.) Watts and Strogatz...

Watts–Strogatz graph model. (See Exercise 4.5.27 and Exercise 4.5.28.) Watts and Strogatz proposed a hybrid model that contains typical links of vertices near each other (people know their geographic neighbors), plus some random long-range connection links. Plot the effect of adding random edges to an n-by-n grid graph on the average path length and on the cluster coefficient, for n = 100. Do the same for k-ring graphs on V vertices, for V = 10,000 and various values of k up to 10 log V.

EXERCISE 4.5.27

In a grid graph, vertices are arranged in an /7-by-n grid, with edges connecting each vertex to its neighbors above, below, to the left, and to the right in the grid. Compose a Smal 1 Worl d and Graph client that generates grid graphs and tests whether they exhibit the small-world phenomenon (first do Exercise 4.5.23).

6-by-6 grid graph

EXERCISE 4.5.23

Add to SmallWorld (Program 4.5.5) the function isSmallWorld() that takes a graph as an argument and returns true if the graph exhibits the small-world phenomenon (as defined by the specific thresholds given in the text) and false otherwise.

EXERCISE 4.5.28

Extend your solutions to the previous two exercises to also take a command-line argument m and to add m random edges to the graph. Experiment with your programs for graphs with approximately 1,000 vertices to find small-world graphs with relatively few edges.

previous two exercises

Exercise 1

Write a SmallWorld and Graph client that generates k-ring graphs and tests whether they exhibit the small-world phenomenon (first do Exercise 4.5.23).

3-ring graph

EXERCISE 4.5.23

Add to SmallWorld (Program 4.5.5) the function isSmallWorld() that takes a graph as an argument and returns true if the graph exhibits the small-world phenomenon (as defined by the specific thresholds given in the text) and false otherwise.

Exercise 2

In a grid graph, vertices are arranged in an /7-by-n grid, with edges connecting each vertex to its neighbors above, below, to the left, and to the right in the grid. Compose a Smal 1 Worl d and Graph client that generates grid graphs and tests whether they exhibit the small-world phenomenon (first do Exercise 4.5.23).

6-by-6 grid graph

EXERCISE 4.5.23

Add to SmallWorld (Program 4.5.5) the function isSmallWorld() that takes a graph as an argument and returns true if the graph exhibits the small-world phenomenon (as defined by the specific thresholds given in the text) and false otherwise.

Program 4.5.5 Small-world test

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search