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 5 d Solution by
Codex 0 2026-10-25
Use the optimization LagrangianSymmetry gives the gradient equations and . The positive-definite matrices are invertible, so defineThe affine constraint gives , henceFor a global certificate, write any other feasible point as . Feasibility implies . Expansion cancels the cross terms and leavesBy positive definiteness this is positive unless . Thus the solution is the unique global minimum, not merely a stationary point. This is a two-block instance of positive quadratic minimization under one affine constraint.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 5 c Solution by
Codex 0 2026-10-25
The objective is continuous on the compact disk, so a global maximum exists. Its gradient is , which is never zero, so a maximum cannot lie in the interior. It must have .
Both coordinates of a maximizing point are positive. Reflecting a negative coordinate to its positive counterpart strictly increases the objective without changing the constraint; at an endpoint with one coordinate zero, a small move along the circle into the positive quadrant also increases the objective to first order. Thus it suffices to consider .
The boundary Lagrange multiplier equations are and . Eliminate to obtain the two-dimensional nonlinear system of equationsKeeping this quadrant restriction excludes the boundary minimum that an unconstrained elimination could also produce. Under the stated uniqueness assumption for the admissible solution, the global maximum must be that solution. Approximate it with multivariable Newton iteration, solving and setting , with a suitable safeguard if needed. For example its explicit Jacobian matrix isNo numerical solution of the system is required.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 5 b Solution by
Codex 0 2026-10-25
Complete the square to write the objective asLet and , so while feasibility requires . The reverse triangle inequality givesThe objective is therefore at least zero. Equality is attained by , which lies on the boundary. Equality requires the vectors to have the same direction and , so this minimizer is unique. HenceIt also satisfies the Karush-Kuhn-Tucker conditions with . The direct distance argument proves global optimality even though the exterior of a disk is not a convex set; this is nearest-point minimization outside a Euclidean ball.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 5 a Solution by
Codex 0 2026-10-25
Separate inactive and active optimization constraints. At an interior feasible point with , a differentiable local minimum must satisfy . Retain only solutions lying in the interior.
On the boundary , if , apply the Lagrange multiplier condition. Using the optimization Lagrangian , the Karush-Kuhn-Tucker conditions areThe sign follows from feasible motion into : the directional derivative along at a minimum cannot be negative. Thus a boundary candidate has and a nonnegative Lagrange multiplier. Boundary points with must be examined separately, because the usual constraint qualification fails there.
Solve the interior and boundary systems, check membership in the feasible set, and establish which candidates are minima using second-order tests or a direct global comparison. The Karush-Kuhn-Tucker conditions alone are not sufficient for general nonconvex functions or feasible sets. On an unbounded feasible set, also check whether an infimum is attained and whether escaping sequences can improve the objective.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 4 e Solution by
Codex 0 2026-10-25
For negative , the mean value theorem gives . In particular,Since is continuous and strictly increasing, it vanishes at exactly one point . The positive second derivative makes a strictly convex function on the entire real line. Its derivative changes from negative to positive at , so is the unique global minimum. One may also use to verify coercivity.
In the endpoint-bracketing form of golden-section search, begin with , a width-one interval known to contain this unique minimum, and place the two standard interior probes. The attainable position accuracy is different from that for a simple root. Around , Taylor's theorem givesHere the minimum value is nonzero and of order one: the lower quadratic bound gives , while . Ordinary relative round-off error in these function values therefore hides changes of order , once has that size. The function-value resolution near a nondegenerate minimum is consequently of orderEach golden-section search contraction multiplies the bracket width by . Using as the nominal target width givesUnknown evaluation-error constants can change the actual stopping point; is the standard scale-based count. Requiring position accuracy from these function-value comparisons would disregard the quadratic flatness of the minimum. The same precision effect is documented for one-dimensional numerical minimization.[ref]
One dimensional minimization in the GNU Scientific Library manual. Caveats: Taylor expansion near the minimizer and the square-root precision limit; Minimization Algorithms: golden-section contraction
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 4 d Solution by
Codex 0 2026-10-25
Apply the mean value theorem, the first-order case of Taylor's theorem, to between and . It yieldsAlso , so the initial point is to the right of the root . For an increasing strictly convex function, its tangent at a point to the right of a root meets the axis between that root and the point. Hence the exact Newton root-finding iteration remains in and decreases towards .
On every relevant interval, and , so the stated quadratic convergence bound gives, with ,Iterating the bound givesThus four Newton corrections suffice to reduce the exact-iteration error bound below the floating-point spacing scale. The quadratic convergence doubles the approximate number of correct digits at each late step. Beyond this point further corrections cannot reliably improve a generic floating-point answer. This is a bound on useful accuracy under the usual stable-evaluation model, not a claim that the data specify the exact iteration at which every implementation must stagnate.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 4 c Solution by
Codex 0 2026-10-25
At a root of size between and , the spacing of floating-point numbers is . With ordinary stable function evaluations, a sensible generic absolute position tolerance has scale ; sub-spacing progress cannot generally be represented. This is a resolution estimate, not a lower bound excluding an accidentally exactly representable root.
Define one bisection method step as replacing the current bracket by the half retaining the sign change. Starting from , the width after such updates is . ThereforeThe midpoint of a bracket has an exact-arithmetic error bound of half its width. If tolerance is defined instead as that midpoint error bound, updates suffice to make it at most . Stating the convention avoids an off-by-one difference; once the endpoints are adjacent floating-point numbers, their exact midpoint need not itself be representable.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 4 b Solution by
Codex 0 2026-10-25
The second-order remainder form of Taylor's theorem gives, for a point between and ,For , the given curvature bounds implyIn particular and . Differentiability implies continuity, so the intermediate value theorem gives a root in .
The mean value theorem applied to gives for . Thus is strictly increasing there, and it cannot have two roots. There is exactly one root in .
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 4 a Solution by
Codex 0 2026-10-25
Use the standard spacing convention for machine epsilon: the next representable floating-point number above is . In a normalized binary representation this corresponds to significant binary digits, including the leading digit. The spacing throughout is therefore .
With rounding to nearest, the associated unit roundoff is half that spacing, ; for a normal result the relative round-off error is bounded by . Some texts instead call machine epsilon. Here denotes the spacing scale, and the iteration counts below use that convention. It describes representation precision, not a guarantee that an arbitrarily evaluated function has a relative error this small.
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 3 e Solution by
Codex 0 2026-10-25
The number isA direct search over every -element subset must inspect candidates. Testing one candidate by generating its subset sums creates values; storing previously seen sums detects a collision. Generating them incrementally needs arithmetic operations, or for the straightforward independent calculation of each sum. Thus the simple overall search has cost on the scale of , apart from integer-arithmetic and data-structure costs.
The important time complexity distinction is that fixed gives polynomial growth in , of degree , but this can still become impractically large. If increases with , both the candidate count and the internal power set can grow exponentially. For example, near the binomial coefficient is already exponentially large. An exhaustive implementation can therefore encounter a combinatorial explosion; the fixed- estimate must not be described as exponential in .
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 3 d Solution by
Codex 0 2026-10-25
Fix any seven-element subset . Its power set supplies pigeons. Map each subset to its integer sum. Since the elements are positive, all such sums lie between and . The latter is at most the sum of the seven largest available elements,There are therefore at most possible sums, fewer than the subsets. The pigeonhole principle forces two distinct subsets to have the same sum. Every seven-element subset has the two-sum property. This is the subset-sum pigeonhole bound. The weaker estimate would also suffice, since .
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 3 c Solution by
Codex 0 2026-10-25
For , choose the first elements of . Every sum of a subset has a unique binary representation, so distinct subsets cannot have the same sum. To see this directly, take the largest power of two belonging to exactly one of two proposed subsets. It exceeds the sum of all smaller powers, and therefore cannot be cancelled by their difference. Thus these chosen sets are dissociated sets and do not have the two-sum property.
If cardinality zero is included, the empty set has only one subset, so it cannot supply two distinct ones either. There is a counterexample at every cardinality from through .
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 3 b Solution by
Codex 0 2026-10-25
For , choose an ordered list of distinct elements: there are such lists. Every -element subset occurs in exactly orders, the number of permutations of its elements. Thus the count is the binomial coefficientFor fixed and , every numerator factor lies between and . ConsequentlyThe constants depend on the fixed , not on . These inequalities prove in big theta notation. More precisely, dividing the product by gives the fixed-cardinality binomial coefficient asymptotic . For , there is exactly one empty subset, and the assertion is .
Past exam of the year 1 of the computer science course of the University of Oxford 2021 Discrete mathematics, continuous mathematics, and probability 3 a Solution by
Codex 0 2026-10-25
A subset is determined uniquely by deciding, for each of the elements, whether to include it. Each decision has two possibilities. By the rule of product, there are decision strings. The correspondence between such binary strings and subsets is a bijection, so . The all-zero string corresponds to the empty subset.
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





