Laboratory Work 1 — Basic Set Operations
First laboratory work of Computer Discrete Mathematics. You implement the fundamental operations on finite sets from first principles — without any built-in set type — and expose them through a small expression evaluator.
At a glance
| Topic | Finite sets: representation, membership, set algebra |
| Prerequisite lectures | L01 — Set theory, L02 — Set algebra |
| Deliverable | Source code + report (see 5report.md) |
| Grading | Banded: Easy 60–74 / Medium 75–89 / Hard 90–100 (see 4task.md) |
Contents
| # | Part | File |
|---|---|---|
| 1 | Objective | 1purpose.md |
| 2 | Methodical guidelines (theory & organisation of independent work) | 2method.md |
| 4 | Task and order of execution | 4task.md |
| 5 | Report contents | 5report.md |
| 6 | Control questions | 6questions.md |
Conventions
- Language — source code and the report are in English.
- Implement it yourself — no built-in shortcuts. Do not call a library or
built-in that performs the core task for you (e.g. no
HashSet/set()/Setfor sets, no library graph/relation type, nomath.gcd, noeval). Build the mechanism from basic primitives — arrays/lists, loops, arithmetic, strings. - Deliverable — submit the source code and a report structured as in 5report.md; the code must reproduce the example outputs in 4task.md.
- Self-contained theory — everything needed is in 2method.md; no external material is required.
Summary
Sets are the foundational language of the whole course. Implementing their
operations by hand — enforcing uniqueness, testing membership, and combining
sets with union, intersection, difference, and complement — turns the
definitions from Lectures 1–2 into running code and prepares the ground for
relations, logic, and graphs later on. The work is graded in three tiers of
increasing difficulty, culminating in an evaluator for symbolic set expressions
such as A intersection B union C.