SAM suffix automata--Learning Notes

Source: Internet
Author: User
What is a suffix automaton (SAM).

Probably understood as an optimization for inserting n suffixes into the letter tree for violence.
First it is an automaton.
For a string s S S, Sam S A M Sam can recognize all of its suffixes. There is also a series of expansion applications. some analysis and proof

Use St (ST) s t (S T) St (ST) to indicate the state in the automaton from the initial state along the string St walk.
The String St (a) S T (a) st (a) can identify x x x when and only if AX a x ax is the suffix of s s S.
So a State st (a) S T (a) st (a) can identify which suffixes, only depending on right (a) R i g H T (a) right (a).
Defines the right (a) R i g H t (a) to (a) that indicates that a a a A is present at S S s so that the position is located at the end of the collection.
Specifically: Set a A A in S S s where the position appears as [L1,r1], [L2,R2],..., [LN,RN] [l 1, R 1), [L 2, R 2), ..., [l N, R N] [l_1,r_1], [l_2,r _2),..., [L_n,r_n),

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.