MathEigo f : 日本語 → English メニュー

この用語はまだ監査を通っていません(未確認)。日英の対応や例文が米国の教室の言い方と合っているか、確認中です。

この用語はまだ監査を通っていません(未確認)。

再帰アルゴリズム

さいきあるごりずむ / 再帰 1対1で対応

recursion

名詞 ・話し言葉 別の言い方 recursive algorithm

式と読み方

gcd⁡(a,b)=gcd⁡(b, a mod b)\gcd(a, b) = \gcd(b,\ a \bmod b)

the gcd of a and b equals the gcd of b and a mod b

定義

問題を同じ形のより小さな問題に分け、自分自身を呼び出して解く手順(再帰)。いちばん小さな場合(基底)は直接答えを返す。

A procedure that solves a problem by calling itself on smaller instances of the same problem. The smallest cases, called base cases, are answered directly.

例文

話し言葉 The idea of recursion is that the function calls itself on a smaller input, so you always need a base case or it never stops. 再帰の考え方は、関数がより小さな入力で自分自身を呼び出すこと。だから基底の場合が必ず要る。無いと止まらない。
書き言葉・答案 Write a recursive algorithm that computes gcd(a, b), and use it to find gcd(252, 198). gcd(a, b) を計算する再帰アルゴリズムを書き、それを用いて gcd(252, 198) を求めよ。

言い間違えやすいところ

  • recursion は「再帰」という考え方全体、recursive algorithm はその考え方で書いた手順。Levin は数列の節(4.1 Describing Sequences・4.4 Exponential Sequences)でも recursion を使う(各 1 件)。
  • 日本語の「帰納的」も「再帰的」も英語では recursive になることが多い(帰納的定義 = recursive definition)。
  • 用例コーパスで recursion は話し言葉のほうが多く(ほとんどが MIT OCW)、書き言葉には少ない。recursive algorithm は話し言葉・書き言葉とも少ない(すべて MIT)。

根拠の件数

話し言葉計 15

  • recursion13
  • recursive algorithm2

書き言葉計 7

  • recursion3
  • recursive algorithm4

米国の講義の書き起こし・字幕(話し言葉)と教科書・講義ノート(書き言葉)で、言い方ごとに数えた回数です。語形変化はまとめ、「…」は 1〜3 語の空き。「数えていない」はその側では数えていないことを示します。

取得元と数えた日
取得元(話し言葉)
MIT OCW 18.06 Linear Algebra / MIT OCW 6.042 Mathematics for Computer Science / 3Blue1Brown
取得元(書き言葉)
MIT OCW lecture notes
数えた日