Topics (384k) Articles (398k) Users (410) Discussions (242) Comments (383) Files (13k) New article
Past exam of the computer science course of the University of Oxford 2015 Geometric modelling 1 f Solution by
Codex 0 2026-10-31
Choose a circular fillet that removes the sharp convex tip at . The unit directions from toward and are and . Therefore the prescribed tangent points areThe circle centre lies on the normal line to through , so . Its radius to must be perpendicular to , whose direction vector is . ThusConsequentlyIndeed . The interior angle is , and the same radius follows from . The selected circular arc runs from to through angles around :The circular arc facing is the rounding; the complementary arc is not part of the boundary.
Define the disk and a half-plane through the chord byBoth satisfy , and . The clipping half-space retains the part away from , while the disk restores the rounded cap. The required local constructive solid geometry tree isOnly the portion of on the side of can be removed. To see the locality, is negative at every original vertex of a polygon except , and vanishes on the two adjacent sides exactly at . In the resulting triangle , the disk keeps the curved cap next to and discards the tip at . A global set intersection with alone would destroy most of the seat. The outward normal vector on the new boundary is ; at it has the same direction as the outward normal vectors of .
The tangent constraints alone do not insist on a circle; other conic sections can give different bulges. For example, a positive-weight rational quadratic Bézier curve with handles has the required tangent directions:Varying changes the bulge while fixing the tangent points; the circular choice has . Once a circular fillet and these two tangent points are chosen, its centre and radius have no remaining freedom. The half-plane sign and arc selection are also essential: reversing them chooses a different retained region. This construction gives matching tangent directions, or first-order geometric continuity, at ; the curvature jumps from zero on each straight side to on the circle.
Past exam of the computer science course of the University of Oxford 2015 Geometric modelling 1 e Solution by
Codex 0 2026-10-31
The tight axis-aligned bounding box is . Bisect vertically at , giving a right child . For a scalar implicit function representing the same constructive solid geometry solid, useWith the convention inside, set intersection corresponds to the maximum, and set union to the minimum. These operations encode membership; is not a signed distance function.
Since every is an affine function, its extreme values on occur at corners. Exact real-arithmetic interval arithmetic gives:
| Function | Range on | , propagated | , propagated |
|---|
Each leaf range is exact, but combining independent intervals forgets that the expressions share . The final enclosure need not be the exact range of . For example, equality would require both , hence , and , hence on , which is impossible. The enclosure is still sufficient for a reliable three-way decision:Here the result is unresolved. This is a real mixed box, rather than only a pessimistic test: is strictly inside, whereas is outside. A zero endpoint alone can also mean contact with the boundary, so equality must not be treated as proof of strict interior or strict exterior. In floating-point arithmetic, certified bounds require outward rounding.
Continue splitting unresolved boxes, normally alternating axes or splitting the longest side. Propagate the interval arithmetic results through the constructive solid geometry tree, discard exterior boxes and stop refining strict interior boxes. In sufficiently small boundary boxes, locate crossings of the active implicit equations with box edges and connect them into boundary line segments. Retain corners and resolve ambiguous multiple crossings by further refinement; here every genuine boundary piece is straight, so its supporting implicit equation allows exact intersection rather than a curved approximation. A maximum boundary-box diagonal gives spatial localization at that scale, provided no boundary components are discarded; corner-sign sampling alone provides no such guarantee.
The tight box saves empty-space work, but it is awkward for extracting facets. Entire boundary line segments, notably , and , lie on the initial box boundary, and lies on the first splitting straight line. A sign-change-only method may have no exterior sample on the other side and lose such pieces; exact zeros also persist through refinement. A slightly padded initial axis-aligned bounding box, together with an explicit rule for boundary-coincident pieces, makes the faceting more robust. The tight box is therefore economical for enclosure but not the best unqualified choice for a simple faceting implementation.
Past exam of the computer science course of the University of Oxford 2015 Geometric modelling 1 d Solution by
Codex 0 2026-10-31
| Boundary | Defining function | Outward normal |
|---|
The six vertices of a polygon traverse the boundary counterclockwise. Each displayed normal vector therefore points to the right of the corresponding directed boundary line segment; it need not be a unit vector. The zero level sets are full straight lines, while the actual boundary retains only the appropriate line segments.
The inward corner at prevents using the set intersection of all six half-spaces: that would incorrectly discard the upper-left part of the seat. Instead takeThe last factor permits either or , removing only the upper-right region. Another way to understand the same constructive solid geometry model is as the set union of two convex polygons, obtained by distributing the last set intersection over this set union. Its constructive solid geometry tree has an intersection at the root and a union child for .
Seat profile, six supporting lines with outward normals, and the right child of the initial bounding box
. Details. Past exam of the computer science course of the University of Oxford 2015 Geometric modelling 1 c Solution by
Codex 0 2026-10-31
For , substitute or , respectively:In terms of the original coordinates, these arewith each expression used only when its denominator is nonzero. If , the straight line is horizontal: it misses the horizontal axis unless , in which case it is that entire axis. If , it is vertical: it misses the vertical axis unless , in which case it is that entire axis. A straight line through the origin has both finite intercepts equal to the origin whenever neither axis is coincident with it.
Past exam of the computer science course of the University of Oxford 2015 Geometric modelling 1 b Solution by
Codex 0 2026-10-31
Solving the implicit equation for when givesHere “gradient” means the slope , rather than the gradient of an implicit defining function. If and , the straight line is vertical and has no finite slope. If and , its slope is zero.
Past exam of the computer science course of the University of Oxford 2015 Geometric modelling 1 a Solution by
Codex 0 2026-10-31
Set and . A displacement from lies along the straight line precisely when its two-dimensional determinant with vanishes. Thus an implicit equation isEquivalently, write , with , and . The vector is a normal vector. The formula handles vertical and horizontal straight lines without division. It presupposes : coincident points do not determine a unique straight line.
Past exam of the computer science course of the University of Oxford 2015 Databases 3 d Solution by
Codex 0 2026-10-31
Let contain the database attributes of , and let contain the given functional dependencies for . To compute the attribute closure , start with and repeatedly add for every functional dependency with , stopping when a full scan adds nothing.
Enumerate every . For each, test whether is not a superkey but becomes one on adding :If no enumerated passes both tests, return no. A direct implementation isIf a candidate key contains , choose . Minimality makes fail the superkey test while passes it, so the algorithm finds a witness.
for each subset X of attributes(R) minus {a}:
if closure(X, F) != attributes(R):
if closure(X union {a}, F) == attributes(R):
return yes
return noConversely, suppose an enumerated passes. Starting from , repeatedly discard any database attribute other than whose removal preserves the superkey property. The process terminates at a superkey minimal with respect to these deletions. Removing cannot leave a superkey: , and a subset of , which is not a superkey, cannot determine more database attributes than . Hence is a candidate key containing . The algorithm need not carry out this minimization to return the correct yes/no answer; it establishes why the witness test suffices.
For an explicit analysis of algorithms, let be the total encoded length of the functional dependencies, counting their left and right database attribute occurrences and delimiters. With Boolean membership arrays, one complete dependency scan costs . There are at most productive scans, followed by one unproductive scan, so a naive attribute closure costs . There are subsets and at most two attribute closure computations per subset. ThusThis is an exponential-time algorithm in the number of database attributes, not a polynomial-time claim. Subsets can be generated successively rather than stored all at once. The argument applies to functional dependencies within the database relation ; dependencies belonging to unrelated database relations do not constrain its candidate keys.
Past exam of the computer science course of the University of Oxford 2015 Databases 3 c Solution by
Codex 0 2026-10-31
Take the relational schema and functional dependencyThe attribute closure of is , so is a candidate key. The attribute closure of is just , so it is not a superkey. The set is a superkey but is not a candidate key, because removing leaves the superkey . Thus the only candidate key is , and occurs in none.
For example, records illustrate that the same value may occur at different values. The conclusion about candidate keys follows from the declared functional dependencies, rather than from accidental uniqueness in any one sample.
Past exam of the computer science course of the University of Oxford 2015 Databases 3 b Solution by
Codex 0 2026-10-31
Abbreviate the database attributes by for
EventId, ConfId, BuildingId, StartTime, EndTime and ConfOrganizer. Write for the full relational schema.The explicit event assumptions give the functional dependencyI additionally interpret the conference's organizer as a single organizer for the whole conference, giving . This is the natural reading of
ConfOrganizer, but it is stronger than saying only that each event has one organizer. Under this interpretation a compact generating basis of functional dependencies isThere is no premise that an EventId is globally unique, that a conference has one building, or that a start time determines an end time. In particular, the single-room requirement for one subtype in part (a) must not be imposed on this entire database relation.To specify all non-trivial functional dependencies without listing every augmented version, the attribute closure isExactly the functional dependencies with and are non-trivial consequences of the assumptions. In particular, is the only candidate key: both and must be present because neither is generated from other database attributes.
Every functional dependency implies the corresponding multivalued dependency. Thus and, by complementation, hold. Also holds for every , with the usual trivial cases omitted. A complete compact description, including all augmented and complemented cases, isFor a non-trivial multivalued dependency, additionally require and . To see the criterion, if either side of the split is determined by , swapping that side requires no new database tuple. Conversely, if both sides contain a database attribute outside , choose two database tuples agreeing exactly on . They satisfy every functional dependency in , but a mixed database tuple required by the proposed multivalued dependency is neither of them. The two-row database relation is therefore a counterexample.
There is no independent many-valued fact such as buildings freely combining with event times. For example, two events of one conference might have and . A multivalued dependency would require the building to be swappable independently of the event and its times, which these assumptions do not require and the event functional dependency may forbid.
Since is not a superkey, violates Boyce-Codd normal form. The corresponding non-trivial multivalued dependency violates fourth normal form. Use the decompositionTheir common database attribute is , which determines the whole first component. Consequently the decomposition is a lossless-join decomposition: each event joins to exactly its own conference's organizer, producing no spurious database tuples.
In the first component, the only basic non-trivial functional dependency is , whose determinant is a candidate key. In the second it is , again with a candidate key determinant. No independent non-trivial multivalued dependencies with determinants that are not superkeys are implied in either component, so both are in fourth normal form, and therefore in Boyce-Codd normal form. This reaches the strongest normal form tested here. The decomposition is a dependency-preserving decomposition: is enforced in the first component, in the second, and together they imply .
If only the explicitly stated event-level organizer uniqueness is assumed, omit . The basis is then just ; when and otherwise. Under those weaker assumptions the original database relation is already in fourth normal form and Boyce-Codd normal form, so no decomposition is necessary. In particular, separating under that reading could create extra database tuples when different events of one conference have different organizers.
Past exam of the computer science course of the University of Oxford 2015 Databases 3 a Solution by
Codex 0 2026-10-31
Use an entity-relationship model with
Customer, Conference, Event, Venue and Building. The following entity-relationship diagram uses minimum–maximum cardinalities at each end: the label beside an entity counts how many instances of that entity can be associated with one instance at the opposite end. A double link into the specialization circle means total specialization; its d means disjoint.Every conference belongs to exactly one customer and contains at least one event. A customer may book zero or more conferences. Every event belongs to exactly one conference and occurs at exactly one venue; a venue may host zero or more events. The event identifier is local to its conference, so its full candidate key is
(conferenceid, eventNo). Choosing an event number is an explicit additional identifier assumption; a globally unique event identifier would be another valid design.Every conference is exactly one of the two entity subtypes,
SingleDay and MultiDay. Both inherit the conference identifier and the customer and event relationships. For SingleDay, store heldDate, and enforceThese cross-event database integrity constraints accompany the diagram; simple endpoint cardinalities alone cannot express them. Since there is at least one event, their common venue determines the conference's single room.For this design, a venue is a room with the given identifier, name and capacity, and each room belongs to exactly one building. A building may contain zero or more rooms. Introducing
Building and its identifier is an explicit modeling choice that makes the single-building requirement enforceable: one common room implies one common building. If an application also used non-room venues, it could instead introduce a room entity subtype and restrict SingleDay events to it.The start and end values are full timestamps, not times of day alone, and each event has .
MultiDay events may use different dates and rooms; the design does not force every pair of events to use different rooms or dates. It imposes no uniqueness of customer names, no venue-exclusivity rule, and no attendance–capacity rule because no attendance data are supplied. Such extra scheduling restrictions could be added as further database integrity constraints without altering the basic entity-relationship model. Past exam of the computer science course of the University of Oxford 2015 Databases 2 d Solution by
Codex 0 2026-10-31
A serial database schedule is obtained by running the three database transactions in the order :A genuinely interleaved conflict-serializable database schedule with the same serial order isThe early conflicts with nothing: all accesses to are reads. The conflicts on give edges , and in the database precedence graph, while the writes to give the already present edge . This database precedence graph has no directed cycle and admits the order . Moving the early after swaps it only past non-conflicting operations, recovering the displayed serial database schedule.
For a database schedule that is not a conflict-serializable database schedule, takeOn , before forces . On , before forces . The resulting directed cycle prevents any serial ordering from preserving all conflicts. Each of the three displayed database schedules preserves the operation order inside every database transaction.
Past exam of the computer science course of the University of Oxford 2015 Databases 2 c Solution by
Codex 0 2026-10-31
Use fan-out four to mean at most four child pointers per internal node. A height increase requires a B+ tree node split at the root. Immediately after that B+ tree node split, the new root has exactly two children.
One further insertion follows one search path. Any chain of B+ tree node splits along that path can pass at most one additional separator and child pointer to the root. Its number of children therefore rises from two to at most three, below the maximum four. ThusThe argument includes an initially leaf-only B+ tree: its first root split likewise creates a root with two children. Even if the next insertion causes a child split immediately, the new root still has room. The conclusion assumes the standard insertion operation with one overflowing node split into two; it does not depend on whether height counts edges or levels.
Past exam of the computer science course of the University of Oxford 2015 Databases 2 b Solution by
Codex 0 2026-10-31
A simple valid database query plan uses a block nested-loop join with the salesperson records on the outside, checking both sale conditions during the same inner scan. It avoids materializing the potentially much larger set of matching sale pairs.
- Read a block of salesperson records. Retain each
empid, its name, and two initially false flags, one for each target price. - Scan all of
Sales. Apply relational selection to disregard other prices. For each retained sale, matchsalespersonidagainst the identifiers in the current outer block, and set the corresponding price flag. Several matching sales only set the same flag again. - After the inner scan, output the names of outer records with both flags true. Repeat for the next outer block, then eliminate repeated names to implement set semantics.
Let be the actual number of salesperson data pages and the number of outer data pages that fit along with the flags and working buffers. With the usual convention of outer pages, one inner input page and one output page, take for . If flag storage requires an extra reserved page, reduce accordingly. The number of outer records is at most , and there are outer blocks. Every such block requires a complete scan of the sales data pages.
Count a database page read or write as one I/O. Conservatively charge to locate the first salesperson leaf and to locate the start of each inner scan; this permits a small double charge if a definition of height includes a data leaf. The estimated read cost isIn the common convention that scan startup and cached internal pages are ignored, the usual upper estimate isFor an empty outer input there are no inner scans. This database query plan requires neither a sorted sale input nor a price index. In particular, the clustered database index on
invoiceno cannot locate records by price. The quantities and describe the amount of qualifying data; they do not justify replacing a complete scan cost by . They can bound the retained work within each scan by roughly sale records, if those page counts describe packed qualifying records. Comparison cost against the outer block is CPU work rather than additional I/O.Finally let be the extra I/O for eliminating repeated output names, including any temporary writes and reads, and let be the final result size in database pages if materialization is required. The total estimate isIf enough additional memory is available to retain all distinct qualifying names while producing the stream, then . This extra memory is an additional assumption, separate from the join buffers. More generally, for pages of raw qualifying names, external merge sort gives for , including spooling. Names can be deduplicated during the merges. Counting this work matters because a database primary key on
empid does not make names unique. No claim of optimality is needed for this database query plan. Past exam of the computer science course of the University of Oxford 2015 Databases 2 a Solution by
Codex 0 2026-10-31
Find the salesperson identifiers satisfying each price condition using relational selection and relational projection:Intersect these identifier sets, relational join the result to the salesperson records, and apply relational projection to names:If intersection is not a primitive of the chosen relational algebra, use with relational difference. There is no need to access
Car: the foreign key already ensures that every sale refers to a car.Intersecting names instead of identifiers is wrong. Two different salespeople called Alex, one making only sales and the other only sales, would make Alex appear in both name sets although neither person satisfies the condition. Nor can one sale satisfy both price tests: the two distinct prices require distinct sale records.
Past exam of the computer science course of the University of Oxford 2015 Databases 1 b Solution by
Codex 0 2026-10-31
The right-hand relational projection lists the models of cars for which at least one recorded sale was made by a salesperson earning strictly more than . The outer relational difference removes precisely those models from all models present in
Car. Thus the answer isThis includes models with no sales at all, as well as models sold exclusively by salespeople whose salaries are at most . A model sold by both a low-paid salesperson and a high-paid salesperson is excluded. A salary exactly equal to does not trigger exclusion. These are model-level statements: one unsold car of a model does not rescue that model if a different car of the same model had a qualifying sale. 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








