R. Bar-Yehuda © www.cs.technion.ac.il/~cs234141 1 Graph theory – תורת הגרפים 4. ORDERED TREES 4.1 UNIQUELY DECIPHERABLE CODES מבוסס על הספר : S. Even,

Slides:



Advertisements
Similar presentations
WSPD Applications.
Advertisements

Discrete Mathematics Lecture 5 Alexander Bukharovich New York University.
Problem: Huffman Coding Def: binary character code = assignment of binary strings to characters e.g. ASCII code A = B = C =
Data Compression.
Finite Automata Section 1.1 CSC 4170 Theory of Computation.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
1 Huffman Codes. 2 Introduction Huffman codes are a very effective technique for compressing data; savings of 20% to 90% are typical, depending on the.
R. Bar-Yehuda © 1 Graph theory – תורת הגרפים 4.4 CATALAN NUMBERS מבוסס על הספר : S. Even, "Graph Algorithms", Computer.
R. Bar-Yehuda © 1 קומבינטוריקה למדעי - המחשב – הרצאה # DE BRUIJN SEQUENCES מבוסס על הספר : S. Even, "Graph Algorithms",
CSE115/ENGR160 Discrete Mathematics 04/03/12 Ming-Hsuan Yang UC Merced 1.
R. Bar-Yehuda © 1 קומבינטוריקה למדעי - המחשב – הרצאה #17 Chapter 2: TREES מבוסס על הספר : S. Even, "Graph Algorithms",
R. Bar-Yehuda © 1 Graph theory – תורת הגרפים 2.4 Directed Trees – עצים מכוונים מבוסס על הספר : S. Even, "Graph Algorithms",
R. Bar-Yehuda © 1 Graph theory – תורת הגרפים 2.6 THE NUMBER OF SPANNING TREE מבוסס על הספר : S. Even, "Graph Algorithms",
R. Bar-Yehuda © 1 קומבינטוריקה למדעי - המחשב – הרצאה #14 Graph theory – תורת הגרפים Chapter 1: PATHS IN GRAPHS – 1. מסלולים.
עבודה סמינריונית Prelude to Ukkonen algorithm ON-LINE CONSTRUCTION OF SUFFIX TREES מגישים : עיד מוחמד טיבי פיראס.
אוטומט מחסנית הפקולטה למדעי המחשב אוטומטים ושפות פורמליות ( ) תרגיל מספר 11.
CS5371 Theory of Computation Lecture 5: Automata Theory III (Non-regular Language, Pumping Lemma, Regular Expression)
R. Bar-Yehuda © 1 Graph theory – תורת הגרפים 2.3 CAYLEY’S THEOREM – משפט קיילי מבוסס על הספר : S. Even, "Graph Algorithms",
א " ב, מילים, ושפות הפקולטה למדעי המחשב אוטומטים ושפות פורמליות ( ) תרגיל מספר 1.
א " ב, מילים, ושפות הפקולטה למדעי המחשב אוטומטים ושפות פורמליות ( ) תרגיל מספר 1.
א " ב, מילים, ושפות הפקולטה למדעי המחשב אוטומטים ושפות פורמליות ( ) תרגיל מספר 1.
Data Structures – LECTURE 10 Huffman coding
1 Chapter 5 A Measure of Information. 2 Outline 5.1 Axioms for the uncertainty measure 5.2 Two Interpretations of the uncertainty function 5.3 Properties.
CSE115/ENGR160 Discrete Mathematics 03/31/11
הפקולטה למדעי המחשב אוטומטים ושפות פורמליות (236353)
Normal forms for Context-Free Grammars
R. Bar-Yehuda © 1 קומבינטוריקה למדעי - המחשב – הרצאה #16 EULER GRAPHS גרפים אויילרים מבוסס על הספר : S. Even, "Graph Algorithms",
CSE 326 Huffman coding Richard Anderson. Coding theory Conversion, Encryption, Compression Binary coding Variable length coding A B C D E F.
Variable-Length Codes: Huffman Codes
Introduction to CS Theory Lecture 1 – Introduction Piotr Faliszewski
Discrete Mathematics CS 2610 March 26, 2009 Skip: structural induction generalized induction Skip section 4.5.
Zvi Kohavi and Niraj K. Jha 1 Memory, Definiteness, and Information Losslessness of Finite Automata.
Mathematical preliminaries Episode 2 0 Sets Sequences Functions Relations Strings.
By: Er. Sukhwinder kaur.  What is Automata Theory? What is Automata Theory?  Alphabet and Strings Alphabet and Strings  Empty String Empty String 
Distributed Computing 3. Leader Election – lower bound for ring networks Shmuel Zaks ©
Athasit Surarerks THEORY OF COMPUTATION 07 NON-DETERMINISTIC FINITE AUTOMATA 1.
 Rooted tree and binary tree  Theorem 5.19: A full binary tree with t leaves contains i=t-1 internal vertices.
5.5.3 Rooted tree and binary tree  Definition 25: A directed graph is a directed tree if the graph is a tree in the underlying undirected graph.  Definition.
4.3 Recursive Definitions and Structural Induction Sometimes it is difficult to define an object explicitly. However, it may be easy to define this object.
Theory of Computation, Feodor F. Dragan, Kent State University 1 TheoryofComputation Spring, 2015 (Feodor F. Dragan) Department of Computer Science Kent.
ICS 253: Discrete Structures I Induction and Recursion King Fahd University of Petroleum & Minerals Information & Computer Science Department.
1 Recap lecture 27 Pumping lemma version II, proof, examples, Myhill Nerode theorem, examples.
2.1 Functions.
CS355 - Theory of Computation Regular Expressions.
Pumping Lemma for CFLs. Theorem 7.17: Let G be a CFG in CNF and w a string in L(G). Suppose we have a parse tree for w. If the length of the longest path.
Huffman Codes. Overview  Huffman codes: compressing data (savings of 20% to 90%)  Huffman’s greedy algorithm uses a table of the frequencies of occurrence.
CompSci 102 Discrete Math for Computer Science March 13, 2012 Prof. Rodger Slides modified from Rosen.
Theory of computation Introduction theory of computation: It comprises the fundamental mathematical properties of computer hardware, software,
6 6.3 © 2016 Pearson Education, Inc. Orthogonality and Least Squares ORTHOGONAL PROJECTIONS.
Theory of Computing Topics Formal languages automata computability and related matters Purposes To know the foundations and principles of computer science.
Theory of Computing Topics Formal languages automata computability and related matters Purposes To know the foundations and principles of computer science.
. Sequence Alignment Tutorial #3 © Ydo Wexler & Dan Geiger.
5.6 Prefix codes and optimal tree Definition 31: Codes with this property which the bit string for a letter never occurs as the first part of the bit string.
Chapter 5 With Question/Answer Animations 1. Chapter Summary Mathematical Induction - Sec 5.1 Strong Induction and Well-Ordering - Sec 5.2 Lecture 18.
 2004 SDU Uniquely Decodable Code 1.Related Notions 2.Determining UDC 3.Kraft Inequality.
Math 3121 Abstract Algebra I Lecture 6 Midterm back over+Section 7.
Ch4. Zero-Error Data Compression Yuan Luo. Content  Ch4. Zero-Error Data Compression  4.1 The Entropy Bound  4.2 Prefix Codes  Definition and.
Discrete Structures for Computer Science
Introduction to Automata Theory
SQL בסיסי – הגדרה אינדוקטיבית
הפקולטה למדעי המחשב אוטומטים ושפות פורמליות (236353)
Lecture 6 Instantaneous Codes and Kraft’s Theorem (Section 1.4)
Advanced Algorithms Analysis and Design
Advanced Algorithms Analysis and Design
2.1 Functions.
2.1 Functions.
Huffman Coding Greedy Algorithm
Lecture 17 Making New Codes from Old Codes (Section 4.6)
Lecture 3 Strings and Things (Section 1.1)
Presentation transcript:

