Zvi Kohavi and Niraj K. Jha 1 Memory, Definiteness, and Information Losslessness of Finite Automata.

Slides:



Advertisements
Similar presentations
Chapter 2 Revision of Mathematical Notations and Techniques
Advertisements

Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Finite-state Recognizers
Theory of Computing Lecture 23 MAS 714 Hartmut Klauck.
Lecture 24 MAS 714 Hartmut Klauck
Longest Common Subsequence
Relations Relations on a Set. Properties of Relations.
8.3 Representing Relations Connection Matrices Let R be a relation from A = {a 1, a 2,..., a m } to B = {b 1, b 2,..., b n }. Definition: A n m  n connection.
Walks, Paths and Circuits Walks, Paths and Circuits Sanjay Jain, Lecturer, School of Computing.
C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
Information Theory EE322 Al-Sanie.
Zvi Kohavi and Niraj K. Jha 1 Introduction to Synchronous Sequential Circuits and Iterative Networks.
Bounds on Code Length Theorem: Let l ∗ 1, l ∗ 2,..., l ∗ m be optimal codeword lengths for a source distribution p and a D-ary alphabet, and let L ∗ be.
Digital Logic Design Lecture 27.
Finite Automata with Output
Representing Relations Using Matrices
Applied Discrete Mathematics Week 11: Graphs
Applied Discrete Mathematics Week 12: Trees
3 -1 Chapter 3 The Greedy Method 3 -2 The greedy method Suppose that a problem can be solved by a sequence of decisions. The greedy method has that each.
Introduction to Graphs
Aho-Corasick String Matching An Efficient String Matching.
Data Structures – LECTURE 10 Huffman coding
Variable-Length Codes: Huffman Codes
Copyright © Cengage Learning. All rights reserved.
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
Induction and recursion
Partially Ordered Sets (POSets)
5  Systems of Linear Equations: ✦ An Introduction ✦ Unique Solutions ✦ Underdetermined and Overdetermined Systems  Matrices  Multiplication of Matrices.
A Complexity Measure THOMAS J. McCABE Presented by Sarochapol Rattanasopinswat.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 7 Mälardalen University 2010.
Zvi Kohavi and Niraj K. Jha 1 Capabilities, Minimization, and Transformation of Sequential Machines.
© The McGraw-Hill Companies, Inc., Chapter 3 The Greedy Method.
Copyright © Cengage Learning. All rights reserved.
Zvi Kohavi and Niraj K. Jha 1 Structure of Sequential Machines.
1 2. Independence and Bernoulli Trials Independence: Events A and B are independent if It is easy to show that A, B independent implies are all independent.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Basic Concepts of Encoding Codes, their efficiency and redundancy 1.
Chapter 9. Section 9.1 Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and.
CHAPTER 4 Combinational Logic
Based on slides by Y. Peng University of Maryland
Introduction to State Machine
Word : Let F be a field then the expression of the form a 1, a 2, …, a n where a i  F  i is called a word of length n over the field F. We denote the.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CS 103 Discrete Structures Lecture 13 Induction and Recursion (1)
Chapter 6 Properties of Regular Languages. 2 Regular Sets and Languages  Claim(1). The family of languages accepted by FSAs consists of precisely the.
Problem Statement How do we represent relationship between two related elements ?
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
CS 203: Introduction to Formal Languages and Automata
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 1 Regular Languages Some slides are in courtesy.
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
UNIT - I Formal Language and Regular Expressions: Languages Definition regular expressions Regular sets identity rules. Finite Automata: DFA NFA NFA with.
Testing of Synchronous Sequential Circuits By Dr. Amin Danial Asham.
Chapter 5 Finite Automata Finite State Automata n Capable of recognizing numerous symbol patterns, the class of regular languages n Suitable for.
Zvi Kohavi and Niraj K. Jha 1 Linear Sequential Machines.
Chapter 11. Chapter Summary  Introduction to trees (11.1)  Application of trees (11.2)  Tree traversal (11.3)  Spanning trees (11.4)
Lecture 14: Theory of Automata:2014 Finite Automata with Output.
 2004 SDU Uniquely Decodable Code 1.Related Notions 2.Determining UDC 3.Kraft Inequality.
