Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Coding theory
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Definition=== Data can be seen as a [[random variable]] <math>X:\Omega\to\mathcal{X}</math>, where <math>x \in \mathcal{X}</math> appears with probability <math>\mathbb{P}[X=x]</math>. Data are encoded by strings (words) over an [[Alphabet (computer science)|alphabet]] <math>\Sigma</math>. A code is a function :<math>C:\mathcal{X}\to\Sigma^*</math> (or <math>\Sigma^+</math> if the empty string is not part of the alphabet). <math>C(x)</math> is the code word associated with <math>x</math>. Length of the code word is written as :<math>l(C(x)).</math> Expected length of a code is :<math>l(C) = \sum_{x\in\mathcal{X}}l(C(x))\mathbb{P}[X=x] .</math> The concatenation of code words <math>C(x_1, \ldots, x_k) = C(x_1)C(x_2) \cdots C(x_k)</math>. The code word of the empty string is the empty string itself: :<math>C(\epsilon) = \epsilon</math>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)