Wednesday, August 5, 2009

How To Roll A Dutch Master Palma

Google

This story today they appeared as national news a few days ago.
Let's do an experiment. Open another browser window Google page and type Varcelona well, with V of Warsaw. get a lot of search results , but what we are is what comes up: If Google detects that the search word is misspelled we stand corrected.
Did you mean: Barcelona.
And if we click on the suggestion, it disappears.

Now repeat the same with the word Recursion. Google is proposing to do the search for the term recursion, but when we click on the suggestion, the same suggestion back out, over and over again, ad infinitum.

This is a programmer's joke from Google that shows the fine sense of humor they spend. Let's try to understand the joke.

In mathematics called recursion recursion or (two palabros que no existen en español, por cierto. El término correcto es recurrencia ) a una manera de escribir sucesiones de números en la que cada término se calcula a partir de los anteriores.
Por ejemplo, la famosísima sucesión de Fibonacci:
1, 1, 2, 3, 5, 8, 13, 21, ...
en la que los dos primeros números son 1 y 1 y a partir de ahí cada uno de los elementos se calcula sumando los dos que tiene detrás.
1+1=2
1+2=3
2+3=5
3+5=8
5+8=13

La manera de escribir esto usando la recursión es:

F 0 =1
F 1 = 1
2 F = 0 F + F 1 = 1 +1 = 2
F 3 = 1 F + F 2 = 1 +2 = 3
... F
n = F n-2 + F n-1


words, to define an element refers to the definition of the element in smaller cases, and until the case but simple, which is defined numerically.
For example, we calculate F 5 , 5 th term of the sequence Fibonacci:

F 5 = F 3 + F 4

therefore, must first calculate the 3 rd and 4 th (ie F 3 and F 4 )

F 4 = F 2 + F 3
F 3 = F 1 + F 2


Whereupon the 5 th term would be (the parentheses are only to separate and not tiing):

5 F = (F 3) + (F 4 ) =
= (F + F 1 2) + (F 2 + [F 3]) =
= (F + F 1 2) + (F 2 + [F + F 1 2])

But F 1 = 1 and F 2 = 1, so that to calculate F 5 just replace the previous formula: F
5 = (F + F 1 2) + (F 2 + [F + F 1 2])
5 F = (1 +1) + (1 + [1 +1]) = 5

other words, to calculate a number use your own definition as many times as do need to get to the simplest case. You try to calculate other terms for themselves, help them understand.

The Google search does the same thing: If you are asked to find recursion recursion is proposing that we seek, and if we accept the suggestion we again make the same suggestion, and so on to infinity.
For Google, recursion is an endless recursion.

Note: This form of calculation is used by computers to perform complex tasks, split the task into smaller ones recursively up to a simple case easily solved. Two examples:
1. Management de un conjunto de números:
Para ordenar una lista de números se divide la lista en dos trozos, se ordenan cada uno por separado y luego se mezclan. Para ordenar cada uno de los trozos se utiliza el mismo procedimiento recursivo.
2. Buscar un número (o una palabra) en una lista no ordenada:
Se divide la lista en dos partes y se busca en una de ellas. Sino está se busca en la otra mitad. Cada una de las búsquedas se hace usando el mismo procedimiento. Aunque parezca mentira los ordenadores encuentran las cosas antes usando este método que mirando uno a uno los elementos de la lista.

0 comments:

Post a Comment