The Frequent Words Problem: Difference between revisions

From Algorithm Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 26: Line 26:
|}
|}


== Time Complexity graph ==  
== Time Complexity Graph ==  


[[File:The Frequent Words Problem - Time.png|1000px]]
[[File:The Frequent Words Problem - Time.png|1000px]]


== Space Complexity graph ==  
== Space Complexity Graph ==  


[[File:The Frequent Words Problem - Space.png|1000px]]
[[File:The Frequent Words Problem - Space.png|1000px]]


== Pareto Decades graph ==  
== Pareto Frontier Improvements Graph ==  


[[File:The Frequent Words Problem - Pareto Frontier.png|1000px]]
[[File:The Frequent Words Problem - Pareto Frontier.png|1000px]]

Revision as of 14:05, 15 February 2023

Description

Given a string of length $n$ and in input integer $k$, determine the most frequent $k$-mers in the string, i.e. the most frequent words of length $k$.

Parameters

n: length of string

k: length of words

sigma: size of alphabet

Table of Algorithms

Name Year Time Space Approximation Factor Model Reference
Naive solution 1940 $O(n)$ $O(max(n, sigma^k)$) auxiliary Exact Deterministic
Rabin Karp 1987 $O(n)$ $O(max(n, sigma^k)$) auxiliary? Exact Deterministic

Time Complexity Graph

The Frequent Words Problem - Time.png

Space Complexity Graph

The Frequent Words Problem - Space.png

Pareto Frontier Improvements Graph

The Frequent Words Problem - Pareto Frontier.png

References/Citation

http://bioinformaticsalgorithms.com/data/debugdatasets/replication/FrequentWordsProblem.pdf