Source paper: released examination archive, member a10101w1-2.pdf; original cover dated 2016-09-15.
Take as the four input bits, of weights , and let 1 light a segment of the seven-segment display. The required truth table is
value   wxyz   abcdefg
 0      0000   1111110
 1      0001   0110000
 2      0010   1101101
 3      0011   1111001
 4      0100   0110011
 5      0101   1011011
 6      0110   1011111
 7      0111   1110000
 8      1000   1111111
 9      1001   1111011
10      1010   0000000
11      1011   0000000
12      1100   0000000
13      1101   0000000
14      1110   0000000
15      1111   0000000
Here binary-coded decimal represents one decimal digit per group of four bits. The six unused codes must be zeros in every output for this part; they are not don't-care conditions.
Use Karnaugh maps with rows and columns , both in Gray code order . Juxtaposition means Boolean conjunction, means Boolean disjunction, and a bar means Boolean negation. The minimal sum of products forms are
and
For , the groups are , and . For , take , , , and the isolated minterm . Every group contains only required ones. The last group wraps between the top and bottom map rows.
These covers are minimal: needs its three essential groups, forced by inputs 6, 3 and 8. For , input 5 is isolated, while 9, 3 and 6 each force their respective pair; input 0 still needs a further group. These five groups also attain the minimum literal count of 16.
Figure 1.
Karnaugh maps for the three decoder outputs used in the solution
. Original maps in Gray order. Invalid inputs are fixed to zero for and ; only the map in part (d) treats them as X. Blue cells are required ones. Details.
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.
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 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.
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.
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.
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.
First-come-first-served disk scheduling follows the arrival order:
133 -> 76 -> 157 -> 91 -> 142 -> 97 -> 135 -> 112 -> 23
The total seek distance is
The initial position is 133; the earlier completed request at 135 is used to determine direction for the elevator policy, not added again to this total.
Shortest-seek-time-first disk scheduling chooses the nearest remaining track after each service:
133 -> 135 -> 142 -> 157 -> 112 -> 97 -> 91 -> 76 -> 23
The distances are , giving 158 tracks. There are no distance ties along this service sequence.
The previous motion from 135 to 133 fixes the initial direction as downward. Under SCAN disk scheduling, the head continues to the physical endpoint 0 before reversing:
133 -> 112 -> 97 -> 91 -> 76 -> 23 -> 0 -> 135 -> 142 -> 157
Thus SCAN crosses tracks, stopping once the final pending request has been served.
If “elevator” means LOOK disk scheduling, reversal occurs at the lowest pending request, 23, rather than track 0. Its route omits 0, and the total is tracks. Stating the turnaround convention is necessary to make the numerical answer unambiguous.
Figure 1.
Disk scheduling service paths and the SCAN–LOOK turnaround distinction
. Original paths from the given starting position. The extra zero-track endpoint in SCAN is a movement step rather than a serviced request. Totals measure absolute track displacement. Details.
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.
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.
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.
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.
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.
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 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.
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.
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.
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.
The determinant of the unit lower triangular matrix is 1. There is one row swap, so , and the upper triangular matrix has determinant . Therefore
For an matrix, its row space is the span of its rows, a subspace of ; its column space is the span of its columns, a subspace of . Its null space is . The rank of a matrix is the dimension of its column space, equal to the dimension of its row space. The rank-nullity theorem gives .
Let the original rows be . Begin with rows , and :
Subtract the third from the second, then subtract that new second row from the first. The resulting rows are
They are linearly independent because their first three coordinates form the identity matrix. All original rows lie in their span: and . Thus they form a basis of the row space, and . Equivalently, these are the nonzero rows of the reduced row echelon form, with two further zero rows.
The pivot columns are columns 1, 2 and 3 of the original matrix. A basis for its column space is therefore
Use the original columns, rather than the columns of the row-reduced matrix: elementary row operations preserve column dependence relations, but can change the column space as a subspace of .
The reduced homogeneous system is , , . Set to obtain
The rank-nullity theorem confirms , and substitution verifies that the displayed vector is annihilated by .
A particular solution is , as direct substitution into all five equations verifies. Add any vector in the null space to obtain every solution:
Conversely, the difference of any two solutions is annihilated by , so there are no further solutions. This is the affine solution space of a consistent linear system.
Implication introduction assumes temporarily, derives , and discharges that assumption to conclude . Disjunction elimination starts from and derives the same conclusion in two separate branches, one assuming and the other assuming .
The boxes delimit subproofs: a locally assumed formula is available inside its box but cannot be used unconditionally outside it. Discharging a box records exactly which dependency has been removed. The proofs below use a vertical bar to mark each active box.
Apply negation introduction separately to the two disjuncts, then conjunction introduction:
 1  ¬(E ∨ F)      premise
 2  | E           assumption
 3  | E ∨ F       ∨-intro-L 2
 4  | ⊥           ¬-elim 3,1
 5  ¬E            ¬-intro 2–4
 6  | F           assumption
 7  | E ∨ F       ∨-intro-R 6
 8  | ⊥           ¬-elim 7,1
 9  ¬F            ¬-intro 6–8
