Question: Babylonian square root calculation...- proc binomial...

Des suggestions de solutions? Merci.

A) a) Écrire une procédure qui produit une itération du calcul babylonien de la racine carrée d'un nombre positif k à partir     d'une première approximation x0 .

    Entrée: k , x0 .

    Sortie:  x1 = (x0+ k/x0)/2 .

b) En utilisant la procédure trouvée en a), en écrire une autre, qui prend en entrée un entier positif n en plus des entiers k   et x0 vus en a) et qui retourne en sortie n itérations du calcul babylonien de la racine carée de k.

 B)

Écrire une procédure récursive Maple qui prend en entrée deux nombres n et k et qui utilise l'identité (n k) = (n -1k)+(n-1 k-1) pour retourner en sortie le coefficient binomial (n k) , cette procédure ne doit pas utiliser la commande Maple binomial.

TRADUCTION:

Suggestions for solutions? Thank you.

A) a) Write a procedure that produces an iteration of the Babylonian calculus of the square root of a positive number k from a     first approximation x0.

    Input: k, x0.

   Output: x1 = (x0 + k / x0) / 2.

b) Using the procedure found in a), write another one, which takes as input a positive integer n in addition to the integers k and   x0 seen in a) and which returns in exit n iterations of the Babylonian calculation of the square root of k.

B) Write a Maple recursive procedure that takes as input two numbers n and k and uses the identity (n k) = (n-1 k)+ (n-1 k-1) to   return the binomial coefficient (n k), this procedure should not use the binomial Maple command.

Please Wait...