1 / 8

F: 氷の音楽家

F: 氷の音楽家. 作問: 青木 テスト担当: 津島、西出. 問題概要. 連長圧縮された長さ n の文字列 s 圧縮されていない長さ m の文字列 t 0 , …, t k s に対する t i の類似度 t i の部分文字列のうち、 s の部分に含まれるものの数 t i に同じ部分文字列が出現した場合、別々に数える 類似度が最大となる文字列を t i , …, t k から求める問題. 圧縮文字列を展開したい. 文字列 s をふつうに展開するとメモリに載らない.

aira
Download Presentation

F: 氷の音楽家

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. F: 氷の音楽家 作問: 青木 テスト担当: 津島、西出

  2. 問題概要 • 連長圧縮された長さ n の文字列 s • 圧縮されていない長さ m の文字列 t0, …, tk • s に対する tiの類似度 • tiの部分文字列のうち、 s の部分に含まれるものの数 • tiに同じ部分文字列が出現した場合、別々に数える • 類似度が最大となる文字列を ti, …, tkから求める問題

  3. 圧縮文字列を展開したい • 文字列 s をふつうに展開するとメモリに載らない sh1000(1000(1000(1000(ee))))t100(a)paz100(u) =>sheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee...

  4. 必要な部分だけ展開 • 連長圧縮された文字列を必要な部分だけ展開 • 2回目以降の繰り返しでは、前後 m 文字分かればよい • 展開された文字列の長さ O ( nm ) 100(abcdefg … tuvwxyz) => abcdefg … tuvxyzabc$xyz 使わない文字を省略部分に挿入

  5. 展開した文字列に対する検索 • s を部分的に展開した長さ O( nm ) の文字列に対して、tiの部分文字列長さ O( m ) の文字列を何度も検索する • 通常の文字列マッチングアルゴリズムは、O( n + m ) • O( kn2) 回繰り返すには時間がかかりすぎる • Suffix Array を使う • 一回当たりの検索が、O( m lg (nm) ) • これなら、 O( kn2 ) 回繰り返せる

  6. Suffix Array • アリ本の第2版に新しく追加された項目 • アリ本には、nlgnのアルゴリズムが載ってる

  7. 問題文 背景 • シュタゲ→ヒャダゲ • 氷の呪文をいかに使うか? • オカリン→オカレン • 岡○倫太郎と滝○太郎の名前が似てる • シューベ○トは、魚に当たって亡くなったとか 魚を氷の全体呪文で凍らせよう!

  8. 結果 • First Accept • オンサイト: • オンライン: • Accept / Submit • /

More Related