1 / 11

Random generation of words with fixed occurrences of symbols in regular languages

Random generation of words with fixed occurrences of symbols in regular languages. 2. 1. 1. A. Bertoni P. Massazza R. Radicioni 1 Università degli Studi di Milano, Dipartimento di Scienze dell'Informazione, via Comelico 39, 20135 Milano, Italy.

kamana
Download Presentation

Random generation of words with fixed occurrences of symbols in regular languages

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Random generation of words with fixed occurrences of symbols in regular languages 2 1 1 A. Bertoni P. Massazza R. Radicioni 1 Università degli Studi di Milano, Dipartimento di Scienze dell'Informazione, via Comelico 39, 20135 Milano, Italy. 2 Università dell’Insubria, Dipartimento di Informatica e Comunicazione, via Mazzini 5, 21100 Varese, Italy MIUR-COFIN: Ravello, september 19-21

  2. INPUT: Integers OUTPUT: A random word with occurrences of THE RGFOL PROBLEM Fix a language • APPLICATIONS: • Approximate counting • Testing and complexity analysis • Statistical analysis of biological sequences

  3. Is there an algorithm ? OUR CONTRIBUTION Answer is YESforL regular, M = 2 RANDOM GENERATION AND COUNTING Deep correlation with counting [Flajolet, Van Cutsem, Zimmermann 1994] Best algorithm for regular languages working in time [Denise, Roques, Termier 2000]

  4. arithmetical operations (due to the precomputation of all ) STANDARD TECHNIQUE Minimal automaton for L Language recognized by

  5. ALTERNATIVE SOLUTION: Arithmetical ops (1’) 21 6 0 1 1 1 1 1 A VERY SIMPLE EXAMPLE , minimal automaton has one state STANDARD TECHNIQUE: Arithmetical ops 1 1 (1) 1 4 1 3 6 1 2 3 4 0 1 1 1 1 1 (2)

  6. Alternative solution uses equations of type Theorem:If Lis regular, then there exist polynomials s.t. verifies recurrences of type (2). RECURRENCES WITH 1-dim SHIFTS Standard technique uses equations of type

  7. THE FUNCTION “MOVE” Def.: Move( , s, sense) computes a matrix of coefficients from M by means of recurrences of type (2),depending on direction s and on sense sense. An Forward (Backward) move in the direction s uses Example: M=2, Move( , 1 , forward)

  8. A FIRST ATTEMPT Given , we first compute (GB Bases) Then, an algorithm holds if the coefficients do not vanish in for Phase 1: Computation of Phase 2: Random generation

  9. W W W SW SW SW S S S What if the leading and the least coefficients vanish? SOLUTION for M=2: Consider the recurrence equation (with constant coefficients) directly associated with a rational function and define a procedureSmartMove(M,dir)that smartly uses recurrence (3) whenever it is not possible to compute from by means of recurrences of type (2). Fact:A matrix of coefficients M can be computed by (3) if are known. Examples:

  10. Theorem RandomGen(n1,n2) runs in time (and space) O(n1+n2) Fact 1 In the gridthere are O(n1+n2) points where the coefficients of recurrences of type (2) vanish. Fact 2 RandomGen(n1,n2) calls SmartMove() O(n1+n2) times Fact 3 The cost (time and space) of a call SmartMove (M(x,y),dir) that occurs inside RandomGen(n1,n2) is O(n1+n2) Fact 4 The cost (time and space) of h calls SmartMove(M(xh,yh),dirh) that occur inside RandomGen(n1,n2) is O(max(h, n1+n2))

  11. CONCLUSIONS There exists an O(n1+n2) algorithm for the RGFOL problem(under uniform cost criterion) when is regular. Future Works • Extension of the general case to arbitrary alphabets (M>2). • Extension to unambiguous context-free languages. • Deep investigation on the nature of recurrences • Complexity analysis under log. cost criterion.

More Related