<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>potetisensei</author_name>
  <author_url>https://blog.hatena.ne.jp/potetisensei/</author_url>
  <blog_title>生きたい</blog_title>
  <blog_url>https://potetisensei.hatenablog.com/</blog_url>
  <categories>
  </categories>
  <description>大学生なのでデータ構造とアルゴリズムという授業を取っているんですが、今まで自分がKMP法だと思い込んでいたものがMP法だった上、ネット上の記事が無限にバラバラなのでメモしておく。 MP法 MP法はMorris-Pratt algorithmと呼ばれるもので、Knuthが登場しない。 MP法では、パターン文字列に対してborderと呼ばれる値を計算することにより、シフト量を定める。 ある文字列Sのborderとは、Sの部分文字列であって、Sの接頭辞かつ接尾辞であるような文字列Wのことである。 MP法では、i=0..|S|に対して、S[0:i-1]の最長border(の長さ)をO(|S|)で求め、…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fpotetisensei.hatenablog.com%2Fentry%2F2017%2F07%2F10%2F174908&quot; title=&quot;MP法とKMP法の違い - 生きたい&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2017-07-10 17:49:08</published>
  <title>MP法とKMP法の違い</title>
  <type>rich</type>
  <url>https://potetisensei.hatenablog.com/entry/2017/07/10/174908</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
