smithery/parcadei

source-coding

Problem-solving strategies for source coding in information theory

Installation

$ npx skills add smithery/parcadei --skill source-coding

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/parcadei · top by installs.

npx skills add smithery/parcadei

Browse all from smithery/parcadei

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsBash, Read
Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,135 B
  • docs SUMMARY.md 87 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

Source Coding

When to Use

Use this skill when working on source-coding problems in information theory.

Decision Tree

  1. Source Coding Theorem

- Minimum average code length >= H(X) - Achievable with optimal codes - z3solve.py prove "shannonbound"

  1. Huffman Coding

- Optimal prefix-free code for known distribution - Build tree: combine two least probable symbols - Average length: H(X) <= L < H(X) + 1 - sympycompute.py simplify "expectedcode_length"

  1. Kraft Inequality

- For prefix-free code: sum 2^{-li} <= 1 - Necessary and sufficient - z3solve.py prove "kraft_inequality"

  1. Arithmetic Coding

- Approaches entropy for any distribution - Encodes entire message as interval [0,1) - Practical for adaptive/unknown distributions

  1. Rate-Distortion Theory

- Lossy compression: trade rate for distortion - R(D) = min{p(xhat|x): E[d(X,Xhat)]<=D} I(X;Xhat) - Minimum rate to achieve distortion D - sympycompute.py minimize "I(X;Xhat)" --constraint "E[d] <= D"

Tool Commands

Scipy_Huffman

uv run python -c "print('Huffman codes for a=0.5, b=0.25, c=0.125, d=0.125: a=0, b=10, c=110, d=111')"

Sympy_Kraft

uv run python -m runtime.harness scripts/sympy_compute.py simplify "2**(-l1) + 2**(-l2) + 2**(-l3) + 2**(-l4)"

Z3ShannonBound

uv run python -m runtime.harness scripts/z3_solve.py prove "expected_length >= entropy"

Key Techniques

From indexed textbooks:

  • [Elements of Information Theory] Elements of Information Theory -- Thomas M Cover &amp; Joy A Thomas -- 2_, Auflage, New York, NY, 2012 -- Wiley-Interscience -- 9780470303153 -- 2fcfe3e8a16b3aeefeaf9429fcf9a513 -- Anna’s Archive. The Shannon–Fano–Elias coding procedure can also be applied to sequences of random variables. The key idea is to use the cumulative distribution function of the sequence, expressed to the appropriate accuracy, as a code for the sequence.
  • [Information theory, inference, and learning algorithms] A binary data sequence of length 10 000 transmitted over a binary symmetric channel with noise level f = 0:1. Dilbert image Copyright c Syndicate, Inc. The physical solution is to improve the physical characteristics of the commu- nication channel to reduce its error probability.
  • [Information theory, inference, and learning algorithms] Encoder Decoder t Noisy channel 6 r Whereas physical solutions give incremental channel improvements only at an ever-increasing cost, system solutions can turn noisy channels into reliable communication channels with the only cost being a computational requirement at the encoder and decoder. Coding theory is concerned with the creation of practical encoding and We now consider examples of encoding and decoding systems. What is the simplest way to add useful redundancy to a transmission?

Cognitive Tools Reference

See .claude/skills/math-mode/SKILL.md for full tool documentation.