3 views

Uploaded by nassr_ismail

Proof of optimality of Hufman codes

save

- DS Theory Main
- Data Compression Solutions
- Lecture-10 Regression Tree
- slides12-continuations.pdf
- Exam Info
- The Structure of Many Distribution Systems is Like a Tree With Several Laterals and Sub
- Multiples
- Data Structure Study Notes for IBPS SO IT officer- Team MME.pdf
- Decision Trees
- CommunityGuidel-PropertyFilter
- ICM-199601-03
- Induction
- Data
- Software Engineering Quiz
- Data_Structures(1-5) 2&16 Marks
- The Number of Khalimsky-continuous Functions on Intervals
- Treeview BaiHoc
- Estrutura- exercicio
- Datastructures Lab
- Openvdb Introduction
- AVL-Tree-Deletion.pdf
- SkipLists
- EWD469
- Effective Packet Management Scheme in Wireless Ad-Hoc Networks using Distributed Spanning Tree
- Test 1 Spring 99
- PNAS-2012-Novikoff-1109863109
- Proj 4
- Dsa 4
- Datastructure Bsc2 Richa
- Info Vis 2013
- HSDPA Plus Switch
- 256 QAM Feature
- Network Capacity Overview
- 64 QAM Feature
- Iub Port Available Bandwidth Utilizing Ratio.pdf
- Add Intra-Frequency Neighboring Cell
- Location Tracking of Mobiles (Smart Filtering)
- Important Parameters Huawei
- Carrier Aggregation Adaptive PCC Anchoring
- Kalman Filter Handouts.pdf
- UL-Interference-UL-RSSI-Ericsson.pdf
- UL RSSI
- Dropctrlerrindseqerr Parameter
- 2 DriveTest Analysis Ver1.pdf
- Uplink Pdtch-pacch Usage
- white-paper-understanding-mobile-terminated-call-failures.pdf
- Type1 Frame Struct
- CME_Poster_Feature_OM_Management(01).pdf
- 9780857296344-c2.pdf
- Power Boosting
- Netact Tutorial.pdf
- MDT1
- 3GPP_CORBA_Bulk_CM_Northbound.pdf
- DL Power Allocation
- PDCCH Parameters
- NSN- HW Parameter Mapping
- R-Criterion Parameters
- Nokia Consistency Check
- Pa-pb Power Dist
- Cn 1859721 A
- Guia de Interpretacion de Requisitos Iso 14001 96 v Nov 16
- The Research Agenda for General Practice Part 1,2,3
- Buho de Las Soledades
- Escrito Por Charity Darlene Gardner
- Vencendo_desafios_incriveis
- Trabalho Pronto
- Analisis_a_Cuatro_Columnas (1).pdf
- A Reforma Protestante 2
- Pesquisa em Serviço Social - Ricardo Lara
- Magnitudes de Unidades
- Libro - El Mito Nazi
- POLAND and the Coming of the Second World War
- Modernismo en Mexico
- HOLLANDER.pdf
- Trabalho - Bens públicos
- Revisión bibliografica 1
- DSS Profesor Danilo
- DAFTAR PUSTAKA
- Estrabon Geografia
- Publishing Workshop 2015
- I Can Get by With a Little Help From My Friends Peer Mentoring - Critical Friends for the Reflect
- 7 LECCIONES DE LA VIDA QUE ME ENSEÑO BRUCE LEE
- CCTV Dialogue Show
- DERECHOS HUMANOS
- Ejer Cici Os
- Analisis Foda
- Fotosintesis issaito asimov
- caim-2011-promo-26-x-11
- Por qué mueren los creyentes.doc
- cartilla promesa.pdf

You are on page 1of 2

