Linguist Noam Chomsky, among many others, has argued that the lack of an upper bound on the number of grammatical sentences in a language, and the lack of an upper bound on grammatical sentence length (beyond practical constraints such as the time available to utter one), can be explained as the consequence of recursion in natural language. For this reason, recursive definitions are very rare in everyday situations. When a procedure is thus defined, this immediately creates the possibility of an endless loop recursion can only be properly used in a definition if the step in question is skipped in certain cases so that the procedure can complete.īut even if it is properly defined, a recursive procedure is not easy for humans to perform, as it requires distinguishing the new from the old, partially executed invocation of the procedure this requires some administration as to how far various simultaneous instances of the procedures have progressed. Recursion is related to, but not the same as, a reference within the specification of a procedure to the execution of some other procedure. A procedure is a set of steps based on a set of rules, while the running of a procedure involves actually following the rules and performing the steps. To understand recursion, one must recognize the distinction between a procedure and the running of a procedure. A procedure that goes through recursion is said to be 'recursive'. Recursion is the process a procedure goes through when one of the steps of the procedure involves invoking the procedure itself. Informal definition Recently refreshed sourdough, bubbling through fermentation: the recipe calls for some sourdough left over from the last time the same recipe was made. There are various more tongue-in-cheek definitions of recursion see recursive humor. Other recursively defined mathematical objects include factorials, functions (e.g., recurrence relations), sets (e.g., Cantor ternary set), and fractals. For example, the formal definition of the natural numbers by the Peano axioms can be described as: "Zero is a natural number, and each natural number has a successor, which is also a natural number." By this base case and recursive rule, one can generate the set of all natural numbers. Many mathematical axioms are based upon recursive rules. The Fibonacci sequence is another classic example of recursion:įib(0) = 0 as base case 1, Fib(1) = 1 as base case 2, For all integers n > 1, Fib( n) = Fib( n − 1) + Fib( n − 2).
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |