狠狠撸

狠狠撸Share a Scribd company logo
ハフマン符号
http://www.computerhope.com/people/david_hu?man.htm
13年6月13日木曜日
ハフマン符号って?
?データを圧縮するときの符号化法
?JPEGやZIPで利用されている
David Hu?manさんが作りました
13年6月13日木曜日
アルゴリズム
? 1. データ列のアルファベットを出現回数順
に、昇順に並び替える
? 2. 小さい順にアルファベットを融合していく
? 3. 各アルファベットにビット列を割り振っ
て、元のデータ列を変換する
13年6月13日木曜日
やってみよう
「TONGULLMAN」というデータ列を
圧縮してみます
13年6月13日木曜日
1. データ列のアルファベットを
出現回数順に、昇順に並び替える
?TONGULLMAN
?↓
?T(1), O(1), G(1), U(1), M(1), A(1),
N(2), L(2)
13年6月13日木曜日
2. 小さい順にアルファベットを
融合していく
?T(1), O(1), G(1), U(1), M(1), A(1),
N(2), L(2)
?↓
?G(1), U(1), M(1), A(1), TO(2), N(2),
L(2)
?融合できなくなるまで繰り返す
13年6月13日木曜日
木構造で表すと
T (1) O(1) G(1) U(1) M(1) A(1) N(2) L(2)
13年6月13日木曜日
木構造で表すと
T (1) O(1) G(1) U(1) M(1) A(1) N(2) L(2)
TO(2)
13年6月13日木曜日
木構造で表すと
T (1) O(1) G(1) U(1) M(1) A(1) N(2) L(2)
TO(2) GU(2)
13年6月13日木曜日
木構造で表すと
T (1) O(1) G(1) U(1) M(1) A(1) N(2) L(2)
TO(2) GU(2) MA(2)
13年6月13日木曜日
木構造で表すと
T (1) O(1) G(1) U(1) M(1) A(1) N(2) L(2)
TO(2) GU(2) MA(2)
TOGU(4)
13年6月13日木曜日
木構造で表すと
T (1) O(1) G(1) U(1) M(1) A(1) N(2) L(2)
TO(2) GU(2) MA(2)
TOGU(4) MAN(4)
13年6月13日木曜日
木構造で表すと
T (1) O(1) G(1) U(1) M(1) A(1) N(2) L(2)
TO(2) GU(2) MA(2)
TOGU(4) MAN(4)
LMAN(6)
13年6月13日木曜日
木構造で表すと
T (1) O(1) G(1) U(1) M(1) A(1) N(2) L(2)
TO(2) GU(2) MA(2)
TOGU(4) MAN(4)
LMAN(6)
TOGULMAN(10)
13年6月13日木曜日
木構造で表すと
T (1) O(1) G(1) U(1) M(1) A(1) N(2) L(2)
TO(2) GU(2) MA(2)
TOGU(4) MAN(4)
LMAN(6)
TOGULMAN(10)
木構造の根から順に0, 1を割り振っていく
13年6月13日木曜日
木構造で表すと
T (1) O(1) G(1) U(1) M(1) A(1) N(2) L(2)
TO(2) GU(2) MA(2)
TOGU(4) MAN(4)
LMAN(6)
TOGULMAN(10)
木構造の根から順に0, 1を割り振っていく
0 1
0 1
0 1 0 1
0 1
0 1
0 1
13年6月13日木曜日
各文字に割り当てられた符号は
T
O
G
U
M
A
N
L
000
001
010
011
1000
1001
101
11
13年6月13日木曜日
3. 各アルファベットにビット列を割り振って、元
のデータ列を変換する
T
O
G
U
M
A
N
L
000
TONGULLMAN
↓
000001101010011111110001001101
001
010
011
1000
1001
101
11
13年6月13日木曜日
符号化おわり
?TONGULLMAN (10byte = 80bit)
?↓
? 000001101010011111110001001101 (30bit)
13年6月13日木曜日

More Related Content

Featured (20)

PDF
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
?
PDF
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
?
PDF
Skeleton Culture Code
Skeleton Technologies
?
PDF
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
?
PDF
Content Methodology: A Best Practices Report (Webinar)
contently
?
PPTX
How to Prepare For a Successful Job Search for 2024
Albert Qian
?
PDF
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
?
PDF
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
?
PDF
5 Public speaking tips from TED - Visualized summary
SpeakerHub
?
PDF
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
?
PDF
Getting into the tech field. what next
Tessa Mero
?
PDF
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
?
PDF
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
?
PDF
Introduction to Data Science
Christy Abraham Joy
?
PDF
Time Management & Productivity - Best Practices
Vit Horky
?
PDF
The six step guide to practical project management
MindGenius
?
PDF
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
?
PDF
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
?
PDF
12 Ways to Increase Your Influence at Work
GetSmarter
?
PDF
ChatGPT webinar slides
Alireza Esmikhani
?
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
?
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
?
Skeleton Culture Code
Skeleton Technologies
?
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
?
Content Methodology: A Best Practices Report (Webinar)
contently
?
How to Prepare For a Successful Job Search for 2024
Albert Qian
?
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
?
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
?
5 Public speaking tips from TED - Visualized summary
SpeakerHub
?
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
?
Getting into the tech field. what next
Tessa Mero
?
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
?
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
?
Introduction to Data Science
Christy Abraham Joy
?
Time Management & Productivity - Best Practices
Vit Horky
?
The six step guide to practical project management
MindGenius
?
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
?
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
?
12 Ways to Increase Your Influence at Work
GetSmarter
?
ChatGPT webinar slides
Alireza Esmikhani
?

ハフマン符号