Capabilities, Minimization, and Transformation of Sequential Machines
Relations and Their Properties
Unit-III Algebraic Structures
Relations Binary relations represent relationships between the elements of two sets. A binary relation R from set A to set B is defined by: R  A 
5 Systems of Linear Equations and Matrices
Copyright © Cengage Learning. All rights reserved.
Testing of Synchronous Sequential Circuits
Enumerating Distances Using Spanners of Bounded Degree
Copyright © Cengage Learning. All rights reserved.
Error Correction Coding
Theory of Computation Lecture 23: Turing Machines III
332:437 Lecture 14 Turing Machines and State Machine Sequences
Presentation transcript:

Zvi Kohavi and Niraj K. Jha 1 Memory, Definiteness, and Information Losslessness of Finite Automata

2 Memory Span Memory span: the amount of past input and output information needed to determine the machine’s future behavior Memory span w.r.t. input-output sequences (finite-memory machines): An FSM M is defined as a finite-memory machine of order, if is the least integer s.t. the present state of M can be determined uniquely from the knowledge of the last input symbols and the corresponding output symbols I.e., every input sequence of length is a homing sequence

3 Testing Table and Testing Graph Example: Consider machine M 1 and its testing table and testing graph Uncertainty pair Implied pair

4 Conditions for Finite Memory Theorem: A sequential machine M has a finite memory if and only if its testing graph is loop-free Example: the testing graph of M 1 has two loops – hence it’s not finite memory An arbitrary long string of 0 input symbols: will never resolve uncertainty (CD) Similarly, if initial uncertainty is (AC): input sequence 0101…01 will transfer the machine to (BD), (AC), (BD), and so on

5 Corollary Corollary: Let G be a loop-free testing graph for machine M. If the length of the longest path in G is l, then = l + 1 Example: Machine M 2 for which = (n-1)n/2

6 Determining Whether a Graph is Loop- free Connection matrix of directed graph G with p vertices: a pxp matrix, whose (i,j) th entry is 1 if there is an arc emanating from vertex i and terminating at vertex j, and is 0 otherwise If G is loop-free: then it has one or more terminal vertices The subgraph resulting from the removal of a terminal vertex and all arcs leading to it is also loop-free Example: connection matrix for machine M 2 with = 6

7 Memory Span wrt Input Sequences (Definite Machines) A sequential machine M is called a definite machine of order if is the least integer s.t. the present state of M can be determined uniquely from the knowledge of the last input symbols to M A definite machine is thus said to have finite input memory Definite machine of order : -definite machine A -definite machine is also finite memory of order equal to or smaller than The knowledge of any past input values is always sufficient to completely specify the present state of a -definite machine Canonical realization:

8 Properties of Definite Machines A machine is -definite if and only if every sequence of length is a synchronizing sequence Length of the longest path to a singleton uncertainty in the synchronizing tree: order of definiteness Example: Machine M 3 : definite of order 3

9 Machine Contraction Example: Machine M 4 and its contracted table M 4 If M is -definite: M is ( -1)-definite –Conversely, if M is k-definite: then M is (k + 1)-definite –If M is not definite: neither is M

10 Test for Definiteness First test for definiteness: 1.Determine the subsets of states whose I k -successors are identical 2.Select one representative in each subset 3.Obtain the contracted table M by replacing each subset with its representative, and modifying the table accordingly 4.Regard M as a new table and repeat the previous steps until no new contractions are possible M is definite if and only if the final contracted table consists of just a single state Example: Machine M 4 and its contractions

11 Theorem Theorem: If machine M is -definite, then <= n-1. Moreover the order of definiteness is equal to the number of contractions needed to obtain a one-state machine Since for machine M 4, four contractions are necessary to obtain a one- state machine: its = 4

