<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Some stuff &#187; math</title>
	<atom:link href="http://blog.yhuang.org/?feed=rss2&#038;tag=math" rel="self" type="application/rss+xml" />
	<link>https://blog.yhuang.org</link>
	<description>here.</description>
	<lastBuildDate>Wed, 27 Aug 2025 08:50:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>die throwing problem</title>
		<link>https://blog.yhuang.org/?p=1796</link>
		<comments>https://blog.yhuang.org/?p=1796#comments</comments>
		<pubDate>Thu, 14 Sep 2017 03:21:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dice]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[Probability]]></category>
		<category><![CDATA[problem]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=1796</guid>
		<description><![CDATA[Here&#8217;s a link to a subtle probability problem. You throw a die until you get 6. What is the expected number of throws (including the throw giving 6) conditioned on the event that all throws gave even numbers? The &#8220;obvious&#8221; answer is incorrect. The correct answer can be brute-forced by computing probabilities of this sort: [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a <a href="https://gilkalai.wordpress.com/2017/09/08/elchanan-mossels-amazing-dice-paradox-answers-to-tyi-30/">link</a> to a subtle probability problem.</p>
<blockquote><p>You throw a die until you get 6. What is the expected number of throws (including the throw giving 6) conditioned on the event that all throws gave even numbers?</p></blockquote>
<p>The &#8220;obvious&#8221; answer is incorrect.<br />
<span id="more-1796"></span><br />
The correct answer can be brute-forced by computing probabilities of this sort:<br />
If \(s\) is a sequence of length \(n\), then<br />
\(P_n\triangleq\) = P(\(s\) ends in 6 and \(s\) all even) = \((2/6)^{n-1} (1/6)\)<br />
(The total probability over all \(n\) is therefore \(Z=(1/6)/(4/6)=1/4\).)<br />
The expected length of \(s\) is \(\sum_{n=1}^\infty n (P_n / Z)\)<br />
\(= \sum_{n=1}^\infty n (2/6)^{n-1} (1/6) / (1/4) = \sum_{n=1}^\infty n (2/6)^{n-1} (2/3) = 3/2\)</p>
<p>This is interesting since premature conditioning on the 3 even sides of a die in every roll produces an (incorrect) expected length of 3.</p>
<p>There is already an elegant and convincing derivation of the correct answer attributed to Paul Cuff if you follow the links from the original article, but here&#8217;s an intuitive explanation for why the <em>incorrect</em> answer overestimates the expected length in such a way &#8211;</p>
<p>Notice that in \(P_n\) the probability \((1/6)\) of obtaining the final 6 has no effect on the expected length. The expected length depends entirely on the shape of \(P_n\) over \(n\). The calculation for the &#8220;incorrect&#8221; reasoning would have made the sum \(\sum_{n=1}^\infty n (2/3)^{n-1} (1/3) = 3\), and the difference is in the \((2/3)^{n-1}\) vs. \((2/6)^{n-1}\) term. So the existence of 1, 3, and 5 matter; they make longer prefixes of 2 and 4 even less likely, as more of the longer sequences that would have been valid ends up containing a 1, 3, or 5 instead and getting thrown away.</p>
<p>Note: There is also a good discussion <a href="https://www.quora.com/What-is-the-expected-number-of-rolls-of-a-fair-six-sided-die-to-get-a-6-given-that-all-rolls-leading-up-to-that-6-are-even-numbered">on Quora</a>.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=1796</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bounding overlaps</title>
		<link>https://blog.yhuang.org/?p=983</link>
		<comments>https://blog.yhuang.org/?p=983#comments</comments>
		<pubDate>Mon, 21 Jan 2013 06:35:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[marginal probability]]></category>
		<category><![CDATA[masks]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[normalizing]]></category>
		<category><![CDATA[probabilities]]></category>
		<category><![CDATA[schematic view]]></category>
		<category><![CDATA[sequences]]></category>
		<category><![CDATA[singleton]]></category>
		<category><![CDATA[universal constraints]]></category>
		<category><![CDATA[vector]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=983</guid>
		<description><![CDATA[A Venn diagram gives a schematic view of joint counts on a set of categories, e.g. where . Each &#8220;patch&#8221; of the diagram corresponds to one of possible values of . If we have the total count , then we can take the counts as probabilities by normalizing with . Suppose we are given only [...]]]></description>
			<content:encoded><![CDATA[<p>A Venn diagram gives a schematic view of joint counts on a set of \(n\) categories, e.g. \(c(S_1^n=s_1^n)\) where \(s_i\in\{0,1\}\). Each &#8220;patch&#8221; of the diagram corresponds to one of \(2^n\) possible values of \(s_1^n\).</p>
<p>If we have the total count \(C\triangleq \sum_{s_j: j\in \{1,&#8230;,n\}} c(S_1^n=s_1^n)\), then we can take the counts as probabilities by normalizing with \(p(S_1^n=s_1^n)=c(S_1^n=s_1^n)/C\).</p>
<p>Suppose we are given only singleton marginals \(p(S_i=1)\triangleq \sum_{s_j: j\in \{1,&#8230;,n\}\backslash i} p(S_1^n=s_1^n)\), then we can bound the other probabilities by imposing universal constraints on probabilities to be between 0 and 1.<br />
<span id="more-983"></span><br />
To get the bounds, we solve a linear programming problem. The standard form is \(\min_x f&#8217;x \ \ \mathrm{s.t.}\  Ax \leq b\). Here, \(f\) is a length-\(2^n\) vector that indicates the particular marginal probability we want to bound, by selecting among the \(s_1^n\)-sequences. \(A\) is \([I_{2^n\times 2^n}; B; \mathbf{1}_{1\times 2^n}]\) where the columns correspond to all possible \(s_1^n\)-sequences, and where the rows of \(B\) are the \(n\) half-1 masks indicating the \(n\) singleton marginals. Finally, let \(u=[\mathbf{1}_{2^n\times1}; p(S_1=s_1);...;p(S_n=s_n); 1]\) and \(l=[\mathbf{0}_{2^n\times1}; p(S_1=s_1);...;p(S_n=s_n); 1]\).</p>
<p>Hence to get the lower bound on the desired marginal, we solve \(\min_x f&#8217; x \ \ \mathrm{s.t.}\  A x \leq u\ \mathrm{and}\ -A x \leq -l\). Likewise, for the upper bound, \(-\min_x -f&#8217; x \ \ \mathrm{s.t.}\  A x \leq u\ \mathrm{and}\ -A x \leq -l\).</p>
<p>For example, \(n=2\), \(p(S_1=1)=0.6\), \(p(S_2=1)=0.5\), then we can bound \(p(S_1=1,S_2=1)\) by \(0.1\le p(S_1=1,S_2=1)\le 0.5\).</p>
<p>Of course, we can add additional constraints when we know them. In some cases with categories, we have that \(p(S_1^n=0)=0\), that is, everything must belong to at least one category. Then it would appear the doublet marginal \(p(S_i=1,S_j=1)\) satisfies<br />
\(\max \{0, p(S_i=1)+p(S_j=1)-1\}\le p(S_i=1,S_j=1)\)<br />
\(\le \min \{(\sum_{i=1}^n p(S_i=1))-1, p(S_i=1), p(S_j=1)\}\).</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=983</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>extrinsic bias in the prediction market</title>
		<link>https://blog.yhuang.org/?p=958</link>
		<comments>https://blog.yhuang.org/?p=958#comments</comments>
		<pubDate>Wed, 31 Oct 2012 05:55:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[contract]]></category>
		<category><![CDATA[election]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[payoff]]></category>
		<category><![CDATA[prediction]]></category>
		<category><![CDATA[variance]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=958</guid>
		<description><![CDATA[People have proposed using price signals from prediction markets to estimate the odds of certain events. On Intrade right now, you can buy contracts for the two outcomes of the 2012 US Presidential Election. Each contract expires at $10 if the event occurs or $0 if it doesn&#8217;t. For example, &#8220;Barack Obama wins&#8221; contracts are [...]]]></description>
			<content:encoded><![CDATA[<p>People have proposed using price signals from prediction markets to estimate the odds of certain events. On <a href="http://www.intrade.com/v4/misc/scoreboard/">Intrade right now</a>, you can buy contracts for the two outcomes of the 2012 US Presidential Election. Each contract expires at $10 if the event occurs or $0 if it doesn&#8217;t. For example, &#8220;Barack Obama wins&#8221; contracts are $6.33 a pop right now, while &#8220;Mitt Romney wins&#8221; contracts go for $3.65. On the page, these are taken directly as probabilities, because it is assumed that the gamble is zero-sum.</p>
<p>Specifically, if \(p\) and \(\bar{p}=1-p\) are respectively the probabilities of two complementary events, and \(a\) and \(b\) are respectively the prices of contracts on them, which can be bought and sold freely, then no-arbitrage imposes that \(-a-b+10 = 0\) and statistical no-arbitrage imposes \(-\bar{p}a +p(10-a) = 0\) and \(-pb +\bar{p}(10-b) = 0\). Solving indeed gives the prices \(a=10p\) and \(b=10\bar{p}\).</p>
<p>However, this isn&#8217;t the end of the story.<br />
<span id="more-958"></span><br />
The prediction market isn&#8217;t a closed system. Event outcomes are correlated with other payoffs outside of it. For instance, the election outcome has personal income tax consequences for certain individuals. While playing in the prediction market has no expected gain or loss, its contracts can diversify just such an external payoff to reduce its variance.</p>
<p>Suppose the total tax exposure of an Obama presidency is \(T_o\) and of a Romney presidency \(T_r\), and the probabilities of the two winning are respectively \(p\) and \(\bar{p}\), then the expected payoff is \(-pT_o -\bar{p}T_r\) while the variance is \(p\bar{p}(T_o-T_r)^2\).</p>
<p>Without loss of generality, assume \(T_o > T_r\). Then we can reduce the variance of the payoff by buying &#8220;Obama wins&#8221; contracts at normalized price \(q=a/10\). Let&#8217;s say we buy an amount worth \(N\) if expired in the money. The payoff becomes \(-T_o +(1-q)N\) with probability \(p\) and \(-T_r -qN\) with probability \(\bar{p}\). If the contracts are priced for no arbitrage as before (\(q=p\)), the expected payoff is \(-pT_o +p\bar{p}N -\bar{p}T_r -\bar{p}pN = -pT_o -\bar{p}T_r\) as before. However, the variance is \(p\bar{p}(T_o-T_r-N)^2\), which is a decrease for any \(N\in (0,2(T_o-T_r))\), with the aggregate (i.e. hedged) payoff becoming completely deterministic for \(N=T_o-T_r\). This is the point of maximal utility gain for a risk-averse hedger. One ends up &#8220;pre-paying&#8221; a portion of the potential additional tax burden in exchange for immunity from the election outcome.</p>
<p>The fact that hedgers exist and are biased in one direction means that the normalized price of a contract may no longer be exactly the probability of its expiring in the money. The imbalance in the market caused by risk aversion should create precisely an insurance premium to be added to the price of &#8220;Obama wins&#8221; contracts. Of course, the reality is more complicated, since not all individuals have homogeneous tax burdens under the outcomes. If the number of risk-averse hedgers is small, then the no-arbitrage assumption may still approximately hold.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=958</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>compactness</title>
		<link>https://blog.yhuang.org/?p=925</link>
		<comments>https://blog.yhuang.org/?p=925#comments</comments>
		<pubDate>Thu, 27 Sep 2012 04:10:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[compact sets]]></category>
		<category><![CDATA[compactness]]></category>
		<category><![CDATA[condition]]></category>
		<category><![CDATA[definition]]></category>
		<category><![CDATA[Disc]]></category>
		<category><![CDATA[limit]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[text]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=925</guid>
		<description><![CDATA[I swear the concept of compactness was invented to remedy the shortcomings of closedness. Compact sets are closed (in Hausdorff spaces and therefore metric spaces), so compactness is stricter than closedness. It evidently patches some feebleness in the definition of closedness to make it more useful. Closedness of a set in a metric space (&#8220;includes [...]]]></description>
			<content:encoded><![CDATA[<p>I swear the concept of compactness was invented to remedy the shortcomings of closedness. Compact sets are closed (in Hausdorff spaces and therefore metric spaces), so compactness is stricter than closedness. It evidently patches some feebleness in the definition of closedness to make it more useful.</p>
<p>Closedness of a set in a metric space (&#8220;includes all limit points&#8221;), by the sound of it, really wants to be something akin to &#8220;has solid boundaries.&#8221; But it isn&#8217;t. The problem is that the existence of limit points depends on the embedding space. If the embedding space lacks those limit points, then a set in it can be technically closed even though it isn&#8217;t really &#8220;like&#8221; other closed sets. For example, the set \(\mathbb R\) in space \((\mathbb R, d_{\text{Eucl.}})\) is closed, because the space has no point called \(\infty\).<br />
<span id="more-925"></span><br />
The first stab at &#8220;has solid boundaries&#8221; was to get rid of infinities by adding boundedness (&#8220;can be covered by some ball&#8221;) to the condition. Now, the set \(\mathbb R\) in space \((\mathbb R, d_{\text{Eucl.}})\) is closed yet not bounded, so it doesn&#8217;t have solid boundaries. Excellent. Upon further inspection, however, it doesn&#8217;t really address the real issue. For instance, set \(\mathbb Q \cap [0,1]\) in space \((\mathbb Q, d_{\text{Eucl.}})\) is closed and bounded, but it&#8217;s still porous at all the irrational numbers. It doesn&#8217;t have solid boundaries.</p>
<p>The second stab then was to replace closedness with completeness (&#8220;contains all Cauchy limits&#8221;). Completeness gets rid of the dependency on the embedding space and uses points in the set itself to define limits. This along with boundedness takes care of the above two examples. But there is still a deeply unsatisfying outcome: completeness and boundedness both depend on the metric and therefore are affected by rescaling. First let&#8217;s rewrite the boundedness condition as equivalently &#8220;can be covered by a finite number of \(r\)-balls for a fixed \(r\)&#8220;. The set \(\mathbb Z\) in space \((\mathbb Z, d_{\text{Disc.}}^1)\) where \(d_{\text{Disc.}}^k(x,y)=k\) if \(x\neq y\) is complete and bounded, if we choose \(r>1\), yet under a rescaling, say by replacing \(d_{\text{Disc.}}^1\) with \(d_{\text{Disc.}}^{r+\epsilon}\), the set is no longer bounded.</p>
<p>So finally, a third stab was to require sets to be bounded at once for all rescaling, by replacing boundedness with total boundedness (&#8220;can be covered by a finite collection of \(r\)-balls for all \(r\)&#8220;).</p>
<p>This last definition, complete and totally bounded, turns out to be equivalent to compactness (&#8220;every open cover has a finite subcover&#8221;) in metric spaces. And it shows. We&#8217;ve managed to drop all the stuff dependent on the embedding space and the metric scaling. All that is left are the topological properties of the set under open balls generated by the metric.</p>
<p>In some sense, what we get out of compactness (and really wanted from the outset) is the notion that a set is well contained regardless of scaling. This is what it means to have solid boundaries. It has to be a topological property of the set itself. More interestingly, because we can scale the set however we want (provided the scaling is non-singular), we can turn infinitesimals into infinities and vice versa. Small-scale infinitesimals (limiting sequence) and large-scale infinities (unbounded sequence) are really the same thing. For instance, the set \(\{1/n\}_{n\in \mathbb Z}\) under the metric \(d_{\text{Eucl.}}\) has an unincluded Cauchy limit at 0 and is thus not complete, but if we rescale the underlying space by \(1/x\) at \(x\), then it is basically \(\mathbb Z\) under the metric \(d_{\text{Disc.}}^1\), with no Cauchy limits to include and is complete. Similarly the first set is totally bounded while the second is not. This scale-dependence is awkward. Apparently, completeness and total boundedness take care of the small-scale and the large-scale separately, but in the end, they are all infinities and should be treated the same. The true distinction of consequence is between finitude (solid boundaries, well contained) and infinitude (no solid boundaries, ill contained), a distinction which compactness identifies.</p>
<p>One of the immediately intuitive notions coming from this understanding of compactness is the theorem that states &#8220;the image of a compact set under continuous mapping is also compact&#8221; (just a rescaling after all). We can regurgitate this as, a set with solid boundaries under continuous rescaling of the space still has solid boundaries. Other nice properties about limits being attained on compact sets, and about functions on compact sets, follow from the same intuition of their having solid boundaries. It also makes sense why the intersection of a compact set with a closed set is compact (well containment only needs to be ensured once), and therefore the intersection of any number of compact sets is compact. In some sense, compact sets are a much more useful dual to open sets, than closed sets &#8212; even under their topological definition (&#8220;complement is open&#8221;) &#8212; ever were.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=925</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>tensors</title>
		<link>https://blog.yhuang.org/?p=655</link>
		<comments>https://blog.yhuang.org/?p=655#comments</comments>
		<pubDate>Sun, 16 Oct 2011 12:33:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[basis]]></category>
		<category><![CDATA[component elements]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[math math]]></category>
		<category><![CDATA[overbrace]]></category>
		<category><![CDATA[space]]></category>
		<category><![CDATA[sum]]></category>
		<category><![CDATA[vector products]]></category>
		<category><![CDATA[vector space]]></category>
		<category><![CDATA[vector spaces]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=655</guid>
		<description><![CDATA[This has been a confusing topic, with half a dozen Wikipedia pages on the subject. Here I took some notes. Tensors are sums of &#8220;products&#8221; of vectors. There are different kinds of vector products. The one used to build tensors is, naturally, the tensor product. In the Cartesian product of vector spaces , the set [...]]]></description>
			<content:encoded><![CDATA[<p>This has been a confusing topic, with half a dozen Wikipedia pages on the subject. Here I took some notes.</p>
<p>Tensors are sums of &#8220;products&#8221; of vectors. There are different kinds of vector products. The one used to build tensors is, naturally, the <strong>tensor product</strong>. In the Cartesian product of vector spaces \(V\times W\), the set elements are tuples like \((v,w)\) where \(v\in V, w\in W\). A tensor product \(v\otimes w\) is obtained by tupling the component <strong>bases</strong> rather than the component elements. If \(V\) has basis \(\{e_i\}_{i\in\{1,&#8230;,M\}}\) and \(W\) has basis \(\{f_j\}_{j\in\{1,&#8230;,N\}}\), then take \(\{(e_i,f_j)\}_{i\in\{1,&#8230;,M\},j\in\{1,&#8230;,N\}}\) as the basis of the <strong>tensor product space</strong> \(V\otimes W\). Then define the tensor product \(v\otimes w\) as</p>
<p>(1) \(\sum_{i,j} v_i w_j (e_i,f_j) \in V\otimes W\),</p>
<p>if \(v=\sum_i v_i e_i\) and \(w=\sum_j w_j f_j\). The entire tensor product space \(V\otimes W\) is defined as sums of these tensor products</p>
<p>(2) \(\{\sum_k v_k\otimes w_k | v_k\in V, w_k\in W\}\).</p>
<p>So tensors in a given basis can be represented as multidimensional arrays.</p>
<p>\(V\otimes W\) is also a vector space, with \(MN\) basis dimensions (c.f. \(V\times W\) with \(M+N\) basis dimensions). But additionally, it has internal multilinear structure due to the fact that it is made of component vector spaces, namely:</p>
<p>\((v_1+v_2)\otimes w = v_1\otimes w + v_2\otimes w\)<br />
\(v\otimes (w_1+w_2) = v\otimes w_1 + v\otimes w_2\)<br />
\(\alpha (v\otimes w) = (\alpha v)\otimes w = v\otimes (\alpha w)\)<br />
<span id="more-655"></span><br />
Higher-order (n-th order) tensor products \(v_1\otimes v_2\otimes \cdots \otimes v_n\) are obtained by chaining in the obvious way, likewise for higher-order tensor product spaces \(V_1\otimes V_2\otimes \cdots \otimes V_n\). With this, <strong>concatenation</strong> of tensors are also defined, i.e. \(S_{i_1,&#8230;i_m} \in V_1\otimes \cdots \otimes V_m\) and \(T_{i_{m+1},&#8230;,i_n} \in V_{m+1}\otimes \cdots \otimes V_n\), then \(S_{i_1,&#8230;,i_m}\otimes T_{i_{m+1},&#8230;,i_n} = Z_{i_1,&#8230;,i_n} \in V_1\otimes \cdots \otimes V_n\). In other words, the indices are appended. This is essentially the <strong>Kronecker product</strong>, which generalizes the <strong>outer product</strong>.</p>
<p>However, usually when tensors are mentioned, the tensor product spaces under discussion are already specialized to those generated from a single base vector space \(V\) and its dual space \(V^*\), rather than from a collection of arbitrary vector spaces. In such a space \(P(m,n) = \overbrace{V\otimes \cdots \otimes V}^{m} \otimes \overbrace{V^*\otimes \cdots \otimes V^*}^{n}\), the component spaces (and their bases, indices, etc.) naturally belong to two groups, those from \(V\) are called <strong>contravariant</strong>, those from \(V^*\) are called <strong>covariant</strong>,  and an (m,n)-tensor from \(P(m,n)\) is written \(T^{i_1,&#8230;,i_m}_{j_1,&#8230;,j_n}\).</p>
<p>This specialization allows the <strong>contraction</strong> of tensors to be defined. A contraction basically chooses one covariant vector component and one contravariant vector component from a tensor and applies the former as a functional on the latter, e.g., contracting \(T^{i_1,&#8230;,i_m}_{j_1,&#8230;,j_n} = v_{i_1}\otimes \cdots \otimes v_{i_m} \otimes v^*_{j_1} \otimes \cdots \otimes v^*_{j_n}\) on the pair of indices \(i_1\) and \(j_1\) gives \(Z^{i_2,&#8230;,i_m}_{j_2,&#8230;,j_n} = v^*_{j_1}(v_{i_1}) (v_{i_2}\otimes \cdots \otimes v_{i_m} \otimes v^*_{j_2} \otimes \cdots \otimes v^*_{j_n})\). \(v^*_{j_1}(v_{i_1})\) of course is an <strong>inner product</strong> that sums over the dimensions of the paired components. Contraction generalizes the <strong>trace</strong> operator. Combined with concatenation, this defines a <strong>tensor multiplication</strong>, such that if \(S^{r,i_2,&#8230;,i_m}_{s,j_2,&#8230;,j_n}\in P(m,n)\) and \(T^{s,k_2,&#8230;,k_p}_{r,l_2,&#8230;,l_q}\in P(p,q)\), then \(S^{r,i_2,&#8230;,i_m}_{s,j_2,&#8230;,j_n}T^{s,k_2,&#8230;,k_p}_{r,l_2,&#8230;,l_q}\) is the contraction of \(S^{r,i_2,&#8230;,i_m}_{s,j_2,&#8230;,j_n}\otimes T^{s,k_2,&#8230;,k_p}_{r,l_2,&#8230;,l_q}\) on all common indices that can be paired, e.g. \(r,s\). This is the so-called <strong>Einstein notation</strong>, and generalizes <strong>matrix multiplication</strong>.</p>
<p>The distinction of \(V\) vs. \(V^*\) also manifests in the <strong>change-of-basis</strong> rules for tensors, which inherit from the change-of-basis rules of the component vector spaces, which are:</p>
<ul>
<li><strong>contravariant</strong> change-of-basis rule: If \(B = [b_1\ b_2\ \cdots\ b_M]\) is a change-of-basis matrix, with the new basis \(\{b_i\}_{i\in \{1,&#8230;,M\}}\) written in the old basis as columns, then for a vector written in the old basis \(v\in V\) and the same vector written in the new basis \(\tilde{v}\in V\), \(v = B\tilde{v}\). Therefore, we have
<p>(3) \(v \mapsto \tilde{v} = B^{-1}v\).</li>
<li><strong>covariant</strong> change-of-basis rule: If additionally \(a^T\in V^*\) is a functional written in the old basis and \(\tilde{a}^T\in V^*\) is the same functional written in the new basis, then \(\forall v\in V: a^T v = \tilde{a}^T \tilde{v} = \tilde{a}^T B^{-1}v\). Therefore, we have
<p>(4) \(a^T \mapsto \tilde{a}^T = a^T B\).</li>
</ul>
<p>Combining (1), it can be shown that, for a change-of-basis tensor \(B = {B^{-1}}^{i_1}_{i_1}\cdots {B^{-1}}^{i_m}_{i_m}B^{j_1}_{j_1}\cdots B^{j_n}_{j_n}\), an (m,n)-tensor \(T^{i_1,&#8230;,i_m}_{j_1,&#8230;,j_n}\) has the change-of-basis rule \(T^{i_1,&#8230;,i_m}_{j_1,&#8230;,j_n} \mapsto BT^{i_1,&#8230;,i_m}_{j_1,&#8230;,j_n}\).</p>
<p>Okay, so what&#8217;s the point of these tensors? Basically, an (m,n)-tensor \(T^{i_1,&#8230;,i_m}_{j_1,&#8230;,j_n}\in P(m,n)\) represents a multilinear input-output relationship that takes \(n\) vectors as input and produces \(m\) vectors as output. If used &#8220;canonically&#8221; on an input \(X^{j_1,&#8230;,j_n}\in P(n,0)\), you get \(T^{i_1,&#8230;,i_m}_{j_1,&#8230;,j_n}X^{j_1,&#8230;,j_n} = Y^{i_1,&#8230;,i_m}\in P(m,0)\) as output. The contravariant input gets contracted with the covariant parts of the transformation tensor, and these drive the contravariant parts of the transformation tensor to produce the contravariant output.</p>
<p><img src="wp-content/uploads/images/tensor.png" /><br />
(System diagrams: <strong>Rank</strong> is the minimal number of terms in a tensor. On the left, a rank-1 tensor transformation; on the right, a rank-\(K\) one. )</p>
<p>An example is linear transformations, which are (1,1)-tensors (1 vector in, 1 vector out). In array representation these would just be matrices. Any rank-\(K\) linear transformation \(T^v_a\) is decomposable into a \(K\)-term tensor \(\sum_{k=1}^K v_k\otimes a_k\), but 1-term (1,1)-tensors are outer products, so this is the matrix \(\sum_{k=1}^K v_k a^T_k\), and \(Y^v = T^v_a X^a\) is just \(y = \sum_k v_k (a^T_k x)\).</p>
<p>Most other &#8220;multilinear&#8221; operations on vectors (inner product, cross product, wedge product, determinant) can be written as tensors. For example, the inner product operation (2 vectors in, &#8220;0&#8243; vectors out, i.e. scalar) is the (0,2) \(N\)-term <strong>Kronecker tensor</strong> \(\delta_{i_1 i_2}=\sum_{k=1}^N e^*_k\otimes e^*_k\) where \(\{e^*_k\}_{k\in\{1,&#8230;,N\}}\) are the standard basis of \(V^*\).</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=655</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>a card problem</title>
		<link>https://blog.yhuang.org/?p=281</link>
		<comments>https://blog.yhuang.org/?p=281#comments</comments>
		<pubDate>Sun, 26 Sep 2010 05:33:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[52 cards]]></category>
		<category><![CDATA[answer]]></category>
		<category><![CDATA[deck of cards]]></category>
		<category><![CDATA[face]]></category>
		<category><![CDATA[fakalin]]></category>
		<category><![CDATA[full deck of cards]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[math cards]]></category>
		<category><![CDATA[number of cards]]></category>
		<category><![CDATA[subdeck]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=281</guid>
		<description><![CDATA[Here is a problem quoted from fakalin. A full deck of cards has 52 cards. Suppose 10 of them were face up and 42 were face down. You are in a dark room holding the deck. How do you rearrange the deck into two subdecks so that they have the same number of cards facing [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a problem quoted from fakalin. A full deck of cards has 52 cards. Suppose 10 of them were face up and 42 were face down. You are in a dark room holding the deck. How do you rearrange the deck into two subdecks so that they have the same number of cards facing up?<br />
<span id="more-281"></span><br />
The cards can be flipped. So first, the specific numbers don&#8217;t matter. They don&#8217;t even have to be even numbers. The answer is simple.</p>
<p>Say there are \(n\) cards up in the full deck. If you just divide the deck without flipping cards, then however you divide, one subdeck will have \(m\in [0,n]\) cards up, and the other subdeck will have the complement \(n-m\) cards up. So take \(n\) cards out of the original deck as subdeck A, and <u>flip them over</u>. If this subdeck A had \(m\) cards up originally, now it has \(n-m\) cards up. In the remaining cards forming subdeck B, there were already \(n-m\) cards up. So the two subdecks have an equal number of cards up.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=281</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>road path problem</title>
		<link>https://blog.yhuang.org/?p=242</link>
		<comments>https://blog.yhuang.org/?p=242#comments</comments>
		<pubDate>Fri, 19 Feb 2010 21:45:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[circle]]></category>
		<category><![CDATA[continuous path]]></category>
		<category><![CDATA[line]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[math 1]]></category>
		<category><![CDATA[pi math]]></category>
		<category><![CDATA[road]]></category>
		<category><![CDATA[secant graph]]></category>
		<category><![CDATA[theta]]></category>
		<category><![CDATA[unit radius]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=242</guid>
		<description><![CDATA[Suppose there is a straight road, infinitely long at both ends, located 1 unit from your starting location. Find the most efficient path to reach the road, and the worst-case total length of this path. The trivial but wrong way is to go for 1 unit in some direction, then trace the circumference of a [...]]]></description>
			<content:encoded><![CDATA[<p>Suppose there is a straight road, infinitely long at both ends, located 1 unit from your starting location. Find the most efficient path to reach the road, and the worst-case total length of this path.</p>
<p>The trivial but wrong way is to go for 1 unit in some direction, then trace the circumference of a unit-radius circle. The road will surely be found this way, but the path length is \(1+2\pi\), which can be improved upon.<br />
<span id="more-242"></span><br />
Every possible position for the road corresponds to a tangent line to the unit circle centered at the starting location. Therefore, this is a problem about finding a shortest path that touches all tangent lines to a unit circle. To make this more concrete, let us transform the space into polar form as below.</p>
<p><img src="wp-content/uploads/images/roadpath2.png" /></p>
<p>We see that in polar form, the unit circle becomes the line \(r=1\) and each tangent line touching the circle at angle \(\theta_0\) becomes the graph \(r=\sec(\theta-\theta_0)\). The trivial solution corresponds to a path that traces \(r=0\) to \(r=1\) at \(\theta=0\), followed by \(\theta=0\) to \(\theta=2\pi\) at \(r=1\). This is not efficient.</p>
<p>In fact, any continuous path starting at \(r=0\) &#8220;reaches the road&#8221; (i.e. touches every tangent line) as long as it touches \(r=\sec(\theta)\) somewhere on \(\theta\in [0,\pi/2)\) and somewhere on \(\theta\in (3\pi/2,2\pi]\), and it stays above \(r=1\) between those two points. And up to shifts in \(\theta\), these are the only possible solutions.* Note that the path doesn&#8217;t need to be closed, like the trivial path was. So we are left to find the shortest such path (e.g. the one in green above).</p>
<p>Whereas in rectangular form, the shortest path between two points is a straight line, in polar form, the shortest path between two points is along a secant graph. It is a fairly easy matter to show that the shortest path must take the following form:</p>
<p>1. Start from \((r,\theta)=(0,\phi)\) for some \(\phi\in [0,\pi/2)\);<br />
2. Drop onto the graph \(r=\sec(\theta-2\phi)\), between the points \((r,\theta)=(\sec(\phi),\phi)\) and \((r,\theta)=(1,2\phi)\);<br />
3. Take the path \(r=1\) from \(\theta=2\phi\) to some \(\theta=2\pi-2\psi\);<br />
4. Drop onto the graph \(r=\sec(\theta-(2\pi-2\psi))\), between the points \((r,\theta)=(1,2\pi-2\psi)\) and \((r,\theta)=(\sec(2\pi-\psi),2\pi-\psi)\).</p>
<p>Finally, we need to solve two minimizations, which will find the best \(\phi\) and \(\psi\). \(\psi\) can actually be solved by inspection, but formally:</p>
\(\min_{\psi\in[0,\pi/2)} \tan(\psi) + \pi - 2\psi\)<br />
solution at \(\sec^2{\psi} = 2 \Rightarrow \psi=\pi/4\)
<p>\(\min_{\phi\in[0,\pi/2)} \sec(\phi) + \tan(\phi) + \pi - 2\phi\)<br />
solution at \(\frac{\sin(\phi)}{\cos^2(\phi)} + \sec^2(\phi) = 2 \Rightarrow \sin(\phi)=1/2 \Rightarrow \phi=\pi/6\).</p>
<p>The solved path has total length \(\tan(\pi/4) + \pi &#8211; \pi/2 + \sec(\pi/6) + \tan(\pi/6) + \pi &#8211; \pi/3 = 1+\sqrt{3}+7\pi/6\), and is plotted below. This is about 12% shorter than the trivial path.</p>
<p><img src="wp-content/uploads/images/roadpath.png" /></p>
<hr />
* Technically, we still need to prove that paths that re-enter the unit circle (go below \(r=1\)) are not worthy. One can reason about why such paths can be improved upon by replacing the path segments that re-enter the unit circle, but it seems a proof needs some global properties of the path. With the reader comment (below) about reflecting the starting point, the best path actually becomes a function \(r(\theta)\), of the variable \(\theta\), which almost certainly is a necessary condition for efficient paths. Then we can impose other constraints, like, \(\forall \theta_0: r(\theta) \not< \sec(\theta-\theta_0)\), which says the path function should not be dominated by any secant function (equivalent to crossing all tangent lines to the unit circle). This may be a direction to a complete proof.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=242</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Windows 7 Math Input Panel!</title>
		<link>https://blog.yhuang.org/?p=204</link>
		<comments>https://blog.yhuang.org/?p=204#comments</comments>
		<pubDate>Tue, 06 Oct 2009 14:44:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[human computer interface]]></category>
		<category><![CDATA[Input]]></category>
		<category><![CDATA[input panel]]></category>
		<category><![CDATA[input problem]]></category>
		<category><![CDATA[interface]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[OCR]]></category>
		<category><![CDATA[pen input device]]></category>
		<category><![CDATA[sense]]></category>
		<category><![CDATA[straight edges]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=204</guid>
		<description><![CDATA[Somehow the ability to turn handwritten math into MathML escaped my attention as a Windows 7 feature from trying the first beta. Finally! I&#8217;ve been waiting for this since forever&#8230; Wonder what took so long. Next up are music notation and graphics in general*. The ultimate goal of a handwriting recognizer is of course similar [...]]]></description>
			<content:encoded><![CDATA[<p><img src="wp-content/uploads/images/clip_image014_thumb.jpg" alt="http://blogs.msdn.com/blogfiles/e7/WindowsLiveWriter/InkInputandTablet_E2A5/clip_image014_thumb.jpg" /></p>
<p>Somehow the ability to <a href="http://blogs.msdn.com/e7/archive/2009/04/23/ink-input-and-tablet.aspx">turn handwritten math into MathML</a> escaped my attention as a Windows 7 feature from trying the first beta. Finally! I&#8217;ve been waiting for this since forever&#8230; Wonder what took so long.</p>
<p>Next up are music notation and graphics in general*. The ultimate goal of a handwriting recognizer is of course similar to that of OCR: to turn one piece of art (for the lack of a better word) rendering to another, text included. Specifically, it should <em>rectify</em> all the rendering to a &#8220;typeset&#8221; form. It should intelligently recognize a host of objects with its own Visio-like templates: if I draw a resistor, it should pull out a nice schematic rendering of a resistor. If I draw a rectangle, and select &#8220;rectify&#8221;, it should make a rectangle with straight edges.<br />
<span id="more-204"></span><br />
It is in some sense harder than OCR: the handwriting can vary a lot; but in other sense easier: the user is by definition actively interacting with the process. Combined with a rational input device (not a mouse, not a pen that is but a mouse emulator**), this can become the realistic next-generation human-computer interface, and tablet will take off as one of the next-generation form factors (as it almost inevitably must take off, probably in a merged tablet/ebook form). I&#8217;m not too sure what human-computer interface people are doing these days, but last I checked they were working on fanciful stuff divorced from an actual use. If it were up to me to decide, I&#8217;d explore the limits of the pen input device first, simple things often yield greater and surprising results.</p>
<p>* Now this is something I&#8217;ve been ranting about for years as one of these &#8220;obvious&#8221; advances that should have happened but haven&#8217;t, but it is also possible that technology has caught up enough to implement these things. Certainly the math input idea isn&#8217;t new at all. Somebody wrote an <a href="http://www.ai.mit.edu/projects/natural-log/papers/matsakis-MEng-99.pdf">MEng thesis</a> on it 10 years ago and I&#8217;m sure he wasn&#8217;t the first one. The general input problem is more interesting though.</p>
<p>** A useful pen device would forsake the god-awful mouse model, and move along the lines of some pens nowadays: with a digital eraser, with pressure sensing (these two already exist), but also with a scroll wheel to select menus or choose options, with some feedback either mechanical or like a small display. The latter can be useful, for instance, to show the color of the pen or some other such property. There is no reason why a pen cannot be as useful &#8212; indeed, more useful &#8212; than a mouse (which has become an uncomfortable and unnatural inner glove). The pen form factor has been tried for thousands of years and its usefulness should not be doubted, disdain for archaism be damned.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=204</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>An improvised dialogue on Wolfram&#124;Alpha</title>
		<link>https://blog.yhuang.org/?p=190</link>
		<comments>https://blog.yhuang.org/?p=190#comments</comments>
		<pubDate>Sat, 16 May 2009 23:36:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[article 18]]></category>
		<category><![CDATA[expert systems]]></category>
		<category><![CDATA[human genome]]></category>
		<category><![CDATA[lol]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[natural language queries]]></category>
		<category><![CDATA[non]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[wolfram]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=190</guid>
		<description><![CDATA[[18:01] fakalin: hey [18:01] fakalin: did you try wolfram alpha [18:02] me: waht [18:02] fakalin: what [18:02] fakalin: jeez you&#8217;re out of touch [18:02] fakalin: http://www.wolframalpha.com/ [18:04] me: what is this [18:04] me: i don&#8217;t get it [18:04] fakalin: what&#8217;s it like living under a rock [18:04] fakalin: ask it something [18:04] fakalin: anything [18:04] [...]]]></description>
			<content:encoded><![CDATA[<p>[18:01] fakalin: hey<br />
[18:01] fakalin: did you try wolfram alpha<br />
[18:02] me: waht<br />
[18:02] fakalin: what<br />
[18:02] fakalin: jeez you&#8217;re out of touch<br />
[18:02] fakalin: http://www.wolframalpha.com/<br />
<span id="more-190"></span><br />
[18:04] me: what is this<br />
[18:04] me: i don&#8217;t get it<br />
[18:04] fakalin: what&#8217;s it like living under a rock<br />
[18:04] fakalin: ask it something<br />
[18:04] fakalin: anything<br />
[18:04] me: it&#8217;s down<br />
[18:04] fakalin: oh<br />
[18:04] fakalin: lol<br />
[18:04] fakalin: read up on it<br />
[18:06] me: but what&#8217;s the idea, these are all pre computed?<br />
[18:06] fakalin: here it comes<br />
[18:06] fakalin: HERE IT COMES<br />
[18:06] fakalin: http://lmgtfy.com/?q=wolfram+alpha<br />
[18:08] me: hmm<br />
[18:08] me: but what does this have to do with the web<br />
[18:09] fakalin: um<br />
[18:09] me: except that the users are &#8220;on the web&#8221;<br />
[18:09] fakalin: the fact that you can use it using this thing called a &#8216;web browser&#8217;<br />
[18:09] me: that&#8217;s weak<br />
[18:09] me: i&#8217;m asking this because it is compared to google<br />
[18:09] fakalin: it&#8217;s useful for some things i guess<br />
[18:10] me: that&#8217;s a weak statement<br />
[18:10] fakalin: you&#8217;re weak<br />
[18:10] me: in fact it can&#8217;t get waker<br />
[18:10] me: weaker<br />
[18:12] me: “Alpha does not answer natural language queries &#8212; you have to ask questions in a particular syntax, or various forms of abbreviated notation.”<br />
[18:12] me: ok<br />
[18:13] me: “and it computes answers, it doesn&#8217;t merely look them up in a big database.”<br />
[18:13] me: i don&#8217;t see a clear distinction<br />
[18:13] me: even SQL can compute<br />
[18:13] fakalin: it&#8217;s basically a bunch of expert systems<br />
[18:13] fakalin: lol<br />
[18:13] fakalin: so your argument is &#8216;even sql can do stuff&#8217;<br />
[18:14] me: i&#8217;m quoting an article<br />
[18:15] me: not impressed<br />
[18:15] fakalin: yawn<br />
[18:15] me: wolfman is overreaching<br />
[18:15] me: again<br />
[18:15] me: “Stephen showed me many interesting examples &#8212; for example, Wolfram Alpha was able to solve novel numeric sequencing problems, calculus problems, and could answer questions about the human genome too.”<br />
[18:16] me: this sounds like mathematica<br />
[18:16] fakalin: no shit sherlock<br />
[18:16] me: but then<br />
[18:16] fakalin: it&#8217;s like mathematica on the web with some added modules<br />
[18:16] me: &#8220;It was also able to compute answers to questions about many other kinds of topics (cooking, people, economics, etc.). &#8221;<br />
[18:16] me: see, this is too vague\<br />
[18:16] fakalin: you&#8217;re too vague<br />
[18:16] me: i guess i&#8217;ll have to wait for it to resurrect<br />
[18:16] me: and try myself<br />
[18:16] fakalin: keep trying<br />
[18:16] fakalin: it just came out yesterday<br />
[18:16] fakalin: sometimes it works<br />
[18:17] me: haha<br />
[18:18] me: i&#8217;d like to see ONE example where something non trivial in a non-scientific field is &#8220;computed&#8221;<br />
[18:21] me: ok<br />
[18:22] me: anagrams<br />
[18:22] me: that&#8217;s one example i guess<br />
[18:22] fakalin: lol what<br />
[18:22] me: and maybe decoding stuff<br />
[18:22] fakalin: what are you blathering about<br />
[18:22] me: an example of computing a non scientific topic<br />
[18:22] fakalin: who cares about that<br />
[18:22] fakalin: you and your straw men<br />
[18:22] me: lol<br />
[18:22] fakalin: unit conversions nigga<br />
[18:23] me: that&#8217;s mat<br />
[18:23] me: math<br />
[18:23] fakalin: lol<br />
[18:23] fakalin: news flash<br />
[18:23] fakalin: computers can do math<br />
[18:23] me: dude, i know that<br />
[18:23] me: that&#8217;s mathematica<br />
[18:23] me: i&#8217;m trying to figure out how this wolframalpha is new<br />
[18:23] fakalin: simple<br />
[18:23] me: the thing is, if you know the word &#8220;anagram&#8221;, you can find an anagramming tool<br />
[18:23] fakalin: find a website on the internet like it<br />
[18:24] me: sure, it&#8217;s more convenient<br />
[18:24] me: but it&#8217;s not a one stop shop<br />
[18:24] me: which google is<br />
[18:24] me: like i said, you can find an &#8220;anagramming&#8221; tool<br />
[18:24] me: if you want to do anagrams<br />
[18:24] me: same with just about any other &#8220;tagged&#8221; computation type<br />
[18:25] me: it&#8217;d be more interesting if wolfram alpha computes things for which tools haven&#8217;t been built &#8230;.<br />
[18:25] me: this is a bit problematic<br />
[18:26] me: see, google can work because everybody writes in some language it indexes<br />
[18:26] me: however, on the web, people do not write computational tools solely in mathematica<br />
[18:26] me: if they did, then wolfram alpha can just glom onto all of those<br />
[18:26] me: but as is, they only have wolfram researchers to write stuff<br />
[18:30] fakalin: lol<br />
[18:30] me: you see my point though, right?<br />
[18:31] fakalin: that wolfram alpha just packages things together and offers nothing new?<br />
[18:31] fakalin: could say the same about google<br />
[18:31] fakalin: you just like shitting on new things<br />
[18:31] fakalin: communist hates change<br />
[18:32] me: i&#8217;m saying wolfram alpha is like yahoo<br />
[18:32] me: unlike google<br />
[18:33] fakalin: except yahoo sux<br />
[18:33] fakalin: lolzz<br />
[18:33] me: my point is, they depend on experts</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=190</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is this true?</title>
		<link>https://blog.yhuang.org/?p=166</link>
		<comments>https://blog.yhuang.org/?p=166#comments</comments>
		<pubDate>Sat, 07 Mar 2009 21:41:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[binary symmetric channel]]></category>
		<category><![CDATA[classical statement]]></category>
		<category><![CDATA[codewords]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[frac]]></category>
		<category><![CDATA[input alphabet]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[noisy channel]]></category>
		<category><![CDATA[theorem]]></category>
		<category><![CDATA[wikipedia]]></category>

		<guid isPermaLink="false">http://scripts.mit.edu/~zong/wpress/?p=166</guid>
		<description><![CDATA[So this thing on Wikipedia http://en.wikipedia.org/wiki/Noisy-channel_coding_theorem could have left it at the classical statement of the theorem with bullet #1. Then it goes on to say: 2. If a probability of bit error is acceptable, rates up to are achievable, where . 3. For any , rates greater than are not achievable. I have never [...]]]></description>
			<content:encoded><![CDATA[<p>So this thing on Wikipedia</p>
<p><a href="http://en.wikipedia.org/wiki/Noisy-channel_coding_theorem">http://en.wikipedia.org/wiki/Noisy-channel_coding_theorem</a></p>
<p>could have left it at the classical statement of the theorem with bullet #1. Then it goes on to say:</p>
<p>2. If a probability of bit error \(p_b\) is acceptable, rates up to \(R(p_b)\) are achievable, where</p>
<p>\(R(p_b) = \frac{C}{1-H_2(p_b)}\).</p>
<p>3. For any \(p_b\), rates greater than \(R(p_b)\) are not achievable.<br />
<span id="more-166"></span><br />
I have never seen this before. At first glance, this seems questionable, as Fano&#8217;s converse gives \(P_e^{(n)} \ge 1 &#8211; \frac{1}{nR} &#8211; \frac{C}{R}\), which seems to converge to \(H_b(p_e) \ge p_e\) for \(p_e \in [0,0.5]\). So it must mean whatever is used to code this is not going to be a long block code.</p>
<p>One example where this is true is the binary symmetric channel, with uncoded transmission. But I&#8217;m not so sure what is the achievability scheme in general, although I have some ideas &#8212; it may involve quantizing the excess codewords to the nearest zero-error codewords. The converse I have no idea.</p>
<p>In terms of the statement, it is really unclear what is meant by &#8220;bit error&#8221;. In the classical statement, a message from a large alphabet is coded into some \(X^n \in \mathcal{X}^n\) where \(\mathcal{X}\) is the channel input alphabet. After decoding, \(X^n\) is either found correctly, or it is in error. There is no &#8220;bit&#8221; in here. Even if \(X\) is binary, is the bit error the received (uncooked) bit error? Or is it the decoded (cooked) bit error? Why should the decoded bit error matter, isn&#8217;t that a codebook artifact? Or is it the bit error in the original message, if the original message is to be represented by a bit-stream? But that is also entirely arbitrary.</p>
<p>Anyway I&#8217;d like a clarification from someone or a reference.</p>
]]></content:encoded>
			<wfw:commentRss>https://blog.yhuang.org/?feed=rss2&#038;p=166</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