Optimality of Huﬀman Codes: Cost function: cost = Σc C (f (c)dc ) where C is the alphabet (character set), f(c) is the frequency and dc is the code length of the character c C . Goal is to optimize the above cost. 1. Proposition 1. The Huﬀman tree is a full binary tree. Proof: It follows from the construction of the Huﬀman tree, i.e., we always create a new node by having two subtrees as it’s two children. 2. proposition 2: Two least frequent characters α and β must be the two deepest nodes in the optimal tree and these two nodes are siblings. proof: Assume α is not the deepest node in the optimal tree. Then there exists a node γ which is deeper than α. The cost due to the characters α and γ : f (α)dα + f (γ )dγ . If we swap α with γ in the tree the cost is f (α)dγ + f (γ )dα notation dα and dγ are used to denote the code lengths of the respective characters before the swap. Then f (α)dγ + f (γ )dα < f (α)dα + f (γ )dγ because (dγ − dα ) is positive, f (α) < f (γ ) and therefore, f (α)(dγ − dα ) < f (γ )(dγ − dα ) The above is a contradiction because the tree was optimal before the swap and the cost of the new tree created by the swap is less. 3. Huﬀman’s algorithm is a greedy algorithm which gives optimal results. Therefore, it must satisfy the optimal substructure property, i.e., optimal solution to the problem contains within it the optimal solutions to the subproblems. Theorem: Let T be a full binary tree representing an optimal preﬁx code over an alphabet C. Consider two characters x, y C that appear as sibling of a parent node z in the tree T. Now consider the tree T with 1

