Finite State Machines for Strings over Infinite Alphabets

Click here to load reader

  • date post

    10-Jan-2016
  • Category

    Documents

  • view

    37
  • download

    1

Embed Size (px)

description

Finite State Machines for Strings over Infinite Alphabets. F. Neven, T. Schwentick and V. Vianu. ACM Transactions on Computational Logic, Vol. V No. N, 01/03. Automata Seminar - Spring 2007 Tamar Aizikowitz. Finite Machine for Infinite Alphabet?. Finite automaton: - PowerPoint PPT Presentation

Transcript of Finite State Machines for Strings over Infinite Alphabets

  • Finite State Machines for Strings over Infinite AlphabetsF. Neven, T. Schwentick and V. VianuAutomata Seminar - Spring 2007Tamar AizikowitzACM Transactions on Computational Logic, Vol. V No. N, 01/03

  • Finite Machine for Infinite Alphabet?Finite automaton:Transitions based on current state and input value defined for QInfinite alphabet infinite transition function?Solution: Store a finite number of valuesTransitions based on stored valuesNew values can be stored during computation

  • Register AutomataSuggested by Kaminski and Francez, 1994Finite automata + finite number of registersRegisters store values from alphabetRegister operations:Compare register value with current valueStore current value in registerTransitions specify change of state, whether value is stored and movement of head.

  • Infinite Alphabets - DefinitionsD : an infinite set (e.g. set of data values)D-string : w=d1dn s.t. di Ddom(w) = {1,,|w|}valw(i) = di for i dom(w), D delimit input string 2-way automata work on w = vdom+(w) = {0,,|w|+1} where: valw(0) = valw(|w|+1) =

  • Nondeterministic 2-Way k-Register Automata (2N-RA)A = D , Q , q0 , 0 , , F D infinite alphabetQ , q0 , F as usual0:{1,,k} D{,} initial register assignment transition functionTwo types of transitions:(i,q) ( p,d ) current value = register i valueq ( p,i,d ) store current value in register id {stay,right,left} movement direction of head

  • ConfigurationsConfiguration: = [ j , q , ]

    Initial configuration: 0 = [1,q0,0]

    Accepting configuration: f = [ j,qf,] , qf FHead PositionCurrent StateRegister Assignment

  • Computations[ j, q, ] [ j, q, ] iff:(1) (i,q) (q,d) , j = j+d , valw( j) = (i) and = or(2) q (q,i,d) , j = j+d and = | (i) valw( j)

    Note: Type 2 transition relevant only if no type 1 transition applies (why?)

    w accepted by A iff there exists f s.t. 0 * f

  • VariantsDeterministic: at most one transition applies to each configuration.

    One way: no left moves in transition function.

    xC-RA: denotation for various modelsWhere x{1,2} and C{D,N}

  • Example 1: 1N-RAL1={d1dn | i, j : ij di=dj}

    contains all words where some value appears more than once

    Construction idea:Read input string from left to rightGuess i and store value in registerLook for stored value in remaining input

  • Example 1: ContinuedA = D , {q0, q1, qf} , q0 , , , {qf}qf :Accepting configuration reached!q1 look for j :Go right: q1 (1,q1)If found value, move to qf : (2,q1) qfq0 - look for i :Go right: q0 (1,q0)Guess i, store value, move to q1: q0 (2,q1)Trash registerRegister for storing repeating value

  • Example 1: ConcludedExample of run on w = 13234 13234##q0(1,q0)q013#1q0(2,q1)213q13q1(1,q1)2323(2,q1)qf43q fW ACCEPTED!

  • Example 2: 2N-RAL2={d1dn | i, j : ij di dj}

    contains all words with distinct values

    Construction idea:Scan symbols from left to right. For each symbol:Store value in registerLook for stored value in remaining inputIf found rejectElse proceed to check next symbol (how?)

  • Example 2: ContinuedA = D,{q0, q1, q2, q3, qrej, qacc}, q0 ,,,{qacc}(1,q0) (q1,right)q1 (2,q2,right)q2 (1,q2,right)(2,q2) (qrej,stay)(3,q2) (q3,left)q3 (1,q3,left)(2,q3) (q1,right)(3,q1) (qacc,stay)didjdidj#?dididididi

  • LogicVariants of first order and monadic second order logic over D-strings.w represented by logical structure:Domain dom(w) with natural ordering