Laboratory Work 7 — Combinatorics and Descriptive Statistics
Seventh laboratory work of Computer Discrete Mathematics. You implement the counting formulas of combinatorics — permutations, arrangements, and combinations — compute the basic descriptive statistics of a dataset (mean, variance, standard deviation), and generate combinatorial objects explicitly.
At a glance
| Topic | Combinatorics (permutations, arrangements, combinations) and descriptive statistics (mean, variance, standard deviation) |
| Prerequisite lectures | L13 — Probabilities |
| 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 & algorithms) | 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
Combinatorics counts the ways to arrange and select objects: the number of orderings of a set (permutations), of ordered selections of from (arrangements), and of unordered selections (combinations). These counts underpin probability, which is why the work pairs them with the basic descriptive statistics of a dataset — its mean (mathematical expectation), variance, and standard deviation. A final task moves from counting the objects to generating them. The tasks are grouped into three difficulty bands.