Fast String Correction With l Even Shte in Automata

Embed Size (px)

Citation preview

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    1/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    2/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    3/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    4/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    5/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    6/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    7/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    8/29

    W

    V

    0 1 i i+2

    xi+1 xi+2

    xi+1 xi+2 (i+1)# (i+2)#

    i+1

    i#i0 1

    W

    V

    0 1 i i+2

    xi+1 xi+2

    xi+2 (i+1)# (i+2)#

    i+1

    i0 1

    W

    V

    0 1 i i+2

    xi+1 xi+2

    xi+2 (i+2)#

    i+1

    0 1 i

    Insertion

    Substitution

    Deletion

    1

    2

    3

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    9/29

    i

    {i+1}

    {i#,(i+1)#,(i+2)#}

    {i#,(i+1)#}

    0 i n-2

    n-1

    {n}

    {(n-1)#,n#}

    xi+1

    xi+2

    xn

    n {n#}i

    {i+1}

    {i#,(i+1)#}

    0 i n-2

    xi+1

    i = n-1 i = n

    i#

    {(i+1)#}xi+1

    0 i n-1

    pr(xi+1,xi+2) = (12)

    pr(xi+1,xi+2) = (11)

    n#

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    10/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    11/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    12/29

    x1

    x2

    x2

    x3

    x3

    x4

    x4

    x5

    x50 1 2 3 4 5

    1# 2# 3# 4#

    5#

    (012)#

    (01)# (12)# (23)#

    (34)#(45)#(123)# (234)# (345)#

    x2 x3 x4 x5

    x2 x3 x4 x5x1

    x1

    x2

    x2 x2

    x3

    x3

    x4

    x40 1 2 3 4 5

    1# 2# 3# 4# 5#

    (012)#

    (01)#

    (12)#

    (23)# (34)#(45)#(234)# (345)#

    x2 x2 x3 x4

    x2

    x2

    x3x4

    x1

    x2

    x2

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    13/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    14/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    15/29

    i

    {i+1}

    {#: i,i+1,i+2}

    {#: i,i+1}

    0 i n-3

    pr(xi+1,xi+2,xi+3) = (1,2,3)

    xi+1xi+2

    {#: i,i+1

    ##: i+3}

    xi+3i

    {i+1}

    {#: i,i+1}

    pr(xi+1,xi+2,xi+3) = (1,1,2)

    xi+1

    {#: i,i+1

    ##: i+3}

    xi+3 i

    {i+1}

    {#: i,i+1}

    pr(xi+1,xi+2,xi+3) = (1,2,2)

    xi+1

    {#: i,i+1,i+2}xi+2 i

    {i+1}

    {#: i,i+1}

    pr(xi+1,xi+2,xi+3) = (1,2,1)

    xi+1

    {#: i,i+1,i+2}xi+2

    i

    {i+1}

    {#: i,i+1}

    pr(xi+1,xi+2,xi+3) = (1,1,1)

    xi+1

    0 i n-3 0 i n-3 0 i n-3

    0 i n-3

    n-2

    {n-1}

    {#: n-2,n-1}

    xn-1

    xn{#: n-2,n-1,n} n-2

    {n-1}

    {#: n-2,n-1}

    xn-1

    i = n-2 i = n-2

    pr(xn-1,xn) = (1,2) pr(xn-1,xn) = (1,1)

    n-1

    {n}

    {#: n-1,n}

    i = n-1

    xn

    n {#: n}

    i = n

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    16/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    17/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    18/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    19/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    20/29

    Ins(?) after x5

    x1

    x1

    x1

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5 ?

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5

    Del(x5)

    Del(x3)

    Subst(x3,x3)

    Ins(x3) before x3

    Subst(x5,x5)

    Ins(x5) before x5

    x1

    x1

    x1

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5 ?

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5

    x2

    x2

    x3

    x3

    x4

    x4

    x5

    x5

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5

    ?

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    21/29

    x1

    x1

    x1

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5 ?

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5

    x2

    x2

    x4 x5

    x5

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5

    ?

    x3 x4 x5

    x3 deletion-deletion-transitions

    deletion of x3 followed by

    deletion of x4

    deletion of x4 followed by deletion of x5

    x1

    x1

    x1

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5 ?

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5

    x2

    x2

    x3

    x3

    x4

    x4

    x5

    x5

    x3

    x3

    x3

    x4x4

    x4

    x5x5

    x5

    ?

    x2 x3 x4 x5

    deletion-substitution-transitions

    deletion of x4 followed by

    substitution of x5

    x1

    x1

    x1

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5 ?

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4x4

    x5

    x5

    x5

    x2

    x2

    x3

    x3

    x4

    x4

    x5

    x5

    x3

    x3

    x3

    x4x4

    x4

    x5x5

    x5

    ?

    x3 x4 x5

    substitution-deletion-transitions

    substitution of x3 followed by

    deletion of x4

    substitution of x4 followed by

    deletion of x5

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    22/29

    x1

    x1

    x1

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5 ?

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5

    x2

    x2

    x3

    x3

    x4

    x4

    x5

    x5

    x3

    x3

    x3

    x4x4

    x4

    x5x5

    x5

    ?

    x2 x3 x4x5

    substitution-substitution-transitions

    substitution of x4 followed by

    substitution of x5

    x1

    x1

    x1

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5 ?

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5

    ?

    x2

    x2

    x3

    x3

    x4

    x4

    x5

    x5

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5

    ?

    x2x1

    x1 x2 x3 x4 x5

    insertion-insertion-transitions

    two insertions before x5

    two insertions after x5

    x1

    x1

    x1

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5 ?

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5

    x2

    x2

    x3

    x3

    x4

    x4

    x5

    x5

    x3

    x3

    x3

    x4x4

    x4

    x5x5

    x5

    ?

    x2

    x1 x2 x3 x4 x5

    insertion-substitution-transitions

    insertion before x5 followed by

    substitution of x5

    x1

    x1

    x1

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5 ?

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5

    x2

    x2

    x3

    x3

    x4

    x4

    x5

    x5

    x3

    x3

    x3

    x4x4

    x4

    x5x5

    x5

    ?

    x2

    x3x2 x4 x5

    substitution-insertion-transitions

    substitution of x4 followed by

    insertion before x5?

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    23/29

    x1

    x1

    x1

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5 ?

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5

    x2

    x2

    x3

    x3

    x4

    x4

    x5

    x5

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5

    x3

    x3

    x4

    x4

    x5

    x5

    x4

    x4

    x4

    x5

    x5

    x5

    ?

    ?

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    24/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    25/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    26/29

    x1

    x1

    x1

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5 ?

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5 Transpose(x4x5)

    x2x1 x3x2 x4x3 x5x4

    x1

    x1

    x1

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5 ?

    x2x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5x5

    x5

    Split(x5,x5x5)

    x1 x2 x3 x4 x5

    x1

    x1

    x1

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5 ?

    x2

    x2

    x2

    x3

    x3

    x3

    x4

    x4

    x4

    x5

    x5

    x5 Merge(x4x5,x4&x5)

    x1&x2 x2&x3 x3&x4 x4&x5

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    27/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    28/29

  • 8/8/2019 Fast String Correction With l Even Shte in Automata

    29/29