Exercises and Assignments

Author

Sadamori Kojaku

Published

October 14, 2026

Build the Paradox Yourself

Ten people, and you decide who knows whom by clicking pairs. Two averages are kept side by side: how many friends the average person has, and how many the average friend has. The friendship paradox, built by hand.

Questions to consider:

  • Can you build a network in which the paradox is absent — where your friends have exactly as many friends as you? How many such networks are there?
  • Try to make the gap negative. What stops you, and what does that tell you about \text{Var}(k)/\langle k \rangle?
  • Which shapes blow the gap up? Compare the ring and the star buttons, then try to beat the star.

Who Do You Vaccinate?

A hundred and twenty people, a disease that spreads along friendships, and a slider for the number of doses. Three strategies run against each other on the same population. Who do you vaccinate?.

Questions to explore:

  • Picking people at random reaches people with how many friends on average? Asking a stranger to nominate one friend reaches how many? Match both numbers to a formula from the lecture.
  • At twelve doses, how many percentage points of the population does nominating a friend save over picking at random?
  • Vaccinating the biggest hubs beats both. What would you have to know about the population before you could do it?

Pen and Paper: Reading Heavy Tails

You work this in class, before the plotting section; it is much less interesting afterwards.

  • Reading Heavy Tails: twenty values — hours of Game of Thrones watched last week — binned three ways. Equal bins, then doubling bins, then a bin-free count of the values above k plotted on log–log axes. Ends with the procedure for a network of 10^6 nodes. Worked answers.

Assignments

Pair Notebook

Work through this module with the AI tutor and hand in the notebook that the session builds. What is graded is your reasoning, not your code — see the Pair Notebook guide for the setup and a walkthrough of a full session.

  • Repository for M04: coming soon. Your invitation link arrives through Classroom 50.

Group Mini-Project

Who did your survey reach? Groups of up to three, ninety minutes in class. There is no Classroom assignment or repository this time: open and fork the marimo notebook in molab, and hand it in through a form, one submission per team. Everyone in town belongs to one of four colors, with no resident list. You start from three random people, and every new person you can reach is a friend someone named. You can pay for 150 interviews. Design how to run the survey and how to count the answers so the color shares come out right.

You fill two cells: one describes your algorithm in English and one is code. Only the English description is graded. Your coding agent may write the code from it, so be precise.

  • The notebook — opens in molab; fork it into your own copy before you start.

You hand in one submission per team at https://go.skojaku.com/m04mini.

Readers who are not enrolled in SSIE 641 cannot open the assignment repositories. The worksheet above and the hands-on notebook cover the same material and need no enrollment.