teaching with "Networks, Crowds, and Markets:
Reasoning About a Highly Connected World" (by David Easley and Jon Kleinberg)
a collection of complementary inclass activities by Lada Adamic
If you are like me, you may have upwards of $20 lying around in change. This is perfect for conducting a "bargaining and power in networks" inclass experiment. The game is played as follows. Each tie/edge has the potential to split some amount of money (in my class we had 50¢ per edge), and the split has to be agreed upon by the parties on either side of the edge. Each person can only participate in one trade, so e.g. in the network on the blue sheet, B can choose to trade with either A or C. I split the change into 5 ziplocks with the networks drawn on them (the networks with more edges got a bit more change) and a good mix of quarters, dimes, nickles and pennies. The change stretched into 5 rounds. Each student received a numbered postit (1,2,3,4,5,...) and I used R to generate a random sequence of those integers and overlaid them on the networks. The students' postits told them which network they had been randomly assigned to (some students were left out). After 3 rounds, we switched so that the students who did not have an opportunity to bargain could do so. At the conclusion of each round, the students would pocket the change that they had earned. From the "games" activity from Chapter 6, I knew that my students were quite resourceful in coordinating and had an altruistic tendency. Thus for this exercise, I was not only careful to assign them into groups randomly, but also told the students to maximize their own payoffs. After all, they would get to keep the money that they bargained for. The results turned out beautifully. Even though Chapter 12 warns that splits tend to be more equitable than theoretical predictions when you run experiments, the results of our inclass experiment were remarkably close to the theoretical predictions, and the students grasped what was going on very well (as far as I could gather from the ensuing inclass discussion after we tallied the results, and the following problem set). 
Below is a snapshot of user allocations for 3 sample students (I've removed the usernames, but in the actual interface, all students holdings are viewable, as well as a list of buy and sell offers, e.g. "user3 to sell 2 of April 24 for .2" 
In this pure strategy simulation, we present the students with a few default payoff matricies (virus, hawkdove, hunter, modhunter), corresponding to games discussed in the chapter. They can also experiment with arbitrary symmetric payoff matricies by setting the payoffs themselves. The students can then set the intial populations and let the simulation run, observing which strategy "S" or "T", if either, is evolutionarily stable. 

In this model of evolutionary mixed games, individuals can play "S" or "T" with some probability p (which is their attribute), here, individuals reproduce/die off depending on their accumulated riches. Their offspring copy their p, but mutate it slightly. Over time, the population should converge to the evolutionarily stable strategy (results may vary though...). Again, there are some preset payoff matrices, or the payoff matrix can be set by the student. 
Take a growing network, with and without preferential attachment. See how the tendency of new nodes to attach to well connected nodes influences the rate of spread: Diffusion in randomly and preferentially grown networks (NetLogo) 

Find out how random rewiring affects the probability that an infection persists in the network using an SIS (susceptibleinfectedsusceptible) model. Diffusion in a small world (NetLogo) 

Find out how community structure can affect opinion formation. Opinion formation on a toy network (NetLogo) 

Sometimes whether an opinion diffuses or not depends on the initial location where it is formed, and also whether one is dealing with simple contagion (each of your friends "infects" you with constant probability at each time point) or complex contagion (you need to hear it from at least two friends to adopt an opinion). This model is set up as a twoplayer game. Choose nodes in a small social network such that your opinion wins out. Simple and complex contagion (NetLogo) 
More interesting to students than the structure of the WWW was the structure of their own Facebook networks (and Web and social networks share some of the same characteristics). I had them follow the procedure written by Bernie Hogan in the NodeXL book, for exporting their Facebook networks into NodeXL, visualizing them, and computing various properties, including finding communities, individuals with high betweenness, etc., and explaining that in a subsequent assignment. This was in part an inclass activity because of the troubleshooting with NodeXL. These days undegrads have rather sizeable Facebook networks, but not always the fastest laptops, leading to a slowrunning NodeXL. One workaround was to make NodeXL available via a virtual app server, but that created an additional layer of complexity with students having to get additional accounts. Gephi appears to be a good alternative (that runs on any platform, as opposed to just Windows), and may be simpler for students to use for the level of analysis used in the class. 
One fun activity is to have class construct a single network collaboratively, while competing to have one student of their choosing receiving the highest PageRank, who then can distribute (or keep) some number of extra credit points. Each student is given two links that they can give to two other students. We used a Google doc where students could write their links (this lead to all sorts of data quality issues, because students would misspell each others names, etc.). If I were to do it again, I would write a script with a dropdown list of unique names that the students could select from. In any case, once the data is obtained, it is imported into some standard network analysis package, the PageRank is computed, and the winner announced. Unfortunately in this instance I had chosen to use NodeXL which at the time had a bug in its PageRank implementation (now fixed!) that rendered it unable to compute PageRank correctly when there are disconnected components in the graph. But on the left I'm showing the results of the same experiment done in an information retrieval class several years ago (where I used Guess to compute the PageRanks). The students came up with a clever piramid scheme that resulted in a relatively low indegree node of their choosing receiving the highest PageRank. This exercise does require time. If students are not given enough time to formulate strategies and then negotiate amongs themselves to implement them, likely they will revert to creating hubs (something that happened in my SI301 class exclusively, but not in the previous class), without giving more thought to "trapping" the random walker in their part of the network. 

Having high PageRank means that not only do others link to you, but those others are themselves linked to. I ask the students to experiment by varying the teleportation probability in applying PageRank to a small network, and also try and figure out why some nodes with equal indegree have different PageRank values.
This activity is a good precursor to the network formation exercise above. 
This NetLogo demonstration includes two networks from the chapter (Figures 19.3 and 19.4), a line network and my old Facebook network. The students can choose payoffs for adopting A (blue) or B (red), or the cost of adopting both (if the bilingual option is turned on). One can randomly allocate choices initially, or students can manually set the initial colors of nodes. The demonstration illustrates how cascades are bounded by clusters and also how nodes that are bilingual can actually impede the diffusion of new, superior technologies, i.e. where the green nodes are bilingual (they speak both red and blue) 
This wasn't an inclass exercise but rather a task spread across a couple of assignments. Memes were the theme. In the first assignment, students were asked to visit the website KnowYourMeme.com, and deduce some common characteristics of popular memes. In a subsequent assignment they were asked to run the following simulation (which they were to code themselves, in retrospect, coding it for them would have saved a bunch of grief, but the computer scientists in the class enjoyed this one). There is a source message “abcdefghijklmnopqrstuvwxyz”. It gets copied in the following way: With 10% chance a person sees the source (that is, they hear the full message above), with 90% chance they see one of the derivative copies, chosen at random. When a copy is made, it is only partial. That is, the person copying often picks only a portion and repeats that portion. We could then discuss richgetricher phenomena and other attributes of memes, such as simplicity, as well as ways in which this very simple model does not capture true memetic spread.

This is a modification of the standard NetLogo implementation of Schelling's residential segregation model. Each point on the lattice can be occupied by an individual. Individuals move if the composition of their immediate neighborhood is not at least X% the same color as they are. Even when X is relatively low, e.g. 1/3, meaning that individuals are tolerant of living in diverse neighborhoods, the neighborhoods become segregated.

Experiment with the WattsStrogatz small world model. See how different amounts of random rewiring affect the shortest path and clustering coefficient of the network: 

F  The students can vary the probability that a link is formed as a function of lattice distance and observe the number of hops it takes a simply greedy algorithm to find its way from source to target. The setup can be computationally expensive  the students should be warned to be patient and not attempt it on slow laptops 
The night before I was to give this lecture, I read "Classroom Games: A prisoner's dilemma", suggesting that "Playing cards are convenient for classroom games because they allow the instructor to implement the experiment quickly, even in large classes. Cards also permit students to keep their choices secret until asked to reveal them." So I brought along 2 decks of cards, asked each student to take one of each color, and played the following game, first pairing students off, and then having them play by row (there were about 5 rows of ~ 6 students/row). The payoffs are as follows: red card: you get $1 no matter what anyone else plays black card: you get $4 if everyone else in the group plays black and $0 if at least one person plays red. The exercise, as designed, is supposed to first get the students familiar with playing games, thinking about strategies and payoffs, etc. Then it is supposed to demonstrate the difficulty of coordination in larger groups. In my class, the students openly communicated (winkwink, go team) to get everyone in a row in line and playing black, making coordination more likely (since by that point they know how the game works), which caught me by surprise. A workaround might be to have the students select a strategy without revealing what the groupings are (e.g. it could be rows or columns or bithdays or some other attribute). Still, for the small amount of setup effort and the engagement of the students in the exercise, it was worthwhile. 
I had prepared this exercise, but we had gotten so deeply into discussing the voting mechanisms that we did not get to try it out. Using R, I generated sequences of preferences among A,B,C,D,and E, where two of the choices were in close contention, and the rest were more likely to occupy the less favored spots.Each student would receive one postit note with their preference. The students would be given for each letter information on how many times it was selected as 1st, 2nd, 3rd, etc. in the generated sequences. The winner among A,B,C,D, and E would be determined by a Borda count of votes submitted by students. However, students would not need to report their "true" preferences and could vote strategically instead. Their payoff would depend on their true preference however. If their true preference was C,D,E,A,B, then if A wins they got 1 point, if C wins they got 4 points, etc. 
Vary the average degree in the classic ErdosRenyi random graph model. Is there a critical average degree at which a giant component emerges? Giant Component Model (model is part of the standard NetLogo models library) 

Start with a simple ErdosRenyi random graph, and figure out how the density of the network affects the speed of diffusion. Diffusion in an Erdos Renyi graph (NetLogo) 

Each node that joins the network has to decide what other node(s) it will attach to. It can do this purely at random, or it may prefer nodes who have more connections. Vary this preference and see the effect on the growing network. Random and preferential attachment NetLogo model 

Use the GirvanNewman betweenness clustering algorithm to discover community structure in the linking patterns of political blogs. Betweenness clustering using Guess 

Many real world networks are scale free. See how the Gnutella peertopeer filesharing network holds up to random node failure and targeted attack on the highest degree nodes. Testing the resilience of a Gnutella network (Guess) 
I didn't have time to create all the demos I would have liked to (I was preparing another new course in parallel). For that, and other reasons, I'd love to hear what others have come up with, so if you have demos/activities for a similar class, please let me know: ladamic@umich.edu.