R. Bar-Yehuda © 1 Graph theory – תורת הגרפים 4. ORDERED TREES 4.1 UNIQUELY DECIPHERABLE CODES מבוסס על הספר : S. Even, "Graph Algorithms", Computer Science Press, 1979 שקפים, ספר וחומר רלוונטי נוסף באתר הקורס : Slides, book and other related material at:

R. Bar-Yehuda © 2 מושגים בסיסיים: א"ב מילה קוד הודעה

R. Bar-Yehuda © 3 מושגים שנפגוש: קוד ח"פ קוד פרפיקסי עץ מצבי הסכום האופייני

R. Bar-Yehuda © UNIQUELY DECIPHERABLE CODES 4.1 UNIQUELY DECIPHERABLE CODES Let We call  an alphabet and its elements are called letters; the number of letters in  is . A finite sequence a 1 a 2 …a l,, where a1 is a letter, is called a word whose length is l. We denote the length of a word w by l(w). A set of (non-empty and distinct) words is called a code. For example, the code {102, 21, 00} consists of three code-words: one code-word of length 3 and two code-words of length 2; the alphabet is {0, 1, 2} and consists of three letters.

R. Bar-Yehuda © 5 Let c 1,c 2,…,c k be code-words. The message c 1,c 2,…,c k is the word resulting from the concatenation of the code-word c 1 with c 2, etc. For example, if c 1 =00,c 2 =21 and c 3 = 00, then c 1 c 2 c 3 = A code C over  is said to be uniquely decipherable (UD) if every message constructed from code-words of C can be broken down into code-words of C in only one way. For example, the code {01, 0, 10} is not UD because the message 010 can be parsed in two ways: 0, 10 and 01, 0..

R. Bar-Yehuda © 6 Lemma 4.1: A code C is UD if and only if no tail is a code-word Proof:לא בחומר (בסמסטר זה)

R. Bar-Yehuda © 7 Prefix c 1 c 2 …c n מחרוזת של אותיות d 1 d 2 …d m היא פרפיקס (רישא) של מחרוזת c 1 =d 1, c 2 =d 2,…, c k =d m אם דוגמא: approximation הוא פרפיקס של: approx

R. Bar-Yehuda © 8 Prefix code קוד יקרא פרפיקסי אם אין בו שני מילים שאחת מהן היא רישא של השניה. טענה: קוד פרפיקסי הוא חד-פענח. הוכחה: על הלוח.

R. Bar-Yehuda © 9 קודים פרפיקסיים ועצים מצביים w(x) :x המילה של צומת מטרת הטענות בהמשך: א. להראות שמילות העלים מהווים קוד פרפיקסי ב. להוכיח תנאי הסכום האופייני

R. Bar-Yehuda © 10 רוצים להראות שמילות העלים מהווים קוד פרפיקסי w(y)פרפיקס של w(x)  y של אב קדמוןx טענה א: w(x)≠w(y)  x≠y טענה ב: w(y)פרפיקס של w(x)  y של אב קדמוןx טענה ג: תוצאה: הקוד המתאים לקבוצת העלים - פרפיקסי אותיות σ טענה ד: לכל קוד-פרפיקסי מעל א"ב עם -מצבי.σ קיים עץ הוכחות: על הלוח.

R. Bar-Yehuda © 11 Theorem 4.1 characteristic sum condition תנאי הסכום האופייני Theorem 4.1; Let C = { c 1, c 2,..., c n } be a UD code over an alphabet of  letters. If l i = l(c i ), i = 1, 2,..., n, then Proof: לא בחומר (בסמסטר זה) אנו נראה זאת רק עבור קודים פרפיקסיים

R. Bar-Yehuda © 12 Theorem 4.2: If the vector of integers, (l 1, l 2,...,l n ), satisfies then there exists a prefix code C={c 1,c 2,…,c n }, over the alphabet of  letters, such that l i =l(c i ). Proof:יוכח בתרגול (בסמסטר זה)