Compression. Compression. Compression. This part of the course... Ifi, UiO Norsk Regnesentral Vårsemester 2005 Wolfgang Leister

Similar documents
CSC Design and Analysis of Algorithms. Example: Change-Making Problem

The Plan. Honey, I Shrunk the Data. Why Compress. Data Compression Concepts. Braille Example. Braille. x y xˆ

Graphs. CSC 1300 Discrete Structures Villanova University. Villanova CSC Dr Papalaskari

CSE 373. Graphs 1: Concepts, Depth/Breadth-First Search reading: Weiss Ch. 9. slides created by Marty Stepp

Graphs. Graphs. Graphs: Basic Terminology. Directed Graphs. Dr Papalaskari 1

b. How many ternary words of length 23 with eight 0 s, nine 1 s and six 2 s?

CSE 373: More on graphs; DFS and BFS. Michael Lee Wednesday, Feb 14, 2018

1 Introduction to Modulo 7 Arithmetic

CS61B Lecture #33. Administrivia: Autograder will run this evening. Today s Readings: Graph Structures: DSIJ, Chapter 12

DUET WITH DIAMONDS COLOR SHIFTING BRACELET By Leslie Rogalski

Lossless Compression Lossy Compression

CS September 2018

Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

A Simple Code Generator. Code generation Algorithm. Register and Address Descriptors. Example 3/31/2008. Code Generation

Paths. Connectivity. Euler and Hamilton Paths. Planar graphs.

, each of which is a tree, and whose roots r 1. , respectively, are children of r. Data Structures & File Management

QUESTIONS BEGIN HERE!

EE1000 Project 4 Digital Volt Meter

Why the Junction Tree Algorithm? The Junction Tree Algorithm. Clique Potential Representation. Overview. Chris Williams 1.

COMP108 Algorithmic Foundations

# 1 ' 10 ' 100. Decimal point = 4 hundred. = 6 tens (or sixty) = 5 ones (or five) = 2 tenths. = 7 hundredths.

Nefertiti. Echoes of. Regal components evoke visions of the past MULTIPLE STITCHES. designed by Helena Tang-Lim

GREEDY TECHNIQUE. Greedy method vs. Dynamic programming method:

An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V

CSI35 Chapter 11 Review

Computational Biology, Phylogenetic Trees. Consensus methods

CS 461, Lecture 17. Today s Outline. Example Run

QUESTIONS BEGIN HERE!

Constructive Geometric Constraint Solving

12. Traffic engineering

Exam 1 Solution. CS 542 Advanced Data Structures and Algorithms 2/14/2013

CSE 373: AVL trees. Warmup: Warmup. Interlude: Exploring the balance invariant. AVL Trees: Invariants. AVL tree invariants review

12/3/12. Outline. Part 10. Graphs. Circuits. Euler paths/circuits. Euler s bridge problem (Bridges of Konigsberg Problem)

Seven-Segment Display Driver

5/9/13. Part 10. Graphs. Outline. Circuits. Introduction Terminology Implementing Graphs

CS 241 Analysis of Algorithms

Similarity Search. The Binary Branch Distance. Nikolaus Augsten.

Present state Next state Q + M N

Analysis for Balloon Modeling Structure based on Graph Theory

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example

S i m p l i f y i n g A l g e b r a SIMPLIFYING ALGEBRA.

CS200: Graphs. Graphs. Directed Graphs. Graphs/Networks Around Us. What can this represent? Sometimes we want to represent directionality:

More Foundations. Undirected Graphs. Degree. A Theorem. Graphs, Products, & Relations

Announcements. Not graphs. These are Graphs. Applications of Graphs. Graph Definitions. Graphs & Graph Algorithms. A6 released today: Risk

0.1. Exercise 1: the distances between four points in a graph

Section 3: Antiderivatives of Formulas

