Learning Summary of multi-pattern matching algorithm

Source: Internet
Author: User

The multi-pattern string matching algorithm mainly has the AC algorithm, is establishes a string automaton trie tree. It then establishes functions such as goto,failture and output.

The time complexity is O (n) and is related to the length of the string to be matched. Implementation: Constructs the prefix tree to set the failure function and each node to match the output to the target string

Search and jump. The failure function determines which state to fallback to. Build the Fail table based on the calculated fail value. Then it is the target string search. to a link:

Http://tech.meituan.com/ac.html. Single-mode matching is a traditional KMP and so on, BM algorithm. The next step is to combine the AC algorithm with the single-mode fast jump algorithm.

Learning Summary of multi-pattern matching algorithm

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.