12 Testing Table/Graph for Definiteness Example: Testing table and testing graph for machine M 3 Theorem: A machine is -definite if and only if its corresponding testing graph G is loop-free. If the length of the longest path in G is l, then = l+1 Machine M 3 : definite of order 3

13 Memory Span wrt Output Sequences An FSM M is said to have an output memory of order if is the least integer s.t. the knowledge of the last output symbols suffices to determine the state of M at some time during the last transitions Testing table for output memory: Example: Machine M 5 Output-successor table

14 Example (Contd.) Example (contd.): Testing graph for M 5 Theorem: An FSM has a finite output memory if and only if its corresponding testing graph G is loop-free. Furthermore, if G is loop-free and the longest path in G is of length l, then M has an output memory of order = I + 1 For M 5 : = 4

15 Determining the State of the Machine Example: For machine M 5 Suppose the output sequence is 1110 Initially, the machine could have been in: A, B, or D Thus, initial uncertainty: (ABD)

16 Information Lossless Machines An FSM M is information lossless if the knowledge of the initial state, output sequence, and final state is sufficient to determine uniquely the input sequence Conditions for lossiness: Example: Machine M 6 is lossy

17 Information Losslessness of Finite Order An FSM is said to be information lossless of finite order if the knowledge of the initial state and the first output symbols is sufficient to determine the first input symbol uniquely Example: Machine M 7 : lossless machine of first order

18 Test for Information Losslessness Two states, S i and S j, are said to be output-compatible if there exists some state S p s.t. both S i and S j are its O k -successors, or if there exists a pair of states S r,S t, s.t. S i,S j are their O k -successors In the latter case: (S i S j ) is implied by (S r S t ) Example: Machine M 8 : testing table for information losslessness

19 Testing Graph A machine is lossless if and only if its testing table does not contain any compatible pair consisting of repeated entries Testing graph for M 8 : lossless

20 Theorem Theorem: A machine M is lossless of order = l + 2 if and only if its testing graph is loop-free and the length of the longest path in the graph is l Case of = 1: detected by the absence of compatible pairs Case of = 2: detected by the absence of arcs in the graph Example: Since the testing graph of M 8 is not loop-free: it is not lossless of finite order

21 Example Example: Machine M 9 : lossless of order 3

22 Retrieval of the Input Sequence Example: Consider machine M 8 Assume the machine was initially in A Suppose output sequence: The machine terminates in B

23 Inverse Machines An inverse M i is a machine which, when excited by the output sequence of a machine M, produces (as its output) the input sequence to M, after at most a finite delay M must be lossless of finite order Example: Machine M 7 and its inverse M 7 i

24 A Deciphering System Schematic diagram:

25 Minimal Inverse Machine Example: Machine M 10 : lossless of third order Knowledge of initial state and three successive output symbols: yields the first input symbol Possible triples: (A,0,0), (A,1,1), (B,0,1), (B,1,0), (C,0,0), (C,0,1), (D,1,0), (D,1,1) For every state of M 10 : the next inverse state is a triple whose members are obtained as follows: –First member: the state to which M 10 goes when it is initially in the state that is the first member of the present inverse state, and when it is supplied with the first input symbol –Second member: third member of the corresponding present inverse state –Third member: present output of M 10

26 Example (Contd.) Example (contd.): Suppose M 10 is initially in state A, and produces either 00 or 11 in response to some input sequence Then, two time units later: M 10 i must be in the state that corresponds to A and the appropriate output sequence, i.e., (A,0,0) or (A,1,1) Since S 4 = (B,1,0) is the only state from which M 10 i that can reach (A,0,0) and (A,1,1), when supplied with input sequences 00 or 11: if the initial state of M 10 is A, the initial state of M 10 i must be (B,1,0)

27 Synchronizable and Uniquely Decipherable Codes Source alphabet: {A,B,C,…} Code alphabet: L = {0,1,2,…} Binary code: L = {0,1} Code word: concatenation of a finite number of code symbols Code: finite number of distinct code words of finite length, each representing a source symbol Coded message: concatenation of code words, without spacing or any other punctuation Example: L = {0,1} and set of code words = {00,01,11,10} Sequence ABDC: coded as