(2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely

Using the Printable Sticker Function. Using the Edit Screen. Computer. Tablet. ScanNCutCanvas

Garnir Polynomial and their Properties

a b c cat CAT A B C Aa Bb Cc cat cat Lesson 1 (Part 1) Verbal lesson: Capital Letters Make The Same Sound Lesson 1 (Part 1) continued...

Decimals DECIMALS.

In order to learn which questions have been answered correctly: 1. Print these pages. 2. Answer the questions.

Outline. Computer Science 331. Computation of Min-Cost Spanning Trees. Costs of Spanning Trees in Weighted Graphs

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS

Minimum Spanning Trees

Outline. Circuits. Euler paths/circuits 4/25/12. Part 10. Graphs. Euler s bridge problem (Bridges of Konigsberg Problem)

XML and Databases. Outline. Recall: Top-Down Evaluation of Simple Paths. Recall: Top-Down Evaluation of Simple Paths. Sebastian Maneth NICTA and UNSW

Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes.

Graph Isomorphism. Graphs - II. Cayley s Formula. Planar Graphs. Outline. Is K 5 planar? The number of labeled trees on n nodes is n n-2

Algorithmic and NP-Completeness Aspects of a Total Lict Domination Number of a Graph

CSE303 - Introduction to the Theory of Computing Sample Solutions for Exercises on Finite Automata

The University of Sydney MATH2969/2069. Graph Theory Tutorial 5 (Week 12) Solutions 2008

NP-Completeness. CS3230 (Algorithm) Traveling Salesperson Problem. What s the Big Deal? Given a Problem. What s the Big Deal? What s the Big Deal?

Math 166 Week in Review 2 Sections 1.1b, 1.2, 1.3, & 1.4

Lecture 6: Coding theory

Problem solving by search

TABLE OF CONTENTS ASSEMBLY INSTRUCTIONS SHEET 1 OF 8 TABLE OF CONTENTS PAGE NUMBER DESCRIPTION B 2 PARTS LIST AND LAYOUT 3-5 PARTS A-D DETAIL DRAWINGS

COMPLEXITY OF COUNTING PLANAR TILINGS BY TWO BARS

Probability. Probability. Curriculum Ready ACMSP: 225, 226, 246,

Numbering Boundary Nodes

Analysis of Algorithms - Elementary graphs algorithms -

Outline Data Structures and Algorithms. Data compression. Data compression. Lossy vs. Lossless. Data Compression

WORKSHOP 6 BRIDGE TRUSS

Integration Continued. Integration by Parts Solving Definite Integrals: Area Under a Curve Improper Integrals

What do you know? Listen and find. Listen and circle. Listen and chant. Listen and say. Lesson 1. sheep. horse

CS553 Lecture Register Allocation I 3

Winter 2016 COMP-250: Introduction to Computer Science. Lecture 24, April 7, 2016

Binomials and Pascal s Triangle

FSA. CmSc 365 Theory of Computation. Finite State Automata and Regular Expressions (Chapter 2, Section 2.3) ALPHABET operations: U, concatenation, *

In which direction do compass needles always align? Why?

Section 10.4 Connectivity (up to paths and isomorphism, not including)

Last time: introduced our first computational model the DFA.

5/7/13. Part 10. Graphs. Theorem Theorem Graphs Describing Precedence. Outline. Theorem 10-1: The Handshaking Theorem

Analysis of Algorithms - Elementary graphs algorithms -

Overview. Usages of Fault Simulators. Problem and Motivation. Alternatives and Their Limitations. VLSI Design Verification and Testing

Chem 104A, Fall 2016, Midterm 1 Key

Register Allocation. How to assign variables to finitely many registers? What to do when it can t be done? How to do so efficiently?

Cycles and Simple Cycles. Paths and Simple Paths. Trees. Problem: There is No Completely Standard Terminology!

The second condition says that a node α of the tree has exactly n children if the arity of its label is n.

Lecture 6 Thermionic Engines

Amphenol Canada Corp.

Solutions for HW11. Exercise 34. (a) Use the recurrence relation t(g) = t(g e) + t(g/e) to count the number of spanning trees of v 1

Aquauno Video 6 Plus Page 1

Surds and Indices. Surds and Indices. Curriculum Ready ACMNA: 233,

Weighted graphs -- reminder. Data Structures LECTURE 15. Shortest paths algorithms. Example: weighted graph. Two basic properties of shortest paths

COMP 250. Lecture 29. graph traversal. Nov. 15/16, 2017

Trees as operads. Lecture A formalism of trees

Multipoint Alternate Marking method for passive and hybrid performance monitoring

Transcription:

Kurs INF5080 Ifi, UiO Norsk Rgnsntrl Vårsmstr 2005 Wolfgng Listr This prt of th ours...... is hl t Ifi, UiO... (Wolfgng Listr) n t ontins mtril from Univrsity Collg Krlsruh (Ptr Ol, Clmns Knorzr)

Informtion Thory Dt Contnt Prviw Img Formts JPEG / JIFF Wvlt Frtl Vio Formts MJPEG MPEG

Imgs Grphis Multimi t typs Vio / Img squns Auio 3D-Dt Txt / Doumnts othrs Imgs Grphis Multimi t typs Vio / Img squns Auio 3D-Dt Txt / Doumnts othrs

Lossy Coing Applil only for t typs lik: Imgs Films (img squns) Auio Us physiologil pilitis n limittions of th snss to sign omprssion mthos Ey Cpilitis of th snss Ey rogniss frqunis Brightnss is ttr rognis thn olours. Movmnt n flikr is rognis vry strongly! Er - Dnsly situt frqunis ovr h othr. - Frqunis hrtristis of th r

Informtion Thory Symols: A = 0, 1,... N-1 Coing: C = 0, 1,... N-1 trivil Coing (onstnt Co Lngth) i = i0, i1,... im-1 ij {0,1} M = log 2 N for i [0,N-1] (inry) (Co lngth, numr of its) Distriution: P = p 0,p 1,... p N-1 proility for symols H Informtion Thory Informtion ontnt: (Entropy) N 1 0 = p i logpi i= 0 Exmpl: Uniform istriution (Bsis = 2 it/owor) 1 p i = N N 1 1 1 1 H0 = N log N= log N= logn i= 0

Informtion thory Coing: C = 0, 1,... N-1 i = i0, i1,... ili -1 i [0,N-1] ij {0,1} l i = lngth of o wor i vrg o lngth: N 1 L = pl ii H 0 i= 0 Informtion Thory Whn is L = H 0? li = l p i 1 1 p i = l = 2 i 2 k Wht if p 1 i for ll i? 2 k not uniform istriution i..: vrg o Lngth = Entropy uniform istriution

Informtion Thory Wht if? p 1 i 2 k non uniform istriution Huffmn Coing Group vnts into on o wor: ( i1,..., in ) i Evry ( i )-omintion must vill: N n o wors Arithmti oing oftn ttr suitl Intrmzzo... Why Dt omprssion? An img sys mor thn thousn wors An img ns mor sp thn thousn wors Dt r ontin runny... Humns lov runny

thniqus losslss run lngth noing thniqus losslss run lngth noing: run lngth noing 000011100000000110000101111110000000000 (4x0)(3x1)(8x0)(2x1)(4x0)(1x1)(1x0)(6x1)(10x0) 4,3,8,2,4,1,1,6,10 Exmpls: PCX Fx JPEG

thniqus losslss run lngth noing optiml Cos thniqus losslss run lngth noing optiml Cos Co wors hv iffrnt lngths Lngth of o wor pnnt on proility: (high proility short Cowort) (low proility long Cowort) Glol n fix o wor tl Co wor tl is prt of oing

thniqus Exmpl: Huffmn-Coing: losslss run lngth noing optiml Cos 1.Stp: Evnts to o r sort y proilitis (rising orr). 2.Stp: Th vnts with lst proilitis r rmov from list, unit to on vnt, n sort into list with sum of oth proilitis. 3.Stp: Rpt Stp 2 until only on lmnt is ontin in list. 4.Stp: Co wors r gnrt y mrking th gs in th inry tr y 0 n 1. R th o wor from top to ottom. thniqus Exmpl Huffmn-Coing: losslss run lngth noing optiml Cos

thniqus Exmpl: Huffmn-Coing: losslss run lngth noing optiml Cos thniqus Exmpl: Huffmn-Coing: losslss run lngth noing optiml Cos

thniqus Exmpl: Huffmn-Coing: losslss 0.6 run lngth noing optiml Cos thniqus Exmpl: Huffmn-Coing: losslss 0.6 1.0 run lngth noing optiml Cos

thniqus Exmpl: Huffmn-Coing: losslss 0.6 1.0 run lngth noing optiml Cos 0 1 0 1 0 1 0 1 thniqus Exmpl: Huffmn-Coing: losslss 01 0010 1 0011 with loss 000 0.6 1.0 run lngth noing optiml Cos 0 1 0 1 0 1 0 1

thniqus losslss run lngth noing optiml Cos ptiv Cos thniqus losslss Mtho y Ziv n Lmpl run lngth noing optiml Cos ptiv Cos Co tll is gnrt whil oing No n to trnsfr o tll

thniqus losslss Exmpl: run lngth noing optiml Cos ptiv Cos 1 2 w: 3 4 Output: 1 5 6 7 8... thniqus losslss Exmpl: 1 2 3 4 5 6 7 8... run lngth noing optiml Cos ptiv Cos Output: w: 12

thniqus losslss Exmpl: 1 2 3 4 5 6 7 8... run lngth noing optiml Cos ptiv Cos w: Output: 123 thniqus losslss Exmpl: 1 2 3 4 5 6 7 8... run lngth noing optiml Cos ptiv Cos w: Output: 1234

thniqus losslss Exmpl: 1 2 3 4 5 6 7 8... run lngth noing optiml Cos ptiv Cos w: Output: 1234 7 Arithmti Coing Symols r rprsnt y proility intrvls Symol hins r rprsnt y ontntion of thir proility intrvls

1.0 0.95 0.75 0.7 0.35 0.0 Arithmti Coing # A P # 0.35 # = [0.95, 1.0) 0.96.. 0.11111 = [0.75, 0.95) 0.75 0.11 = [0.7, 0.75) 0.71.. 0.10111 = [0.35, 0.7) 0.5 0.1 = [, 0.35) 5 0.01 = [0.0, ) 0.125 0.001 1.0 0.95 0.75 0.7 0.35 0.0 Arithmti Coing # A # P 0.35 #

1.0 0.95 0.75 0.7 0.35 0.0 Arithmti Coing # 0.35 # A # P 0.35 1.0 0.95 0.75 0.7 0.35 0.0 Arithmti Coing # # 0.35 # 0.305 525 # 63 525 # 63 62475

Arithmti Coing 63 0.01000011010100111 62475 0.01000011001100001 1.0 0.35 0.95 # # 0.0100001101 0100001101 0.75 Huffmn: 0110110(0000) 0.7 0.35 0.0 0.305 525 # 63 525 # 63 62475 thniqus losslss Quntising: run lngth noing optiml Cos ptiv Cos Anlogu Digitl 8 Bit 4 Bit RGB Colour pltt Clustring Quntisirung Clustring

thniqus losslss run lngth noing optiml Cos ptiv Cos Quntising Clustring thniqus losslss run lngth noing optiml Cos ptiv Cos Quntising Clustring Dsriptiv Trnsformtion

Img Dt formts losslss PBM+ GIF? PNG (JPEG) JPEG Wvlt Compr. Wvlt Compr. Th En of Ltur