How to mark repeated vertices?

May 10, 2011 at 11:42 AM

First of all, we have generate a friend network using Nodexl. We want to select one of the friend in the network randomly in order to distribute a information around the whole network.

For example, we double click Peter in the network, then the Graph in the right hand side will highlight all the vertices (Peter's friends) in the vertices worksheet.

Then we want to select Peter's friend(s), let say John, Mary and Kim in order to distribute the information to other friend in the network. By using John, Mary and Kim 's friend network, we can distribute the information over the network.

The problem is it will cover some repeaters who have received the information previously distribute from Peter(Because they have same friends in the network).

So how to mark repeated vertices? Finally,we want to calculate total number of people who received the information.

Thank you !!

- Pherson

May 10, 2011 at 8:58 PM


I can tell you how to calculate the total number of people who received the information.  I don't know how to distinguish the repeaters from the non-repeaters, though.

To calculate the total number of people who received the information:

1. Select Peter in the graph pane.

2. Right-click Peter in the graph pane and select "Select Subgraphs" from the right-click menu.

3. In the Select Subgraphs dialog box, click "The clicked vertex only", set "Levels of adjacent vertices to include in each subgraph" to 2.0, click Select, and then Close.

You have now selected Peter, his friends, and his friends' friends.  To calculate how many people that is:

4. Right-click anywhere in the graph pane and select "Edit Selected Vertex Properties" from the right-click menu.

5. In the Vertex Properties dialog box, set "Marked?" to "Yes" and click OK.

This adds a "Marked?" column to the Vertices worksheet and sets the cell for each selected vertex to "Yes."  To count the "Yes" cells:

6. In an empty cell somewhere in the Vertices worksheet, enter this formula:

=COUNTIF(Vertices[Marked?], "Yes")

That is the count of Peter, his friends, and his friends' friends.

-- Tony

May 11, 2011 at 4:47 AM

Thank you very much for your help!!!

- Pherson