then this new tree will correspond to the alphabet C. This new tree T3 will have cost B (T3 ) = B (T2 ) + f (x) + f (y )———— 3 From 1. y } ∪ {z }. 2 . Assume that T1 is not optimal. We want to show T1 is optimal by contradiction. except for the cost from z to x and z to y in the tree.———– 2 z appears as a leaf in T2 because we have assumed it to be a character. Then there exists another tree T2 such that B (T2 ) < B (T1 ). 2 and 3 we get B (T3 ) = B (T2 ) + f (x) + f (y ) < B (T1 ) + f (x) + f (y ) = B (T ) This is a contradiction because cost for T3 is less than that for T . Proof: Let B (T ) and B (T1 ) be the costs of the trees T and T1 .x and y removed and z becomes a character in this tree with frequency f(x)+f(y). Then B (T ) = B (T1 ) + f (x) + f (y ) ——— 1 This is because B (T1 ) covers all cost of T including those for x and y. If we add the characters x and y as children of Z and assume z not a character any more but an internal node of this new tree T3 . respectively. Then this new tree T1 represents an optimal preﬁx code over the alphabet C − {x.

- DS Theory MainUploaded bySuweb Reza
- Data Compression SolutionsUploaded bylokeshbn
- Lecture-10 Regression TreeUploaded bytmtb04
- slides12-continuations.pdfUploaded by252966576
- Exam InfoUploaded byZichen Gui
- The Structure of Many Distribution Systems is Like a Tree With Several Laterals and SubUploaded byteja
- MultiplesUploaded byAmritranjan Das
- Data Structure Study Notes for IBPS SO IT officer- Team MME.pdfUploaded byMohan Gupta
- Decision TreesUploaded bySidharth Kayakandy
- CommunityGuidel-PropertyFilterUploaded byshrihn
- ICM-199601-03Uploaded byajay
- InductionUploaded byomoyemi oluwaseyi
- DataUploaded bysanashaikh
- Software Engineering QuizUploaded byDrMayank Singh
- Data_Structures(1-5) 2&16 MarksUploaded bypitchrks19841
- The Number of Khalimsky-continuous Functions on IntervalsUploaded byNeo
- Treeview BaiHocUploaded byapi-3813141
- Estrutura- exercicioUploaded byNicolás Zumelzu
- Datastructures LabUploaded bygmerlingeorge
- Openvdb IntroductionUploaded byRafael Campos
- AVL-Tree-Deletion.pdfUploaded byRajContent
- SkipListsUploaded byihtnasakirah918
- EWD469Uploaded byJosh Jessop-Smith
- Effective Packet Management Scheme in Wireless Ad-Hoc Networks using Distributed Spanning TreeUploaded byijcsis
- Test 1 Spring 99Uploaded byGobara Dhan
- PNAS-2012-Novikoff-1109863109Uploaded byastendra
- Proj 4Uploaded byHaris Masood
- Dsa 4Uploaded byanon_553663796
- Datastructure Bsc2 RichaUploaded byShantam
- Info Vis 2013Uploaded byMécia Sá

- HSDPA Plus SwitchUploaded bynassr_ismail
- 256 QAM FeatureUploaded bynassr_ismail
- Network Capacity OverviewUploaded bynassr_ismail
- 64 QAM FeatureUploaded bynassr_ismail
- Iub Port Available Bandwidth Utilizing Ratio.pdfUploaded bynassr_ismail
- Add Intra-Frequency Neighboring CellUploaded bynassr_ismail
- Location Tracking of Mobiles (Smart Filtering)Uploaded bynassr_ismail
- Important Parameters HuaweiUploaded bynassr_ismail
- Carrier Aggregation Adaptive PCC AnchoringUploaded bynassr_ismail
- Kalman Filter Handouts.pdfUploaded bynassr_ismail
- UL-Interference-UL-RSSI-Ericsson.pdfUploaded bynassr_ismail
- UL RSSIUploaded bynassr_ismail
- Dropctrlerrindseqerr ParameterUploaded bynassr_ismail
- 2 DriveTest Analysis Ver1.pdfUploaded bynassr_ismail
- Uplink Pdtch-pacch UsageUploaded bynassr_ismail
- white-paper-understanding-mobile-terminated-call-failures.pdfUploaded bynassr_ismail
- Type1 Frame StructUploaded bynassr_ismail
- CME_Poster_Feature_OM_Management(01).pdfUploaded bynassr_ismail
- 9780857296344-c2.pdfUploaded bynassr_ismail
- Power BoostingUploaded bynassr_ismail
- Netact Tutorial.pdfUploaded bynassr_ismail
- MDT1Uploaded bynassr_ismail
- 3GPP_CORBA_Bulk_CM_Northbound.pdfUploaded bynassr_ismail
- DL Power AllocationUploaded bynassr_ismail
- PDCCH ParametersUploaded bynassr_ismail
- NSN- HW Parameter MappingUploaded bynassr_ismail
- R-Criterion ParametersUploaded bynassr_ismail
- Nokia Consistency CheckUploaded bynassr_ismail
- Pa-pb Power DistUploaded bynassr_ismail
- Cn 1859721 AUploaded bynassr_ismail

- Guia de Interpretacion de Requisitos Iso 14001 96 v Nov 16Uploaded byPiotrPablus
- The Research Agenda for General Practice Part 1,2,3Uploaded bySari Nurmalia Monny
- Buho de Las SoledadesUploaded byArmando D. Olivares de Garcia
- Escrito Por Charity Darlene GardnerUploaded byAnonymous Tlh26OwN
- Vencendo_desafios_incriveisUploaded bytiago facchi
- Trabalho ProntoUploaded byLídia Costa
- Analisis_a_Cuatro_Columnas (1).pdfUploaded byEL Mono Que Piensa
- A Reforma Protestante 2Uploaded byLorival22
- Pesquisa em Serviço Social - Ricardo LaraUploaded byanapalthaus
- Magnitudes de UnidadesUploaded byJennifer Long
- Libro - El Mito NaziUploaded byDaniela Ruiz
- POLAND and the Coming of the Second World WarUploaded byPiotr Grabowski
- Modernismo en MexicoUploaded byJared Mendez
- HOLLANDER.pdfUploaded byNicolas Jesus Scofano Badan Lopez
- Trabalho - Bens públicosUploaded byRodrigo da Cunha
- Revisión bibliografica 1Uploaded byGuillermo
- DSS Profesor DaniloUploaded byJose Luis Lopez Ruiz
- DAFTAR PUSTAKAUploaded byGina Nd
- Estrabon GeografiaUploaded byAlex Bolívar
- Publishing Workshop 2015Uploaded byAnonymous miC4b0w2
- I Can Get by With a Little Help From My Friends Peer Mentoring - Critical Friends for the ReflectUploaded byVictor Manuel Enriquez G
- 7 LECCIONES DE LA VIDA QUE ME ENSEÑO BRUCE LEEUploaded byRuben Parodi
- CCTV Dialogue ShowUploaded byDavid Moser
- DERECHOS HUMANOSUploaded byJulian Master
- Ejer Cici OsUploaded byPercy Tacar
- Analisis FodaUploaded byKevin Alexandro Ocampo Rosillo
- Fotosintesis issaito asimovUploaded byCarlos Javier Tejada
- caim-2011-promo-26-x-11Uploaded byGeorge Martinez Arhuire
- Por qué mueren los creyentes.docUploaded byMarco Barrantes
- cartilla promesa.pdfUploaded byhugo907