◇ OpenCyber Academy
Engineering · Chapter 2 · English

Chapter 2 — Discrete mathematics

Open, free learning for anyone who wants to protect people and technology. No account is required to read this text or its worked answers.

Chapter 2 — Discrete mathematics

Lesson map

Lesson 02 published. Map, example, EX004.

flowchart TD
  N0["Learning outcomes"]
  N1["2.1 Counting combinations"]
  N2["2.2 Sets and categories"]
  N3["2.3 The pigeonhole principle"]
  N4["2.4 Graphs of relationships"]
  N5["Synthesis"]
  N0 --> N1 --> N2 --> N3 --> N4 --> N5
  N5 --> EX["Worked example"]
  EX --> Q["Exercise EX004"]

Logical drawing

flowchart LR
  N0["Learning outcomes"]
  N1["2.1 Counting combinations"]
  N2["2.2 Sets and categories"]
  N3["2.3 The pigeonhole principle"]
  N4["2.4 Graphs of relationships"]
  N5["Synthesis"]
  N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> Q["EX004"]
[Learning outcomes]
    |
    v
[2.1 Counting combinations]
    |
    v
[2.2 Sets and categories]
    |
    v
[2.3 The pigeonhole principle]
    |
    v
[2.4 Graphs of relationships]
    |
    v
[Synthesis]
    |
    v
[Worked example] --> [Exercise EX004]

Learning outcomes

You will (1) count combinations of attributes; (2) use sets to describe data categories; (3) reason about uniqueness with the pigeonhole principle.

2.1 Counting combinations

Zara counts how many distinct profiles Pellmore's booking form can produce. Birth date has about 36,500 values over a century, sex has two common values, and Pellmore serves around 3,000 postal areas. The product is over two hundred million possible combinations, far more than Pellmore's 150,000 patients. Most combinations are empty and many patients sit alone in their combination. This simple counting argument explains the finding of Sweeney (2002) that a few ordinary attributes can single out most people, which Zara will study in detail later in the course.

2.2 Sets and categories

Data protection law uses categories that behave like sets. The GDPR distinguishes personal data from special categories in Article 9, which include data concerning health. Zara draws a Venn diagram: all data Pellmore holds, the subset that is personal data, and inside it the subset that is health data. She notices that almost everything Pellmore holds falls in the innermost set, because even an appointment time at a telemedicine clinic reveals that someone sought care. Set thinking helps her see why classification decisions must be made carefully.

2.3 The pigeonhole principle

If more pigeons than holes exist, some hole contains at least two pigeons. Zara uses the converse: when there are far more holes than pigeons, most holes contain at most one. With two hundred million combinations and 150,000 patients, uniqueness is almost guaranteed unless attributes are coarsened. Prof. Holm asks her to compute how coarse the attributes must be before each combination holds at least five patients on average. Reducing birth date to birth year and postal area to region brings the number of combinations close to the needed scale.

2.4 Graphs of relationships

Discrete mathematics also covers graphs. Zara models Pellmore's systems as nodes and data flows as edges. A patient record moves from the app to the booking database, then to the video vendor, the records system and the laboratory partner. The graph shows where personal data travel and which nodes connect to outside organisations. She learns that such a graph is the starting point for a record of processing activities, which Article 30 of the GDPR requires, and that missing edges in the diagram usually mean undocumented and therefore unmanaged data flows.

Worked example

Zara counts over two hundred million attribute combinations for 150,000 patients, classifies Pellmore's data with sets, applies the pigeonhole principle to uniqueness and draws a data-flow graph.

Synthetic case. Patient numbers are synthetic; GDPR Articles 9 and 30 and Sweeney (2002) are real.

Errors and limits

Uniform counting assumes values are equally likely; real attributes cluster.

Exercises

Synthesis

Chapter 2 counts, classifies and maps. Chapter 3 looks at the physical side of data.

Continue studying — chapter 02 of 50

← Chapter 01 (draft) · Course chapter index · Chapter 03 (draft) →