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 2023 Functional programming, design and analysis of algorithms 5 a i Solution by
Codex 0 2026-10-25
Start with . With in-place edge relaxation, the Bellman-Ford algorithm makes the following changes during its first lexicographic pass:The next pass makes no change; any remaining fixed-count passes also make none. Thus the final vector is . These are sequential updates within a pass, rather than the simultaneous values of the Synchronous Bellman-Ford recurrence.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 9 b v Solution by
Codex 0 2026-10-25
Part (a) gives . Therefore the ceiling function and floor function satisfy almost surely. Both are integrable, since and . Thus .
Now take expectations in :Writing , which ranges over every , and rearranging yieldsThese are the zeta bounds from rounded Pareto variables: rounding below and above converts one elementary expected value into bounds on an infinite series.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 9 b iv Solution by
Codex 0 2026-10-25
The nonnegative integer-valued tail-sum formula for expectation givesThis is finite because . Here is the Riemann zeta function on its convergent real domain. The floor function is nonnegative on the support, so the tail-sum identity applies directly.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 9 b iii Solution by
Codex 0 2026-10-25
For , the event equals . Integrating the Pareto distribution's density givesThe mass formula follows by subtracting consecutive tail probabilities, or by integrating over . With the paper's convention , include the separate endpoint values and , since almost surely. Substituting into the power expression would be invalid.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 9 b ii Solution by
Codex 0 2026-10-25
The expected value is finite because :The condition on is precisely the first moment threshold for this parameterization of the Pareto distribution.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 9 b i Solution by
Codex 0 2026-10-25
Normalization of the probability density function requires . Hence . It is positive for the given , and the density is nonnegative, so this does define a probability distribution. It is a Pareto distribution with scale and shape .
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 9 a iii Solution by
Codex 0 2026-10-25
The events , for , are pairwise disjoint. Their union is , and the integers form a countable set. By countable additivity,Countability is the necessary justification: one cannot apply this argument to an arbitrary uncountable union of zero-probability singletons. This is a special case of countable sets have zero probability under a density.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 9 a ii Solution by
Codex 0 2026-10-25
An absolutely continuous probability distribution assigns zero probability to a singleton, because its density has zero integral over that set. Thus for every real , including points where a chosen version of is nonzero.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 9 a i Solution by
Codex 0 2026-10-25
The cumulative distribution function is . This formula uses the assumed probability density function; the density itself need not be a continuous function.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 8 b iii Solution by
Codex 0 2026-10-25
Set . The preceding probability generating function becomes , identifyingEquivalently, for , . Since , also . This is the existing geometric count under Bernoulli thinning, with the zero-based convention specified.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 8 b ii Solution by
Codex 0 2026-10-25
The probability generating function of an independent random sum states that, for a nonnegative integer-valued independent of independent and identically distributed nonnegative integer-valued summands, wherever the expectations converge. Here , so, writing ,It is valid at least for , and its power series in fact converges for .
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 8 b i Solution by
Codex 0 2026-10-25
Take an independent and identically distributed sequence with , independent of . Conditional on , the random sum has binomial distribution with parameters , including the empty sum at . This construction therefore has exactly the prescribed joint law of and represents as the required random sum.
For a literal representation that retains an already given pair , enlarge the probability space by auxiliary randomness. Conditional on , choose uniformly a size- subset of , put ones at those indices and zeros at the others, and append independent Bernoulli variables of parameter . Given , a specified length- pattern with ones has probability . Thus the entire sequence is independent and identically distributed and independent of , while its first terms sum to the original .
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 8 a iii Solution by
Codex 0 2026-10-25
Differentiate the probability generating function inside its radius of convergence:The first moment and second factorial moment are and . Consequently
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 8 a ii Solution by
Codex 0 2026-10-25
Let . By the definition of a probability generating function and the geometric series,The series converges absolutely when , equivalently .
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 8 a i Solution by
Codex 0 2026-10-25
In independent Bernoulli trials with success probability , counts failures before the first success. The event requires failures followed by one success, giving . This is the zero-based geometric distribution, rather than the count of trials including the success.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 7 b v Solution by
Codex 0 2026-10-25
Put . The fixed point of this affine recurrence is . Subtracting it gives . Repeated substitution, or mathematical induction, therefore yieldsFor this expression applies to every . For , state the initial value separately and obtain for every , avoiding any need to interpret . The expected red imbalance decays towards zero, although the urn composition itself remains random.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 7 b iv Solution by
Codex 0 2026-10-25
Apply the law of total expectation to the bounded random variable . Linearity of expectation givesThis also holds for the first step from .
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 7 b iii Solution by
Codex 0 2026-10-25
Compute the conditional expectation from the possible increments:Therefore and . This calculation uses the conditional independence of the two selections, not independence of the successive counts .
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 7 b ii Solution by
Codex 0 2026-10-25
At state , urn 1 has red and blue balls, while urn 2 has red and blue balls. Conditional on the state, the two choices are independent, each assigning probability to every ball. A red–blue exchange decreases ; a blue–red exchange increases it; equal colours leave it unchanged. Thus the conditional probability mass function isThe three numerators sum to . At or , the outward transition has probability zero. These are the transitions of the Bernoulli-Laplace diffusion model. The displayed formula is a transition kernel on every state; a literal conditional probability at a particular time requires the conditioning event to have positive probability.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 7 b i Solution by
Codex 0 2026-10-25
The first exchange removes one red ball from urn 1 and replaces it with a blue ball. Hence with probability one.
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





