From 31a3e956ab7f2d63cda88152d88edf574656c856 Mon Sep 17 00:00:00 2001 From: eneller Date: Tue, 25 Nov 2025 13:14:17 +0100 Subject: [PATCH] begin compression --- .latexmkrc | 5 ++++ compression.bib | 7 ++++++ compression.tex | 61 ++++++++++++++++++++++++++++++++++++++++++++++++- entropy.tex | 3 +-- 4 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 .latexmkrc create mode 100644 compression.bib diff --git a/.latexmkrc b/.latexmkrc new file mode 100644 index 0000000..aa44c8a --- /dev/null +++ b/.latexmkrc @@ -0,0 +1,5 @@ +$latex = 'latex %O --shell-escape %S'; +$pdflatex = 'pdflatex %O --shell-escape %S'; +$pdf_mode = 1; +$clean_ext = "lol nav snm"; +$bibtex_use = 2; diff --git a/compression.bib b/compression.bib new file mode 100644 index 0000000..083ed9a --- /dev/null +++ b/compression.bib @@ -0,0 +1,7 @@ + @misc{ enwiki:shannon-source-coding, + author = "{Wikipedia contributors}", + title = "Shannon's source coding theorem --- {Wikipedia}{,} The Free Encyclopedia", + year = "2025", + url = "https://en.wikipedia.org/w/index.php?title=Shannon%27s_source_coding_theorem&oldid=1301398440", + note = "[Online; accessed 25-November-2025]" + } diff --git a/compression.tex b/compression.tex index 9526430..e274e64 100644 --- a/compression.tex +++ b/compression.tex @@ -1,2 +1,61 @@ +\documentclass{article} +\usepackage[utf8x]{inputenc} +\usepackage[margin=1in]{geometry} % Adjust margins +\usepackage{caption} +\usepackage{wrapfig} +\usepackage{subcaption} +\usepackage{parskip} % dont indent after paragraphs, figures +\usepackage{xcolor} +%\usepackage{csquotes} % Recommended for biblatex +\usepackage{tikz} +\usepackage{pgfplots} +\usetikzlibrary{positioning} +%\usegdlibrary{trees} +\usepackage{float} +\usepackage{amsmath} +\PassOptionsToPackage{hyphens}{url} +\usepackage{hyperref} % allows urls to follow line breaks of text +\usepackage[style=ieee, backend=biber, maxnames=1, minnames=1]{biblatex} +\addbibresource{compression.bib} -Compression codes (theorems: Kraft, Shannon-Fano, Huffman, arithmetic and LZW code) + + + +\title{Compression} +\author{Erik Neller} +\date{\today} + +\begin{document} +\maketitle +\section{Introduction} +As the volume of data grows exponentially around the world, compression is only gaining in importance to all disciplines. +Not only does it enable the storage of large amounts of information needed for research in scientific domains +like DNA sequencing and analysis, it also plays a vital role in keeping stored data accessible by +facilitating cataloging, search and retrieval. +The concept of entropy is closely related to the design of efficient codes. + +\begin{equation} + H = E(I) = - \sum_i p_i \log_2(p_i) + \label{eq:entropy-information} +\end{equation} +The understanding of entropy as the expected information $E(I)$ of a message provides an intuition that, +given a source with a given entropy (in bits), any coding can not have a lower average word length (in bits) +than this entropy without losing information. +This is the content of Shannons's source coding theorem \cite{enwiki:shannon-source-coding}. + + +% https://en.wikipedia.org/wiki/Shannon%27s_source_coding_theorem +\section{Kraft-McMillan inequality} +% https://de.wikipedia.org/wiki/Kraft-Ungleichung +% https://en.wikipedia.org/wiki/Kraft%E2%80%93McMillan_inequality +\section{Shannon-Fano} +% https://de.wikipedia.org/wiki/Shannon-Fano-Kodierung +\section{Huffman Coding} +% https://de.wikipedia.org/wiki/Huffman-Kodierung +\section{LZW Algorithm} +% https://de.wikipedia.org/wiki/Lempel-Ziv-Welch-Algorithmus +\section{Arithmetic Coding} +% https://en.wikipedia.org/wiki/Arithmetic_coding + +\printbibliography +\end{document} \ No newline at end of file diff --git a/entropy.tex b/entropy.tex index b1b7d67..ae780cf 100644 --- a/entropy.tex +++ b/entropy.tex @@ -26,7 +26,7 @@ \begin{document} \maketitle -\section{What is entropy?} +\section{Introduction} Across disciplines, entropy is a measure of uncertainty or randomness. Originating in classical thermodynamics, over time it has been applied in different sciences such as chemistry and information theory. @@ -355,7 +355,6 @@ Shannon’s theorem is not constructive as it does not provide an explicit metho but it guarantees their existence. In practice, structured codes such as Hamming and Reed–Solomon codes are employed to approach channel capacity. -\section{Conclusion} \section{Conclusion} Entropy provides a fundamental measure of uncertainty and information, bridging concepts from thermodynamics to modern communication theory.