10  ¬E ∧ ¬F       ∧-intro 5,9
No assumption from either branch remains open in the conclusion apart from the original premise.
The derived proof by contradiction rule is
where the displayed assumption is discharged. Replace each use by negation introduction, giving , followed by double-negation elimination, giving . Applying this replacement recursively removes all RAA occurrences while preserving the final conclusion and open premises. This uses the classical double-negation rule already supplied in the paper; it is not a general derivation of classical RAA from intuitionistic rules alone.
A derivation of the law of excluded middle using only the supplied primitive rules is
1  | ¬(A ∨ ¬A)    assumption
2  | | A          assumption
3  | | A ∨ ¬A     ∨-intro-L 2
4  | | ⊥          ¬-elim 3,1
5  | ¬A           ¬-intro 2–4
6  | A ∨ ¬A       ∨-intro-R 5
7  | ⊥            ¬-elim 6,1
8  ¬¬(A ∨ ¬A)     ¬-intro 1–7
9  A ∨ ¬A         ¬¬-elim 8
Both boxes have been discharged, so the final formula has no undischarged assumptions.
Split on the law of excluded middle for , then use disjunction elimination:
 1  D ∧ E          premise
 2  (A ∧ D) → B    premise
 3  (¬A ∧ E) → B   premise
 4  D              ∧-elim-L 1
 5  E              ∧-elim-R 1
 6  A ∨ ¬A         excluded middle
 7  | A            assumption
 8  | A ∧ D        ∧-intro 7,4
 9  | B            →-elim 2,8
10  | ¬A           assumption
11  | ¬A ∧ E       ∧-intro 10,5
12  | B            →-elim 3,11
13  B              ∨-elim 6,7–9,10–12
The two occurrences of have identical type and depend only on the corresponding temporary branch assumption and the original premises.
Now derive the needed or inside its respective subproof:
 1  A → D          premise
 2  ¬A → E         premise
 3  (A ∧ D) → B    premise
 4  (¬A ∧ E) → B   premise
 5  A ∨ ¬A         excluded middle
 6  | A            assumption
 7  | D            →-elim 1,6
 8  | A ∧ D        ∧-intro 6,7
 9  | B            →-elim 3,8
10  | ¬A           assumption
11  | E            →-elim 2,10
12  | ¬A ∧ E       ∧-intro 10,11
13  | B            →-elim 4,12
14  B              ∨-elim 5,6–9,10–13
Implication elimination supplies the branch-specific premise before conjunction introduction packages it for the final implication.
In a finite domain, an existential quantifier says that at least one candidate satisfies . Reason with a fresh name for such an unspecified witness. If the same conclusion follows using only and the original premises, without depending on which candidate names, then follows from the existential premise itself.
This is exactly existential elimination in boxed form: the sequent is the branch inside the box. The eigenvariable must not occur free in the original undischarged context or in the exported conclusion . Otherwise the proof could smuggle in information about a specially chosen individual or export a fact about a witness whose name has just left scope. Freshness does not mean that the domain contains an additional object; it means that its temporary name carries no other assumptions.
A uniform witness can serve every particular input. Two natural deduction proofs differ in whether universal introduction happens outside or inside the existential witness box.
Proof 1:
1  ∃y ∀x R(x,y)      premise
2  | ∀x R(x,b)       assumption, b fresh
3  | R(a,b)          ∀-elim 2, with a arbitrary
4  | ∃y R(a,y)       ∃-intro 3
5  ∃y R(a,y)         ∃-elim 1,2–4
6  ∀x ∃y R(x,y)      ∀-intro 5

Proof 2:
1  ∃y ∀x R(x,y)      premise
2  | ∀x R(x,b)       assumption, b fresh
3  | R(a,b)          ∀-elim 2, with a arbitrary
4  | ∃y R(a,y)       ∃-intro 3
5  | ∀x ∃y R(x,y)    ∀-intro 4
6  ∀x ∃y R(x,y)      ∃-elim 1,2–5
In both proofs is absent from the original premise. In the second it is also absent from the witness assumption, whose is bound; universal generalization is therefore legal inside that box. The exported conclusions contain no free .
The converse is not valid. On the domain , interpret as . For each , choose , so holds. Neither single choice of equals both 0 and 1, so fails. This is the distinction between a pointwise witness and a uniform witness.
The proposed proof is invalid: its existential-elimination step exports while the witness name still occurs free in that conclusion. Introducing an existential quantifier later does not retrospectively repair that scope error.
Introduce the existential quantifier before discharging the witness box:
1  ∀x (P(x) → Q(x))   premise
2  ∃x P(x)            premise
3  | P(a)             assumption, a fresh
4  | P(a) → Q(a)      ∀-elim 1
5  | Q(a)             →-elim 4,3
6  | ∃x Q(x)          ∃-intro 5
7  ∃x Q(x)            ∃-elim 2,3–6
The conclusion of existential elimination now has no free occurrence of , and the name occurs in neither original premise, satisfying the eigenvariable condition.

Articles by others on the same topic (0)

There are currently no matching articles.