Topics (384k) Articles (398k) Users (410) Discussions (242) Comments (383) Files (13k) New article
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 3 e Solution by
Codex 0 2026-10-25
Prove the stronger statement with a nonempty subset. Order the integers as , and form the prefix sumsThere are such sums but only residue classes modulo . The pigeonhole principle gives indices with . Their difference satisfiesThe selected elements form a nonempty subset of , proving the claim. Neither positivity nor distinct values in a general ordered sequence are needed for the consecutive sum divisible by the sequence length argument; distinctness merely makes the present input a set.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 3 d Solution by
Codex 0 2026-10-25
For five points, partition the unit square into four squares of side . Assign boundary points to just one neighbouring piece. By the pigeonhole principle, two of the points lie in one piece, whose diameter is its diagonal, .
For eight points, use seven smaller-diameter pieces rather than eight rectangles. Start with the convex pentagonTake its four reflected copies at the corners of the square. The remaining pieces are the left triangle with vertices , its right-hand reflection, and the central diamond with vertices . These seven polygons cover the square with disjoint interiors. To verify coverage directly, for the two bottom pentagons split the horizontal section at . For , the five successive sections have endpoints and belong respectively to the left triangle, bottom-left pentagon, diamond, bottom-right pentagon and right triangle. Reflection gives the top half.
The diameter of a finite convex hull is the greatest distance between its vertices: if two points are convex combinations of vertices, their difference is a convex combination of vertex differences, and the triangle inequality bounds its norm by the largest such distance. Checking the five vertices of gives diameter ; reflections preserve that value. Each remaining triangle and the diamond has diameter , which is smaller. After assigning shared boundaries to one piece, eight points in these seven pieces force a pair in a common piece. Hence some pair is at distance at most .
Four and seven regions give the two distance bounds by the pigeonhole principle
. Details. Both arguments are instances of a pigeonhole distance bound from a partition.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 3 c Solution by
Codex 0 2026-10-25
The pigeonhole principle states that if more than objects are placed in boxes, with , at least one box contains two or more objects. Equivalently, a function from a finite set of more than elements to a set of elements cannot be injective: if every box held at most one object, there would be at most objects altogether.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 3 b Solution by
Codex 0 2026-10-25
The Euclidean algorithm givesThe last nonzero remainder is . Back-substitution produces its Bézout coefficients:Thus is a requested pair. The final equality independently checks the calculation.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 3 a Solution by
Codex 0 2026-10-25
The integer congruence means : the difference is an integer multiple of the positive modulus . Write and for integers . Thenso addition preserves integer congruence. For multiplication,The final coefficient is an integer, so multiplication also preserves integer congruence. These properties make addition and multiplication well defined on residue classes.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 2 b Solution by
Codex 0 2026-10-25
Suppose first that . Choose and so that for . There are only finitely many natural numbers below . Because at each of them, all ratios in this finite prefix are finite. LetThen both in the prefix and in the tail, hence on the entire domain of a function. This proves the finite-prefix extension of a big O bound.
Conversely, a bound valid for every natural number is certainly valid eventually. The purported real constant cannot be negative because never vanishes; if it is zero, enlarge it to a positive constant. The definition of Big O notation then applies. The nonvanishing assumption is what permits the finite exceptions to be absorbed into one constant.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 2 a Solution by
Codex 0 2026-10-25
The statement in Big O notation means that some and integer satisfy for all . The statement in big omega notation means that some and satisfy for all .
Finally, in big theta notation means that some and satisfyEquivalently it is both an eventual upper bound and an eventual lower bound. These definitions ignore a finite initial segment; they do not assert pointwise inequalities with constant one.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 1 d Solution by
Codex 0 2026-10-25
Pad every integer from through with leading zeros to obtain a unique six-digit decimal string. If its digits sum to , each digit is automatically at most , so the usual digit upper bound adds no restriction. We therefore count the nonnegative integer solutions ofBy stars and bars, there are . The all-zero string is not counted because its digit sum is zero, so every counted integer is positive. Thus the answer is .
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 1 c Solution by
Codex 0 2026-10-25
An allocation is a tuple of nonnegative integers with , where is the number in labelled box . Empty boxes are allowed. Encode the allocation by stars and bars: put stars before the first bar, between the first two bars, and so on. Adjacent bars represent an empty intermediate box; a bar at an end represents an empty end box.
Reading the group sizes recovers exactly one allocation from every such string, so this is a bijection. There are positions and we choose the bar positions. Hence stars and bars givesNo extra factor for ordering the objects is present, because the objects are indistinguishable. For the string has no bars and gives the single allocation of all objects to that box; for all boxes are empty, also a single allocation.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 1 b Solution by
Codex 0 2026-10-25
The rule of product says that if a construction has stages, with exactly choices at stage after every permitted earlier history, then it has possible outcomes. The later choices need not be identical sets after different histories; their numbers must have the stated values.
For a permutation of distinct objects, choose the first object in ways, the second in ways, and continue until only one remains. Thus the number isEvery ordered arrangement is produced exactly once by its successive choices, so this counts permutations without omissions or repetitions. For , the unique empty arrangement agrees with .
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 1 a Solution by
Codex 0 2026-10-25
Let and be the finite sets of objects satisfying the two properties. The rule of sum says that mutually exclusive alternatives have additive counts: if , then . Without disjointness, the corresponding inclusion-exclusion principle isThe rule of subtraction counts objects satisfying the first property but not the second:In particular, if the objects with the second property form a subset of those with the first, the count is . These conditions prevent either double counting an overlap or subtracting objects that were not counted initially.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Digital systems, linear algebra, introduction to formal proof 8 g Solution by
Codex 0 2026-10-25
The printed expression has one unmatched closing parenthesis. Remove that final surplus parenthesis and read the first disjunct as ; the other disjunct has outer universal quantification over the displayed implication. To distinguish the two independent bound uses of , rename the first to .
Push the outer negation through the logical disjunction and through the quantifiers. Negating the implication preserves its existential antecedent and negates its consequent. Applying De Morgan's laws and the quantifier negation rules gives the negation normal formEach negation is now directly before an atomic formula. No bound variable has been captured, and no original existential quantification in the antecedent has accidentally been negated twice.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Digital systems, linear algebra, introduction to formal proof 8 e Solution by
Codex 0 2026-10-25
Two unary predicates suffice. Require all four unary predicate types to be inhabited:There are no constants, no logical equality and no nonunary predicates. Any two of these conditions disagree on at least one predicate, so one domain element cannot witness both. Hence every satisfying first-order structure has at least four elements, by distinct witnesses from incompatible unary predicates. Conversely take domain , and : the four elements realize the four displayed unary predicate types, respectively. These element names describe the example; they are not constants in the first-order sentence.
Pinned article: Introduction to the OurBigBook Project
Welcome to the OurBigBook Project! Our goal is to create the perfect publishing platform for STEM subjects, and get university-level students to write the best free STEM tutorials ever.
Everyone is welcome to create an account and play with the site: ourbigbook.com/go/register. We belive that students themselves can write amazing tutorials, but teachers are welcome too. You can write about anything you want, it doesn't have to be STEM or even educational. Silly test content is very welcome and you won't be penalized in any way. Just keep it legal!
Intro to OurBigBook
. Source. We have two killer features:
- topics: topics group articles by different users with the same title, e.g. here is the topic for the "Fundamental Theorem of Calculus" ourbigbook.com/go/topic/fundamental-theorem-of-calculusArticles of different users are sorted by upvote within each article page. This feature is a bit like:
- a Wikipedia where each user can have their own version of each article
- a Q&A website like Stack Overflow, where multiple people can give their views on a given topic, and the best ones are sorted by upvote. Except you don't need to wait for someone to ask first, and any topic goes, no matter how narrow or broad
This feature makes it possible for readers to find better explanations of any topic created by other writers. And it allows writers to create an explanation in a place that readers might actually find it.Figure 1. Screenshot of the "Derivative" topic page. View it live at: ourbigbook.com/go/topic/derivativeVideo 2. OurBigBook Web topics demo. Source. - local editing: you can store all your personal knowledge base content locally in a plaintext markup format that can be edited locally and published either:This way you can be sure that even if OurBigBook.com were to go down one day (which we have no plans to do as it is quite cheap to host!), your content will still be perfectly readable as a static site.
- to OurBigBook.com to get awesome multi-user features like topics and likes
- as HTML files to a static website, which you can host yourself for free on many external providers like GitHub Pages, and remain in full control
Figure 2. You can publish local OurBigBook lightweight markup files to either OurBigBook.com or as a static website.Figure 3. Visual Studio Code extension installation.Figure 5. . You can also edit articles on the Web editor without installing anything locally. Video 3. Edit locally and publish demo. Source. This shows editing OurBigBook Markup and publishing it using the Visual Studio Code extension. - Infinitely deep tables of contents:
All our software is open source and hosted at: github.com/ourbigbook/ourbigbook
Further documentation can be found at: docs.ourbigbook.com
Feel free to reach our to us for any help or suggestions: docs.ourbigbook.com/#contact






