OpenCyber Academy
Bachelor's · Chapter 1 · English
Course code: OCA-103Chapter 01: OCA-103-C001

Chapter 1 — Mathematical reasoning

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

Lesson map

Lesson 01 published. Map, example, EX001.

flowchart TD
  N0["Learning outcomes"]
  N1["1.1 Why precision matters"]
  N2["1.2 Sets and membership"]
  N3["1.3 Powers of two"]
  N4["1.4 Counterexamples"]
  N5["Synthesis"]
  N0 --> N1 --> N2 --> N3 --> N4 --> N5
  N5 --> EX["Worked example"]
  EX --> Q["Exercise EX001"]

Logical drawing

flowchart LR
  N0["Learning outcomes"]
  N1["1.1 Why precision matters"]
  N2["1.2 Sets and membership"]
  N3["1.3 Powers of two"]
  N4["1.4 Counterexamples"]
  N5["Synthesis"]
  N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> Q["EX001"]
[Learning outcomes]
    |
    v
[1.1 Why precision matters]
    |
    v
[1.2 Sets and membership]
    |
    v
[1.3 Powers of two]
    |
    v
[1.4 Counterexamples]
    |
    v
[Synthesis]
    |
    v
[Worked example] --> [Exercise EX001]

Learning outcomes

You will (1) use logic and sets to state network rules precisely; (2) reason with powers of two; (3) check claims with counterexamples.

1.1 Why precision matters

Priya Nair begins her bachelor's degree at the fictional Northbridge University and, in her first week, hears about the fictional Harbourside Community Clinics, four small clinics sharing one wireless passphrase for staff, visitors and medical carts. A tutor asks the class to write down, exactly, who should be able to reach what. Most first attempts are vague, such as "visitors should not see patient systems". Mathematical reasoning gives tools to make such statements precise enough to check, and precision is the first habit of network security, because a rule that can be read two ways will eventually be configured the wrong way.

1.2 Sets and membership

A set is a collection of distinct items, and much of network security is about membership. The set of clinic devices can be split into subsets: staff laptops, clinical carts, visitor phones and network equipment. A rule such as "no visitor device may reach any clinical device" becomes a statement about pairs drawn from two sets. Union, intersection and complement let Priya ask useful questions: which devices are in both the staff and clinical sets, which devices belong to no planned set, and whether the sets together cover every device seen on the network.

1.3 Powers of two

Computers count in binary, so network sizes come in powers of two. An address block with eight host bits holds two to the power eight, 256 addresses; seven bits hold 128; four bits hold 16. Each extra bit doubles the size, and each bit removed halves it. Priya practises moving between bit counts and sizes until it is automatic, because later she must size subnets for each clinic group. A common mistake is to treat sizes as decimal round numbers, asking for a block of 100 or 200, when only powers of two are possible.

1.4 Counterexamples

A general claim, such as "every visitor device is on the guest network", is disproved by a single counterexample: one visitor phone found on the staff network. Priya learns that security claims are usually universal, about all devices or all paths, so testing them means searching for counterexamples rather than collecting confirming cases. A hundred visitor phones correctly placed do not prove the claim; one misplaced phone disproves it. This idea returns throughout the course, in testing firewall rules, reviewing configurations and evaluating whether a control works.

Worked example

Priya writes the clinic rule as: for every device d in Visitors and every device c in Clinical, d cannot open a connection to c. She then lists what evidence would be a counterexample.

Synthetic case. The clinics and devices are synthetic.

Errors and limits

Informal language such as "usually" or "should" hides exceptions; precise statements make exceptions visible.

Exercises

Synthesis

Sets, powers of two and counterexamples turn vague security wishes into precise, checkable statements.

Continue studying — chapter 01 of 40

← Course home · Course chapter index · Chapter 02 (draft) →

Worked answers

EX001. One visitor device successfully opening a connection to any clinical device.

EX002. Sixty-four, because two to the power six equals 64.

EX003. They are in the complement of the union of all planned sets and need investigating.