The Frequent Words Problem: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{DISPLAYTITLE:The Frequent Words Problem (The Frequent Words Problem)}} == 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 == <pre>n: length of string k: length of words sigma: size of alphabet</pre> == Table of Algorithms == {| class="wikitable sortable" style="text-align:center;" width="100%" ! Name !! Year !! Time !! Space !! A...") |
No edit summary |
||
(4 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
== Parameters == | == Parameters == | ||
$n$: length of string | |||
k: length of words | |||
sigma: size of alphabet | $k$: length of words | ||
$\sigma$: size of alphabet | |||
== Table of Algorithms == | == Table of Algorithms == | ||
Line 18: | Line 20: | ||
|- | |- | ||
| [[Naive solution (The Frequent Words Problem The Frequent Words Problem)|Naive solution]] || 1940 || $O(n)$ || $O(max(n, sigma^k)$) | | [[Naive solution (The Frequent Words Problem The Frequent Words Problem)|Naive solution]] || 1940 || $O(n)$ || $O(max(n, \sigma^k)$) || Exact || Deterministic || | ||
|- | |- | ||
| [[Rabin Karp (The Frequent Words Problem The Frequent Words Problem)|Rabin Karp]] || 1987 || $O(n)$ || $O(max(n, sigma^k)$) | | [[Rabin Karp (The Frequent Words Problem The Frequent Words Problem)|Rabin Karp]] || 1987 || $O(n)$ || $O(max(n, \sigma^k)$)? || Exact || Deterministic || | ||
|- | |- | ||
|} | |} | ||
== Time Complexity | == Time Complexity Graph == | ||
[[File:The Frequent Words Problem - Time.png|1000px]] | [[File:The Frequent Words Problem - Time.png|1000px]] | ||
== References/Citation == | == References/Citation == | ||
http://bioinformaticsalgorithms.com/data/debugdatasets/replication/FrequentWordsProblem.pdf | http://bioinformaticsalgorithms.com/data/debugdatasets/replication/FrequentWordsProblem.pdf |
Latest revision as of 09:12, 28 April 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)$) | Exact | Deterministic | |
Rabin Karp | 1987 | $O(n)$ | $O(max(n, \sigma^k)$)? | Exact | Deterministic |
Time Complexity Graph
Error creating thumbnail: Unable to save thumbnail to destination
References/Citation
http://bioinformaticsalgorithms.com/data/debugdatasets/replication/FrequentWordsProblem.pdf