×

Constructing method of finite-state machine performing transitions according to a partial type of success function and a failure function

  • US 5,495,409 A
  • Filed: 10/28/1994
  • Issued: 02/27/1996
  • Est. Priority Date: 10/29/1993
  • Status: Expired due to Fees
First Claim
Patent Images

1. A constructing method of a finite-state machine with failure transitions, comprising the steps of:

  • preparing a nondeterministic finite-state machine, an external input taking the nondeterministic finite-state machine from a current state to a plurality of next states;

    producing a deterministic finite-state machine by utilizing the nondeterministic finite-state machine, an external input taking the deterministic finite-state machine from a current state to a next state and specifying an output at the next state, a form for specifying the next state and the output in the deterministic finite-state machine being the same as that in the nondeterministic finite-state machine or being expressed according to a pattern expression in which the form is equivalent to that in the nondeterministic finite-state machine and is convertible into that in the nondeterministic finite-state machine;

    regarding a combination <

    p,q>

    of state sets p and q as states of the deterministic finite-state machine, the state set q being a set of states in the nondeterministic finite-state machine, and the set p being defined as a subset of the state set q;

    setting an initial state s0 of the deterministic finite-state machine to a state <

    {q0 },{q0 }>

    , q0 denoting an initial state of the nondeterministic finite-state machine;

    storing the initial state s0 <

    {q0 },{q0 }>

    to add the initial state s0 to a state set of the deterministic finite-state machine as an element having an unprocessed tag;

    setting an output μ

    (s0) of the deterministic finite-state machine at the initial state s0 to be a set {λ

    (q0)} having an output of the nondeterministic finite-state machine at the initial state q0 ;

    storing the output μ

    (s0);

    producing a state <

    φ



    >

    of the deterministic finite-state machine obtained in case of q=φ

    ;

    storing the state <

    φ



    >

    to add the state <

    φ



    >

    to the state set of the deterministic finite-state machine as an element having a processed tag;

    setting a value μ

    (<

    φ



    >

    ) of an output function μ

    of the deterministic finite-state machine at the state <

    φ



    >

    to be an empty set φ

    ;

    storing the value μ

    (<

    φ



    >

    );

    setting values g(<

    φ



    >

    ,c) of a success function g for arbitrary external inputs c to be the state <

    φ



    >

    ;

    storing the values g(<

    φ



    >

    ,c);

    checking whether or not one or more elements respectively having an unprocessed tag exist in the state set of the deterministic finite-state machine;

    selecting one of the elements <

    p,q>

    respectively having an unprocessed tag from the set of states of the deterministic finite-state machine as a selected element <

    p,q>

    in cases where one or more elements <

    p,q>

    respectively having an unprocessed tag exist in the set of states of the deterministic finite-state machine;

    changing the selected element <

    p,q>

    having an unprocessed tag to a selected element <

    p,q>

    having a processed tag;

    setting one or more values g(<

    p,q>

    ,c) of the success function g to one or more states <

    x,y>

    of the deterministic finite-state machine for first external inputs c which specify a non-empty set of next states δ

    (t,c) defined in the nondeterministic finite-state machine according to one of elements t of a state set p of the nondeterministic finite-state machine corresponding to a first component of the selected state <

    p,q>

    ;

    selecting a union Uδ

    (t,c) of the next states δ

    (t,c) of the nondeterministic finite-state machine for the first external inputs c and the elements t of the set p as values of a set y;

    selecting the values of the set y or a no-empty subset of the set y as elements of a set x;

    storing the values g(<

    p,q>

    ,c)=<

    x,y>

    ;

    storing the states <

    x,y>

    to add the states <

    x,y>

    to the state set of the deterministic finite-state machine as elements respectively having an unprocessed tag in cases where the states <

    x,y>

    are not stored;

    setting a union U{λ

    (t)} of outputs λ

    (t) of the nondeterministic finite-state machine for elements t of the set y as output values μ

    (<

    x,y>

    ) of the output function μ

    of the deterministic finite-state machine at the states <

    x,y>

    in cases where the values μ

    (<

    x,y>

    ) are not defined;

    storing the output values μ

    (<

    x,y>

    )=U{λ

    (t)};

    setting values f(<

    p,q>

    ) of a failure function f not depending on any of second external inputs d to states <

    z,q-p>

    obtained by combining a difference set q-p defined by removing elements of the subset p from elements of the set q and an arbitrary subset z of the difference set q-p in cases where each of the second external inputs d does not specify any of next states g(<

    p,q>

    ,d) defined in the nondeterministic finite-state machine for any of elements of the state set p of the selected element <

    p,q>

    ;

    storing the values f(<

    p,q>

    )=<

    z,q-p>

    stored;

    setting a union U{λ

    (t)} of outputs λ

    (t) of the nondeterministic finite-state machine for elements t of the difference set q-p to output values μ

    (<

    z,q-p>

    ) of the output function μ

    of the deterministic finite-state machine at the states <

    z,q-p>

    in cases where the values μ

    (<

    x,y>

    ) of the output function μ

    are not defined;

    storing the output values μ

    (<

    z,q-p>

    )=U{λ

    (t)};

    repeating the steps of checking whether or not one or more elements, selecting one of the elements <

    p,q>

    , changing the selected element <

    p,q>

    , setting one or more values g(<

    p,q>

    ,c), selecting a union Uδ

    (t,c), selecting the values of the set y, storing the values g(<

    p,q>

    ,c)=<

    x,y>

    , storing the states <

    x,y>

    , setting a union U{λ

    (t)}, storing the output values μ

    (<

    x,y>

    ), setting values f(<

    p,q>

    ), storing the values f(<

    p,q>

    ), setting a union U{λ

    (t)}, and storing the output values μ

    (<

    z,q-p>

    ) until no existence of an element having an unprocessed tag is detected in the step of checking whether or not one or more elements; and

    defining the deterministic finite-state machine modified in the above steps as a finite-state machine with failure transitions, wherein the number of states <

    p,q>

    is finite, an external input c takes the finite-state machine with failure transitions from a current state s to a next state g(s,c) and an output μ

    (s) is output from the next state g(s,c) in cases where a value g(s,c) of the success function g is defined, and an external input c takes the finite-state machine with failure transitions from a current state s to a next state g(h,c) (where h=f(f(...f(s)...))) determined by repeating a process that a value f(s) of the failure function f is calculated and the value f(s) is rewritten to the symbol s until a value g(h,c) of the success function g is defined in cases where a value g(s,c) of the success function g is not defined.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×