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 2005 Calculus, linear algebra, discrete mathematics, logic and proof, and models of computation 4 a i Solution by
Codex 0 2026-10-31
For , the chain rule gives and . Applying it twice to the radial function givesUsing , Laplace's equation becomesTwo integrations now giveThese are the general solutions of the specified radial function form on an annulus or a punctured plane. If the solution must extend continuously to the origin, the logarithm term forces , leaving only a constant function.
Past exam of the year 1 of the computer science course of the University of Oxford 2005 Calculus, linear algebra, discrete mathematics, logic and proof, and models of computation 3 a ii Solution by
Codex 0 2026-10-31
For , on an interval avoiding zero,Substitution into the ordinary differential equation givesTo find an independent solution, put . The product rule gives , so the ordinary differential equation becomes . Its independent solutions are and . HenceThe two displayed solutions are linearly independent, since their ratio is nonconstant on any open interval. Constants can be chosen separately on the two sides of the singular point .
Past exam of the year 1 of the computer science course of the University of Oxford 2005 Calculus, linear algebra, discrete mathematics, logic and proof, and models of computation 3 a i Solution by
Codex 0 2026-10-31
The homogeneous linear differential equation has solutions and . Since the forcing is already a homogeneous solution, seek a particular solution proportional to . Direct differentiation givesThus the general solution of the linear ordinary differential equation isThe first initial condition gives . Alsoso the second initial condition gives , hence . Therefore
Past exam of the year 1 of the computer science course of the University of Oxford 2003 Functional programming, data structures and algorithms, procedural programming, and digital hardware 3 a iv Solution by
Codex 0 2026-10-31
Use first cousins: the children of the siblings of a recorded parent. This includes cousins through a parent's half-sibling under the convention above. In Haskell:
cousins :: Database -> Person -> [Person]
cousins db p = unique [q | parent <- parents db p,
auntOrUncle <- siblings db parent,
q <- children db auntOrUncle, q /= p]Selecting siblings of parents avoids the mistake of returning all people with a common grandparent, which would also return ordinary siblings. The explicit exclusion of
p is harmless on an ordinary consistent pedigree and prevents a self-result in unusual records. Multiple relationship paths give just one output entry after duplicate removal. Thus Past exam of the year 1 of the computer science course of the University of Oxford 2003 Functional programming, data structures and algorithms, procedural programming, and digital hardware 3 a iii Solution by
Codex 0 2026-10-31
Treat brothers as male individuals sharing at least one recorded parent, including half-brothers. Derive a sibling helper and then select the recorded sex:
siblings :: Database -> Person -> [Person]
siblings db p = unique [q | parent <- parents db p,
q <- children db parent, q /= p]
brothers :: Database -> Person -> [Person]
brothers db p = [q | q <- siblings db p, sex q == Male]The exclusion
q /= p prevents a male individual from being his own brother. Duplicate removal is needed because a full brother can be found through both parents. The membership condition isIf the intended convention is full brothers only, replace the shared-parent condition by a common mother and a common father in the recorded certificates. The definition above states the convention explicitly rather than silently discarding half-brothers. Past exam of the year 1 of the computer science course of the University of Oxford 2003 Functional programming, data structures and algorithms, procedural programming, and digital hardware 3 a ii Solution by
Codex 0 2026-10-31
children :: Database -> Person -> [Person]
children db p = unique [baby | (baby,mother,father) <- db,
mother == p || father == p] Past exam of the year 1 of the computer science course of the University of Oxford 2003 Functional programming, data structures and algorithms, procedural programming, and digital hardware 3 a i Solution by
Codex 0 2026-10-31
Extract the two recorded parents from every matching certificate, and use duplicate removal so that repeated certificates do not repeat an individual. This helper is shared by the remaining Haskell definitions:
unique :: Eq a => [a] -> [a]
unique [] = []
unique (x:xs) = x : unique [y | y <- xs, y /= x]
parents :: Database -> Person -> [Person]
parents db p = unique [q | (baby,mother,father) <- db,
baby == p, q <- [mother,father]] Past exam of the year 1 of the computer science course of the University of Oxford 2003 Functional programming, data structures and algorithms, procedural programming, and digital hardware 2 a iii Solution by
Codex 0 2026-10-31
Idempotence concerns applying an operation to the same whole value. It says more than saying that the equal-entry pairs are unchanged. Choose the idempotent binary operation
min. ThenMore generally, a finite list of length paired with itself produces entries, so length alone contradicts idempotence when . Therefore Past exam of the year 1 of the computer science course of the University of Oxford 2003 Functional programming, data structures and algorithms, procedural programming, and digital hardware 2 a ii Solution by
Codex 0 2026-10-31
Commutativity of the element binary operation does not remove the ordering of a list comprehension. For ordinary addition, take
xs = [1,2] and ys = [10,20]. ThenThe middle entries occur in opposite orders. Hence Past exam of the year 1 of the computer science course of the University of Oxford 2003 Functional programming, data structures and algorithms, procedural programming, and digital hardware 2 a i Solution by
Codex 0 2026-10-31
For finite lists, Cartesian lifting of a binary operation to lists preserves associativity. Both associations enumerate triples in the same order: the entry from
xs changes slowest, then the entry from ys, then the entry from zs changes fastest. The results are respectivelyandAssociativity makes corresponding entries equal; their order and multiplicity already agree. Empty lists make both sides empty. Therefore Past exam of the year 1 of the computer science course of the University of Oxford 2003 Functional programming, data structures and algorithms, procedural programming, and digital hardware 10 b iii Solution by
Codex 0 2026-10-31
Use a three-state Moore machine for a rearmable one-cycle pulse generator. Call the states
Ready, Pulse, and Wait. Their outputs are respectively , and initialize in Ready. Labels below are the sampled input pair ab; because simultaneous ones are unspecified, choose reset priority for 11.Rearmable one-cycle pulse generator and reproduction of the specified timing behavior
. Details. The complete chosen state transition table is
| State | |||||
|---|---|---|---|---|---|
Ready | Ready | Ready | Pulse | Ready | |
Pulse | Wait | Ready | Wait | Ready | |
Wait | Wait | Ready | Wait | Ready |
A sampled trigger
10 causes a pulse only in Ready. Leaving Pulse unconditionally on the next edge keeps its output high for exactly one clock period, even if a remains high. In Wait, further triggers are ignored until a sampled reset rearms the finite-state machine.The crucial transition is
Pulse --01--> Ready. If reset occurs in the cycle immediately following a trigger, this transition both ends the current pulse and rearms the circuit. The next trigger then produces a pulse after just one intervening low-output cycle. Sending every exit from Pulse to Wait would lose that reset and fail the alternate-cycle requirement. This behavior is explicitly visible in the last three pulses of the original timing diagram.[ref]Functional programming, data structures and algorithms, procedural programming, and digital hardware examination paper by the University of Oxford (2003). Printed p. 8, Question 10(b)(iii), last reset and trigger alternations
For the sixteen sampled pairs in that diagram, numbering the first edge as 1,
z is high just after edges and low after every other edge. Equivalently,The two low-output states cannot be merged: the same future trigger must produce a pulse from Ready and be ignored from Wait. A separate high-output state is needed to hold the one-cycle pulse, explaining the three-state design. Past exam of the year 1 of the computer science course of the University of Oxford 2003 Functional programming, data structures and algorithms, procedural programming, and digital hardware 10 b ii Solution by
Codex 0 2026-10-31
A fully synchronous sequential circuit has all its state stored in edge-triggered elements driven by a common clock signal, with combinational logic computing the next state from the current state and inputs. State updates occur together at the designated clock edges, rather than letting one register output serve as another register's ripple clock. Its ideal equations areFor a Moore machine the output function depends only on the state, . Physical design must leave enough time for register-to-register combinational paths and satisfy setup time and hold time at every receiving storage element.
Past exam of the year 1 of the computer science course of the University of Oxford 2003 Functional programming, data structures and algorithms, procedural programming, and digital hardware 10 b i Solution by
Codex 0 2026-10-31
A D flip-flop stores one bit. On each active clock edge, it samples the input D and changes its stored output Q to that sampled value after the propagation delay. Between active edges, it holds the value. In the ideal discrete model,where is the input sampled at edge and is the state just after that edge. This assumes D meets the required setup time and hold time; asynchronous set or reset inputs, if present, are inactive.
Past exam of the year 1 of the computer science course of the University of Oxford 2003 Functional programming, data structures and algorithms, procedural programming, and digital hardware 10 a iii Solution by
Codex 0 2026-10-31
For the exact difference, the representability condition becomesWithin the same operand square , the closed diagonal band between and is representable. Above the upper line, gives negative overflow; below the lower line, gives positive overflow. The right-hand panel of the figure shows these regions, including their representable boundary points.
Positive overflow can occur only when and ; negative overflow can occur only when and . The corresponding exact inequalities are still required: operands with different signs do not always overflow. Same-sign subtraction is always representable. In sign-bit terms, subtraction overflows exactly when the operands have different signs and the wrapped result's sign differs from that of .
One must test subtraction directly or use its correct overflow rule: forming
-y in the same bits fails at , even though some differences with that operand are representable. For example is valid. Past exam of the year 1 of the computer science course of the University of Oxford 2003 Functional programming, data structures and algorithms, procedural programming, and digital hardware 10 a ii Solution by
Codex 0 2026-10-31
Write and . The operands occupy the integer points of the square . The exact sum is representable precisely whenThe upper boundary is , and the lower boundary is . Within the operand square, the closed band between these lines is representable. The triangle below the lower line has negative overflow, and the triangle above the upper line has positive overflow. The boundary lines themselves are included.
Consequently overflow occurs exactly when or . Negative overflow requires two negative operands; positive overflow requires two nonnegative operands. Same-sign operands alone are not sufficient: their exact sum must cross a range endpoint. Opposite-sign operands never overflow on addition. In terms of the stored wrapped result, addition overflows exactly when the operands have equal sign bits and the result has the opposite sign bit.
The illustration uses , so and , and marks every permissible operand pair. The general region follows from the same two inequalities for arbitrary .
Past exam of the year 1 of the computer science course of the University of Oxford 2003 Functional programming, data structures and algorithms, procedural programming, and digital hardware 10 a i Solution by
Codex 0 2026-10-31
An -bit two's complement word represents the integerThe leading bit has negative weight. Words beginning with zero encode the nonnegative values; words beginning with one encode the negative values. Equivalently, interpret the whole word as unsigned and subtract when its leading bit is one. For example, the four-bit words
0111, 1000, and 1111 encode , , and respectively. The range is asymmetric: the most negative value has no positive counterpart in the same number of bits.For a nonzero representable magnitude, complementing all bits and adding one obtains its negative modulo . Fixed-width addition can therefore use the same low-order binary numeral system addition circuitry for signed and unsigned operands; interpreting the result as signed requires detecting integer overflow.
Past exam of the year 1 of the computer science course of the University of Oxford 2003 Calculus, probability, linear algebra, discrete mathematics, logic and proof, and models of computation 6 b v Solution by
Codex 0 2026-10-31
The answer is no, even when both original binary relations are equivalence relations. On , let have equivalence classes and have equivalence classes . Each is a transitive relation and, by the earlier proof, a Euclidean relation.
Use exactly the paper's convention for composition of relations: means and for some . The possible successors areIndeed, from or the first step can reach or , whose successors together exhaust ; from the first step must stay at , whose successors are only . Consequently and , but not . Therefore
Past exam of the year 1 of the computer science course of the University of Oxford 2003 Calculus, probability, linear algebra, discrete mathematics, logic and proof, and models of computation 6 b iv Solution by
Codex 0 2026-10-31
On the nonempty set take the empty binary relation . There are no triples for which holds. The defining implication is therefore true for every triple by vacuous truth, making a Euclidean relation.
Past exam of the year 1 of the computer science course of the University of Oxford 2003 Calculus, probability, linear algebra, discrete mathematics, logic and proof, and models of computation 6 b iii Solution by
Codex 0 2026-10-31
Suppose is a reflexive relation and a Euclidean relation. To prove it is a symmetric relation, assume . Reflexivity gives , so applying the Euclidean implication to and gives .
To prove it is a transitive relation, assume and . The symmetry just established gives . Apply the Euclidean implication with common predecessor to and ; the conclusion is . Thus all three requirements hold:
Past exam of the year 1 of the computer science course of the University of Oxford 2003 Calculus, probability, linear algebra, discrete mathematics, logic and proof, and models of computation 6 b ii Solution by
Codex 0 2026-10-31
Suppose is an equivalence relation, and , . Since it is a symmetric relation, . Since it is a transitive relation, together with implies . This proves
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







