{"slug":"entropy-la-gi-do-bat-dinh-tin-hoc-mat-ma-nhiet-dong-hoc-shannon","title":"Entropy Là Gì — Từ Nhiệt Động Học Đến Tin Học & Mật Mã","summary":"Entropy là gì? Từ Boltzmann (nhiệt động học), Shannon (lý thuyết thông tin), đến mật mã (CSPRNG entropy pool) và machine learning (cross-entropy). Công thức, code Python, ứng dụng thực tế.","excerpt":"Entropy là gì? Từ Boltzmann (nhiệt động học), Shannon (lý thuyết thông tin), đến mật mã (CSPRNG entropy pool) và machine learning (cross-entropy). Công thức, code Python, ứng dụng thực tế.","markdown":"# Entropy — Đo Lường Sự Bất Định\n## 1. Entropy Trong Vật Lý: Nhiệt Động Học\nThuật ngữ 'entropy' (Ἐντροπία) được Rudolf Clausius đặt năm 1865, từ tiếng Hy Lạp ἐν (en = trong) + τροπή (tropē = biến đổi). Trong nhiệt động học:\n\n**Entropy (S) = Đo lường mức độ hỗn loạn (disorder) của hệ thống**\n\nĐịnh luật Nhiệt động II: Entropy của hệ cô lập luôn tăng theo thời gian. Đá tan trong nước ấm — entropy tăng. Không bao giờ tự đóng băng lại — entropy không tự giảm.\n\nCông thức Boltzmann (khắc trên bia mộ ông):\n\nS = k_B × ln(Ω)\n\nTrong đó:\nS   = Entropy\nk_B = Hằng số Boltzmann (1.380649 × 10⁻²³ J/K)\nΩ   = Số vi trạng thái (microstates) khả dĩ\nln  = Logarithm tự nhiên\n## 2. Entropy Trong Tin Học: Shannon Entropy\nClaude Shannon (1948) 'A Mathematical Theory of Communication' — Shannon mượn thuật ngữ entropy từ vật lý để đo lường lượng thông tin (information content) trong một thông điệp.\n\n**Shannon Entropy: **H(X) = −Σ p(x) × log₂ p(x)\n\nĐơn vị: bit (khi dùng log₂) hoặc nat (khi dùng ln).\n\n### Ví dụ tính toán:\nimport math\n\ndef shannon_entropy(probabilities):\n\"\"\"Tính Shannon entropy (bits)\"\"\"\nreturn -sum(p * math.log2(p) for p in probabilities if p > 0)\n\n# Đồng xu công bằng: H = 1 bit\nfair_coin = [0.5, 0.5]\nprint(f\"Đồng xu công bằng: {shannon_entropy(fair_coin):.2f} bits\")  # 1.00\n\n# Đồng xu gian lận (90% head): H < 1 bit\nbiased = [0.9, 0.1]\nprint(f\"Đồng xu gian lận:  {shannon_entropy(biased):.2f} bits\")  # 0.47\n\n# Xúc xắc 6 mặt: H = log₂(6) ≈ 2.585 bits\ndice = [1/6] * 6\nprint(f\"Xúc xắc 6 mặt:    {shannon_entropy(dice):.2f} bits\")  # 2.58\n\n# 1 byte ngẫu nhiên: H = 8 bits (maximum)\nuniform_byte = [1/256] * 256\nprint(f\"Byte ngẫu nhiên:   {shannon_entropy(uniform_byte):.2f} bits\")  # 8.00\n### Ý nghĩa trực quan:\nH = 0 bit: Hoàn toàn xác định — biết chắc kết quả (không có thông tin mới)\nH = 1 bit: Tương đương 1 câu hỏi có/không — đồng xu công bằng\nH = 8 bit: 1 byte ngẫu nhiên hoàn toàn — cần 8 câu hỏi yes/no để xác định\nH = 128 bit: UUID v4 — 2¹²² khả năng (6 bit dành cho version/variant)\nH = 256 bit: Private key Bitcoin/Ethereum — vũ trụ sẽ chết nhiệt trước khi brute-force xong\n## 3. Entropy Trong Mật Mã (Cryptographic Entropy)\nTrong mật mã, entropy là thước đo sức mạnh của randomness. CSPRNG cần thu thập đủ entropy từ các nguồn vật lý trước khi sinh số:\n\n### 3.1. Nguồn Entropy trong OS\n/dev/random (Linux): Block nếu entropy pool cạn — an toàn nhất (Linux < 5.6)\n/dev/urandom (Linux): Không block — dùng CSPRNG khi pool cạn — khuyến nghị cho hầu hết trường hợp\ngetrandom() syscall (Linux 3.17+): Block chỉ khi boot chưa đủ entropy — best practice hiện đại\nCryptGenRandom (Windows): Thu thập từ nhiều nguồn hardware\ngetentropy() (macOS/OpenBSD): Tương tự getrandom()\n### 3.2. Nguồn Entropy Vật Lý\nHardware RNG: Intel RDRAND/RDSEED — đọc thermal noise từ transistor\nMouse/keyboard timing: Thời điểm chính xác (microsecond) khi user di chuột, gõ phím\nDisk I/O timing: Jitter từ seek time, rotational latency\nNetwork packet timing: Jitter từ mạng\nQuantum RNG: Đo photon polarization — entropy thật sự ngẫu nhiên (theo cơ học lượng tử)\nLinux kernel entropy pool:\n\n# Kiểm tra entropy hiện tại trong Linux\ncat /proc/sys/kernel/random/entropy_avail\n# Output: 256 (bits available — nếu > 256 thì getrandom() không block)\n\n# Xem thông tin chi tiết\ncat /proc/sys/kernel/random/poolsize\n# Output: 256 (bits — từ Linux 5.18, fixed at 256)\n\n# Thêm entropy từ hardware RNG\nrngd -r /dev/hwrng  # rng-tools daemon\n## 4. Entropy Trong Password\nEntropy đo sức mạnh mật khẩu: số bits cần thiết để brute-force.\n\ndef password_entropy(length, charset_size):\n\"\"\"Tính entropy của mật khẩu\"\"\"\nimport math\nreturn length * math.log2(charset_size)\n\n# Ví dụ:\nprint(f\"8 chữ thường:     {password_entropy(8, 26):.1f} bits\")   # 37.6\nprint(f\"8 chữ hoa+thường:  {password_entropy(8, 52):.1f} bits\")   # 45.6\nprint(f\"8 mixed+digits:    {password_entropy(8, 62):.1f} bits\")   # 47.6\nprint(f\"8 tất cả ký tự:    {password_entropy(8, 95):.1f} bits\")   # 52.6\nprint(f\"12 mixed+digits:   {password_entropy(12, 62):.1f} bits\")  # 71.5\nprint(f\"4 từ tiếng Anh:    {password_entropy(4, 7776):.1f} bits\") # 51.7 (diceware)\nprint(f\"6 từ tiếng Anh:    {password_entropy(6, 7776):.1f} bits\") # 77.5 (diceware)\n\n# Khuyến nghị: >= 80 bits cho người dùng, >= 128 bits cho system key\n## 5. Entropy Trong Lý Thuyết Thông Tin\nShannon entropy có các ứng dụng quan trọng:\n\nNén dữ liệu (Data Compression): Entropy = giới hạn dưới của nén. Không thể nén file nhỏ hơn entropy của nó. ZIP, GZIP, Brotli đều tiệm cận giới hạn Shannon\nMã hóa tối ưu (Huffman/Arithmetic Coding): Mã hóa ký tự thường gặp bằng ít bits hơn\nCross-Entropy Loss (Machine Learning): Hàm loss phổ biến nhất cho classification — đo khoảng cách giữa predicted distribution và true distribution\nKL Divergence: D_KL(P||Q) = Σ P(x) × log(P(x)/Q(x)) — đo sự khác biệt giữa 2 phân phối\n## 6. Tổng Kết: 4 Ý Nghĩa Của Entropy\nVật lý: Đo mức hỗn loạn — luôn tăng trong hệ cô lập (Nhiệt động II)\nTin học (Shannon): Đo lượng thông tin — bits cần thiết để mã hóa thông điệp\nMật mã: Đo sức mạnh ngẫu nhiên — bits entropy trong key/password/seed\nMachine Learning: Cross-entropy — đo chất lượng dự đoán của model","html":"<h1>Entropy — Đo Lường Sự Bất Định</h1><h2>1. Entropy Trong Vật Lý: Nhiệt Động Học</h2><p>Thuật ngữ 'entropy' (Ἐντροπία) được Rudolf Clausius đặt năm 1865, từ tiếng Hy Lạp ἐν <span class=\"math-inline\" data-formula=\"en = trong\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\" style=\"height:0.4306em;\"></span><span class=\"mord mathnormal\">e</span><span class=\"mord mathnormal\">n</span><span class=\"mspace\" style=\"margin-right:0.2778em;\"></span><span class=\"mrel\">=</span><span class=\"mspace\" style=\"margin-right:0.2778em;\"></span></span><span class=\"base\"><span class=\"strut\" style=\"height:0.8095em;vertical-align:-0.1944em;\"></span><span class=\"mord mathnormal\">t</span><span class=\"mord mathnormal\">ro</span><span class=\"mord mathnormal\">n</span><span class=\"mord mathnormal\" style=\"margin-right:0.03588em;\">g</span></span></span></span></span> + τροπή <span class=\"math-inline\" data-formula=\"tropē = biến đổi\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\" style=\"height:0.8095em;vertical-align:-0.1944em;\"></span><span class=\"mord mathnormal\">t</span><span class=\"mord mathnormal\">ro</span><span class=\"mord mathnormal\">p</span><span class=\"mord accent\"><span class=\"vlist-t\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height:0.5678em;\"><span style=\"top:-3em;\"><span class=\"pstrut\" style=\"height:3em;\"></span><span class=\"mord mathnormal\">e</span></span><span style=\"top:-3em;\"><span class=\"pstrut\" style=\"height:3em;\"></span><span class=\"accent-body\" style=\"left:-0.1944em;\"><span class=\"mord\">ˉ</span></span></span></span></span></span></span><span class=\"mspace\" style=\"margin-right:0.2778em;\"></span><span class=\"mrel\">=</span><span class=\"mspace\" style=\"margin-right:0.2778em;\"></span></span><span class=\"base\"><span class=\"strut\" style=\"height:0.9579em;\"></span><span class=\"mord mathnormal\">bi</span><span class=\"mord accent\"><span class=\"vlist-t\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height:0.9579em;\"><span style=\"top:-3em;\"><span class=\"pstrut\" style=\"height:3em;\"></span><span class=\"mord accent\"><span class=\"vlist-t\"><span class=\"vlist-r\"><span class=\"vlist\" style=\"height:0.6944em;\"><span style=\"top:-3em;\"><span class=\"pstrut\" style=\"height:3em;\"></span><span class=\"mord mathnormal\">e</span></span><span style=\"top:-3em;\"><span class=\"pstrut\" style=\"height:3em;\"></span><span class=\"accent-body\" style=\"left:-0.1944em;\"><span class=\"mord\">^</span></span></span></span></span></span></span></span><span style=\"top:-3.2634em;\"><span class=\"pstrut\" style=\"height:3em;\"></span><span class=\"accent-body\" style=\"left:-0.25em;\"><span class=\"mord\">ˊ</span></span></span></span></span></span></span><span class=\"mord mathnormal\">n</span><span class=\"mord latin_fallback\">đ</span><span class=\"mord\">ổ</span><span class=\"mord mathnormal\">i</span></span></span></span></span>. Trong nhiệt động học:</p><p><strong>Entropy <span class=\"math-inline\" data-formula=\"S\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\" style=\"height:0.6833em;\"></span><span class=\"mord mathnormal\" style=\"margin-right:0.05764em;\">S</span></span></span></span></span> = Đo lường mức độ hỗn loạn <span class=\"math-inline\" data-formula=\"disorder\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\" style=\"height:0.6944em;\"></span><span class=\"mord mathnormal\">d</span><span class=\"mord mathnormal\">i</span><span class=\"mord mathnormal\" style=\"margin-right:0.02778em;\">sor</span><span class=\"mord mathnormal\">d</span><span class=\"mord mathnormal\" style=\"margin-right:0.02778em;\">er</span></span></span></span></span> của hệ thống</strong></p><p>Định luật Nhiệt động II: Entropy của hệ cô lập luôn tăng theo thời gian. Đá tan trong nước ấm — entropy tăng. Không bao giờ tự đóng băng lại — entropy không tự giảm.</p><p>Công thức Boltzmann (khắc trên bia mộ ông):</p><pre><code class=\"language-plaintext\">S = k_B × ln(Ω)</code></pre><pre><code class=\"language-plaintext\">Trong đó:</code></pre><pre><code class=\"language-plaintext\">  S   = Entropy</code></pre><pre><code class=\"language-plaintext\">  k_B = Hằng số Boltzmann (1.380649 × 10⁻²³ J/K)</code></pre><pre><code class=\"language-plaintext\">  Ω   = Số vi trạng thái microstates khả dĩ</code></pre><pre><code class=\"language-plaintext\">  ln  = Logarithm tự nhiên</code></pre><h2>2. Entropy Trong Tin Học: Shannon Entropy</h2><p>Claude Shannon (1948) 'A Mathematical Theory of Communication' — Shannon mượn thuật ngữ entropy từ vật lý để đo lường lượng thông tin (information content) trong một thông điệp.</p><p><strong>Shannon Entropy: </strong>H<span class=\"math-inline\" data-formula=\"X\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\" style=\"height:0.6833em;\"></span><span class=\"mord mathnormal\" style=\"margin-right:0.07847em;\">X</span></span></span></span></span> = −Σ p<span class=\"math-inline\" data-formula=\"x\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\" style=\"height:0.4306em;\"></span><span class=\"mord mathnormal\">x</span></span></span></span></span> × log₂ p<span class=\"math-inline\" data-formula=\"x\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\" style=\"height:0.4306em;\"></span><span class=\"mord mathnormal\">x</span></span></span></span></span></p><p>Đơn vị: bit (khi dùng log₂) hoặc nat (khi dùng ln).</p><h3>Ví dụ tính toán:</h3><pre><code class=\"language-python\">import math</code></pre><pre><code class=\"language-python\">def shannon_entropyprobabilities:</code></pre><pre><code class=\"language-python\">    \"\"\"Tính Shannon entropy bits\"\"\"</code></pre><pre><code class=\"language-python\">    return -sum(p * math.log2(p) for p in probabilities if p &gt; 0)</code></pre><pre><code class=\"language-python\"># Đồng xu công bằng: H = 1 bit</code></pre><pre><code class=\"language-python\">fair_coin = [0.5, 0.5]</code></pre><pre><code class=\"language-python\">printf&amp;quot;Đồng xu công bằng: {shannon_entropy(fair_coin):.2f} bits&amp;quot;  # 1.00</code></pre><pre><code class=\"language-python\"># Đồng xu gian lận (90% head): H &lt; 1 bit</code></pre><pre><code class=\"language-python\">biased = [0.9, 0.1]</code></pre><pre><code class=\"language-python\">printf&amp;quot;Đồng xu gian lận:  {shannon_entropy(biased):.2f} bits&amp;quot;  # 0.47</code></pre><pre><code class=\"language-python\"># Xúc xắc 6 mặt: H = log₂(6) ≈ 2.585 bits</code></pre><pre><code class=\"language-python\">dice = [1/6] * 6</code></pre><pre><code class=\"language-python\">printf&amp;quot;Xúc xắc 6 mặt:    {shannon_entropy(dice):.2f} bits&amp;quot;  # 2.58</code></pre><pre><code class=\"language-python\"># 1 byte ngẫu nhiên: H = 8 bits maximum</code></pre><pre><code class=\"language-python\">uniform_byte = [1/256] * 256</code></pre><pre><code class=\"language-python\">printf&amp;quot;Byte ngẫu nhiên:   {shannon_entropy(uniform_byte):.2f} bits&amp;quot;  # 8.00</code></pre><h3>Ý nghĩa trực quan:</h3><ul><li>H = 0 bit: Hoàn toàn xác định — biết chắc kết quả (không có thông tin mới)</li><li>H = 1 bit: Tương đương 1 câu hỏi có/không — đồng xu công bằng</li><li>H = 8 bit: 1 byte ngẫu nhiên hoàn toàn — cần 8 câu hỏi yes/no để xác định</li><li>H = 128 bit: UUID v4 — 2¹²² khả năng (6 bit dành cho version/variant)</li><li>H = 256 bit: Private key Bitcoin/Ethereum — vũ trụ sẽ chết nhiệt trước khi brute-force xong</li><h2>3. Entropy Trong Mật Mã (Cryptographic Entropy)</h2></ul><p>Trong mật mã, entropy là thước đo sức mạnh của randomness. CSPRNG cần thu thập đủ entropy từ các nguồn vật lý trước khi sinh số:</p><h3>3.1. Nguồn Entropy trong OS</h3><ul><li>/dev/random <span class=\"math-inline\" data-formula=\"Linux\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\" style=\"height:0.6833em;\"></span><span class=\"mord mathnormal\">L</span><span class=\"mord mathnormal\">in</span><span class=\"mord mathnormal\">ux</span></span></span></span></span>: Block nếu entropy pool cạn — an toàn nhất (Linux &lt; 5.6)</li><li>/dev/urandom <span class=\"math-inline\" data-formula=\"Linux\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\" style=\"height:0.6833em;\"></span><span class=\"mord mathnormal\">L</span><span class=\"mord mathnormal\">in</span><span class=\"mord mathnormal\">ux</span></span></span></span></span>: Không block — dùng CSPRNG khi pool cạn — khuyến nghị cho hầu hết trường hợp</li><li>getrandom() syscall (Linux 3.17+): Block chỉ khi boot chưa đủ entropy — best practice hiện đại</li><li>CryptGenRandom <span class=\"math-inline\" data-formula=\"Windows\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\" style=\"height:0.6944em;\"></span><span class=\"mord mathnormal\">Win</span><span class=\"mord mathnormal\">d</span><span class=\"mord mathnormal\">o</span><span class=\"mord mathnormal\" style=\"margin-right:0.02691em;\">w</span><span class=\"mord mathnormal\">s</span></span></span></span></span>: Thu thập từ nhiều nguồn hardware</li><li>getentropy() (macOS/OpenBSD): Tương tự getrandom()</li><h3>3.2. Nguồn Entropy Vật Lý</h3></ul><ul><li>Hardware RNG: Intel RDRAND/RDSEED — đọc thermal noise từ transistor</li><li>Mouse/keyboard timing: Thời điểm chính xác <span class=\"math-inline\" data-formula=\"microsecond\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\" style=\"height:0.6944em;\"></span><span class=\"mord mathnormal\">mi</span><span class=\"mord mathnormal\">croseco</span><span class=\"mord mathnormal\">n</span><span class=\"mord mathnormal\">d</span></span></span></span></span> khi user di chuột, gõ phím</li><li>Disk I/O timing: Jitter từ seek time, rotational latency</li><li>Network packet timing: Jitter từ mạng</li><li>Quantum RNG: Đo photon polarization — entropy thật sự ngẫu nhiên (theo cơ học lượng tử)</li><p>Linux kernel entropy pool:</p></ul><pre><code class=\"language-bash\"># Kiểm tra entropy hiện tại trong Linux</code></pre><pre><code class=\"language-bash\">cat /proc/sys/kernel/random/entropy_avail</code></pre><pre><code class=\"language-bash\"># Output: 256 (bits available — nếu &gt; 256 thì getrandom() không block)</code></pre><pre><code class=\"language-bash\"># Xem thông tin chi tiết</code></pre><pre><code class=\"language-bash\">cat /proc/sys/kernel/random/poolsize</code></pre><pre><code class=\"language-bash\"># Output: 256 (bits — từ Linux 5.18, fixed at 256)</code></pre><pre><code class=\"language-bash\"># Thêm entropy từ hardware RNG</code></pre><pre><code class=\"language-bash\">rngd -r /dev/hwrng  # rng-tools daemon</code></pre><h2>4. Entropy Trong Password</h2><p>Entropy đo sức mạnh mật khẩu: số bits cần thiết để brute-force.</p><pre><code class=\"language-python\">def password_entropylength,charsets​ize:</code></pre><pre><code class=\"language-python\">    \"\"\"Tính entropy của mật khẩu\"\"\"</code></pre><pre><code class=\"language-python\">    import math</code></pre><pre><code class=\"language-python\">    return length * math.log2charsets​ize</code></pre><pre><code class=\"language-python\"># Ví dụ:</code></pre><pre><code class=\"language-python\">printf&amp;quot;8 chữ thường:     {password_entropy(8, 26):.1f} bits&amp;quot;   # 37.6</code></pre><pre><code class=\"language-python\">printf&amp;quot;8 chữ hoa+thường:  {password_entropy(8, 52):.1f} bits&amp;quot;   # 45.6</code></pre><pre><code class=\"language-python\">printf&amp;quot;8 mixed+digits:    {password_entropy(8, 62):.1f} bits&amp;quot;   # 47.6</code></pre><pre><code class=\"language-python\">printf&amp;quot;8 tất cả ký tự:    {password_entropy(8, 95):.1f} bits&amp;quot;   # 52.6</code></pre><pre><code class=\"language-python\">printf&amp;quot;12 mixed+digits:   {password_entropy(12, 62):.1f} bits&amp;quot;  # 71.5</code></pre><pre><code class=\"language-python\">printf&amp;quot;4 từ tiếng Anh:    {password_entropy(4, 7776):.1f} bits&amp;quot; # 51.7 diceware</code></pre><pre><code class=\"language-python\">printf&amp;quot;6 từ tiếng Anh:    {password_entropy(6, 7776):.1f} bits&amp;quot; # 77.5 diceware</code></pre><pre><code class=\"language-python\"># Khuyến nghị: &gt;= 80 bits cho người dùng, &gt;= 128 bits cho system key</code></pre><h2>5. Entropy Trong Lý Thuyết Thông Tin</h2><p>Shannon entropy có các ứng dụng quan trọng:</p><ul><li>Nén dữ liệu (Data Compression): Entropy = giới hạn dưới của nén. Không thể nén file nhỏ hơn entropy của nó. ZIP, GZIP, Brotli đều tiệm cận giới hạn Shannon</li><li>Mã hóa tối ưu (Huffman/Arithmetic Coding): Mã hóa ký tự thường gặp bằng ít bits hơn</li><li>Cross-Entropy Loss (Machine Learning): Hàm loss phổ biến nhất cho classification — đo khoảng cách giữa predicted distribution và true distribution</li><li>KL Divergence: D_KL(P||Q) = Σ P<span class=\"math-inline\" data-formula=\"x\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\" style=\"height:0.4306em;\"></span><span class=\"mord mathnormal\">x</span></span></span></span></span> × log(P(x)/Q(x)) — đo sự khác biệt giữa 2 phân phối</li><h2>6. Tổng Kết: 4 Ý Nghĩa Của Entropy</h2></ul><ol><li>Vật lý: Đo mức hỗn loạn — luôn tăng trong hệ cô lập (Nhiệt động II)</li><li>Tin học <span class=\"math-inline\" data-formula=\"Shannon\"><span class=\"katex\"><span class=\"katex-html\" aria-hidden=\"true\"><span class=\"base\"><span class=\"strut\" style=\"height:0.6944em;\"></span><span class=\"mord mathnormal\" style=\"margin-right:0.05764em;\">S</span><span class=\"mord mathnormal\">hann</span><span class=\"mord mathnormal\">o</span><span class=\"mord mathnormal\">n</span></span></span></span></span>: Đo lượng thông tin — bits cần thiết để mã hóa thông điệp</li><li>Mật mã: Đo sức mạnh ngẫu nhiên — bits entropy trong key/password/seed</li><li>Machine Learning: Cross-entropy — đo chất lượng dự đoán của model</li></ol>","tags":["Giáo dục","Khoa học","Lập trình","Thuật toán"],"author":"Quản trị viên","publishedAt":"2026-04-04T07:48:11.002Z","updatedAt":"2026-10-13T20:43:57.647Z","published_at":"2026-04-04T07:48:11.002Z","updated_at":"2026-10-13T20:43:57.647Z","view_count":344,"canonical":"https://wiki.quizzman.com/wiki/entropy-la-gi-do-bat-dinh-tin-hoc-mat-ma-nhiet-dong-hoc-shannon","url":"https://wiki.quizzman.com/wiki/entropy-la-gi-do-bat-dinh-tin-hoc-mat-ma-nhiet-dong-hoc-shannon","markdownUrl":"https://wiki.quizzman.com/api/articles/entropy-la-gi-do-bat-dinh-tin-hoc-mat-ma-nhiet-dong-hoc-shannon.md","apiUrl":"https://wiki.quizzman.com/api/articles/entropy-la-gi-do-bat-dinh-tin-hoc-mat-ma-nhiet-dong-hoc-shannon"}