コンテンツにスキップ

再帰

出典: フリー百科事典『ウィキペディア(Wikipedia)』

: Recursion, Recursive[ 1]

使

[]


(Recursive)[1][2][1]2

 (base case) - 使

 (recursive step) - 









1,

2,

 .

[3]


[]


[4][5]



"that"使

"Dorothy thinks that Toto suspects that Tin Man said that..."

[6]

L[7][8]

"and"沿[9]

使[]


鹿

[10]

退1975-76Let's talk Lisp in Software Tools

[10]Google"recursion""Did you mean: recursion"[11][ 2]

PHP ()"PHP Hypertext Preprocessor"WINE"WINE Is Not an Emulator"GNU"GNU's not Unix"

[]

-

"Recursion""Recursive"

再帰的定義[編集]

例: 自然数[編集]




0 

nn+1

2[ 3]

19

: []


1 (Proof procedure) 






[]


使3

関数での再帰[編集]


  [ 4]

使[13]

[]


使

使[]



[]


 XX af: X Xn



 (where 

[]


2 :





aX

nF(n) = G(n) 

: F(0) = a= G(0) n = 0

: .F(k) = G(k)F(k + 1) = f(F(k)) = f(G(k)) = G(k + 1)
F(k) = G(k)  F(k + 1) = G(k + 1)

F(n) = G(n) 

[]




nn-1C
/* 階乗 n! の計算 */
int fact(int n) {
  if (n == 0) return 1; /* 基底段階。(n = 0) の場合: 1*/
  else return fact(n - 1) * n; /* 再帰的な構造。(n > 0) の場合: n * (n - 1)!。再帰呼出し */
}

(n-1)n

使使

[]




C
void a() {
    b();
}
void b() {
    a();
}

1

再帰的データ構造[編集]


使

 Java Tree  Tree 使
class Tree {
    Tree[] children;
}

[]


[14]

[]

:(1892)
(1904)

[15]

1320 (Stefaneschi Triptych) 使姿[16][17]

1956 (Print Gallery (M. C. Escher)) [18]

[19]

[20][21]

[]




 - 

 ()

 - 

[22]

[]

脚注[編集]

注釈[編集]



(一)^ 

(二)^ "recursion""recursion"Google

(三)^ 00

(四)^ [12]:  

出典[編集]



(一)^ ab 6 (1999) 4389-405

(二)^ Wirth,N.(1986)Algorithms & Data Structures 1990

(三)^ Peano axioms | mathematics (). Encyclopedia Britannica. 20191024

(四)^ Pinker, Steven (1994). The Language Instinct. William Morrow 

(五)^ Pinker, Steven; Jackendoff, Ray (2005). The faculty of language: What's so special about it?. Cognition 95 (2): 201?236. doi:10.1016/j.cognition.2004.08.004. PMID 15694646. 

(六)^ Nordquist, Richard. What Is Recursion in English Grammar? (). ThoughtCo. 20191024

(七)^ Nevins, Andrew; Pesetsky, David; Rodrigues, Cilene (2009). Evidence and argumentation: A reply to Everett (2009). Language 85 (3): 671?681. doi:10.1353/lan.0.0140. 2012-01-06. https://web.archive.org/web/20120106154616/http://web.mit.edu/linguistics/people/faculty/pesetsky/Nevins_Pesetsky_Rodrigues_2_Evidence_and_Argumentation_Reply_to_Everett.pdf. 

(八)^ Drucker, Thomas (4 January 2008). Perspectives on the History of Mathematical Logic. Springer Science & Business Media. p. 110. ISBN 978-0-8176-4768-1. https://books.google.com/books?id=R70M4zsVgREC&pg=PA110 

(九)^ Barbara Partee and Mats Rooth. 1983. In Rainer Bäuerle et al., Meaning, Use, and Interpretation of Language. Reprinted in Paul Portner and Barbara Partee, eds. 2002. Formal Semantics: The Essential Readings. Blackwell.

(十)^ abHunter, David (2011). Essentials of Discrete Mathematics. Jones and Bartlett. pp. 494. ISBN 9781449604424. https://books.google.com/books?id=kuwhTxCVovQC&q=recursion+joke 

(11)^ recursion - Google Search. www.google.com. 20191024

(12)^ C1991305ISBN 4-87408-414-1 

(13)^ 2015127

(14)^ Picture of the Day: Fractal Cauliflower (20121228). 2020419

(15)^ Recursion. 2015924 More examples of recursion: Russian Matryoshka dolls. Each doll is made of solid wood or is hollow and contains another Matryoshka doll inside it.

(16)^ Giotto di Bondone and assistants: Stefaneschi triptych.  The Vatican. 2015916

(17)^ Svozil, Karl (2018). Physical (A)Causality: Determinism, Randomness and Uncaused Events. Springer. pp. 12. https://books.google.com/books?id=gxBMDwAAQBAJ&pg=PA12 

(18)^ Art and Mathematics (200795). 202075

(19)^ 52022324

(20)^   使202398

(21)^  6 202398

(22)^ 0!12020521

外部リンク[編集]