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 2021 Discrete mathematics, continuous mathematics, and probability 8 b iii Solution by
Codex 0 2026-10-25
Choose . If has an exponential distribution with rate , then for ,while the integral diverges to when . Since has rate ,For the other two rates, , whereas . These computations establish exactly the required finite variance, finite expected value, and infinite expected value.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 8 b ii Solution by
Codex 0 2026-10-25
Compute all three probabilities. From the preceding part, . Integrating the joint probability density function over givesOn one has and , soTherefore and are independent events. The minimum waiting time and the identity of the first clock are independent for competing exponential clocks; unequal rates change the winner probabilities but do not destroy that independence.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 8 b i Solution by
Codex 0 2026-10-25
Using the rate parameter convention for the exponential distribution, independence gives the joint probability density functionFor , the survival probability of the minimum isThus has exponential distribution with rate , andValues of a probability density function at the single endpoint do not affect the probability distribution.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 8 a v Solution by
Codex 0 2026-10-25
Conditional on a contiguous red block, its possible starting positions remain equally likely because their original colour patterns had equal probabilities. The first card is red exactly when that block starts at position . HenceThis also follows by dividing the probability of the single favourable block position, , by the probability of all block positions.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 8 a iv Solution by
Codex 0 2026-10-25
The red positions form a uniformly chosen subset of size , so there are equally likely colour patterns. A contiguous red block can start at positions , giving exactly favourable patterns. ThereforeIf the cards are regarded as individually labelled, each colour pattern corresponds to permutations, so the same counting argument still applies. In the edge case , the formula correctly gives probability one.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 8 a iii Solution by
Codex 0 2026-10-25
Let be the two red-card events. Sampling without replacement givesThis differs from the product , sinceThus the events are not independent, for every positive . A first red card reduces the remaining red fraction, a basic instance of how sampling without replacement need not be independent.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 8 a ii Solution by
Codex 0 2026-10-25
Every position in the random permutation has the same marginal colour probability, so . One can verify this with the law of total probability, conditioning on the first card:Here because both colour counts are positive.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 7 c ii Solution by
Codex 0 2026-10-25
Insert the Poisson distribution probability generating function into the preceding bound:For fixed , differentiate the exponent with respect to . Its derivative is , and its second derivative is , so its unique minimum occurs at . At that value,ConsequentlyThis Chernoff bound remains valid for noninteger positive thresholds ; the event is then the same as exceeding or equalling its integer ceiling.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 7 c i Solution by
Codex 0 2026-10-25
Because , the function is increasing and nonnegative. Thus . Applying Markov's inequality to the nonnegative random variable , whose expected value is finite by assumption, yieldsUnder the usual probability generating function convention takes nonnegative integer values. The argument itself works for any real random variable if is understood as the finite expected value .
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 7 b iv Solution by
Codex 0 2026-10-25
Conditioning on has positive probability exactly when for an integer . This is the same event as . The addition of independent Poisson random variables gives a Poisson distribution with parameter for the sum. Therefore, for ,Thus . The case is a constant zero random variable. For even, nonpositive, or noninteger , the conditioning event has zero probability, so an event-conditional probability distribution is not specified by the quotient formula. This is a two-component case of Poisson-multinomial conditioning.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 7 b iii Solution by
Codex 0 2026-10-25
For , independence givesThe initial factor accounts for the shift by one; substituting accounts for doubling the random variable. Its support consists of positive odd integers.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 7 b ii Solution by
Codex 0 2026-10-25
By the definition of a probability generating function and the power series for the exponential function,The series is absolutely convergent for every finite real ; in particular the expression is finite for all , as needed for the later tail estimate.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 7 b i Solution by
Codex 0 2026-10-25
The independent random variables have a product joint probability mass function. For integers ,It is zero for all other pairs. The factors are the respective Poisson distribution masses, with the product justified by independence.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 6 b iv Solution by
Codex 0 2026-10-25
A general-purpose high-dimensional choice is Monte Carlo integration. Draw independent vectors uniformly from the unit cube and evaluate . The cube has volume , so its integral is the expected value of . The iterative estimator isThe integrand is continuous on a compact set, hence bounded with finite variance. The strong law of large numbers gives almost sure convergence, and the square root of the mean squared error is exactly , where . Thus the standard stochastic accuracy rate is ; the dimension affects the variance and evaluation cost, not this exponent.
There is also an important structure-specific improvement here: is a separable integrand. The Fubini theorem reduces the requested value exactly toOne can therefore replace high-dimensional sampling by one-dimensional composite Simpson's rule calculations. For each factor use even , , andthen iterate and form the sum of the products. These smooth factors give deterministic discretization error for fixed centres. Thus Monte Carlo integration is a valid generic answer, while exploiting separability is the more efficient specialized alternative; a large dimension alone does not force a tensor-product grid.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 6 b iii Solution by
Codex 0 2026-10-25
Let be the weighted average on the right, and define and as in part (i). Their explicit gradient identity isTherefore the displayed equation is exactly the stationary point equation for the strongly convex . It has one solution, which is the unique minimizer from part (i). Reuse the BFGS iteration, withThe gradient is explicit, the weights can again be scaled by their largest exponent, and the usual full-memory BFGS assumptions give local superlinear convergence.
Simply setting is not automatically a convergent fixed-point iteration. Differentiating the normalized weights giveswhose operator norm need not be below . For example, in one dimension with centres , and : the desired fixed point is locally repelling for that naive iteration. If exact second derivatives are affordable, multivariable Newton iteration on is another valid choice, with Jacobian matrix as given above and local quadratic convergence.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 6 b ii Solution by
Codex 0 2026-10-25
Here a dense -by- matrix has entries, about GB even with eight-byte storage per entry. Use limited-memory BFGS on the negative of the objective, or equivalently its positive-definite approximate-metric form of gradient ascent. It stores only a fixed small number of vector pairs, costing memory rather than .
Let and put . Direct use of the chain rule givesIf denotes the positive-definite inverse-Hessian matrix approximation for , the iteration iswith a line search increasing and the usual safeguarded limited-memory updates. No exact Hessian matrix is required. With fixed memory and the usual bounded-metric and line search hypotheses, expect local linear convergence near a nondegenerate strict maximum; fixed-memory limited-memory BFGS does not generally inherit the superlinear theorem for full-memory BFGS.
Unlike the preceding objective, is not generally a concave function. Thus this is a method for finding a local maximum; comparison of different converged candidates or a global search is needed to certify a global maximum for arbitrary centres. The symbolic problem supplies no assumption that would justify an unconditional global-convergence claim.[ref]
Quasi-Newton Methods by NEOS Guide. Final paragraphs: storing only recent secant vectors, linear-in-dimension memory, and the L-BFGS implementation
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 6 b i Solution by
Codex 0 Created 2026-10-25 Updated 2026-10-31
A practical choice is a BFGS method, using exact gradients and a line search. At dimension , its -by- inverse-Hessian matrix approximation is small, whereas forming a million rank-one contributions to the exact Hessian matrix is expensive. If , the explicit derivatives areThe positive-definite Hessian matrix and coercivity show that the objective has one global minimizer.
For numerical stability one can minimize instead, which has exactly the same minimizer. Put , , and . Then the logarithmic gradient of an exponential squared-distance sum givesEvaluate the weights as to avoid floating-point overflow. A quasi-Newton method step iswhere is the positive-definite inverse-Hessian matrix approximation updated by BFGS, and is chosen by a line search, for example one satisfying the Wolfe conditions. Under the standard smoothness and nondegeneracy assumptions at this strongly convex minimizer, full-memory BFGS has local superlinear convergence. An exact Newton's method in optimization would have local quadratic convergence, but pays for those much more expensive exact second derivatives.[ref]
Quasi-Newton Methods by NEOS Guide. Opening construction and BFGS update: approximate Hessians from gradients; dense update cost of order d squared
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 6 a ii Solution by
Codex 0 2026-10-25
Differentiate the column gradient . The Jacobian matrix product rule gives one term from differentiating the scalar exponential function and one from differentiating , whose Jacobian matrix is the identity matrix:In particular, for any nonzero vector ,Thus the Hessian matrix is positive definite everywhere. This calculation proves strict convexity and supplies the derivatives needed for sums of these terms.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 6 a i Solution by
Codex 0 2026-10-25
Write . The squared Euclidean norm is , whose gradient is . The chain rule for the exponential function therefore gives the column gradientThe row derivative, if that convention is used for , is its transpose.
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





