First add row 1 to rows 2 and 3. This is the product of two elementary matrices, written compactly as
Swap rows 2 and 4 with , then subtract half of the new row 2 from row 3 with :
This gives the upper triangular matrix
Because , rearranging yields the convention , where
The conjugation by moves the earlier elimination multipliers to the appropriate rows. Ignoring this permutation when forming would give an incorrect PLU factorization. Here the same permutation is its own inverse, so also holds.
Undo each elementary row operation: divide row 3 by 3, add 3 times row 2 to row 4, and repeat the same swap. Hence
Multiplying each inverse by its original matrix gives the identity matrix.
An elementary matrix acts on rows by left multiplication. In the stated order, the three matrices are
The first scales row 3, the second adds times row 2 to row 4, and the third swaps rows 1 and 4. Right multiplication would instead perform column operations.
The first two columns are already orthogonal and have norms 15 and 5. Their normalized versions are and . Their inner products with the third column are 10 and 5. Subtracting these projections leaves , whose norm is 25. Thus an economy-size QR factorization is
Direct multiplication gives and . If a full square is required, append and append a zero fourth row to ; the product is unchanged and the completed is an orthogonal matrix.
In the column convention used for QR factorization, an real matrix has orthonormal columns when . This says that each column has unit norm and distinct columns have zero inner product. If is square, then provides a left inverse; a square matrix with a left inverse is invertible, so , and also . Such a square matrix is an orthogonal matrix. A rectangular matrix with orthonormal columns generally has no two-sided inverse.
The Gram-Schmidt process constructs the vectors in order:
The empty sum at is zero. Each subtraction removes the projection onto one previous unit vector, so is orthogonal to their span. Linear independence of the inputs ensures in exact arithmetic, and normalization gives unit length.
In floating-point arithmetic, subtracting nearly equal projections can amplify roundoff and cause loss of orthogonality, especially for nearly dependent columns. Modified Gram-Schmidt, reorthogonalization, or Householder QR factorization can improve numerical behaviour; no implementation can remove the underlying sensitivity of nearly dependent input data.
As written, the assertion needs a nonzero-vector assumption: the singleton set containing the zero vector is mutually orthogonal but is linearly dependent. For the linear independence of nonzero orthogonal vectors, suppose . Taking the inner product with gives
Since , positive definiteness gives , hence . This holds for every , proving linear independence under the necessary assumption.
Use binary units bytes and bytes, consistent with the given binary GB convention. Reading one average file takes seek plus rotation plus transfer; moving it requires the same costs again on the write:
A half-full 16 GB disk contains used bytes, or average files. Under the stated per-file disk compaction model,
A calculation with decimal KB and MB changes the unrounded figures, so the unit convention must be retained consistently. This model charges one seek and rotational delay on each read and each write; it does not assume a single streaming pass over the whole disk.
At 6000 revolutions per minute the disk makes 100 revolutions per second, so one turn takes 10 ms and the mean rotational latency is 5 ms. Adding seek time, data transfer time and controller overhead gives, using decimal MB,
Using bytes instead gives 19.09765625 ms, with the same rounded answer. The calculation assumes the stated rate applies to the sector transfer and that the seek and overhead are each paid once.
Conditioning on a cache hit or cache miss, the expected latency is
This is a straight line from to ; at hit rate , the mean is 23 ms. The 45 ms is already the complete miss-service time in the question, so another cache-lookup millisecond is not added to it.
Figure 1. . Original plot of milliseconds, including the endpoint and midpoint values. Details.
Device independence lets an application request input-output through a uniform interface without depending on a particular device's control registers, instruction protocol or geometry. A device driver translates the abstract requests into device-specific operations. Replacing one supported disk model with another can then preserve the application's file-reading interface.
Address a read-only memory with the two state bits and two input bits. Each word stores the two next-state bits and INC, so a direct replacement for all the combinational logic is bits, or 48 bits. Program its 16 words from the state table, duplicating a state's output over all four input addresses. The two D flip-flops and clock remain outside the ROM.
If INC retains its separate two-state-bit decoder, only the next-state logic needs a -bit ROM, plus that output gate. Storing output in a separate state-only ROM would use further bits. These factored options have a different boundary from replacing all the combinational logic with one ROM.
Encode by , , , , with reset to . Two positive-edge-triggered D flip-flops store the state. Minimizing the Boolean functions from the complete table gives
Equivalently, the minimal sum of products form of is . The displayed factorization saves duplicated logic. The equations use only AND gates, OR gates and NOT gates; connect to the corresponding flip-flop data input and use one common clock.
For example, with input gives , entering the pulse state. In , either gives or gives , independently of ; the pulse cannot persist. The four states are distinguishable by their current output or future response to inputs and , so two state bits are also necessary.
Use a four-state Moore machine. In state wait for an outer-sensor activation; combines the outer-only and both-sensors phases; records that the visitor has reached the inner-only phase; emits the one-cycle count pulse. Only has INC = 1.
The complete state transition table, with input order , is
state    00    01    11    10    INC
 A        A     B     B     A      0
 B        A     B     B     C      0
 C        I     B     B     C      0
 I        A     B     B     A      1
For a normal entry the states are ; retreat after the first sensor instead gives with no pulse. Repeated samples at one sensor remain in the corresponding phase. State always exits on the next edge, so its output lasts exactly one clock period; an outer activation on that next edge goes directly to , allowing the next visitor to start immediately.
This follows the question's single-visitor entry model and merges the two outer-active phases as its hint requests. Inputs are sampled synchronously; the table also specifies deterministic recovery for other sampled combinations. It is not a specification of a bidirectional occupancy counter for arbitrary overlapping entry and exit traffic.
Figure 1.
Four-state visitor-entry Moore machine with a one-clock output pulse
. Original state diagram. Edge labels use . State I emits the count pulse; its transitions can accept the next visitor without an extra idle clock. Details.
Only now may the invalid codes 10–15 be marked as don't-care conditions. The Karnaugh map gives
The groups are , , and . They cover all required ones, avoid valid-digit zeros, and may assign either output to invalid codes. The valid inputs 0, 5, 6 and 9 cannot share a valid implicant with each other, so at least four product terms are necessary. The displayed four-term cover uses only seven literals.
Use as the three select bits of the 8-to-1 multiplexer, so address selects data input . Connect
A single NOT gate produces , shared by and ; the other connections are wires and constant logic levels. For each fixed select address the data input reproduces the corresponding two rows of the truth table, including zeros for all invalid codes.

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!
We have two killer features:
  1. 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-calculus
    Articles 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/derivative
  2. 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.
    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.
  3. https://raw.githubusercontent.com/ourbigbook/ourbigbook-media/master/feature/x/hilbert-space-arrow.png
  4. Infinitely deep tables of contents:
    Figure 6.
    Dynamic article tree with infinitely deep table of contents
    .
    Descendant pages can also show up as toplevel e.g.: ourbigbook.com/cirosantilli/chordate-subclade
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