Skill站外收录 @skilllib/skill-2117939930272412485
source-coding
解决信息论中的信源编码问题,涵盖无损与有损压缩的核心方法。通过构建最优前缀码、验证编码可行性、逼近熵极限及权衡失真与码率,实现高效数据压缩,适用于已知或自适应分布的序列编码任务。
研究 AI 技能
Skills.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
- `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
```bash
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
```bash
uv run python -m runtime.harness scripts/sympy_compute.py simplify "2**(-l1) + 2**(-l2) + 2**(-l3) + 2**(-l4)"
```
### Z3_Shannon_Bound
```bash
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.
评论 0
还没有评论,来抢沙发。
相关内容
同类或同场景的收录内容
building-with-kafka-strimzi
在 Kubernetes 上构建基于 Apache Kafka 的事件驱动系统,支持高可靠的消息传递、事务性处理与精确一次语义,结合 Strimzi 运营商实现集群自动化管理,利用 Schema Registry 保障事件模式演进,适用于微服务间解耦通信与实时数据流处理场景。
站外数据与分析
609 0.0
personal-tool-builder
专注于从个人真实痛点出发快速构建实用工具,涵盖命令行程序、本地优先应用和自动化脚本的开发与演进,强调先满足自身需求再逐步扩展,通过持续自用打磨功能,避免过度设计,确保工具简洁有效且长期可维护。
站外商业与营销
196 0.0
threejs-lighting
实现三维场景中的光照与阴影控制,支持多种光源类型及环境光照明,提供从基础布光到高级阴影优化的完整方案,适用于需要真实感渲染或性能平衡的可视化项目。
站外效率工具
442 0.0
aggregation-helper
提供数据聚合场景的自动化辅助能力,涵盖 SQL 查询编写、统计分析建模、可视化方案设计及商业智能配置,支持从需求理解到生产级代码生成的全流程指导。
站外效率工具数据与分析
217 0.0
举报「source-coding」
举报信息仅审核团队可见,同一资产 24 小时内仅可举报一次