<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Information Theory and Coding Notes (UCB FA24 EE229A) on itu</title>
		<link>/series/information-theory-and-coding-notes-ucb-fa24-ee229a/</link>
		<description>Recent content in Information Theory and Coding Notes (UCB FA24 EE229A) on itu</description>
		<generator>Hugo</generator>
		<language>en</language>
		
		
		
			<copyright>&amp;copy; 2024 itsublog. All rights reserved.
</copyright>
		
		
			<lastBuildDate>Tue, 25 Nov 2025 11:45:14 +0800</lastBuildDate>
		
			<atom:link href="/series/information-theory-and-coding-notes-ucb-fa24-ee229a/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>INFOTH Note 23: Parallel Gaussian Channels, WSS, Distributed Source Compression</title>
				<link>/posts/ucb_info_theory_notes/23/</link>
				<pubDate>Tue, 25 Nov 2025 11:45:14 +0800</pubDate>
				<guid>/posts/ucb_info_theory_notes/23/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Reference:&lt;/strong&gt; T. M. Cover and J. A. Thomas, &lt;em&gt;Elements of Information Theory&lt;/em&gt;, 2nd ed., Wiley, 2006, Ch. 9 (Gaussian Channel), especially Sec. 9.4 (Parallel Gaussian Channels). The proof sketch uses the maximum entropy theorem (Thm 8.6.5) and the entropy chain rule inequality (eq. 8.63).&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h1 id=&#34;231-recall-awgn-capacity&#34;&gt;23.1 Recall: AWGN Capacity&lt;/h1&gt;&#xA;&lt;p&gt;The single-use AWGN channel \(Y = X &amp;#43; N\), \(N \sim \mathcal N(0,\sigma^2)\), \(X \perp\!\!\!\perp N\), has capacity&lt;/p&gt;&#xA;\[&#xA;C = \frac{1}{2}\log\!\left(1 &amp;#43; \frac{P}{\sigma^2}\right) \text{ bits per channel use},&#xA;\]&lt;ul&gt;&#xA;&lt;li&gt;where \(P\) is the per-use power constraint \(E[X^2] \le P\). Communication at rate \(R &amp;lt; C\) is achievable with \(P_e^{(n)} \to 0\); rate \(R &amp;gt; C\) is not (see &lt;a href=&#34;/posts/ucb_info_theory_notes/22/&#34;&gt;Note 22&lt;/a&gt;).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This is also the mutual information maximizer:&lt;/p&gt;</description>
			</item>
			<item>
				<title>INFOTH Note 22: AWGN Channel and Shannon Limit</title>
				<link>/posts/ucb_info_theory_notes/22/</link>
				<pubDate>Thu, 20 Nov 2025 11:45:14 +0800</pubDate>
				<guid>/posts/ucb_info_theory_notes/22/</guid>
				<description>&lt;h1 id=&#34;221-from-dmc-to-waveform-channels&#34;&gt;22.1 From DMC to Waveform Channels&lt;/h1&gt;&#xA;&lt;p&gt;Until now, we have met DMCs which are &lt;strong&gt;discrete&lt;/strong&gt;, memoryless channels.&lt;/p&gt;&#xA;&lt;p&gt;While the real world communication be like: a message \(m\) is mapped to (corresponded to) an input waveform \(x(t)\), not discrete samples.&lt;/p&gt;&#xA;\[&#xA;x_m(t)=\sum_{i=1}^n x_i\, g(t - iT_0),&#xA;\]&lt;p&gt;where \(x_i\) are symbols and \(T_0\) is the &lt;strong&gt;symbol interval&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;waveform-channel-model&#34;&gt;Waveform Channel Model&lt;/h2&gt;&#xA;\[&#xA;x(t)\to\boxed{\text{Channel}}\to y(t)=x(t)&amp;#43;N(t),&#xA;\]&lt;ul&gt;&#xA;&lt;li&gt;\(N(t)\) is a &lt;strong&gt;continuous-time stochastic process&lt;/strong&gt; (the &lt;strong&gt;additive noise&lt;/strong&gt;), i.e. \((N(t), t\ge 0)\) or \((N(t), t\in \R)\).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;To discuss capacity in a Shannon sense, we consider communication over a fixed time \(T\). Without any constraint, the input \(x(t)\) could carry infinite information (infinite amplitude, infinite bandwidth). We impose two physical constraints:&lt;/p&gt;</description>
			</item>
			<item>
				<title>INFOTH Note 21: Polar Codes and Related Theories (Bhattacharyya, Martingale)</title>
				<link>/posts/ucb_info_theory_notes/21/</link>
				<pubDate>Tue, 18 Nov 2025 11:45:14 +0800</pubDate>
				<guid>/posts/ucb_info_theory_notes/21/</guid>
				<description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Reference:&lt;/strong&gt; E. Arikan, &amp;ldquo;&lt;a href=&#34;https://doi.org/10.1109/TIT.2009.2021379&#34;&gt;Channel Polarization: A Method for Constructing Capacity-Achieving Codes for Symmetric Binary-Input Memoryless Channels&lt;/a&gt;,&amp;rdquo; &lt;em&gt;IEEE Trans. Inform. Theory&lt;/em&gt;, vol. 55, no. 7, pp. 3051–3073, July 2009.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h1 id=&#34;211-core-idea-of-polar-codes&#34;&gt;21.1 Core Idea of Polar Codes&lt;/h1&gt;&#xA;&lt;ol start=&#34;0&#34;&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Notation.&lt;/strong&gt; Throughout this note, \(I(W)\) denotes the &lt;strong&gt;symmetric capacity&lt;/strong&gt; \(I(X;Y)\) under uniform input \(X\). For BISO channels, uniform input achieves capacity, so \(I(W)=C(W)\).&lt;/p&gt;&#xA;&lt;p&gt;本文中 \(I(W)\) 始终指 uniform 输入下的&lt;strong&gt;对称容量&lt;/strong&gt; \(I(X;Y)\)。对于 BISO 信道，uniform 输入恰好达到容量，因此 \(I(W)=C(W)\)。&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Starting point.&lt;/strong&gt; We have a noisy channel \(W\) with capacity \(I(W)\). Shannon&amp;rsquo;s channel coding theorem says reliable communication at rate \(I(W)\) is possible, but does not give a practical construction.&lt;/p&gt;&#xA;&lt;p&gt;有一条噪声信道 \(W\)，容量 \(I(W)\)。Shannon: 能以 \(I(W)\) 的 rate 可靠通信，但没有给出实际的构造方法。&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Arikan&amp;rsquo;s idea.&lt;/strong&gt; Take \(N=2\) copies of \(W\). Instead of using them independently, mix the inputs through a linear pre-processing step: \(x_1=u_1\oplus u_2\), \(x_2=u_2\), a butterfly transform analogous to the FFT.&lt;/p&gt;&#xA;&lt;p&gt;使用 \(N=2\) 份 \(W\)，把输入 \((u_1, u_2)\) 经线性变换得到 \((x_1, x_2)\)：\(x_1 = u_1 \oplus u_2,~~ x_2 = u_2\)，这是一个类似 FFT 的蝴蝶变换。&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Channel splitting.&lt;/strong&gt; After mixing, the decoder wants to recover \((u_1,u_2)\) from the outputs \((y_1,y_2)\). Rather than the intuitive order of decoding \(u_2\) first (since \(x_2=u_2\) directly), we deliberately decode \(u_1\) first and then \(u_2\), which enables polarization.&lt;/p&gt;&#xA;&lt;p&gt;混合后从解码端看，我们想通过输出 \((y_1,y_2)\) 解码 \((u_1,u_2)\). 我们故意设计先不解码直观的 \(u_2\) 而是先解码 \(u_1\)，再解码 \(u_2\)，这样才能极化两个信道。&lt;/p&gt;&#xA;&lt;p&gt;The two identical physical channels \(W\) can be viewed as two different synthetic sub-channels \(W&amp;#39;\) and \(W&amp;#39;&amp;#39;\):&lt;/p&gt;&#xA;&lt;p&gt;原来的两个相同物理信道 \(W\) 可以看成两个不同的合成子信道 \(W&amp;#39;\) 和 \(W&amp;#39;&amp;#39;\)；&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;In \(W&amp;#39;\), the sole input is \(u_1\), while \(u_2\) is unknown, an uncontrollable random variable that must be summed over (marginalized out). The presence of this unknown \(u_2\) degrades the decoding of \(u_1\).&lt;/p&gt;&#xA;&lt;p&gt;在 \(W&amp;#39;\) 我们假设输入只有 \(u_1\)，而 \(u_2\) 是未知信息，即不可控的随机噪声，因此要对 \(u_2\) 求和消去，并且直觉上存在额外噪声导致解码 \(u_1\) 的性能变差；&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;In \(W&amp;#39;&amp;#39;\), the sole input is \(u_2\), and \(u_1\) has already been decoded; it is known side information available to the decoder before decoding \(u_2\). Mathematically, \(u_1\) is grouped with \(y_1,y_2\) as part of the output. Since \(x_1=u_1\oplus u_2\) and \(u_1\) is known, the decoder can use \(y_1\) to extract additional information about \(u_2\).&lt;/p&gt;&#xA;&lt;p&gt;而在 \(W&amp;#39;&amp;#39;\) 中我们假设 \(u_2\) 是唯一的输入，此时 \(u_1\) 已经被解码，是已知信息，也即 \(u_1\) 作为 decoder 在解码前拿到的辅助信息存在，因此数学上可以和 \(y_1,y_2\) 归在一起；直觉上可以清除 \(x_1=u_1 \oplus u_2\) 对 \(u_2\) 的干扰，从而提升性能。&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;也即：&lt;/p&gt;&#xA;\[&#xA;    W&amp;#39;: u_1 \mapsto (y_1,y_2), \text{unknown } u_2 \text{ is marginalized out};&#xA;    \]&lt;p&gt;&#xA;&lt;/p&gt;&#xA;\[&#xA;    W&amp;#39;&amp;#39;: u_2 \mapsto (y_1,y_2,u_1), u_1 \text{ is known side info}.&#xA;    \]&lt;p&gt;Total information is conserved: \(I(W&amp;#39;)&amp;#43;I(W&amp;#39;&amp;#39;)=2I(W)\), but redistributed unevenly.&lt;/p&gt;&#xA;&lt;p&gt;总信息量守恒：\(I(W&amp;#39;) &amp;#43; I(W&amp;#39;&amp;#39;) = 2I(W)\)，但一多一少。&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Recursion.&lt;/strong&gt; Apply the same transform (copy, XOR, split) recursively to \(W&amp;#39;\) and \(W&amp;#39;&amp;#39;\) and we get 4 equivalent channels. After \(n\) levels of recursion, we have \(N=2^n\) sub-channels. Each level makes the good ones better and the bad ones worse.&lt;/p&gt;&#xA;&lt;p&gt;对 \(W&amp;#39;\) 和 \(W&amp;#39;&amp;#39;\) 各自再做同样的 copy-XOR-split，就可以产出 4 个等效信道。\(n\) 层之后有 \(N=2^n\) 个子信道。每一层都让好的更好、差的更差。&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Polarization.&lt;/strong&gt; As \(N\to\infty\), every sub-channel becomes either perfectly reliable (\(I\to 1\)) or completely useless (\(I\to 0\)). The fraction of perfect channels approaches exactly \(I(W)\).&lt;/p&gt;&#xA;&lt;p&gt;\(N\to\infty\) 时，所有子信道要么 \(I\to 1\)（完美），要么 \(I\to 0\)（无用）。完美的那些占比恰好趋向 \(I(W)\)。&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Usage.&lt;/strong&gt; Transmit data only on the good sub-channels (\(I\approx 1\)). Freeze the bad ones (\(I\approx 0\)) to a fixed known value (e.g., \(0\)). The resulting rate approaches \(I(W)\) i.e. achieves capacity.&lt;/p&gt;&#xA;&lt;p&gt;只在好的子信道上发数据，坏的 freeze 成 \(0\)。速率 \(\approx I(W)\)，达到容量。&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;</description>
			</item>
			<item>
				<title>INFOTH Note 20: Channel Coding Schemes</title>
				<link>/posts/ucb_info_theory_notes/20/</link>
				<pubDate>Thu, 13 Nov 2025 01:45:14 +0800</pubDate>
				<guid>/posts/ucb_info_theory_notes/20/</guid>
				<description>&lt;h1 id=&#34;201-maximum-likelihood-decoding-最尤復号法&#34;&gt;20.1 Maximum Likelihood Decoding 最尤復号法&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Note: This is referenced from &lt;a href=&#34;https://drive.google.com/file/d/1bvn34sHjXclYlTV1FpxX2i--oREbsUvY/view&#34;&gt;Toyoaki Nishida&amp;rsquo;s slides: IT-09&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Also see &lt;a href=&#34;https://www-alg.ist.hokudai.ac.jp/~atsu/info_theory/info_theory_10.html&#34;&gt;Atsuyoshi Nakamura&amp;rsquo;s slides: 情報理論 第10回&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;setup&#34;&gt;Setup&lt;/h2&gt;&#xA;&lt;p&gt;&lt;img src=&#34;/posts/ucb_info_theory_notes/20/max-like-dec.png&#34; alt=&#34;image-20251111111948633&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;Because it&amp;rsquo;s not so possible for multiple errors to occur, the probability where the output in the output space will be not so far away from the input, if the input space is the same as the output space.&lt;/p&gt;&#xA;&lt;p&gt;For every &lt;strong&gt;message&lt;/strong&gt; \(i\), we have \(w_i:=e_n(i)=\bold x^n(i)\) defined as the encoded code block or channel input.&lt;/p&gt;</description>
			</item>
			<item>
				<title>INFOTH Note 19: Channel Coding Theorem for DMC 2</title>
				<link>/posts/ucb_info_theory_notes/19/</link>
				<pubDate>Thu, 06 Nov 2025 11:45:14 +0800</pubDate>
				<guid>/posts/ucb_info_theory_notes/19/</guid>
				<description>&lt;h1 id=&#34;191-proof-of-channel-coding-theorem-for-dmc&#34;&gt;19.1 Proof of Channel Coding Theorem for DMC&lt;/h1&gt;&#xA;&lt;p&gt;We inherit the setup in Note 18.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-setup&#34;&gt;The Setup&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;DMC: \(p(y|x)\)&lt;/li&gt;&#xA;&lt;li&gt;Definition of capacity&lt;/li&gt;&#xA;&lt;li&gt;Encoding and decoding maps, \(((e_n,d_n),n\ge 1)\)&lt;/li&gt;&#xA;&lt;li&gt;Prob. of error: \(\lambda_{i,n}=\Pr[d_n(\bold y^n)\ne i|\bold x^n=e_n(i)]\)&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Max: \(\lambda_{\max,n}=\max_{i\in[2^{nR}]}\lambda_{i,n}\)&lt;/li&gt;&#xA;&lt;li&gt;Average: \(P_e^{(n)}=\frac1{2^{nR}}\sum_{i=1}^{2^{nR}}\lambda_{i,n}\)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;codebook-randomized&#34;&gt;Codebook Randomized&lt;/h2&gt;&#xA;&lt;p&gt;Although the channel encoding and decoding maps are fixed, we randomize the encoding map into a codebook where a behavior of ==coding of a message \(m\) into \(\bold x^n\) follows a probability==.&lt;/p&gt;&#xA;&lt;p&gt;For the \(p(x)\) distribution over \(\mathcal X\), we build a codebook mapping every message \(m\in[2^{nR}=M_n]\) to a sequence of length \(n\). Every symbol of this sequence (\(i\)-th index) is a RV:&#xA;&lt;/p&gt;</description>
			</item>
			<item>
				<title>INFOTH Note 18: Channel Coding Theorem for DMC 1</title>
				<link>/posts/ucb_info_theory_notes/18/</link>
				<pubDate>Tue, 04 Nov 2025 11:45:14 +0800</pubDate>
				<guid>/posts/ucb_info_theory_notes/18/</guid>
				<description>&lt;h1 id=&#34;181-communication&#34;&gt;18.1 Communication&lt;/h1&gt;&#xA;&lt;h2 id=&#34;setup&#34;&gt;Setup&lt;/h2&gt;&#xA;&lt;p&gt;&lt;img src=&#34;/posts/ucb_info_theory_notes/18/channel_coding.png&#34; alt=&#34;channel coding&#34;&gt;&lt;/p&gt;&#xA;&lt;p&gt;There is a &lt;strong&gt;sender&lt;/strong&gt; and a &lt;strong&gt;receiver&lt;/strong&gt; in a communication.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;A &lt;strong&gt;sender&lt;/strong&gt; has a message \(m\in[M]:=\{1,2,\dots,M\}\) to send&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The information source codeword (情報源符号): \(m\), inputted into a &lt;strong&gt;channel encoder&lt;/strong&gt;, encoded into \(x\in\mathcal X\)&lt;/li&gt;&#xA;&lt;li&gt;Approximately a channel encoder&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;The sender sends a message via a &lt;strong&gt;channel&lt;/strong&gt;. The &lt;strong&gt;channel&lt;/strong&gt; is noisy, mapping \(x\) to \(y\) probably:&#xA;&lt;/p&gt;&#xA;\[&#xA;  x\to\underbrace{\boxed{p(y|x)}}_W\to y&#xA;  \]&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;A &lt;strong&gt;receiver&lt;/strong&gt; receives \(y\) and wants to decode \(y\) into the original message \(m\), but turning out to be \(\hat m\):&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The channel outputs \(y\) and the receiver uses a &lt;strong&gt;channel decoder&lt;/strong&gt; to recover \(\hat m\simeq m\)&lt;/li&gt;&#xA;&lt;li&gt;Approximately a channel decoder&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
			</item>
			<item>
				<title>INFOTH Note 9: Differential Entropy</title>
				<link>/posts/ucb_info_theory_notes/9/</link>
				<pubDate>Thu, 02 Oct 2025 11:45:14 +0800</pubDate>
				<guid>/posts/ucb_info_theory_notes/9/</guid>
				<description>&lt;h1 id=&#34;91-differential-entropy&#34;&gt;9.1 Differential Entropy&lt;/h1&gt;&#xA;&lt;p&gt;For discrete r.v.s, we have the &lt;strong&gt;entropy&lt;/strong&gt;. But for real-valued r.v.s with density functions, we need another form of entropy to process things. That is &lt;strong&gt;differential entropy&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;def-diff-ent&#34;&gt;Def: Diff. Ent.&lt;/h2&gt;&#xA;&lt;p&gt;Let \(X\sim f\) be a real-valued r.v. with density \(f\), meaning&#xA;&lt;/p&gt;&#xA;\[&#xA;\Pr[X\in[a,b]]=\int_a^b f(x)\mathrm d x,\quad \int_{-\infty}^\infty f(x)\mathrm d x=1.&#xA;\]&lt;p&gt;&#xA;We define \((\int_\R:=\int_{-\infty}^\infty)\)&#xA;&lt;/p&gt;&#xA;\[&#xA;h(X)=-\int_{\R} f(x)\log f(x)\mathrm d x&#xA;\]&lt;p&gt;&#xA;In fact, the \(h\) may not exist (the integral is \(\pm \infty\)), in case&#xA;&lt;/p&gt;</description>
			</item>
			<item>
				<title>INFOTH Note 8: BW Transform</title>
				<link>/posts/ucb_info_theory_notes/8/</link>
				<pubDate>Tue, 30 Sep 2025 11:45:14 +0800</pubDate>
				<guid>/posts/ucb_info_theory_notes/8/</guid>
				<description>&lt;h1 id=&#34;81-burrows-wheeler-transform&#34;&gt;8.1 Burrows-Wheeler Transform&lt;/h1&gt;&#xA;&lt;h2 id=&#34;why&#34;&gt;Why&lt;/h2&gt;&#xA;&lt;p&gt;BWT is a &lt;strong&gt;string (symbol sequence)&lt;/strong&gt; transform algorithm for data compression. Via rearranging the symbols and making the same symbols  more concentrated, it can improve the efficiency of subsequent compression algorithms.&lt;/p&gt;&#xA;&lt;h2 id=&#34;transformation-algorithm&#34;&gt;Transformation Algorithm&lt;/h2&gt;&#xA;&lt;p&gt;Consider a sequence of symbols of length \(n\ge 1\) drawn from a finite alphabet \(\mathcal X\) (repetition allowed), call the sequence&#xA;&lt;/p&gt;&#xA;\[&#xA;x_1x_2\dots x_n&#xA;\]&lt;p&gt;&#xA;Do:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Make a \(n\times n\) array of the &lt;strong&gt;cyclic permutations of the sequence&lt;/strong&gt; like:&#xA;&lt;/p&gt;&#xA;\[&#xA;   x_1x_2\dots x_n\\&#xA;   x_2x_3\dots x_{n}x_1\\&#xA;   x_3x_4\dots x_{n}x_1x_2\\&#xA;   \vdots\\&#xA;   x_nx_1\dots x_{n-2}x_{n-1}&#xA;   \]&lt;p&gt;&#xA;Example: &lt;code&gt;SHANNON&lt;/code&gt; original&lt;/p&gt;&#xA;&lt;p&gt;-&amp;gt;&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;SHANNON&#xA;HANNONS&#xA;ANNONSH&#xA;NNONSHA&#xA;NONSHAN&#xA;ONSHANN&#xA;NSHANNO&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Make every row lexicographically sorted (字典序)&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;ANNONSH&#xA;HANNONS&#xA;NNONSHA&#xA;NONSHAN&#xA;NSHANNO&#xA;ONSHANN&#xA;SHANNON&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;As a sender (transformer) we want to send the receiver (de-transformer):&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The last &lt;strong&gt;column&lt;/strong&gt; \(\hat {\bold{x}}\): &lt;code&gt;HSANONN&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;The row index of the original sequence \(i\): &lt;code&gt;7&lt;/code&gt; here starting from 1&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;</description>
			</item>
			<item>
				<title>INFOTH Note 7: Huffman &amp; Arithmetic Coding</title>
				<link>/posts/ucb_info_theory_notes/7/</link>
				<pubDate>Thu, 25 Sep 2025 11:45:14 +0800</pubDate>
				<guid>/posts/ucb_info_theory_notes/7/</guid>
				<description>&lt;h1 id=&#34;71-huffman-coding&#34;&gt;7.1 Huffman Coding&lt;/h1&gt;&#xA;&lt;h2 id=&#34;the-algorithm&#34;&gt;The Algorithm&lt;/h2&gt;&#xA;&lt;p&gt;For a distribution (of appearance) \((p(x),x\in\mathcal X)\),&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Sort the probability vector \(\bold p\) in &lt;strong&gt;decreasing order&lt;/strong&gt;,&lt;/li&gt;&#xA;&lt;li&gt;&amp;ldquo;Merge&amp;rdquo; the two smallest probabilities,&lt;/li&gt;&#xA;&lt;li&gt;Reorder (sort again) and go back to merging.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;How to merge: assume we have 2 &amp;ldquo;symbols&amp;rdquo; now, say \(a,b\)&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Generate a node \(ab\) which has 2 children \(a\) and \(b\)&lt;/li&gt;&#xA;&lt;li&gt;Assign (e.g.) 0 to \(a\) and \(1\) to \(b\) (to the edges)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Finally, we will get a Huffman tree, where each path from the root (all symbols) to a leaf (one symbol) is the codeword for that symbol.&lt;/p&gt;</description>
			</item>
			<item>
				<title>INFOTH Note 6: Kraft&#39;s Inequality, Shannon Code</title>
				<link>/posts/ucb_info_theory_notes/6/</link>
				<pubDate>Tue, 23 Sep 2025 11:45:14 +0800</pubDate>
				<guid>/posts/ucb_info_theory_notes/6/</guid>
				<description>&lt;h1 id=&#34;61-coding-and-compression&#34;&gt;6.1 Coding and Compression&lt;/h1&gt;&#xA;&lt;h2 id=&#34;def-code--encoding&#34;&gt;Def: Code / Encoding&lt;/h2&gt;&#xA;&lt;p&gt;We define a &lt;strong&gt;coding/encoding map&lt;/strong&gt; as follows:&#xA;&lt;/p&gt;&#xA;\[&#xA;c:\mathcal X^n\to\{0,1\}^*-\empty&#xA;\]&lt;p&gt;&#xA;We say this map is &lt;strong&gt;nonsingular&lt;/strong&gt; iff it&amp;rsquo;s &lt;strong&gt;injective&lt;/strong&gt;. (thesaurus)&lt;/p&gt;&#xA;&lt;p&gt;The input is a sequence of source symbols (I call it a &lt;strong&gt;source word&lt;/strong&gt;), and the output (image) is a &lt;strong&gt;codeword&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;If the &amp;lt; means &lt;code&gt;being a subset of&lt;/code&gt;,&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Instantaneous codes &amp;lt; Uniquely decodable codes &amp;lt; Nonsingular codes &amp;lt; All codes&lt;/li&gt;&#xA;&lt;li&gt;Nonsingular: injective (again)&lt;/li&gt;&#xA;&lt;li&gt;Uniquely decodable: Every sequence concatenated by codewords can only be decoded to only 1 source sequence.&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The &amp;ldquo;Kleene Closure&amp;rdquo; of the map is also injective.&lt;/li&gt;&#xA;&lt;li&gt;整个由codeword接成的序列也只能被解码成唯一的source word序列。&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;If \(A\to0,B\to1,C\to01\), we cannot tell the original seq. from 0101 though this coding is nonsingular.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;We can process the coding like a path in a binary tree.&lt;/p&gt;</description>
			</item>
			<item>
				<title>INFOTH Note 5: Fano Ineq., Entropy Rate, AEP</title>
				<link>/posts/ucb_info_theory_notes/5/</link>
				<pubDate>Tue, 16 Sep 2025 11:45:14 +0800</pubDate>
				<guid>/posts/ucb_info_theory_notes/5/</guid>
				<description>&lt;p&gt;Fano&amp;rsquo;s Inequality, Markov Chain, Entropy Rate, Asymptotic Equipartition Property and Lossless Compression.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h1 id=&#34;51-fanos-inequality&#34;&gt;5.1 Fano&amp;rsquo;s Inequality&lt;/h1&gt;&#xA;&lt;p&gt;Fano is for the scenario of estimation.&lt;/p&gt;&#xA;&lt;h2 id=&#34;setup&#34;&gt;Setup&lt;/h2&gt;&#xA;&lt;h3 id=&#34;markov-chain&#34;&gt;Markov Chain&lt;/h3&gt;&#xA;&lt;p&gt;Given variable \(X\in\cal X\) and \(Y\in\cal Y\). The estimator of \(X\) from \(Y\) is \(\hat X=\hat X(Y)\) (we determine that estimator from \(Y\)).&lt;/p&gt;&#xA;&lt;p&gt;Note that \(X\to Y\to \hat X\) constructs a Markov Chain, because&#xA;&lt;/p&gt;&#xA;\[&#xA;P(\hat X=x|Y=y,X=z)=P(\hat X=x|Y=y)&#xA;\]&lt;h3 id=&#34;probability-of-error&#34;&gt;Probability of Error&lt;/h3&gt;&#xA;&lt;p&gt;The error as an event: \(\hat X\ne X\)&lt;/p&gt;&#xA;&lt;p&gt;The probability of error is defined as:&#xA;&lt;/p&gt;</description>
			</item>
			<item>
				<title>INFOTH Note 4: Cond. MI &amp; Cond. KL, Data Processing Ineq.</title>
				<link>/posts/ucb_info_theory_notes/4/</link>
				<pubDate>Thu, 11 Sep 2025 11:45:14 +0800</pubDate>
				<guid>/posts/ucb_info_theory_notes/4/</guid>
				<description>&lt;h1 id=&#34;41-conditional-mutual-information-and-cond-kl-divergence&#34;&gt;4.1 Conditional Mutual Information and Cond. KL Divergence&lt;/h1&gt;&#xA;&lt;h2 id=&#34;def-cond-mi&#34;&gt;Def: Cond. MI&lt;/h2&gt;&#xA;\[&#xA;I(X;Y|Z):=H(X|Z)-H(X|Y,Z)=H(Y|Z)-H(Y|X,Z)&#xA;\]&lt;p&gt;展开式子可以发现，在互信息中定义的 &lt;strong&gt;给定 Z&lt;/strong&gt; 也是 &lt;strong&gt;将 Z 求和的：&lt;/strong&gt;&lt;/p&gt;&#xA;\[&#xA;\begin{aligned}&#xA;I(X;Y|Z)&amp;amp;=H(X|Z)-H(X|Y,Z)&#xA;\\&amp;amp;=\sum_z p(z)\sum_x p(x|z)\log \frac1{p(x|z)}&#xA;\\&amp;amp;&amp;#43;\sum_{z}p(z)\sum_y p(y|z)\sum_x p(x|y,z)\log p(x|y,z)\quad\text{(Def)}&#xA;\\&amp;amp;=\sum_{x,z}p(x,z)\log \frac1{p(x|z)}&amp;#43;&#xA;\sum_{x,y,z}p(x,y,z)\log{p(x|y,z)}&#xA;\\&amp;amp;=\sum_{x,y,z}p(x,y,z)\log \frac1{p(x|z)}&amp;#43;&#xA;\sum_{x,y,z}p(x,y,z)\log{p(x|y,z)}&#xA;\\&amp;amp;=\sum_{x,y,z}p(x,y,z)\log {p(x|y,z)\over p(x|z)}&#xA;\\&amp;amp;=\sum_{x,y,z}p(x,y,z)\log {p(x,y|z)\over p(x|z)p(y|z)}&#xA;\\&amp;amp;=E_{X,Y,Z}\left[\log {p(x,y|z)\over p(x|z)p(y|z)}\right]&#xA;\end{aligned}&#xA;\]&lt;p&gt;We can also write the expectation as&lt;/p&gt;</description>
			</item>
			<item>
				<title>INFOTH Note 3: Relative Ent. (KL), Mutual Info.</title>
				<link>/posts/ucb_info_theory_notes/3/</link>
				<pubDate>Thu, 04 Sep 2025 11:45:14 +0800</pubDate>
				<guid>/posts/ucb_info_theory_notes/3/</guid>
				<description>&lt;p&gt;I now start cancel numbering for sections since I&amp;rsquo;m lazy.&lt;/p&gt;&#xA;&lt;h1 id=&#34;31-log-sum-inequality&#34;&gt;3.1 Log-sum Inequality&lt;/h1&gt;&#xA;&lt;h2 id=&#34;theorem&#34;&gt;Theorem&lt;/h2&gt;&#xA;&lt;p&gt;Suppose \(a_i,b_i&amp;gt;0\) for a countable set \(\mathcal X\), then&#xA;&lt;/p&gt;&#xA;\[&#xA;\sum_{i\in\mathcal X}a_i\log {a_i\over b_i}\ge a\log b,\quad a=\sum_i a_i, \quad b=\sum_i b_i.&#xA;\]&lt;h3 id=&#34;proof&#34;&gt;Proof&lt;/h3&gt;&#xA;&lt;p&gt;Using Jensen&amp;rsquo;s Inequality, given \(u\log u\) is convex and \(\sum_i (b_i/b) = 1\)&#xA;&lt;/p&gt;&#xA;\[&#xA;\begin{aligned}&#xA;\sum_{i\in\cal X}a_i\log {a_i\over b_i}&amp;amp;=b\sum_{i}({b_i\over b}){a_i\over b_i}\log {a_i\over b_i}&#xA;\\&amp;amp;= b\sum_i \lambda_i u_i\log u_i,\qquad\lambda_i:=b_i/b,\quad\sum_i\lambda_i=1,\quad u_i=a_i/b_i,&#xA;\\&amp;amp;\ge b\cdot (\sum_i\lambda_iu_i) \cdot \log \sum_i\lambda_iu_i&#xA;\\&amp;amp;=b\cdot(\sum_i{a_i\over b})\cdot\log \sum_i {a_i\over b}&#xA;\\&amp;amp;=a\log{a\over b}.\qquad\square&#xA;\end{aligned}&#xA;\]&lt;h1 id=&#34;32-relative-entropy-kl-distance&#34;&gt;3.2 Relative Entropy (KL distance)&lt;/h1&gt;&#xA;&lt;h2 id=&#34;def-relative-entropy-相对熵--kl散度&#34;&gt;Def: Relative Entropy 相对熵 = KL散度&lt;/h2&gt;&#xA;&lt;p&gt;The relative entropy i.e. &lt;strong&gt;Kullback-Leibler (KL) Distance&lt;/strong&gt; between 2 probability mass functions \(p(x)\) and \(q(x)\) is defined as&#xA;&lt;/p&gt;</description>
			</item>
			<item>
				<title>INFOTH Note 2: Joint &amp; Conditional Entropy, Chain Rule</title>
				<link>/posts/ucb_info_theory_notes/2/</link>
				<pubDate>Tue, 02 Sep 2025 23:39:54 +0800</pubDate>
				<guid>/posts/ucb_info_theory_notes/2/</guid>
				<description>&lt;h1 id=&#34;21-entropy&#34;&gt;2.1 Entropy&lt;/h1&gt;&#xA;&lt;h2 id=&#34;def-211-entropy&#34;&gt;Def 2.1.1 Entropy&lt;/h2&gt;&#xA;&lt;p&gt;We define, for a discrete r.v. \(X\) on a domain \(\mathcal X\) with finitely many or countably infinitely many elements (such as a finite set or \(\Z\)), a distribution \(p\in\Delta_{\cal X}\):&#xA;&lt;/p&gt;&#xA;\[&#xA;H(X)=-\sum_{x\in\mathcal X}p(x)\log p(x)\equiv E_{X\sim p} \log {1\over p(X)}&#xA;\]&lt;ul&gt;&#xA;&lt;li&gt;\(E_p\) 在这里指的是 \(X\) under \(p\) distribution的时候，\(X\) 对某个函数的期望。This specifies an &lt;strong&gt;equivalent definition by expectation&lt;/strong&gt; of entropy.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;properties&#34;&gt;Properties&lt;/h3&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;\(H(X)\ge 0\)&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Replacing the base 替换底数&lt;/strong&gt;：Let \(H_a(X)\) be the entropy defined in the base of the log changed into \(a\) instead of 2.&lt;/p&gt;&#xA;&lt;p&gt;\(H_b(X)=(\log_b a)H_a(X)\)&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;So \(H_a(X)=(\log_2a )H(X)\).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;</description>
			</item>
			<item>
				<title>INFOTH Note 1: Axioms &amp; Def of Entropy</title>
				<link>/posts/ucb_info_theory_notes/1/</link>
				<pubDate>Thu, 28 Aug 2025 23:39:41 +0800</pubDate>
				<guid>/posts/ucb_info_theory_notes/1/</guid>
				<description>&lt;h1 id=&#34;11-definition-of-the-shannon-entropy&#34;&gt;1.1 Definition of the Shannon Entropy&lt;/h1&gt;&#xA;&lt;p&gt;To (re)invent the &lt;strong&gt;entropy&lt;/strong&gt;, we need to let this quantity follow some axioms. Let the entropy be \(H(\cdot)\).&lt;/p&gt;&#xA;&lt;p&gt;\(H\) can also wrap distribution like \(p_1,...,p_n\), or just be fed with a distribution tuple \(p\), or a random variable \(X\).&lt;/p&gt;&#xA;&lt;h2 id=&#34;def-111-shannon-entropy&#34;&gt;Def 1.1.1 Shannon Entropy&lt;/h2&gt;&#xA;&lt;p&gt;Consider a discrete probability distribution \(p=(p_1,\dots,p_n)\) on the set \(\mathcal X=\{1,\dots,n\}\).&lt;/p&gt;&#xA;&lt;p&gt;The &lt;strong&gt;Shannon Entropy&lt;/strong&gt; of \(p\) is defined by&#xA;&lt;/p&gt;&#xA;\[&#xA;H(p)=-\sum_{x\in\cal X}p_x\log p_x.&#xA;\]&lt;ul&gt;&#xA;&lt;li&gt;\(\log:=\log_2\), as this is Shannon&amp;rsquo;s convention (and also will be ours)&lt;/li&gt;&#xA;&lt;li&gt;We have defined the entropy only on a finite set.&lt;/li&gt;&#xA;&lt;li&gt;We also allow \(H\) to wrap a tuple like this: \(H(p)=H(p_1,\dots,p_n)\).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;def-112-entropy-of-a-random-variable&#34;&gt;Def 1.1.2 Entropy of a Random Variable&lt;/h2&gt;&#xA;&lt;p&gt;Given a discrete r.v. \(X\) over a finitely many set \(\cal X\), we write the &lt;strong&gt;entropy&lt;/strong&gt; as&#xA;&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
