source-coding

GitHub

提供信息论中源编码问题的解决策略,涵盖信源编码定理、霍夫曼编码、柯夫不等式、算术编码及率失真理论,支持通过Z3和SymPy进行数学证明与计算。

.claude/skills/math/information-theory/source-coding/SKILL.md parcadei/Continuous-Claude-v3

Trigger Scenarios

信息论源编码问题求解 霍夫曼编码构建 柯夫不等式验证 率失真理论计算

Install

npx skills add parcadei/Continuous-Claude-v3 --skill source-coding -g -y
More Options

Non-standard path

npx skills add https://github.com/parcadei/Continuous-Claude-v3/tree/main/.claude/skills/math/information-theory/source-coding -g -y

Use without installing

npx skills use parcadei/Continuous-Claude-v3@source-coding

指定 Agent (Claude Code)

npx skills add parcadei/Continuous-Claude-v3 --skill source-coding -a claude-code -g -y

安装 repo 全部 skill

npx skills add parcadei/Continuous-Claude-v3 --all -g -y

预览 repo 内 skill

npx skills add parcadei/Continuous-Claude-v3 --list

SKILL.md

Frontmatter
{
    "name": "source-coding",
    "description": "Problem-solving strategies for source coding in information theory",
    "allowed-tools": [
        "Bash",
        "Read"
    ]
}

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
    • z3_solve.py prove "shannon_bound"
  2. Huffman Coding

    • Optimal prefix-free code for known distribution
    • Build tree: combine two least probable symbols
    • Average length: H(X) <= L < H(X) + 1
    • sympy_compute.py simplify "expected_code_length"
  3. Kraft Inequality

    • For prefix-free code: sum 2^{-l_i} <= 1
    • Necessary and sufficient
    • z3_solve.py prove "kraft_inequality"
  4. Arithmetic Coding

    • Approaches entropy for any distribution
    • Encodes entire message as interval [0,1)
    • Practical for adaptive/unknown distributions
  5. Rate-Distortion Theory

    • Lossy compression: trade rate for distortion
    • R(D) = min_{p(x_hat|x): E[d(X,X_hat)]<=D} I(X;X_hat)
    • Minimum rate to achieve distortion D
    • sympy_compute.py minimize "I(X;X_hat)" --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)"

Z3_Shannon_Bound

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 & 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.

Version History

  • d07ff4b Current 2026-08-20 12:48

Same Skill Collection

.claude/plugins/braintrust-tracing/skills/trace-claude-code/SKILL.md
.claude/skills/agentica-claude-proxy/SKILL.md
.claude/skills/agentica-infrastructure/SKILL.md
.claude/skills/agentica-prompts/SKILL.md
.claude/skills/agentica-sdk/SKILL.md
.claude/skills/agentica-server/SKILL.md
.claude/skills/archive/leann-search/SKILL.md
.claude/skills/ast-grep-find/SKILL.md
.claude/skills/braintrust-tracing/SKILL.md
.claude/skills/cli-reference/SKILL.md
.claude/skills/commit/SKILL.md
.claude/skills/compound-learnings/SKILL.md
.claude/skills/continuity_ledger/SKILL.md
.claude/skills/create_handoff/SKILL.md
.claude/skills/dead-code/SKILL.md
.claude/skills/debug-hooks/SKILL.md
.claude/skills/debug/SKILL.md
.claude/skills/describe_pr/SKILL.md
.claude/skills/discovery-interview/SKILL.md
.claude/skills/explore/SKILL.md
.claude/skills/firecrawl-scrape/SKILL.md
.claude/skills/fix/SKILL.md
.claude/skills/github-search/SKILL.md
.claude/skills/help/SKILL.md
.claude/skills/hook-developer/SKILL.md
.claude/skills/implement_plan_micro/SKILL.md
.claude/skills/implement_plan/SKILL.md
.claude/skills/implement_task/SKILL.md
.claude/skills/loogle-search/SKILL.md
.claude/skills/math-help/SKILL.md
.claude/skills/math-router/SKILL.md
.claude/skills/math-unified/SKILL.md
.claude/skills/math/abstract-algebra/fields/SKILL.md
.claude/skills/math/abstract-algebra/groups/SKILL.md
.claude/skills/math/abstract-algebra/rings/SKILL.md
.claude/skills/math/category-theory/categories-functors/SKILL.md
.claude/skills/math/category-theory/limits-colimits/SKILL.md
.claude/skills/math/category-theory/natural-transformations/SKILL.md
.claude/skills/math/complex-analysis/analytic-functions/SKILL.md
.claude/skills/math/complex-analysis/contour-integrals/SKILL.md
.claude/skills/math/complex-analysis/residues/SKILL.md
.claude/skills/math/functional-analysis/banach-spaces/SKILL.md
.claude/skills/math/functional-analysis/hilbert-spaces/SKILL.md
.claude/skills/math/functional-analysis/operator-theory/SKILL.md
.claude/skills/math/graph-number-theory/graph-algorithms/SKILL.md
.claude/skills/math/graph-number-theory/modular-arithmetic/SKILL.md
.claude/skills/math/graph-number-theory/prime-numbers/SKILL.md
.claude/skills/math/information-theory/channel-capacity/SKILL.md
.claude/skills/math/information-theory/entropy/SKILL.md

Metadata

Files
0
Version
d07ff4b
Hash
40b5eced
Indexed
2026-08-20 12:48

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-21 05:21
浙ICP备14020137号-1 $Гость$