En la teoría de la computabilidad, las funciones computables también se denominan funciones recursivas. Al menos a primera vista, no tienen nada en común con lo que ustedes llaman "recursivo" en la programación diaria (es decir, funciones que se llaman a sí mismos).
¿Cuál es el significado real de recursivo en el contexto de la computabilidad? ¿Por qué esas funciones se llaman "recursivas"?
En otras palabras: ¿cuál es la conexión entre los dos significados de "recursividad"?
computability
terminology
history
Golo Roden
fuente
fuente
Respuestas:
Definir algunas funciones básicas:
función cero
función sucesora
función de proyección
De ahora en adelante para denotar ( x 1 , x 2 , … , x n )xn¯ (x1,x2,…,xn)
Definir una composición:
Funciones dadas
Construya la siguiente función:
Definir recursividad primitiva:
Funciones dadas
Construya la siguiente función (por partes):
Todas las funciones que pueden realizarse utilizando composiciones y recursividad primitiva en funciones básicas , se denominan primitivas recursivas . Se llama así por definición. Si bien existe un enlace con funciones que se llaman a sí mismas, no hay necesidad de intentar vincularlas entre sí. Puede considerar la recursión como un homónimo.
Esta definición y construcción anterior fue construida por Gödel (algunas otras personas también estuvieron involucradas) en un intento de capturar todas las funciones que son computables, es decir, existe una Máquina de Turing para esa función. Tenga en cuenta que el concepto de una máquina de Turing aún no se describió, o al menos era muy vago.
(Des) afortunadamente, alguien llamado Ackermann vino y definió la siguiente función:
This function is computable, but there's no way to construct it using only the constructions above! (i.e.Ack is not primitive recursive) This means that Gödel and his posse failed to capture all computable functions in their construction!
Gödel had to expand his class of functions soAck could be constructed.
He did this by defining the following:
Unbounded minimisation
THEN
ELSE
This last one may be hard to grasp, but it basically means thatg((x1,x2,…,xk)) is the smallest root of f (if a root exists).
All functions that can be constructed with all the constructions defined above are called recursive. Again, the name recursive is just by definition, and it doesn't necessarily have correlation with functions that call themselves. Truly, consider it a homonym.
Recursive functions can be either partial recursive functions or total recursive functions. All partial recursive functions are total recursive functions. All primitive recursive functions are total. As an example of a partial recursive function that is not total, consider the minimisation of the successor function. The successor function doesn't have roots, so its minimisation is not defined. An example of a total recursive function (which uses minimisation) isAck .
Now Gödel was able to construct theAck function as well with his expanded class of functions. As a matter of fact, every function that can be computed by a Turing machine, can be represented by using the constructions above and vice versa, every construction can be represented by a Turing machine.
If you're intrigued, you could try to make Gödel's class bigger. You can try to define the 'opposite' of unbounded minimisation. That is, unbounded maximisation i.e. the function that finds the biggest root. However, you may find that computing that function is hard (impossible). You can read into the Busy Beaver Problem, which tries to apply unbounded maximisation.
fuente
The founders of computability theory were mathematicians. They founded what is now called computability theory before there was any computers. What was the way mathematicians defined functions that could be computed? By recursive definitions!
So there were recursive function before there were any other model of computation like Turing machines or lambda calculus or register machines. So people referred to these function as recursive functions. The fact that they turned out to be exactly what Turing machines and other models can compute is a later event (mostly proven by Kleene).
We have the simple definition of a recursive function which is now called primitive recursive function. There were not general enough (e.g. Ackermann's function) so people developed more general notions likeμ -recursive functions and
Herbrand-Gödel general recursive functions that
did capture all computable functions (assuming the Church's thesis).
Church claimed that his model of lambda calculus captured
all computable functions.
Many people, and in particular Gödel, were not convinced that
these capture all functions that can be computed.
Until Turing's analysis of computation and introduction of his machine model.
The name of the field used to recursion theory. However there has been a successful push in recent decades to change the name to something more appealing from recursion theory to something more computer sciency (vs. mathy). As a result the field is now called computability theory. However if you look at books, papers, conferences, etc. in the early decades they are called recursion theory and not computability theory. Even the title of Soare's own 1987 book (who was the main person behind the push to change the name to computability theory) is "Recursively Enumerable Sets and Degrees".
If you want to know more about the history a fun and good place to read about it is the first chapter of Classical Recursion Theory by Odifreddi.
fuente
Robert Soare wrote an essay about this issue. According to him, the term (general) recursive functions was coined by Gödel, who defined them using some sort of mutual recursion. The name stuck, though later on other equivalent definitions were found.
For more information, I recommend Soare's essay.
fuente
instead of putting a long comment decided to add an answer:
Because they are defined recursively, i.e "more complex functions are defined in terms of previously defined, simpler functions"
This kind of iterative or incremental procedure creates well-defined functions (in the mathematical sense)
This is the meaning of recursiveness in mathematical parlance. See below how this relates to recursion in programming parlance.
Compare this procedure with techniques and methods like (mathematical) induction which is also an example of recursiveness in mathematics.
Programming has a mathematical vein as well as an engineering one.
This (usualy constructive) procedure is also refered as "bootstrapping" in Operating Systems parlance.
However a runtime recursion of the same function (i.e caling itself during its runtime), since it must (hmm, should) happen on already computed values (or arguments), or in other words, in the part of the result set already computed, is also recursive in the above sense, i.e "defined w.r.t previously defined functions (and their values)"
Else is not well-defined, and leads to such things like Stack Overflow :))))
To give a further example from Operating Systems, a runtime recursion (calling itself) can be taken as the analog of an operating system rebooting after a certain update (e.g core update). Many OSes do the following procedure:
Auberon's beautiful answer demonstrates a procedure of this kind in more detail.
fuente