Exercise 3: Mapping Each Worked-System Step to Its Discrete Math Topic — Possible Solution ==================================================================== STEP 1: THE ACCESS RULE ITSELF, WRITTEN WITH AND/OR/NOT — PROPOSITIONAL LOGIC (CHAPTER 2) ------------------------------ The rule combines statements ("is admin," "owns the resource") using the connectives AND, OR, and NOT, and its negation is derived using De Morgan's Law - this is propositional logic, working with whole statements that are true or false, combined by connectives. STEP 2: "EVERY ADMIN CAN ACCESS EVERY RESOURCE" — PREDICATE LOGIC AND QUANTIFIERS (CHAPTER 3) ------------------------------ This statement isn't about one fixed proposition - it makes a claim about every user and every resource at once, using "every," which is exactly the universal quantifier. Predicates (Admin(u), CanAccess(u,r)) combined with a quantifier are Chapter 3's own specific territory, distinct from the fixed, unquantified statements of Chapter 2. STEP 3: COMBINING VISIBLE RESOURCES WITH UNION — SETS AND SET OPERATIONS (CHAPTER 4) ------------------------------ Computing "owned resources combined with admin-visible resources" using union is a direct set operation on two collections of resources - Chapter 4's own subject specifically. STEP 4: OWNERSHIP AND "SAME TEAM AS," ONE OF WHICH IS AN EQUIVALENCE RELATION — RELATIONS (CHAPTER 5) ------------------------------ Both "owns" and "is on the same team as" connect pairs of things (a user to a resource, or a user to another user) - this is a relation. Checking whether "same team as" satisfies reflexive, symmetric, and transitive properties to qualify as an equivalence relation is specifically Chapter 5's own material. STEP 5: CHECKING THE USER LOOKUP IS INJECTIVE — FUNCTIONS (CHAPTER 6) ------------------------------ Verifying that no two different users share the same ID - so that a given ID reliably identifies exactly one user - is checking the injectivity of a function, exactly Chapter 6's own defining property. STEP 6: PROVING THE RECURSIVE PERMISSION CHECK CORRECT VIA A BASE CASE AND INDUCTIVE STEP — PROOF TECHNIQUE AND INDUCTION (CHAPTERS 7-8) ------------------------------ Establishing correctness for a recursive function across every possible folder-tree depth, using a base case (the root folder) and an inductive step (assuming correctness at depth k implies it at depth k+1), is structural induction - Chapter 8's own subject, building on Chapter 7's general proof-technique material. STEP 7: COUNTING 2 x 2 x 2 COMBINATIONS FOR TEST COVERAGE — COMBINATORICS (CHAPTER 9) ------------------------------ Multiplying the number of possible states for each of several independent boolean conditions together to get a total count of combinations is the multiplication principle - Chapter 9's own foundational counting rule. WHY THIS WORKS AS AN ANSWER ------------------------------ Each step is matched to its topic by identifying the specific mathematical operation or reasoning pattern actually being used in that step's own description - quantified claims, set operations, relation properties, function injectivity, inductive proof structure, and counting combinations - rather than simply repeating the chapter numbers already given in the original worked system.