タグ

2011年8月8日のブックマーク (2件)

  • LCP(Longest Common Prefix)を用いたSuffix Arrayの検索 - EchizenBlog-Zwei

    Suffix Arrayは「インデックスの構築」と「キーワードの検索」からなる。それぞれ構築には文字列のsortが、検索には文字列の二分探索が必要になる。 以前にCompressed Suffix Arrayのライブラリtsubomiを実装したときにはsortについてはマルチキー・クイックソート(multikey-quicksort)というアルゴリズムを用いた。一方で二分探索については特に工夫をしていなかった。 さすがにこのまま放っておくのは気が引けたのでSuffix Array論文を読みなおしてみたらLCP(Longest Common Prefix)を用いた二分探索の方法が書いてあった。シンプルだが賢い方法だったのでメモしておく。これはすごい(というか今まで読み飛ばしてたことのほうが問題ですね。はい)。 さて。まずLCP(Longest Common Prefix)とは何かと言うとその

    LCP(Longest Common Prefix)を用いたSuffix Arrayの検索 - EchizenBlog-Zwei
    xxxxxeeeee
    xxxxxeeeee 2011/08/08
    suffix array上でクエリ文字列の検索にLCP(longest common prefix)が使えるという話
  • German tank problem - Wikipedia

    During World War II, production of German tanks such as the Panther was accurately estimated by Allied intelligence using statistical methods. In the statistical theory of estimation, the German tank problem consists of estimating the maximum of a discrete uniform distribution from sampling without replacement. In simple terms, suppose there exists an unknown number of items which are sequentially

    German tank problem - Wikipedia