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 2017 Functional programming, design and analysis of algorithms (resit) 7 c iv Solution by
Codex 0 2026-10-31
False. Take edges and , and let the outer DFS loop try vertices in order . The first call finishes immediately. The next discovers , whose only outgoing edge reaches already black , so its tree contains only . Finally sees already black .
Vertex has both an incoming edge from and an outgoing edge to , yet is the sole vertex of its DFS tree. Nonzero incoming and outgoing degrees do not require either edge to become a tree edge in depth-first search.
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Functional programming, design and analysis of algorithms (resit) 7 c iii Solution by
Codex 0 2026-10-31
True for a directed cycle. Suppose there were no back edges. On examining an edge , its target would either be white, in which case its recursive call finishes before ; or black, in which case it has already finished. A gray target would be an active ancestor and hence give a back edge, contrary to the supposition. Therefore every edge would satisfy .
Applying those strict inequalities around a directed cycle would imply , a contradiction. Thus some back edge in depth-first search must exist in the search's edge classification. Such an edge is classified relative to the DFS forest; it is not one of the forest's tree edges.
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Functional programming, design and analysis of algorithms (resit) 7 c ii Solution by
Codex 0 2026-10-31
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Functional programming, design and analysis of algorithms (resit) 7 c i Solution by
Codex 0 2026-10-31
False. Use vertices , edges , , , and start depth-first search at , scanning before . The times areThere is a directed path and , but and are separate children of . Thus is not a descendant of . The path leaves through an already gray ancestor; its later branch need not be explored inside 's recursive call. This is consistent with the DFS parenthesis property.
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Discrete mathematics, continuous mathematics and probability 9 c ii Solution by
Codex 0 2026-10-31
The normalized sum has mean one and variance . For every fixed , the Chebyshev inequality givesThis proves the requested limit, and in fact proves convergence in probability of to one. It is a finite covariance range weak law: adjacent dependence is harmless here because only linearly many covariance terms survive.
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Discrete mathematics, continuous mathematics and probability 9 c i Solution by
Codex 0 2026-10-31
Put for . Independence of the underlying exponentials gives andBy the covariance of overlapping independent products, adjacent terms have covariance one. Terms separated by at least two indices use disjoint independent factors, so their covariance is zero. There are adjacent pairs. Linearity of expectation and the variance of a sum formula therefore yieldIn particular, the products themselves are not independent merely because the original are.
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Discrete mathematics, continuous mathematics and probability 9 b ii Solution by
Codex 0 2026-10-31
For finite second moments, the general variance of a sum formula isEach distinct unordered pair appears once in the second sum and twice when the full square is expanded. No independence assumption is needed.
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Discrete mathematics, continuous mathematics and probability 9 b i Solution by
Codex 0 2026-10-31
Assume finite second moments and write . Expanding the squared centered sum givesThis variance of a sum identity does not require independence; the covariance term records the contribution that would otherwise be lost.
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Discrete mathematics, continuous mathematics and probability 9 a iii Solution by
Codex 0 2026-10-31
For the overlapping products, factor using the independence of :This is the covariance of overlapping independent products: the shared contributes its second moment. In contrast, and use disjoint independent factors and are themselves independent, giving
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Discrete mathematics, continuous mathematics and probability 9 a ii Solution by
Codex 0 2026-10-31
Because and are independent random variables, their product's expected value factors:The original independence assumption is essential to this factorization.
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Discrete mathematics, continuous mathematics and probability 9 a i Solution by
Codex 0 2026-10-31
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Discrete mathematics, continuous mathematics and probability 8 b iv Solution by
Codex 0 2026-10-31
The Markov property and time homogeneity giveSince , conditional probability yields the Markov chain return bridge expressionThe explicit formula gives , soThe conditioning event has positive probability at each finite time even though those return probabilities tend to zero. Taking an undefined conditional on an infinite-time zero-probability event is not needed.
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Discrete mathematics, continuous mathematics and probability 8 b iii Solution by
Codex 0 2026-10-31
The initial values are and . The characteristic polynomial of the linear recurrence iswith roots and . Hence . The initial conditions give , , so , . Therefore
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Discrete mathematics, continuous mathematics and probability 8 b ii Solution by
Codex 0 2026-10-31
Let . By the law of total probability,There is no return contribution from the absorbing state . Since can be entered only from , for . Substitution yieldsNo independence between successive positions is assumed; the conditional transitions give the recurrence.
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Discrete mathematics, continuous mathematics and probability 8 b i Solution by
Codex 0 2026-10-31
Starting at , the two possible two-step returns are and . They are disjoint events, with probabilities and . ThereforeEach path probability uses the specified Markov property to multiply its successive transition probabilities.
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Discrete mathematics, continuous mathematics and probability 8 a ii Solution by
Codex 0 2026-10-31
For a finite or countable measurable partition, the law of total probability isIndeed, is the disjoint union of , and the conditional probability formula gives each positive-probability term. Zero-probability cells contribute zero; their conditionals need not be defined by a ratio. If all cells have positive probability, the sum simply runs over every .
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Discrete mathematics, continuous mathematics and probability 8 a i Solution by
Codex 0 2026-10-31
A partition of a set consists of nonempty subsets that are pairwise disjoint and whose union is the whole set. HereThus every outcome belongs to exactly one cell. The probability calculation additionally requires the cells to be measurable events.
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Discrete mathematics, continuous mathematics and probability 7 b iii Solution by
Codex 0 2026-10-31
For , its mean is , so the size-biased probability generating function isChoose independent with distribution . Their shifted sum has generating function, initially for ,with both sides continuous and zero at . Equality of probability generating functions provesEquivalently, has possible positive summand pairs, each of probability , matching the size-biased geometric distribution probabilities.
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Discrete mathematics, continuous mathematics and probability 7 b ii Solution by
Codex 0 2026-10-31
For , differentiate the probability generating function term by term and multiply by :This is the size-biased probability generating function identity. At , the finite-mean assumption gives the limiting value one on both sides; at zero, positive support gives value zero.
Past exam of the year 1 of the computer science course of the University of Oxford 2017 Discrete mathematics, continuous mathematics and probability 7 b i Solution by
Codex 0 2026-10-31
Since , its finite expected value satisfies . Every is nonnegative andThus these values are a probability mass function. They define the size-biased distribution of : larger values receive proportionally more weight.
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







