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 Discrete mathematics, probability and continuous mathematics 7 a iii Solution by
Codex 0 2026-10-25
A partition of a sample space is a finite or countable family of pairwise disjoint events whose union is the whole sample space. For an integrable random variable, the partition form of the law of total expectation isZero-probability cells contribute zero and are omitted because elementary event-conditioning on them is undefined. The formula also holds with extended nonnegative values when . Integrability makes the signed series legitimate in the finite-expectation case.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 7 a ii Solution by
Codex 0 2026-10-25
For , the conditional probability mass function isThe positive denominator makes the expression well-defined, and its sum over is one.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 7 a i Solution by
Codex 0 2026-10-25
The joint probability mass function is for . It is nonnegative and its sum over equals one. Summing over one coordinate gives the other variable's marginal distribution.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 5 c iii Solution by
Codex 0 2026-10-25
Gradient descent uses only the current gradient and a suitable step size; its additional storage is order . It is attractive for very large or when low per-iteration cost matters most. For a smooth strongly convex function, standard step choices give linear convergence, with a rate sensitive to the condition number. Mere convexity gives a global-minimum interpretation but does not alone imply a linear rate; for nonconvex objectives the usual guarantee concerns stationary points.
BFGS uses successive gradients to update an approximation to inverse curvature, incorporating information that can correct poor scaling. Full BFGS uses order storage and update work. With suitable line searches and local smoothness and positive-curvature assumptions near a nondegenerate minimum, it has superlinear convergence. This often favours it in moderate dimensions when gradients are not extremely cheap relative to the extra work.
Neither gradient descent nor BFGS requires an explicitly evaluated Hessian matrix. Thus an expensive Hessian matrix is compatible with both, rather than a reason to reject BFGS. If an accurate Hessian matrix and its factorization are exceptionally cheap, Newton's method in optimization becomes an additional reasonable option. Convexity helps identify a stationary point as a global minimum; without it, both methods need suitable descent and curvature safeguards. The BFGS update learns curvature from the Quasi-Newton secant equation.[ref]
Quasi-Newton Methods by NEOS Guide. Quasi-Newton condition and the BFGS member of the low-rank updating family.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 5 c ii Solution by
Codex 0 2026-10-25
Convexity of the components of a vector field is not the decisive criterion for a root-finding problem. Neither method becomes globally reliable merely because each component is convex.
Prefer the Newton root-finding iteration when the Jacobian matrix is available accurately and at reasonable cost. Solve rather than explicitly forming an inverse matrix. Near a root with a nonsingular Jacobian matrix and a locally Lipschitz Jacobian matrix, the usual exact iteration has quadratic convergence.
Prefer Broyden's method when evaluating or differentiating the vector field makes a fresh Jacobian matrix expensive. It learns an approximate Jacobian matrix through secant updates using function differences. Under appropriate local regularity and initialization assumptions it has superlinear convergence, generally slower asymptotically than the quadratic convergence of exact Newton steps, but often with cheaper iterations.[ref]
A Class of Methods for Solving Nonlinear Simultaneous Equations by Charles George Broyden. pp. 577–579, cost of Jacobian evaluation and construction of updating methods.
Dimension matters through storage and solves. A full dense Newton factorization costs order arithmetic operations; a dense Broyden approximation uses order storage, and maintained inverse or factorization updates can cost order . A naive fresh dense solve can still cost order . Sparsity can favour Newton, while very large can make either dense formulation unsuitable. Neither local rate guarantees convergence from an arbitrary starting point.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 5 c i Solution by
Codex 0 2026-10-25
Use bisection on when the derivative is cheap and a bracket is easy to obtain. For a differentiable convex function, is nondecreasing, so such a bracket locates a global minimum, allowing a flat minimizing interval. Without convexity, first isolate a region containing the desired local minimum; arbitrary stationary points need not be minima.
Use golden-section search when reliable function values are available but derivatives are unavailable or expensive. It needs a bracket on which the objective is a unimodal function, commonly found by three ordered points whose middle value is below the two outer values. Those inequalities alone do not prove that the objective is a unimodal function. A convex function supplies the needed shape; for a nonconvex objective, isolate an interval on which it is a unimodal function.
Both methods have linear convergence of bracket width. Bisection contracts the width by per new derivative evaluation. Golden-section search contracts it by per new function evaluation after initialization, reusing one earlier value. Choose by evaluation cost and bracket availability as well as this contraction factor: comparing iteration counts alone can misidentify the faster method.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 5 b ii Solution by
Codex 0 2026-10-25
The origin is feasible and has objective zero, while a Euclidean norm is nonnegative. Thus the minimum is , and the complete argmin isIf is injective, this set contains only the origin. If it has a nontrivial kernel, every feasible kernel vector is also a minimizer. No Lagrange multipliers are needed.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 5 b i Solution by
Codex 0 2026-10-25
Interpret the norms as Euclidean norms and set . This is a real symmetric matrix with , hence a positive semidefinite matrix. Squaring the nonnegative objective does not change its argmin. Let be the smallest eigenvalue of and its eigenspace.
First minimize on the unit sphere. The Lagrange multiplier function has stationarity condition . Multiplication by shows that the squared objective at such a point is . The spectral theorem for real symmetric matrices also gives, for every unit vector, , with equality exactly in . This proves global minimality, rather than merely finding stationary candidates.
If , every point with has a strictly smaller objective after rescaling to unit length. ThereforeIf , the kernel of a linear map satisfies , since implies , and the converse is immediate. The minimum is then zero, attained precisely atIn this case minimizers need not have unit length. This distinction is essential for a rank-deficient , including any real matrix with . The result is the minimum image norm outside a Euclidean unit ball, governed by the least singular value.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 4 c iii Solution by
Codex 0 2026-10-25
Since , the line lies in the domain and satisfies . The restriction of to this line is , whose second derivative is : negative for and positive for . It can be neither globally convex nor globally concave. Hence is neither. Equivalently, its Hessian matrix is , changing the sign of its nonzero directional curvature across .
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 4 c ii Solution by
Codex 0 2026-10-25
The denominator is positive throughout the domain. Holding fixed, differentiate with respect to :At the interior point this second partial derivative is , so the restriction to a horizontal line is locally strictly concave, ruling out convexity. At the interior point it is , ruling out concavity. Restrictions of a convex function or a concave function to every line segment must retain that property. Consequently is neither convex nor concave on its stated domain.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 4 c i Solution by
Codex 0 2026-10-25
Differentiating on the given domain yieldsThe denominator and are positive there. Thus is strictly concave, and is not convex.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 3 b iii Solution by
Codex 0 2026-10-25
Suppose are two products of positive primes. If , then , and necessarily , since any nonempty product of positive primes is at least . Otherwise Euclid's lemma, applied repeatedly to the right-hand product, says divides one . Since is prime, . Reorder the right-hand factors and cancel this common nonzero factor. Repeating, or using induction on the number of factors, matches every factor. Neither side can have factors left over, because their product would then equal . Thus the prime factorization is unique up to rearrangement.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 3 b ii Solution by
Codex 0 2026-10-25
If , there is nothing to prove. Otherwise the only possible positive common divisors of the prime and show that . By Bézout's identity, for some integers . Multiplying by gives . Both terms on the right are divisible by , the second because . Hence . This proves Euclid's lemma, including when either factor is zero or negative.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 3 b i Solution by
Codex 0 2026-10-25
Use strong induction on the positive integer . The case is represented by the empty product. For , if is prime it is already a product of one prime. Otherwise with ; the induction hypothesis gives prime factorizations for both and , and concatenating them gives one for . This proves existence in the fundamental theorem of arithmetic without presupposing uniqueness.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 3 a ii Solution by
Codex 0 2026-10-25
The Euclidean algorithm repeatedly replaces by , where the new remainder lies between and . Common divisors are unchanged by this subtraction, and decreasing positive remainders ensure termination. The last nonzero remainder is the greatest common divisor.
The extended Euclidean algorithm also tracks coefficients , beginning with coefficient pairs and and applying the same subtraction to the pairs. This invariant produces Bézout coefficients for the last nonzero remainder. Here the divisions areBack substitution givesThus , with and in Bézout's identity.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 3 a i Solution by
Codex 0 2026-10-25
The greatest common divisor of positive integers is the largest positive integer dividing both, denoted . The set of positive common divisors contains and is finite, so this definition supplies a value.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 2 d v Solution by
Codex 0 2026-10-25
Fix . Since is surjective, there is with . Injectivity of gives , proving that is surjective. All five conclusions are instances of injectivity and surjectivity under composition.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 2 d iv Solution by
Codex 0 2026-10-25
Suppose . Since is surjective, choose with and . Then , so injectivity gives and therefore . Thus is injective. The use of surjectivity is what makes every point of accessible to this argument.
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 2 d iii Solution by
Codex 0 2026-10-25
Past exam of the year 1 of the computer science course of the University of Oxford 2023 Discrete mathematics, probability and continuous mathematics 2 d ii Solution by
Codex 0 2026-10-25
For any , surjectivity of supplies with . Taking proves that has a preimage under . Thus is surjective.
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





