For , part (c) gives
Consequently
Write , where conditionally and . Then
The law of large numbers sends the matrix to
while the vector tends to zero, proving consistency. The central limit theorem and Slutsky's theorem give
Similarly, with and ,
These conclusions require the displayed matrices to be finite and nonsingular.
Dividing row of both and by transforms the model to one with covariance . Ordinary least squares without an intercept on these transformed data is exactly the estimator in part (a). In R, the unweighted estimator is returned by
R
fit2 <- lm(Y ~ X - 1)
fit2$coefficients
Conditionally on , the log likelihood differs from
only by terms independent of . Differentiation gives the weighted normal equations
and therefore
For , map to a machine that initially enumerates nothing and, if the simulation establishing halts, enumerates every word. Its language is cofinite exactly when .
For , map to a machine that enumerates successively longer finite initial segments of while simulating . If the simulation never halts, every word is eventually enumerated; if it halts, enumeration stops with a finite language and therefore an infinite complement. Thus the constructed language is cofinite exactly when .
The parameter theorem makes both code transformations total and computable.
Since the empty language does not lie in
Rice's construction gives . Conversely, is computably enumerable: dovetail the enumerator for until two distinct words appear, then accept. The diagonal halting set is many-one complete for computably enumerable sets, so . Therefore
The set of codes of even length is not an index set because code length is syntactic rather than a property of . By the padding lemma, every computably enumerable language has equivalent machine descriptions of arbitrarily many lengths, in particular descriptions of both parities. Hence equal recognized languages need not give equal membership.
The empty language belongs to , so the second case applies:
It does not belong to , so the first case applies:
Let and let be any index for the empty language. The proof of Rice theorem gives
In either case choose a language on the opposite side of the nontrivial property and switch from the empty enumerator to its enumerator if the simulated diagonal computation halts.
For the same distribution , the balanced code has every length equal to two and hence expected length . Part (a) exhibited a Huffman code with that same expected length, so the balanced code is also optimal. Thus both listed codes are optimal for this distribution, after assigning their words in nondecreasing length order to nonincreasing probabilities.
Huffman's algorithm repeatedly merges the two least probable current symbols, labels the two new edges , and replaces the pair by a compound symbol whose probability is their sum. Reading paths from the final root gives a prefix code.
For optimality, first observe that in some optimal full binary tree the two least probable symbols are sibling leaves at maximum depth: exchange them with any deepest sibling pair, putting the smaller probabilities at no smaller depths, without increasing expected length. Contract that sibling pair to one symbol of combined probability. The original expected length equals the contracted tree's expected length plus the pair's combined probability. Induction on the alphabet size now proves that choosing the two least probabilities and recursing is optimal, which is precisely Huffman's algorithm.
If a symbol has length one, it must be . At the three-weight stage, the other two weights must be merged while survives, so . Thus , proving . Therefore forces every length to be at least two.
For the other bound, suppose is first merged at the three-weight stage, with weights , where . The preceding merge created from two weights no larger than the surviving , so . Since also , we have , and hence
Thus this can happen only when . If , it survives until the final merge and receives a length-one word. At equality, ties can support either tree shape.
For code (a), take
Huffman merging produces lengths and expected length .
Both and are unitary and Hermitian, so their expectations are real. Run the real-part Hadamard test twice, once with controlled and once with controlled . If the respective ancilla outcome-one probabilities are and , then
The identity in part (b) implements each controlled tensor product by gates on its two target wires with the common control. By linearity,
For every product vector,
Product vectors span the two-register state space, so the single gate equals parallel application of to the first register and to the second. Unitarity guarantees that both descriptions are valid quantum circuits.
Immediately before the final Hadamard, the state is
The outcome-one component after that Hadamard is . Thus, with ,

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