Aww frickin yisss. Finished a problem I was working on for two - TopicsExpress



          

Aww frickin yisss. Finished a problem I was working on for two days. Here was the problem. Given a string of up to 10^5 decimal digits, find the number of occurrences of 2^x in decimal form in the string where x is a maximum of 800. This is a form of the exact set matching problem. The set P is the 801 powers of 2 as decimal strings, and the text is the input string. If p is the sum of the lengths of the element of P and t is the length of the input string, there is a solution to this problem with a running time of O(t + p + k) where k is the number of occurrences. This solution was invented by Aho and Corasick using a modified Trie which is now known as Aho-Corasick Automaton. This is the solution I used. More information at en.wikipedia.org/wiki/Aho%E2%80%93Corasick_string_matching_algorithm and cs.uku.fi/~kilpelai/BSA05/lectures/slides04.pdf
Posted on: Sun, 08 Jun 2014 17:04:04 +0000

Trending Topics



Recently Viewed Topics




© 2015