28 Uniquely Decipherable Code Example: Not in every case can we work backwards to find a unique sequence of source symbols for a given binary sequence If = {0,00,01} represents {A,B,C}: then 0001 may be decoded as AAC or BC Uniquely decipherable code: if and only if every coded message can be decomposed into a sequence of code words in only one way is uniquely decipherable, is not Whenever the number of code symbols is not the same for all code words: the code is not necessarily uniquely decipherable On the other hand: = {1,01,001,0001} is uniquely decipherable since symbol 1 actually serves as a separator between successive code words –Such a separator is called a comma –Such a code is called a comma code Block code: in which all code words contain the same number of symbols Variable-length code: in which the number of symbols representing code words is not the same

29 Instantaneous Code Instantaneous code: whenever each code word can be deciphered without knowing the succeeding code words and are instantaneous codes: while = {1,10,100} is not since sequence 10 cannot be deciphered until we verify that the next symbol is a 1 Let = be a code word: then,m<=n, is called a prefix of A necessary and sufficient condition for a code to be instantaneous is that no code word is a prefix of some other code word Reason for using variable-length codes: reduction in the average length of messages Use shorter code words for more frequently used symbols Average length of code: P i l i –P i and l i : probability of occurrence and length of the code word representing the i th source symbol

30 Test of Unique Decipherability A code is uniquely decipherable with a finite delay if and only if is the least integer s.t. the knowledge of the first symbols of the coded message suffices to determine its first code word Insert a separation symbol S at the beginning and end of each code word in In every code word representing source symbol N: insert symbol N i between its i th symbol and its (i+1) st symbol Example: If source symbols are {A,B,C} and = {0,01,1010}, then the code words are Separation symbol to the right of the code symbol: -successor, denoted R i, of the left separation symbol –C 1 : 1-successor of S because S1C 1 occurs in the third code word

31 Testing Table for Unique Decipherability Two successors, R i and R j, are compatible if S R i and S R j occur, or if R p R i and R q R j occur, and R p and R q are compatible (R i R j ) is said to be the compatible implied by (R p R q ) Testing table can be constructed in the following manner: 1.The column headings of the table are the symbols of the code alphabet 2.The first row heading is S. The other row headings are the compatible pairs 3.The entries in row R p R q, column, are the compatibles implied by (R p R q ) under Example: Testing table for our example

32 Testing Table (Contd.) If a repeated pair (SS) occurs in the table: the code is not uniquely decipherable, else it is Implies that there exists some compatible pair (R i R j ) s.t. S is the -successor of both R i and R j However, since both R i and R j are reachable from S by a binary sequence that corresponds to two or more different sequences of source symbols: the code is not uniquely decipherable Tracing back the compatibles which implied pair (SS): we can find shortest ambiguous messages –Ambiguous message may be interpreted as AC or BBA

33 Testing Graph Example: Testing table and graph for code = {1,10,001} Uniquely decipherable since (SS) is not generated A code is uniquely decipherable with a finite delay if and only if its testing graph is loop-free Delay = I + 1: l is the length of the longest path in the testing graph

34 Deciphering a Coded Message Example: Consider code = {11,011,001,01,00}, which is known to be uniquely decipherable We want to decode Scanning from left: insert a lower comma whenever a sequence, which corresponds to a legitimate code word, is detected Next, scan the coded message from the right and insert an upper comma: whenever a sequence which corresponds to the inverse of a legitimate code word is scanned If the code is uniquely decipherable: the message can be decoded by retaining only those commas that occur in the upper and lower spaces simultaneously

35 Test for Synchronizability of Codes A code is said to be synchronizable of order if is the least integer s.t. the knowledge of any consecutive code symbols is sufficient to determine a separation of code words within these symbols Testing a code for synchronizability: analogous to testing an FSM for finite output memory A code is synchronizable if and only if it is uniquely decipherable and its testing graph is loop-free. It is synchronizable of order if and only if the longest path in the graph is of length - 1 Example: Testing table and testing graph for = {1,10,001}