{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Récursivité et Programmation Dynamique\n",
    "\n",
    "# La reproduction des lapins\n",
    "\n",
    "Nous allons utiliser 2 grandes méthodes de programmation que nous allons appliquer à un problème célèbre et récurrent dans le milieu de la programmation.\n",
    "\n",
    "En 1202, Leonardo Fibonacci publie un ouvrage dans lequel il traite d'un problème simple et concret : la croissance d'une population de lapins. Il s'agit de savoir comment contrôler la population des clapiers et quand vendre ses lapins, etc.\n",
    "\n",
    "Voici le fonctionnement simplifié de cette reproduction :\n",
    "\n",
    "1. On compte les lapins par **couple**\n",
    "2. **Chaque mois** chaque couple de lapins matures donne naissance à 1 couple de jeunes lapins immatures\n",
    "3. Après 2 mois les jeunes couples devienent matures et engendrent à leur tour un jeune couple immature\n",
    "4. On étudie la croissance de la population tous les mois : n est le nombre de mois\n",
    "\n",
    "|                n               | 0 | 1 | 2 | 3 | 4 | 5 | 6 |  7 |  8 |  9 | 10 |\n",
    "|:------------------------------:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:--:|:--:|:--:|:--:|\n",
    "|       nb couples matures       | 0 | 0 | 0 | 1 | 1 | 2 | 3 |  5 |  8 | 13 | 21 |\n",
    "|  nb couples immatures 1er mois | 0 | 1 | 0 | 1 | 1 | 2 | 3 |  5 |  8 | 13 | 21 |\n",
    "| nb couples immatures 2ème mois | 0 | 0 | 1 | 0 | 1 | 1 | 2 |  3 |  5 |  8 | 13 |\n",
    "|           nb couples           | 0 | 1 | 1 | 2 | 3 | 5 | 8 | 13 | 21 | 34 | 55 |\n",
    "\n",
    "- Complétez les mois manquants en respectant les règles de reproduction.\n",
    "\n",
    "- En vous inspirant de la méthode que vous avez employée pour compléter le tableau ci-dessus, écrivez une fonction `lapinoux(n)` qui retourne le nombre de couples de lapin obtenus au mois n.\n",
    "- Testez votre fonction pour des valeurs de n entre 0 et 10."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Pour n=0 le nombre de couples vaut:0\n",
      "Pour n=1 le nombre de couples vaut:1\n",
      "Pour n=2 le nombre de couples vaut:1\n",
      "Pour n=3 le nombre de couples vaut:2\n",
      "Pour n=4 le nombre de couples vaut:3\n",
      "Pour n=5 le nombre de couples vaut:5\n",
      "Pour n=6 le nombre de couples vaut:8\n",
      "Pour n=7 le nombre de couples vaut:13\n",
      "Pour n=8 le nombre de couples vaut:21\n",
      "Pour n=9 le nombre de couples vaut:34\n",
      "Pour n=10 le nombre de couples vaut:55\n"
     ]
    }
   ],
   "source": [
    "def lapinoux(n: int) -> int:\n",
    "    \"\"\" Calcule le nombre de couples de lapins au bout de n mois (n>=0) \"\"\"\n",
    "    assert isinstance(n, int) and n >= 0, \"n must be integer and positive\"\n",
    "    \n",
    "    nb_couples_matures = 0\n",
    "    nb_couples_immatures1 = 1\n",
    "    nb_couples_immatures2 = 0\n",
    "    \n",
    "    for i in range(n+1):\n",
    "        nb_couples_matures += nb_couples_immatures2\n",
    "        nb_couples_immatures2 = nb_couples_immatures1\n",
    "        nb_couples_immatures1 = nb_couples_matures\n",
    "    \n",
    "    return nb_couples_matures\n",
    "\n",
    "def lapinoux_base(n: int) -> int:\n",
    "    \"\"\" Calcule le nombre de couples de lapins au bout de n mois (n>=0) \"\"\"\n",
    "    assert isinstance(n, int) and n >= 0, \"n must be integer and positive\"\n",
    "    \n",
    "    if n <= 0 : return 0\n",
    "    nb_couples_matures = 0\n",
    "    nb_couples_immatures1 = 1\n",
    "    nb_couples_immatures2 = 0\n",
    "    \n",
    "    for i in range(2,n+1):\n",
    "        nb_couples_matures += nb_couples_immatures2\n",
    "        nb_couples_immatures2 = nb_couples_immatures1\n",
    "        nb_couples_immatures1 = nb_couples_matures\n",
    "\n",
    "    return nb_couples_matures + nb_couples_immatures1 + nb_couples_immatures2\n",
    "\n",
    "for i in range(11):\n",
    "    print(f\"Pour n={i} le nombre de couples vaut:{lapinoux(i)}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "🏁 **Terminaison** : la fonction termine toujours car elle est constituée d'un boucle finie `for ... range`.\n",
    "\n",
    "🐌 **Complexité** : $O(n)$ car à chaque fois qu'on augmente n de 1 on ajoute un tour de boucle avec 3 affectations et 1 addition."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Suite de Fibonacci\n",
    "\n",
    "Comme vous êtes de bons élèves en mathématiques, il ne vous a pas échappé que ce fonctionnement pouvait se formaliser sous forme de suite mathématique qu'on nomme la **Suite de Fibonacci**.\n",
    "\n",
    "En effet, vous avez pu constater que pour obtenir un terme pour un mois donné, il suffisait de faire la somme des termes des 2 mois précédents : `fibo(0) = 0 ; fibo(1) = 1 ; fibo(n) = fibo(n-1) + fibo(n-2)`.\n",
    "\n",
    "- Reprogrammez la fonction précédente en la nommant `fibo(n)` mais cette fois en utilisant la définition de la suite ci-dessus.\n",
    "\n",
    "- Testez votre fonction pour des valeurs de n entre 0 et 10."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Pour n=0 le nombre de couples vaut:0\n",
      "Pour n=1 le nombre de couples vaut:1\n",
      "Pour n=2 le nombre de couples vaut:1\n",
      "Pour n=3 le nombre de couples vaut:2\n",
      "Pour n=4 le nombre de couples vaut:3\n",
      "Pour n=5 le nombre de couples vaut:5\n",
      "Pour n=6 le nombre de couples vaut:8\n",
      "Pour n=7 le nombre de couples vaut:13\n",
      "Pour n=8 le nombre de couples vaut:21\n",
      "Pour n=9 le nombre de couples vaut:34\n",
      "Pour n=10 le nombre de couples vaut:55\n"
     ]
    }
   ],
   "source": [
    "def fibo(n: int) -> int:\n",
    "    \"\"\" Calcule les termes de la suite de Fibonacci (n>=0) \"\"\"\n",
    "    assert isinstance(n, int) and n >= 0, \"n must be integer and positive\"\n",
    "    \n",
    "    if n <= 0: return 0\n",
    "    elif n <= 1: return 1\n",
    "    \n",
    "    un_moins_2 = 0\n",
    "    un_moins_1 = 1\n",
    "       \n",
    "    for i in range(2,n+1):\n",
    "        un = un_moins_1 + un_moins_2\n",
    "        un_moins_2 = un_moins_1\n",
    "        un_moins_1 = un\n",
    "    return un\n",
    "\n",
    "for i in range(11):\n",
    "    print(f\"Pour n={i} le nombre de couples vaut:{fibo(i)}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "🏁 **Terminaison** : la fonction termine toujours car elle est constituée d'un boucle finie `for ... range`.\n",
    "\n",
    "🐌 **Complexité** : $O(n)$ car à chaque fois qu'on augmente n de 1 on ajoute un tour de boucle avec 3 affectations et 1 addition."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Récursivité\n",
    "\n",
    "⚠️ En informatique une fonction peut **s'appeler elle-même**, c'est ce qu'on nomme une **fonction récursive**. Faisons un exemple pour voir :"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n",
      "Lancement de la fonction recursive_infinie()\n"
     ]
    },
    {
     "ename": "RecursionError",
     "evalue": "maximum recursion depth exceeded while calling a Python object",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mRecursionError\u001b[0m                            Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-10-2d19be49f426>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m      3\u001b[0m     \u001b[0mrecursive_infinie\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      4\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 5\u001b[0;31m \u001b[0mrecursive_infinie\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m<ipython-input-10-2d19be49f426>\u001b[0m in \u001b[0;36mrecursive_infinie\u001b[0;34m()\u001b[0m\n\u001b[1;32m      1\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mrecursive_infinie\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      2\u001b[0m     \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Lancement de la fonction recursive_infinie()\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m     \u001b[0mrecursive_infinie\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      4\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      5\u001b[0m \u001b[0mrecursive_infinie\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "... last 1 frames repeated, from the frame below ...\n",
      "\u001b[0;32m<ipython-input-10-2d19be49f426>\u001b[0m in \u001b[0;36mrecursive_infinie\u001b[0;34m()\u001b[0m\n\u001b[1;32m      1\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mrecursive_infinie\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      2\u001b[0m     \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Lancement de la fonction recursive_infinie()\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m     \u001b[0mrecursive_infinie\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m      4\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m      5\u001b[0m \u001b[0mrecursive_infinie\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mRecursionError\u001b[0m: maximum recursion depth exceeded while calling a Python object"
     ]
    }
   ],
   "source": [
    "def recursive_infinie():\n",
    "    print(\"Lancement de la fonction recursive_infinie()\")\n",
    "    recursive_infinie()\n",
    "    \n",
    "recursive_infinie()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Vous constatez que la fonction **s'appelle elle-même** sans s'arrêter jusqu'à provoquer l'erreur : *RecursionError: maximum recursion depth exceeded while calling a Python object*. Qui se traduit littéralement par : *Ta function ne s'arrête pas gros noob !*\n",
    "\n",
    "⚠️ Quand nous écrivons une **fonction récursive**, il faut s'assurer que la **fonction s'arrête à coup sûr** ! Il faut donc bien écrire le ou les **cas d'arrêt**.\n",
    "\n",
    "Essayons cet autre exemple :"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "On est dans la fonction recursive(10)\n",
      "On est dans la fonction recursive(9)\n",
      "On est dans la fonction recursive(8)\n",
      "On est dans la fonction recursive(7)\n",
      "On est dans la fonction recursive(6)\n",
      "On est dans la fonction recursive(5)\n",
      "On est dans la fonction recursive(4)\n",
      "On est dans la fonction recursive(3)\n",
      "On est dans la fonction recursive(2)\n",
      "On est dans la fonction recursive(1)\n",
      "On est dans la fonction recursive(0)\n",
      "C'est fini !\n"
     ]
    }
   ],
   "source": [
    "def recursive(n: int):\n",
    "    print(f\"On est dans la fonction recursive({n})\")\n",
    "    if n <= 0 :\n",
    "        print(\"C'est fini !\")\n",
    "    else :\n",
    "        recursive(n-1)\n",
    "    \n",
    "recursive(10)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- Écrivez la fonction `fibor(n)` pour calculer les termes de la Suite de Fibonacci en utilisant une **fonction récursive**. Pour cela vous devez utiliser le fait que `fibor(n)` doit **retourner** `fibor(n-1) + fibor(n-2)` ! Et pensez aux cas d'arrêt !\n",
    "- Testez votre fonction pour des valeurs de n entre 0 et 10."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Pour n=0 le nombre de couples vaut:0\n",
      "Pour n=1 le nombre de couples vaut:1\n",
      "Pour n=2 le nombre de couples vaut:1\n",
      "Pour n=3 le nombre de couples vaut:2\n",
      "Pour n=4 le nombre de couples vaut:3\n",
      "Pour n=5 le nombre de couples vaut:5\n",
      "Pour n=6 le nombre de couples vaut:8\n",
      "Pour n=7 le nombre de couples vaut:13\n",
      "Pour n=8 le nombre de couples vaut:21\n",
      "Pour n=9 le nombre de couples vaut:34\n",
      "Pour n=10 le nombre de couples vaut:55\n"
     ]
    }
   ],
   "source": [
    "def fibor(n: int) -> int:\n",
    "    \"\"\" Calcule les termes de la suite de Fibonacci récursivement (n>=0) \"\"\"\n",
    "    assert isinstance(n, int) and n >= 0, \"n must be integer and positive\"\n",
    "    \n",
    "    if n < 2: return n\n",
    "    else: return fibor(n-1) + fibor(n-2)\n",
    "        \n",
    "for i in range(11):\n",
    "    print(f\"Pour n={i} le nombre de couples vaut:{fibor(i)}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "🏁 **Terminaison** : la fonction termine toujours car elle est appelée récursivement avec des paramètres entiers positifs **décroissants** donc ils arriveront forcément à 0 et 1 ce qui **arrêtera les appels récursifs**.\n",
    "\n",
    "🐌 **Complexité** : $O(A^n)$, chaque appel de la fonction avec un nombre n plus grand déploie un arbre d'appel qui croît exponentiellement.\n",
    "\n",
    "Cette méthode de programmation **récursive** est séduisante car elle permet de **programmer simplement** des problèmes **difficiles** (parcours de structures, etc.). Mais elle a un gros défaut, c'est qu'elle est souvent **peu performante** en terme de **temps de calcul** et **d'efficacité mémoire**. Voyons pourquoi.\n",
    "\n",
    "- Ajouter à votre fonction un `print` qui permet de voir toutes les fonctions appelées. Ensuite testez `fibor(10)`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "On calcule fibor(10)\n",
      "On calcule fibor(9)\n",
      "On calcule fibor(8)\n",
      "On calcule fibor(7)\n",
      "On calcule fibor(6)\n",
      "On calcule fibor(5)\n",
      "On calcule fibor(4)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(4)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(5)\n",
      "On calcule fibor(4)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(6)\n",
      "On calcule fibor(5)\n",
      "On calcule fibor(4)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(4)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(7)\n",
      "On calcule fibor(6)\n",
      "On calcule fibor(5)\n",
      "On calcule fibor(4)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(4)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(5)\n",
      "On calcule fibor(4)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(8)\n",
      "On calcule fibor(7)\n",
      "On calcule fibor(6)\n",
      "On calcule fibor(5)\n",
      "On calcule fibor(4)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(4)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(5)\n",
      "On calcule fibor(4)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(6)\n",
      "On calcule fibor(5)\n",
      "On calcule fibor(4)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(4)\n",
      "On calcule fibor(3)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(2)\n",
      "On calcule fibor(1)\n",
      "On calcule fibor(0)\n",
      "55\n",
      "fibor lancée 177 fois\n"
     ]
    }
   ],
   "source": [
    "compteur = 0\n",
    "\n",
    "def fibor(n: int) -> int:\n",
    "    \"\"\" Calcule les termes de la suite de Fibonacci récursivement (n>=0) \"\"\"\n",
    "    assert isinstance(n, int) and n >= 0, \"n must be integer and positive\"\n",
    "    global compteur\n",
    "    compteur += 1\n",
    "    print(f\"On calcule fibor({n})\")\n",
    "    if n < 2: return n\n",
    "    else: return fibor(n-1) + fibor(n-2)\n",
    "        \n",
    "print(fibor(10))\n",
    "print(\"fibor lancée\", compteur, \"fois\")"
   ]
  },
  {
   "attachments": {
    "out.svg": {
     "image/svg+xml": [
      "[encoded data, 13644 characters]"
     ]
    }
   },
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Vous constatez que la fonction `fibor` est lancée **177 fois** ! Et surtout, on calcule les mêmes valeurs plusieurs fois, par exemple on calcule **8 fois** `fibor(5)` !\n",
    "\n",
    "Cette image montre bien le problème pour `fibor(6)` :\n",
    "\n",
    "![out.svg](attachment:out.svg)\n",
    "\n",
    "On voit dans l'arbre des appels successifs que `fibor(4)` est calculé 2 fois et `fibor(3)` 3 fois. Ce qui est évidemment **inefficace**.\n",
    "\n",
    "On peut, en général, améliorer la **récursivité** en faisant de la **récursivité terminale**, mais nous approfondirons ce problème plus tard...\n",
    "\n",
    "⚠️ Retenons pour l'instant que la **récursivité** permet de programmer avec **simplicité et élégance** des problème **difficiles** mais souvent au **détriment de la performance**.\n",
    "\n",
    "# Programmation dynamique\n",
    "\n",
    "Le gros défaut de l'algorithme précédent est qu'il **recalcule** sans cesse les **mêmes termes** inutilement. Il existe une méthode de programmation qui répond justement à ce problème :\n",
    "\n",
    "⚠️ La **programmation dynamique** est une méthode de programmation qui consiste à **enregistrer des résultats de calculs intermédiaires** pour les **réutiliser plus tard afin d'éviter de les recalculer**.\n",
    "\n",
    "- Écrivez la fonction `fibordyn` qui calcule les termes de la suite de Fibonacci **récursivement** mais avec une **liste pour enregistrer les résultats intermédiaires** que vous consulterez avant de recommencer un calcul.\n",
    "\n",
    "- Testez votre fonction avec n = 10."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "On appelle fibor(10)\n",
      "On appelle fibor(9)\n",
      "On appelle fibor(8)\n",
      "On appelle fibor(7)\n",
      "On appelle fibor(6)\n",
      "On appelle fibor(5)\n",
      "On appelle fibor(4)\n",
      "On appelle fibor(3)\n",
      "On appelle fibor(2)\n",
      "On appelle fibor(1)\n",
      "On appelle fibor(0)\n",
      "On appelle fibor(1)\n",
      "On appelle fibor(2)\n",
      "On appelle fibor(3)\n",
      "On appelle fibor(4)\n",
      "On appelle fibor(5)\n",
      "On appelle fibor(6)\n",
      "On appelle fibor(7)\n",
      "On appelle fibor(8)\n",
      "55\n",
      "On appelle fibor(10)\n",
      "On appelle fibor(9)\n",
      "On appelle fibor(8)\n",
      "On appelle fibor(7)\n",
      "On appelle fibor(6)\n",
      "On appelle fibor(5)\n",
      "On appelle fibor(4)\n",
      "On appelle fibor(3)\n",
      "On appelle fibor(2)\n",
      "55\n",
      "On appelle fibor(10)\n",
      "On appelle fibor(9)\n",
      "On appelle fibor(8)\n",
      "On appelle fibor(7)\n",
      "On appelle fibor(6)\n",
      "On appelle fibor(5)\n",
      "On appelle fibor(4)\n",
      "On appelle fibor(3)\n",
      "On appelle fibor(2)\n",
      "55\n"
     ]
    }
   ],
   "source": [
    "def fibordyn1(n: int) -> int:\n",
    "    \"\"\" Lanceur de la fonction fibor (n>=0) : initialisation du tableau de résultats \"\"\"\n",
    "    assert isinstance(n, int) and n >= 0, \"n must be integer and positive\"\n",
    "    resultats = [None for i in range(n+2)]\n",
    "    resultats[0] = 0\n",
    "    resultats[1] = 1\n",
    "    return fibor1(n, resultats)\n",
    "\n",
    "def fibor1(n: int, resultats: list) -> int:\n",
    "    \"\"\" Calcule les termes de la suite de Fibonacci récursivement avec programmation dynamique (n>=0) \"\"\"\n",
    "    assert isinstance(n, int) and n >= 0, \"n must be integer and positive\"\n",
    "    print(f\"On appelle fibor({n})\")\n",
    "\n",
    "    if resultats[n] == None:\n",
    "        resultats[n] = fibor1(n-1, resultats) + fibor1(n-2, resultats)\n",
    "    \n",
    "    return resultats[n]\n",
    "\n",
    "def fibordyn2(n: int) -> int:\n",
    "    \"\"\" Lanceur de la fonction fibor (n>=0) : initialisation du tableau de résultats \"\"\"\n",
    "    assert isinstance(n, int) and n >= 0, \"n must be integer and positive\"\n",
    "    resultats = [None for i in range(n+2)]\n",
    "    resultats[0] = 0\n",
    "    resultats[1] = 1\n",
    "    return fibor2(n, resultats)\n",
    "\n",
    "def fibor2(n: int, resultats: list) -> int:\n",
    "    \"\"\" Calcule les termes de la suite de Fibonacci récursivement avec programmation dynamique (n>=0) \"\"\"\n",
    "    assert isinstance(n, int) and n >= 0, \"n must be integer and positive\"\n",
    "    print(f\"On appelle fibor({n})\")\n",
    "    if resultats[n] != None: return resultats[n]\n",
    "    if resultats[n-1] == None: resultats[n-1] = fibor2(n-1, resultats)\n",
    "    if resultats[n-2] == None: resultats[n-2] = fibor2(n-2, resultats)\n",
    "    return resultats[n-1] + resultats[n-2]\n",
    "\n",
    "def fibordyn3(n: int) -> int:\n",
    "    \"\"\" Lanceur de la fonction fibor (n>=0) : initialisation du tableau de résultats \"\"\"\n",
    "    assert isinstance(n, int) and n >= 0, \"n must be integer and positive\"\n",
    "    resultats = [None for i in range(n+2)]\n",
    "    resultats[0] = 0\n",
    "    resultats[1] = 1\n",
    "    \n",
    "    # === Nested function ===\n",
    "    def fibor3(n: int) -> int:\n",
    "        \"\"\" Calcule les termes de la suite de Fibonacci récursivement avec programmation dynamique (n>=0) \"\"\"\n",
    "        assert isinstance(n, int) and n >= 0, \"n must be integer and positive\"\n",
    "        print(f\"On appelle fibor({n})\")\n",
    "        \n",
    "        if resultats[n] != None: return resultats[n]\n",
    "        if resultats[n-1] == None: resultats[n-1] = fibor3(n-1)\n",
    "        if resultats[n-2] == None: resultats[n-2] = fibor3(n-2)\n",
    "        return resultats[n-1] + resultats[n-2]\n",
    "    # === End of nested function ===\n",
    "    \n",
    "    return fibor3(n)\n",
    "\n",
    "print(fibordyn1(10))\n",
    "print(fibordyn2(10))\n",
    "print(fibordyn3(10))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "🏁 **Terminaison** : la fonction termine toujours car elle est appelée récursivement avec des paramètres entiers positifs **décroissants** donc ils arriveront forcément à 0 et 1 ce qui **arrêtera les appels récursifs**.\n",
    "\n",
    "🐌 **Complexité** : $O(n)$, on appelle n+1 fois la fonction `fibor()` qui contient des tests, des affectations, des additions mais aussi des **accès à des listes qui se font en temps constant en Python**.\n",
    "\n",
    "⚠️ Je vous conseille de faire un arbre d'appel avec `n = 5` pour comprendre exactement comment marche ce programme car c'est plus subtil qu'il n'y parait ! C'est l'occasion d'utiliser [Python Tutor](http://www.pythontutor.com/visualize.html#mode=edit) !\n",
    "\n",
    "# Performances\n",
    "\n",
    "Nous avons donc 4 algorithmes différents pour calculer la croissance de la population de nos couples de lapins. Testons leurs performances.\n",
    "\n",
    "- **Copier-coller** la définition de votre fonction `lapinoux` au début de la cellule ci-dessous et exécutez la cellule pour analyser les performances."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Test avec n=10 - Test avec n=1010 - Test avec n=2010 - Test avec n=3010 - Test avec n=4010 - Test avec n=5010 - Test avec n=6010 - Test avec n=7010 - Test avec n=8010 - Test avec n=9010 - Test avec n=10010 - Test avec n=11010 - Test avec n=12010 - Test avec n=13010 - Test avec n=14010 - Test avec n=15010 - Test avec n=16010 - Test avec n=17010 - Test avec n=18010 - Test avec n=19010 - Test avec n=20010 - Test avec n=21010 - Test avec n=22010 - Test avec n=23010 - Test avec n=24010 - Test avec n=25010 - Test avec n=26010 - Test avec n=27010 - Test avec n=28010 - Test avec n=29010 - Test avec n=30010 - Test avec n=31010 - Test avec n=32010 - Test avec n=33010 - Test avec n=34010 - Test avec n=35010 - Test avec n=36010 - Test avec n=37010 - Test avec n=38010 - Test avec n=39010 - Test avec n=40010 - Test avec n=41010 - Test avec n=42010 - Test avec n=43010 - Test avec n=44010 - Test avec n=45010 - Test avec n=46010 - Test avec n=47010 - Test avec n=48010 - Test avec n=49010 - Test avec n=50010 - Test avec n=51010 - Test avec n=52010 - Test avec n=53010 - Test avec n=54010 - Test avec n=55010 - Test avec n=56010 - Test avec n=57010 - Test avec n=58010 - Test avec n=59010 - Test avec n=60010 - Test avec n=61010 - Test avec n=62010 - Test avec n=63010 - Test avec n=64010 - Test avec n=65010 - Test avec n=66010 - Test avec n=67010 - Test avec n=68010 - Test avec n=69010 - Test avec n=70010 - Test avec n=71010 - Test avec n=72010 - Test avec n=73010 - Test avec n=74010 - Test avec n=75010 - Test avec n=76010 - Test avec n=77010 - Test avec n=78010 - Test avec n=79010 - Test avec n=80010 - Test avec n=81010 - Test avec n=82010 - Test avec n=83010 - Test avec n=84010 - Test avec n=85010 - Test avec n=86010 - Test avec n=87010 - Test avec n=88010 - Test avec n=89010 - Test avec n=90010 - Test avec n=91010 - Test avec n=92010 - Test avec n=93010 - Test avec n=94010 - Test avec n=95010 - Test avec n=96010 - Test avec n=97010 - Test avec n=98010 - Test avec n=99010 - "
     ]
    },
    {
     "data": {
      "application/javascript": [
       "/* Put everything inside the global mpl namespace */\n",
       "/* global mpl */\n",
       "window.mpl = {};\n",
       "\n",
       "mpl.get_websocket_type = function () {\n",
       "    if (typeof WebSocket !== 'undefined') {\n",
       "        return WebSocket;\n",
       "    } else if (typeof MozWebSocket !== 'undefined') {\n",
       "        return MozWebSocket;\n",
       "    } else {\n",
       "        alert(\n",
       "            'Your browser does not have WebSocket support. ' +\n",
       "                'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
       "                'Firefox 4 and 5 are also supported but you ' +\n",
       "                'have to enable WebSockets in about:config.'\n",
       "        );\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure = function (figure_id, websocket, ondownload, parent_element) {\n",
       "    this.id = figure_id;\n",
       "\n",
       "    this.ws = websocket;\n",
       "\n",
       "    this.supports_binary = this.ws.binaryType !== undefined;\n",
       "\n",
       "    if (!this.supports_binary) {\n",
       "        var warnings = document.getElementById('mpl-warnings');\n",
       "        if (warnings) {\n",
       "            warnings.style.display = 'block';\n",
       "            warnings.textContent =\n",
       "                'This browser does not support binary websocket messages. ' +\n",
       "                'Performance may be slow.';\n",
       "        }\n",
       "    }\n",
       "\n",
       "    this.imageObj = new Image();\n",
       "\n",
       "    this.context = undefined;\n",
       "    this.message = undefined;\n",
       "    this.canvas = undefined;\n",
       "    this.rubberband_canvas = undefined;\n",
       "    this.rubberband_context = undefined;\n",
       "    this.format_dropdown = undefined;\n",
       "\n",
       "    this.image_mode = 'full';\n",
       "\n",
       "    this.root = document.createElement('div');\n",
       "    this.root.setAttribute('style', 'display: inline-block');\n",
       "    this._root_extra_style(this.root);\n",
       "\n",
       "    parent_element.appendChild(this.root);\n",
       "\n",
       "    this._init_header(this);\n",
       "    this._init_canvas(this);\n",
       "    this._init_toolbar(this);\n",
       "\n",
       "    var fig = this;\n",
       "\n",
       "    this.waiting = false;\n",
       "\n",
       "    this.ws.onopen = function () {\n",
       "        fig.send_message('supports_binary', { value: fig.supports_binary });\n",
       "        fig.send_message('send_image_mode', {});\n",
       "        if (fig.ratio !== 1) {\n",
       "            fig.send_message('set_dpi_ratio', { dpi_ratio: fig.ratio });\n",
       "        }\n",
       "        fig.send_message('refresh', {});\n",
       "    };\n",
       "\n",
       "    this.imageObj.onload = function () {\n",
       "        if (fig.image_mode === 'full') {\n",
       "            // Full images could contain transparency (where diff images\n",
       "            // almost always do), so we need to clear the canvas so that\n",
       "            // there is no ghosting.\n",
       "            fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
       "        }\n",
       "        fig.context.drawImage(fig.imageObj, 0, 0);\n",
       "    };\n",
       "\n",
       "    this.imageObj.onunload = function () {\n",
       "        fig.ws.close();\n",
       "    };\n",
       "\n",
       "    this.ws.onmessage = this._make_on_message_function(this);\n",
       "\n",
       "    this.ondownload = ondownload;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._init_header = function () {\n",
       "    var titlebar = document.createElement('div');\n",
       "    titlebar.classList =\n",
       "        'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\n",
       "    var titletext = document.createElement('div');\n",
       "    titletext.classList = 'ui-dialog-title';\n",
       "    titletext.setAttribute(\n",
       "        'style',\n",
       "        'width: 100%; text-align: center; padding: 3px;'\n",
       "    );\n",
       "    titlebar.appendChild(titletext);\n",
       "    this.root.appendChild(titlebar);\n",
       "    this.header = titletext;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\n",
       "\n",
       "mpl.figure.prototype._root_extra_style = function (_canvas_div) {};\n",
       "\n",
       "mpl.figure.prototype._init_canvas = function () {\n",
       "    var fig = this;\n",
       "\n",
       "    var canvas_div = (this.canvas_div = document.createElement('div'));\n",
       "    canvas_div.setAttribute(\n",
       "        'style',\n",
       "        'border: 1px solid #ddd;' +\n",
       "            'box-sizing: content-box;' +\n",
       "            'clear: both;' +\n",
       "            'min-height: 1px;' +\n",
       "            'min-width: 1px;' +\n",
       "            'outline: 0;' +\n",
       "            'overflow: hidden;' +\n",
       "            'position: relative;' +\n",
       "            'resize: both;'\n",
       "    );\n",
       "\n",
       "    function on_keyboard_event_closure(name) {\n",
       "        return function (event) {\n",
       "            return fig.key_event(event, name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    canvas_div.addEventListener(\n",
       "        'keydown',\n",
       "        on_keyboard_event_closure('key_press')\n",
       "    );\n",
       "    canvas_div.addEventListener(\n",
       "        'keyup',\n",
       "        on_keyboard_event_closure('key_release')\n",
       "    );\n",
       "\n",
       "    this._canvas_extra_style(canvas_div);\n",
       "    this.root.appendChild(canvas_div);\n",
       "\n",
       "    var canvas = (this.canvas = document.createElement('canvas'));\n",
       "    canvas.classList.add('mpl-canvas');\n",
       "    canvas.setAttribute('style', 'box-sizing: content-box;');\n",
       "\n",
       "    this.context = canvas.getContext('2d');\n",
       "\n",
       "    var backingStore =\n",
       "        this.context.backingStorePixelRatio ||\n",
       "        this.context.webkitBackingStorePixelRatio ||\n",
       "        this.context.mozBackingStorePixelRatio ||\n",
       "        this.context.msBackingStorePixelRatio ||\n",
       "        this.context.oBackingStorePixelRatio ||\n",
       "        this.context.backingStorePixelRatio ||\n",
       "        1;\n",
       "\n",
       "    this.ratio = (window.devicePixelRatio || 1) / backingStore;\n",
       "    if (this.ratio !== 1) {\n",
       "        fig.send_message('set_dpi_ratio', { dpi_ratio: this.ratio });\n",
       "    }\n",
       "\n",
       "    var rubberband_canvas = (this.rubberband_canvas = document.createElement(\n",
       "        'canvas'\n",
       "    ));\n",
       "    rubberband_canvas.setAttribute(\n",
       "        'style',\n",
       "        'box-sizing: content-box; position: absolute; left: 0; top: 0; z-index: 1;'\n",
       "    );\n",
       "\n",
       "    var resizeObserver = new ResizeObserver(function (entries) {\n",
       "        var nentries = entries.length;\n",
       "        for (var i = 0; i < nentries; i++) {\n",
       "            var entry = entries[i];\n",
       "            var width, height;\n",
       "            if (entry.contentBoxSize) {\n",
       "                if (entry.contentBoxSize instanceof Array) {\n",
       "                    // Chrome 84 implements new version of spec.\n",
       "                    width = entry.contentBoxSize[0].inlineSize;\n",
       "                    height = entry.contentBoxSize[0].blockSize;\n",
       "                } else {\n",
       "                    // Firefox implements old version of spec.\n",
       "                    width = entry.contentBoxSize.inlineSize;\n",
       "                    height = entry.contentBoxSize.blockSize;\n",
       "                }\n",
       "            } else {\n",
       "                // Chrome <84 implements even older version of spec.\n",
       "                width = entry.contentRect.width;\n",
       "                height = entry.contentRect.height;\n",
       "            }\n",
       "\n",
       "            // Keep the size of the canvas and rubber band canvas in sync with\n",
       "            // the canvas container.\n",
       "            if (entry.devicePixelContentBoxSize) {\n",
       "                // Chrome 84 implements new version of spec.\n",
       "                canvas.setAttribute(\n",
       "                    'width',\n",
       "                    entry.devicePixelContentBoxSize[0].inlineSize\n",
       "                );\n",
       "                canvas.setAttribute(\n",
       "                    'height',\n",
       "                    entry.devicePixelContentBoxSize[0].blockSize\n",
       "                );\n",
       "            } else {\n",
       "                canvas.setAttribute('width', width * fig.ratio);\n",
       "                canvas.setAttribute('height', height * fig.ratio);\n",
       "            }\n",
       "            canvas.setAttribute(\n",
       "                'style',\n",
       "                'width: ' + width + 'px; height: ' + height + 'px;'\n",
       "            );\n",
       "\n",
       "            rubberband_canvas.setAttribute('width', width);\n",
       "            rubberband_canvas.setAttribute('height', height);\n",
       "\n",
       "            // And update the size in Python. We ignore the initial 0/0 size\n",
       "            // that occurs as the element is placed into the DOM, which should\n",
       "            // otherwise not happen due to the minimum size styling.\n",
       "            if (width != 0 && height != 0) {\n",
       "                fig.request_resize(width, height);\n",
       "            }\n",
       "        }\n",
       "    });\n",
       "    resizeObserver.observe(canvas_div);\n",
       "\n",
       "    function on_mouse_event_closure(name) {\n",
       "        return function (event) {\n",
       "            return fig.mouse_event(event, name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mousedown',\n",
       "        on_mouse_event_closure('button_press')\n",
       "    );\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mouseup',\n",
       "        on_mouse_event_closure('button_release')\n",
       "    );\n",
       "    // Throttle sequential mouse events to 1 every 20ms.\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mousemove',\n",
       "        on_mouse_event_closure('motion_notify')\n",
       "    );\n",
       "\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mouseenter',\n",
       "        on_mouse_event_closure('figure_enter')\n",
       "    );\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mouseleave',\n",
       "        on_mouse_event_closure('figure_leave')\n",
       "    );\n",
       "\n",
       "    canvas_div.addEventListener('wheel', function (event) {\n",
       "        if (event.deltaY < 0) {\n",
       "            event.step = 1;\n",
       "        } else {\n",
       "            event.step = -1;\n",
       "        }\n",
       "        on_mouse_event_closure('scroll')(event);\n",
       "    });\n",
       "\n",
       "    canvas_div.appendChild(canvas);\n",
       "    canvas_div.appendChild(rubberband_canvas);\n",
       "\n",
       "    this.rubberband_context = rubberband_canvas.getContext('2d');\n",
       "    this.rubberband_context.strokeStyle = '#000000';\n",
       "\n",
       "    this._resize_canvas = function (width, height, forward) {\n",
       "        if (forward) {\n",
       "            canvas_div.style.width = width + 'px';\n",
       "            canvas_div.style.height = height + 'px';\n",
       "        }\n",
       "    };\n",
       "\n",
       "    // Disable right mouse context menu.\n",
       "    this.rubberband_canvas.addEventListener('contextmenu', function (_e) {\n",
       "        event.preventDefault();\n",
       "        return false;\n",
       "    });\n",
       "\n",
       "    function set_focus() {\n",
       "        canvas.focus();\n",
       "        canvas_div.focus();\n",
       "    }\n",
       "\n",
       "    window.setTimeout(set_focus, 100);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._init_toolbar = function () {\n",
       "    var fig = this;\n",
       "\n",
       "    var toolbar = document.createElement('div');\n",
       "    toolbar.classList = 'mpl-toolbar';\n",
       "    this.root.appendChild(toolbar);\n",
       "\n",
       "    function on_click_closure(name) {\n",
       "        return function (_event) {\n",
       "            return fig.toolbar_button_onclick(name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    function on_mouseover_closure(tooltip) {\n",
       "        return function (event) {\n",
       "            if (!event.currentTarget.disabled) {\n",
       "                return fig.toolbar_button_onmouseover(tooltip);\n",
       "            }\n",
       "        };\n",
       "    }\n",
       "\n",
       "    fig.buttons = {};\n",
       "    var buttonGroup = document.createElement('div');\n",
       "    buttonGroup.classList = 'mpl-button-group';\n",
       "    for (var toolbar_ind in mpl.toolbar_items) {\n",
       "        var name = mpl.toolbar_items[toolbar_ind][0];\n",
       "        var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
       "        var image = mpl.toolbar_items[toolbar_ind][2];\n",
       "        var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
       "\n",
       "        if (!name) {\n",
       "            /* Instead of a spacer, we start a new button group. */\n",
       "            if (buttonGroup.hasChildNodes()) {\n",
       "                toolbar.appendChild(buttonGroup);\n",
       "            }\n",
       "            buttonGroup = document.createElement('div');\n",
       "            buttonGroup.classList = 'mpl-button-group';\n",
       "            continue;\n",
       "        }\n",
       "\n",
       "        var button = (fig.buttons[name] = document.createElement('button'));\n",
       "        button.classList = 'mpl-widget';\n",
       "        button.setAttribute('role', 'button');\n",
       "        button.setAttribute('aria-disabled', 'false');\n",
       "        button.addEventListener('click', on_click_closure(method_name));\n",
       "        button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
       "\n",
       "        var icon_img = document.createElement('img');\n",
       "        icon_img.src = '_images/' + image + '.png';\n",
       "        icon_img.srcset = '_images/' + image + '_large.png 2x';\n",
       "        icon_img.alt = tooltip;\n",
       "        button.appendChild(icon_img);\n",
       "\n",
       "        buttonGroup.appendChild(button);\n",
       "    }\n",
       "\n",
       "    if (buttonGroup.hasChildNodes()) {\n",
       "        toolbar.appendChild(buttonGroup);\n",
       "    }\n",
       "\n",
       "    var fmt_picker = document.createElement('select');\n",
       "    fmt_picker.classList = 'mpl-widget';\n",
       "    toolbar.appendChild(fmt_picker);\n",
       "    this.format_dropdown = fmt_picker;\n",
       "\n",
       "    for (var ind in mpl.extensions) {\n",
       "        var fmt = mpl.extensions[ind];\n",
       "        var option = document.createElement('option');\n",
       "        option.selected = fmt === mpl.default_extension;\n",
       "        option.innerHTML = fmt;\n",
       "        fmt_picker.appendChild(option);\n",
       "    }\n",
       "\n",
       "    var status_bar = document.createElement('span');\n",
       "    status_bar.classList = 'mpl-message';\n",
       "    toolbar.appendChild(status_bar);\n",
       "    this.message = status_bar;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.request_resize = function (x_pixels, y_pixels) {\n",
       "    // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
       "    // which will in turn request a refresh of the image.\n",
       "    this.send_message('resize', { width: x_pixels, height: y_pixels });\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.send_message = function (type, properties) {\n",
       "    properties['type'] = type;\n",
       "    properties['figure_id'] = this.id;\n",
       "    this.ws.send(JSON.stringify(properties));\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.send_draw_message = function () {\n",
       "    if (!this.waiting) {\n",
       "        this.waiting = true;\n",
       "        this.ws.send(JSON.stringify({ type: 'draw', figure_id: this.id }));\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
       "    var format_dropdown = fig.format_dropdown;\n",
       "    var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
       "    fig.ondownload(fig, format);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_resize = function (fig, msg) {\n",
       "    var size = msg['size'];\n",
       "    if (size[0] !== fig.canvas.width || size[1] !== fig.canvas.height) {\n",
       "        fig._resize_canvas(size[0], size[1], msg['forward']);\n",
       "        fig.send_message('refresh', {});\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_rubberband = function (fig, msg) {\n",
       "    var x0 = msg['x0'] / fig.ratio;\n",
       "    var y0 = (fig.canvas.height - msg['y0']) / fig.ratio;\n",
       "    var x1 = msg['x1'] / fig.ratio;\n",
       "    var y1 = (fig.canvas.height - msg['y1']) / fig.ratio;\n",
       "    x0 = Math.floor(x0) + 0.5;\n",
       "    y0 = Math.floor(y0) + 0.5;\n",
       "    x1 = Math.floor(x1) + 0.5;\n",
       "    y1 = Math.floor(y1) + 0.5;\n",
       "    var min_x = Math.min(x0, x1);\n",
       "    var min_y = Math.min(y0, y1);\n",
       "    var width = Math.abs(x1 - x0);\n",
       "    var height = Math.abs(y1 - y0);\n",
       "\n",
       "    fig.rubberband_context.clearRect(\n",
       "        0,\n",
       "        0,\n",
       "        fig.canvas.width / fig.ratio,\n",
       "        fig.canvas.height / fig.ratio\n",
       "    );\n",
       "\n",
       "    fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_figure_label = function (fig, msg) {\n",
       "    // Updates the figure title.\n",
       "    fig.header.textContent = msg['label'];\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_cursor = function (fig, msg) {\n",
       "    var cursor = msg['cursor'];\n",
       "    switch (cursor) {\n",
       "        case 0:\n",
       "            cursor = 'pointer';\n",
       "            break;\n",
       "        case 1:\n",
       "            cursor = 'default';\n",
       "            break;\n",
       "        case 2:\n",
       "            cursor = 'crosshair';\n",
       "            break;\n",
       "        case 3:\n",
       "            cursor = 'move';\n",
       "            break;\n",
       "    }\n",
       "    fig.rubberband_canvas.style.cursor = cursor;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_message = function (fig, msg) {\n",
       "    fig.message.textContent = msg['message'];\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_draw = function (fig, _msg) {\n",
       "    // Request the server to send over a new figure.\n",
       "    fig.send_draw_message();\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_image_mode = function (fig, msg) {\n",
       "    fig.image_mode = msg['mode'];\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_history_buttons = function (fig, msg) {\n",
       "    for (var key in msg) {\n",
       "        if (!(key in fig.buttons)) {\n",
       "            continue;\n",
       "        }\n",
       "        fig.buttons[key].disabled = !msg[key];\n",
       "        fig.buttons[key].setAttribute('aria-disabled', !msg[key]);\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_navigate_mode = function (fig, msg) {\n",
       "    if (msg['mode'] === 'PAN') {\n",
       "        fig.buttons['Pan'].classList.add('active');\n",
       "        fig.buttons['Zoom'].classList.remove('active');\n",
       "    } else if (msg['mode'] === 'ZOOM') {\n",
       "        fig.buttons['Pan'].classList.remove('active');\n",
       "        fig.buttons['Zoom'].classList.add('active');\n",
       "    } else {\n",
       "        fig.buttons['Pan'].classList.remove('active');\n",
       "        fig.buttons['Zoom'].classList.remove('active');\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.updated_canvas_event = function () {\n",
       "    // Called whenever the canvas gets updated.\n",
       "    this.send_message('ack', {});\n",
       "};\n",
       "\n",
       "// A function to construct a web socket function for onmessage handling.\n",
       "// Called in the figure constructor.\n",
       "mpl.figure.prototype._make_on_message_function = function (fig) {\n",
       "    return function socket_on_message(evt) {\n",
       "        if (evt.data instanceof Blob) {\n",
       "            /* FIXME: We get \"Resource interpreted as Image but\n",
       "             * transferred with MIME type text/plain:\" errors on\n",
       "             * Chrome.  But how to set the MIME type?  It doesn't seem\n",
       "             * to be part of the websocket stream */\n",
       "            evt.data.type = 'image/png';\n",
       "\n",
       "            /* Free the memory for the previous frames */\n",
       "            if (fig.imageObj.src) {\n",
       "                (window.URL || window.webkitURL).revokeObjectURL(\n",
       "                    fig.imageObj.src\n",
       "                );\n",
       "            }\n",
       "\n",
       "            fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
       "                evt.data\n",
       "            );\n",
       "            fig.updated_canvas_event();\n",
       "            fig.waiting = false;\n",
       "            return;\n",
       "        } else if (\n",
       "            typeof evt.data === 'string' &&\n",
       "            evt.data.slice(0, 21) === 'data:image/png;base64'\n",
       "        ) {\n",
       "            fig.imageObj.src = evt.data;\n",
       "            fig.updated_canvas_event();\n",
       "            fig.waiting = false;\n",
       "            return;\n",
       "        }\n",
       "\n",
       "        var msg = JSON.parse(evt.data);\n",
       "        var msg_type = msg['type'];\n",
       "\n",
       "        // Call the  \"handle_{type}\" callback, which takes\n",
       "        // the figure and JSON message as its only arguments.\n",
       "        try {\n",
       "            var callback = fig['handle_' + msg_type];\n",
       "        } catch (e) {\n",
       "            console.log(\n",
       "                \"No handler for the '\" + msg_type + \"' message type: \",\n",
       "                msg\n",
       "            );\n",
       "            return;\n",
       "        }\n",
       "\n",
       "        if (callback) {\n",
       "            try {\n",
       "                // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
       "                callback(fig, msg);\n",
       "            } catch (e) {\n",
       "                console.log(\n",
       "                    \"Exception inside the 'handler_\" + msg_type + \"' callback:\",\n",
       "                    e,\n",
       "                    e.stack,\n",
       "                    msg\n",
       "                );\n",
       "            }\n",
       "        }\n",
       "    };\n",
       "};\n",
       "\n",
       "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n",
       "mpl.findpos = function (e) {\n",
       "    //this section is from http://www.quirksmode.org/js/events_properties.html\n",
       "    var targ;\n",
       "    if (!e) {\n",
       "        e = window.event;\n",
       "    }\n",
       "    if (e.target) {\n",
       "        targ = e.target;\n",
       "    } else if (e.srcElement) {\n",
       "        targ = e.srcElement;\n",
       "    }\n",
       "    if (targ.nodeType === 3) {\n",
       "        // defeat Safari bug\n",
       "        targ = targ.parentNode;\n",
       "    }\n",
       "\n",
       "    // pageX,Y are the mouse positions relative to the document\n",
       "    var boundingRect = targ.getBoundingClientRect();\n",
       "    var x = e.pageX - (boundingRect.left + document.body.scrollLeft);\n",
       "    var y = e.pageY - (boundingRect.top + document.body.scrollTop);\n",
       "\n",
       "    return { x: x, y: y };\n",
       "};\n",
       "\n",
       "/*\n",
       " * return a copy of an object with only non-object keys\n",
       " * we need this to avoid circular references\n",
       " * http://stackoverflow.com/a/24161582/3208463\n",
       " */\n",
       "function simpleKeys(original) {\n",
       "    return Object.keys(original).reduce(function (obj, key) {\n",
       "        if (typeof original[key] !== 'object') {\n",
       "            obj[key] = original[key];\n",
       "        }\n",
       "        return obj;\n",
       "    }, {});\n",
       "}\n",
       "\n",
       "mpl.figure.prototype.mouse_event = function (event, name) {\n",
       "    var canvas_pos = mpl.findpos(event);\n",
       "\n",
       "    if (name === 'button_press') {\n",
       "        this.canvas.focus();\n",
       "        this.canvas_div.focus();\n",
       "    }\n",
       "\n",
       "    var x = canvas_pos.x * this.ratio;\n",
       "    var y = canvas_pos.y * this.ratio;\n",
       "\n",
       "    this.send_message(name, {\n",
       "        x: x,\n",
       "        y: y,\n",
       "        button: event.button,\n",
       "        step: event.step,\n",
       "        guiEvent: simpleKeys(event),\n",
       "    });\n",
       "\n",
       "    /* This prevents the web browser from automatically changing to\n",
       "     * the text insertion cursor when the button is pressed.  We want\n",
       "     * to control all of the cursor setting manually through the\n",
       "     * 'cursor' event from matplotlib */\n",
       "    event.preventDefault();\n",
       "    return false;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._key_event_extra = function (_event, _name) {\n",
       "    // Handle any extra behaviour associated with a key event\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.key_event = function (event, name) {\n",
       "    // Prevent repeat events\n",
       "    if (name === 'key_press') {\n",
       "        if (event.which === this._key) {\n",
       "            return;\n",
       "        } else {\n",
       "            this._key = event.which;\n",
       "        }\n",
       "    }\n",
       "    if (name === 'key_release') {\n",
       "        this._key = null;\n",
       "    }\n",
       "\n",
       "    var value = '';\n",
       "    if (event.ctrlKey && event.which !== 17) {\n",
       "        value += 'ctrl+';\n",
       "    }\n",
       "    if (event.altKey && event.which !== 18) {\n",
       "        value += 'alt+';\n",
       "    }\n",
       "    if (event.shiftKey && event.which !== 16) {\n",
       "        value += 'shift+';\n",
       "    }\n",
       "\n",
       "    value += 'k';\n",
       "    value += event.which.toString();\n",
       "\n",
       "    this._key_event_extra(event, name);\n",
       "\n",
       "    this.send_message(name, { key: value, guiEvent: simpleKeys(event) });\n",
       "    return false;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.toolbar_button_onclick = function (name) {\n",
       "    if (name === 'download') {\n",
       "        this.handle_save(this, null);\n",
       "    } else {\n",
       "        this.send_message('toolbar_button', { name: name });\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.toolbar_button_onmouseover = function (tooltip) {\n",
       "    this.message.textContent = tooltip;\n",
       "};\n",
       "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Left button pans, Right button zooms\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
       "\n",
       "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n",
       "\n",
       "mpl.default_extension = \"png\";/* global mpl */\n",
       "\n",
       "var comm_websocket_adapter = function (comm) {\n",
       "    // Create a \"websocket\"-like object which calls the given IPython comm\n",
       "    // object with the appropriate methods. Currently this is a non binary\n",
       "    // socket, so there is still some room for performance tuning.\n",
       "    var ws = {};\n",
       "\n",
       "    ws.close = function () {\n",
       "        comm.close();\n",
       "    };\n",
       "    ws.send = function (m) {\n",
       "        //console.log('sending', m);\n",
       "        comm.send(m);\n",
       "    };\n",
       "    // Register the callback with on_msg.\n",
       "    comm.on_msg(function (msg) {\n",
       "        //console.log('receiving', msg['content']['data'], msg);\n",
       "        // Pass the mpl event to the overridden (by mpl) onmessage function.\n",
       "        ws.onmessage(msg['content']['data']);\n",
       "    });\n",
       "    return ws;\n",
       "};\n",
       "\n",
       "mpl.mpl_figure_comm = function (comm, msg) {\n",
       "    // This is the function which gets called when the mpl process\n",
       "    // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
       "\n",
       "    var id = msg.content.data.id;\n",
       "    // Get hold of the div created by the display call when the Comm\n",
       "    // socket was opened in Python.\n",
       "    var element = document.getElementById(id);\n",
       "    var ws_proxy = comm_websocket_adapter(comm);\n",
       "\n",
       "    function ondownload(figure, _format) {\n",
       "        window.open(figure.canvas.toDataURL());\n",
       "    }\n",
       "\n",
       "    var fig = new mpl.figure(id, ws_proxy, ondownload, element);\n",
       "\n",
       "    // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
       "    // web socket which is closed, not our websocket->open comm proxy.\n",
       "    ws_proxy.onopen();\n",
       "\n",
       "    fig.parent_element = element;\n",
       "    fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n",
       "    if (!fig.cell_info) {\n",
       "        console.error('Failed to find cell for figure', id, fig);\n",
       "        return;\n",
       "    }\n",
       "    fig.cell_info[0].output_area.element.one(\n",
       "        'cleared',\n",
       "        { fig: fig },\n",
       "        fig._remove_fig_handler\n",
       "    );\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_close = function (fig, msg) {\n",
       "    var width = fig.canvas.width / fig.ratio;\n",
       "    fig.cell_info[0].output_area.element.off(\n",
       "        'cleared',\n",
       "        fig._remove_fig_handler\n",
       "    );\n",
       "\n",
       "    // Update the output cell to use the data from the current canvas.\n",
       "    fig.push_to_output();\n",
       "    var dataURL = fig.canvas.toDataURL();\n",
       "    // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
       "    // the notebook keyboard shortcuts fail.\n",
       "    IPython.keyboard_manager.enable();\n",
       "    fig.parent_element.innerHTML =\n",
       "        '<img src=\"' + dataURL + '\" width=\"' + width + '\">';\n",
       "    fig.close_ws(fig, msg);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.close_ws = function (fig, msg) {\n",
       "    fig.send_message('closing', msg);\n",
       "    // fig.ws.close()\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.push_to_output = function (_remove_interactive) {\n",
       "    // Turn the data on the canvas into data in the output cell.\n",
       "    var width = this.canvas.width / this.ratio;\n",
       "    var dataURL = this.canvas.toDataURL();\n",
       "    this.cell_info[1]['text/html'] =\n",
       "        '<img src=\"' + dataURL + '\" width=\"' + width + '\">';\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.updated_canvas_event = function () {\n",
       "    // Tell IPython that the notebook contents must change.\n",
       "    IPython.notebook.set_dirty(true);\n",
       "    this.send_message('ack', {});\n",
       "    var fig = this;\n",
       "    // Wait a second, then push the new image to the DOM so\n",
       "    // that it is saved nicely (might be nice to debounce this).\n",
       "    setTimeout(function () {\n",
       "        fig.push_to_output();\n",
       "    }, 1000);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._init_toolbar = function () {\n",
       "    var fig = this;\n",
       "\n",
       "    var toolbar = document.createElement('div');\n",
       "    toolbar.classList = 'btn-toolbar';\n",
       "    this.root.appendChild(toolbar);\n",
       "\n",
       "    function on_click_closure(name) {\n",
       "        return function (_event) {\n",
       "            return fig.toolbar_button_onclick(name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    function on_mouseover_closure(tooltip) {\n",
       "        return function (event) {\n",
       "            if (!event.currentTarget.disabled) {\n",
       "                return fig.toolbar_button_onmouseover(tooltip);\n",
       "            }\n",
       "        };\n",
       "    }\n",
       "\n",
       "    fig.buttons = {};\n",
       "    var buttonGroup = document.createElement('div');\n",
       "    buttonGroup.classList = 'btn-group';\n",
       "    var button;\n",
       "    for (var toolbar_ind in mpl.toolbar_items) {\n",
       "        var name = mpl.toolbar_items[toolbar_ind][0];\n",
       "        var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
       "        var image = mpl.toolbar_items[toolbar_ind][2];\n",
       "        var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
       "\n",
       "        if (!name) {\n",
       "            /* Instead of a spacer, we start a new button group. */\n",
       "            if (buttonGroup.hasChildNodes()) {\n",
       "                toolbar.appendChild(buttonGroup);\n",
       "            }\n",
       "            buttonGroup = document.createElement('div');\n",
       "            buttonGroup.classList = 'btn-group';\n",
       "            continue;\n",
       "        }\n",
       "\n",
       "        button = fig.buttons[name] = document.createElement('button');\n",
       "        button.classList = 'btn btn-default';\n",
       "        button.href = '#';\n",
       "        button.title = name;\n",
       "        button.innerHTML = '<i class=\"fa ' + image + ' fa-lg\"></i>';\n",
       "        button.addEventListener('click', on_click_closure(method_name));\n",
       "        button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
       "        buttonGroup.appendChild(button);\n",
       "    }\n",
       "\n",
       "    if (buttonGroup.hasChildNodes()) {\n",
       "        toolbar.appendChild(buttonGroup);\n",
       "    }\n",
       "\n",
       "    // Add the status bar.\n",
       "    var status_bar = document.createElement('span');\n",
       "    status_bar.classList = 'mpl-message pull-right';\n",
       "    toolbar.appendChild(status_bar);\n",
       "    this.message = status_bar;\n",
       "\n",
       "    // Add the close button to the window.\n",
       "    var buttongrp = document.createElement('div');\n",
       "    buttongrp.classList = 'btn-group inline pull-right';\n",
       "    button = document.createElement('button');\n",
       "    button.classList = 'btn btn-mini btn-primary';\n",
       "    button.href = '#';\n",
       "    button.title = 'Stop Interaction';\n",
       "    button.innerHTML = '<i class=\"fa fa-power-off icon-remove icon-large\"></i>';\n",
       "    button.addEventListener('click', function (_evt) {\n",
       "        fig.handle_close(fig, {});\n",
       "    });\n",
       "    button.addEventListener(\n",
       "        'mouseover',\n",
       "        on_mouseover_closure('Stop Interaction')\n",
       "    );\n",
       "    buttongrp.appendChild(button);\n",
       "    var titlebar = this.root.querySelector('.ui-dialog-titlebar');\n",
       "    titlebar.insertBefore(buttongrp, titlebar.firstChild);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._remove_fig_handler = function (event) {\n",
       "    var fig = event.data.fig;\n",
       "    fig.close_ws(fig, {});\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._root_extra_style = function (el) {\n",
       "    el.style.boxSizing = 'content-box'; // override notebook setting of border-box.\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._canvas_extra_style = function (el) {\n",
       "    // this is important to make the div 'focusable\n",
       "    el.setAttribute('tabindex', 0);\n",
       "    // reach out to IPython and tell the keyboard manager to turn it's self\n",
       "    // off when our div gets focus\n",
       "\n",
       "    // location in version 3\n",
       "    if (IPython.notebook.keyboard_manager) {\n",
       "        IPython.notebook.keyboard_manager.register_events(el);\n",
       "    } else {\n",
       "        // location in version 2\n",
       "        IPython.keyboard_manager.register_events(el);\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._key_event_extra = function (event, _name) {\n",
       "    var manager = IPython.notebook.keyboard_manager;\n",
       "    if (!manager) {\n",
       "        manager = IPython.keyboard_manager;\n",
       "    }\n",
       "\n",
       "    // Check for shift+enter\n",
       "    if (event.shiftKey && event.which === 13) {\n",
       "        this.canvas_div.blur();\n",
       "        // select the cell after this one\n",
       "        var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n",
       "        IPython.notebook.select(index + 1);\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
       "    fig.ondownload(fig, null);\n",
       "};\n",
       "\n",
       "mpl.find_output_cell = function (html_output) {\n",
       "    // Return the cell and output element which can be found *uniquely* in the notebook.\n",
       "    // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
       "    // IPython event is triggered only after the cells have been serialised, which for\n",
       "    // our purposes (turning an active figure into a static one), is too late.\n",
       "    var cells = IPython.notebook.get_cells();\n",
       "    var ncells = cells.length;\n",
       "    for (var i = 0; i < ncells; i++) {\n",
       "        var cell = cells[i];\n",
       "        if (cell.cell_type === 'code') {\n",
       "            for (var j = 0; j < cell.output_area.outputs.length; j++) {\n",
       "                var data = cell.output_area.outputs[j];\n",
       "                if (data.data) {\n",
       "                    // IPython >= 3 moved mimebundle to data attribute of output\n",
       "                    data = data.data;\n",
       "                }\n",
       "                if (data['text/html'] === html_output) {\n",
       "                    return [cell, data, j];\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "};\n",
       "\n",
       "// Register the function which deals with the matplotlib target/channel.\n",
       "// The kernel may be null if the page has been refreshed.\n",
       "if (IPython.notebook.kernel !== null) {\n",
       "    IPython.notebook.kernel.comm_manager.register_target(\n",
       "        'matplotlib',\n",
       "        mpl.mpl_figure_comm\n",
       "    );\n",
       "}\n"
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<img src=\"data:image/png;base64,[encoded data, 28212 characters]\" width=\"640\">"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "Temps d'execution de lapinoux avec n=99010 : 0.08579590969999984\n"
     ]
    }
   ],
   "source": [
    "def lapinoux(n: int) -> int:\n",
    "    \"\"\" Calcule le nombre de couples de lapins au bout de n mois (n>=0) \"\"\"\n",
    "    assert isinstance(n, int) and n >= 0, \"n must be integer and positive\"\n",
    "    nb_couples_immatures1 = 1\n",
    "    nb_couples_immatures2 = 0\n",
    "    nb_couples_matures = 0\n",
    "    \n",
    "    for i in range(n+1):\n",
    "        nb_couples_matures += nb_couples_immatures2\n",
    "        nb_couples_immatures2 = nb_couples_immatures1\n",
    "        nb_couples_immatures1 = nb_couples_matures\n",
    "    \n",
    "    return nb_couples_matures\n",
    "\n",
    "# Mesure du temps et tracés\n",
    "import time\n",
    "%matplotlib notebook\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "n = [i for i in range(10, 100000, 1000)]\n",
    "liste_temps = []\n",
    "\n",
    "for i in n:\n",
    "    print(f\"Test avec n={i}\", end = \" - \")\n",
    "    temps = 0.0\n",
    "    nb_loops = 10\n",
    "    for test in range(nb_loops):\n",
    "        start = time.process_time()\n",
    "        lapinoux(i)\n",
    "        temps += time.process_time() - start\n",
    "    temps /= nb_loops\n",
    "    liste_temps.append(temps)\n",
    "\n",
    "plt.plot(n, liste_temps, label=\"lapinoux\")\n",
    "plt.xlabel(\"n\")\n",
    "plt.grid(True)\n",
    "print(f\"\\n\\nTemps d'execution de lapinoux avec n={n[-1]} : {liste_temps[-1]}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "On constate que le temps d'exécution en fonction de `n` n'est **pas linéaire** comme la complexité le laissait supposer... ???\n",
    "\n",
    "- **Copier-coller** la définition de votre fonction `fibo` au début de la cellule suivante et exécutez la cellule pour analyser les performances."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Test avec n=10 - Test avec n=1010 - Test avec n=2010 - Test avec n=3010 - Test avec n=4010 - Test avec n=5010 - Test avec n=6010 - Test avec n=7010 - Test avec n=8010 - Test avec n=9010 - Test avec n=10010 - Test avec n=11010 - Test avec n=12010 - Test avec n=13010 - Test avec n=14010 - Test avec n=15010 - Test avec n=16010 - Test avec n=17010 - Test avec n=18010 - Test avec n=19010 - Test avec n=20010 - Test avec n=21010 - Test avec n=22010 - Test avec n=23010 - Test avec n=24010 - Test avec n=25010 - Test avec n=26010 - Test avec n=27010 - Test avec n=28010 - Test avec n=29010 - Test avec n=30010 - Test avec n=31010 - Test avec n=32010 - Test avec n=33010 - Test avec n=34010 - Test avec n=35010 - Test avec n=36010 - Test avec n=37010 - Test avec n=38010 - Test avec n=39010 - Test avec n=40010 - Test avec n=41010 - Test avec n=42010 - Test avec n=43010 - Test avec n=44010 - Test avec n=45010 - Test avec n=46010 - Test avec n=47010 - Test avec n=48010 - Test avec n=49010 - Test avec n=50010 - Test avec n=51010 - Test avec n=52010 - Test avec n=53010 - Test avec n=54010 - Test avec n=55010 - Test avec n=56010 - Test avec n=57010 - Test avec n=58010 - Test avec n=59010 - Test avec n=60010 - Test avec n=61010 - Test avec n=62010 - Test avec n=63010 - Test avec n=64010 - Test avec n=65010 - Test avec n=66010 - Test avec n=67010 - Test avec n=68010 - Test avec n=69010 - Test avec n=70010 - Test avec n=71010 - Test avec n=72010 - Test avec n=73010 - Test avec n=74010 - Test avec n=75010 - Test avec n=76010 - Test avec n=77010 - Test avec n=78010 - Test avec n=79010 - Test avec n=80010 - Test avec n=81010 - Test avec n=82010 - Test avec n=83010 - Test avec n=84010 - Test avec n=85010 - Test avec n=86010 - Test avec n=87010 - Test avec n=88010 - Test avec n=89010 - Test avec n=90010 - Test avec n=91010 - Test avec n=92010 - Test avec n=93010 - Test avec n=94010 - Test avec n=95010 - Test avec n=96010 - Test avec n=97010 - Test avec n=98010 - Test avec n=99010 - "
     ]
    },
    {
     "data": {
      "application/javascript": [
       "/* Put everything inside the global mpl namespace */\n",
       "/* global mpl */\n",
       "window.mpl = {};\n",
       "\n",
       "mpl.get_websocket_type = function () {\n",
       "    if (typeof WebSocket !== 'undefined') {\n",
       "        return WebSocket;\n",
       "    } else if (typeof MozWebSocket !== 'undefined') {\n",
       "        return MozWebSocket;\n",
       "    } else {\n",
       "        alert(\n",
       "            'Your browser does not have WebSocket support. ' +\n",
       "                'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
       "                'Firefox 4 and 5 are also supported but you ' +\n",
       "                'have to enable WebSockets in about:config.'\n",
       "        );\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure = function (figure_id, websocket, ondownload, parent_element) {\n",
       "    this.id = figure_id;\n",
       "\n",
       "    this.ws = websocket;\n",
       "\n",
       "    this.supports_binary = this.ws.binaryType !== undefined;\n",
       "\n",
       "    if (!this.supports_binary) {\n",
       "        var warnings = document.getElementById('mpl-warnings');\n",
       "        if (warnings) {\n",
       "            warnings.style.display = 'block';\n",
       "            warnings.textContent =\n",
       "                'This browser does not support binary websocket messages. ' +\n",
       "                'Performance may be slow.';\n",
       "        }\n",
       "    }\n",
       "\n",
       "    this.imageObj = new Image();\n",
       "\n",
       "    this.context = undefined;\n",
       "    this.message = undefined;\n",
       "    this.canvas = undefined;\n",
       "    this.rubberband_canvas = undefined;\n",
       "    this.rubberband_context = undefined;\n",
       "    this.format_dropdown = undefined;\n",
       "\n",
       "    this.image_mode = 'full';\n",
       "\n",
       "    this.root = document.createElement('div');\n",
       "    this.root.setAttribute('style', 'display: inline-block');\n",
       "    this._root_extra_style(this.root);\n",
       "\n",
       "    parent_element.appendChild(this.root);\n",
       "\n",
       "    this._init_header(this);\n",
       "    this._init_canvas(this);\n",
       "    this._init_toolbar(this);\n",
       "\n",
       "    var fig = this;\n",
       "\n",
       "    this.waiting = false;\n",
       "\n",
       "    this.ws.onopen = function () {\n",
       "        fig.send_message('supports_binary', { value: fig.supports_binary });\n",
       "        fig.send_message('send_image_mode', {});\n",
       "        if (fig.ratio !== 1) {\n",
       "            fig.send_message('set_dpi_ratio', { dpi_ratio: fig.ratio });\n",
       "        }\n",
       "        fig.send_message('refresh', {});\n",
       "    };\n",
       "\n",
       "    this.imageObj.onload = function () {\n",
       "        if (fig.image_mode === 'full') {\n",
       "            // Full images could contain transparency (where diff images\n",
       "            // almost always do), so we need to clear the canvas so that\n",
       "            // there is no ghosting.\n",
       "            fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
       "        }\n",
       "        fig.context.drawImage(fig.imageObj, 0, 0);\n",
       "    };\n",
       "\n",
       "    this.imageObj.onunload = function () {\n",
       "        fig.ws.close();\n",
       "    };\n",
       "\n",
       "    this.ws.onmessage = this._make_on_message_function(this);\n",
       "\n",
       "    this.ondownload = ondownload;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._init_header = function () {\n",
       "    var titlebar = document.createElement('div');\n",
       "    titlebar.classList =\n",
       "        'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\n",
       "    var titletext = document.createElement('div');\n",
       "    titletext.classList = 'ui-dialog-title';\n",
       "    titletext.setAttribute(\n",
       "        'style',\n",
       "        'width: 100%; text-align: center; padding: 3px;'\n",
       "    );\n",
       "    titlebar.appendChild(titletext);\n",
       "    this.root.appendChild(titlebar);\n",
       "    this.header = titletext;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\n",
       "\n",
       "mpl.figure.prototype._root_extra_style = function (_canvas_div) {};\n",
       "\n",
       "mpl.figure.prototype._init_canvas = function () {\n",
       "    var fig = this;\n",
       "\n",
       "    var canvas_div = (this.canvas_div = document.createElement('div'));\n",
       "    canvas_div.setAttribute(\n",
       "        'style',\n",
       "        'border: 1px solid #ddd;' +\n",
       "            'box-sizing: content-box;' +\n",
       "            'clear: both;' +\n",
       "            'min-height: 1px;' +\n",
       "            'min-width: 1px;' +\n",
       "            'outline: 0;' +\n",
       "            'overflow: hidden;' +\n",
       "            'position: relative;' +\n",
       "            'resize: both;'\n",
       "    );\n",
       "\n",
       "    function on_keyboard_event_closure(name) {\n",
       "        return function (event) {\n",
       "            return fig.key_event(event, name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    canvas_div.addEventListener(\n",
       "        'keydown',\n",
       "        on_keyboard_event_closure('key_press')\n",
       "    );\n",
       "    canvas_div.addEventListener(\n",
       "        'keyup',\n",
       "        on_keyboard_event_closure('key_release')\n",
       "    );\n",
       "\n",
       "    this._canvas_extra_style(canvas_div);\n",
       "    this.root.appendChild(canvas_div);\n",
       "\n",
       "    var canvas = (this.canvas = document.createElement('canvas'));\n",
       "    canvas.classList.add('mpl-canvas');\n",
       "    canvas.setAttribute('style', 'box-sizing: content-box;');\n",
       "\n",
       "    this.context = canvas.getContext('2d');\n",
       "\n",
       "    var backingStore =\n",
       "        this.context.backingStorePixelRatio ||\n",
       "        this.context.webkitBackingStorePixelRatio ||\n",
       "        this.context.mozBackingStorePixelRatio ||\n",
       "        this.context.msBackingStorePixelRatio ||\n",
       "        this.context.oBackingStorePixelRatio ||\n",
       "        this.context.backingStorePixelRatio ||\n",
       "        1;\n",
       "\n",
       "    this.ratio = (window.devicePixelRatio || 1) / backingStore;\n",
       "    if (this.ratio !== 1) {\n",
       "        fig.send_message('set_dpi_ratio', { dpi_ratio: this.ratio });\n",
       "    }\n",
       "\n",
       "    var rubberband_canvas = (this.rubberband_canvas = document.createElement(\n",
       "        'canvas'\n",
       "    ));\n",
       "    rubberband_canvas.setAttribute(\n",
       "        'style',\n",
       "        'box-sizing: content-box; position: absolute; left: 0; top: 0; z-index: 1;'\n",
       "    );\n",
       "\n",
       "    var resizeObserver = new ResizeObserver(function (entries) {\n",
       "        var nentries = entries.length;\n",
       "        for (var i = 0; i < nentries; i++) {\n",
       "            var entry = entries[i];\n",
       "            var width, height;\n",
       "            if (entry.contentBoxSize) {\n",
       "                if (entry.contentBoxSize instanceof Array) {\n",
       "                    // Chrome 84 implements new version of spec.\n",
       "                    width = entry.contentBoxSize[0].inlineSize;\n",
       "                    height = entry.contentBoxSize[0].blockSize;\n",
       "                } else {\n",
       "                    // Firefox implements old version of spec.\n",
       "                    width = entry.contentBoxSize.inlineSize;\n",
       "                    height = entry.contentBoxSize.blockSize;\n",
       "                }\n",
       "            } else {\n",
       "                // Chrome <84 implements even older version of spec.\n",
       "                width = entry.contentRect.width;\n",
       "                height = entry.contentRect.height;\n",
       "            }\n",
       "\n",
       "            // Keep the size of the canvas and rubber band canvas in sync with\n",
       "            // the canvas container.\n",
       "            if (entry.devicePixelContentBoxSize) {\n",
       "                // Chrome 84 implements new version of spec.\n",
       "                canvas.setAttribute(\n",
       "                    'width',\n",
       "                    entry.devicePixelContentBoxSize[0].inlineSize\n",
       "                );\n",
       "                canvas.setAttribute(\n",
       "                    'height',\n",
       "                    entry.devicePixelContentBoxSize[0].blockSize\n",
       "                );\n",
       "            } else {\n",
       "                canvas.setAttribute('width', width * fig.ratio);\n",
       "                canvas.setAttribute('height', height * fig.ratio);\n",
       "            }\n",
       "            canvas.setAttribute(\n",
       "                'style',\n",
       "                'width: ' + width + 'px; height: ' + height + 'px;'\n",
       "            );\n",
       "\n",
       "            rubberband_canvas.setAttribute('width', width);\n",
       "            rubberband_canvas.setAttribute('height', height);\n",
       "\n",
       "            // And update the size in Python. We ignore the initial 0/0 size\n",
       "            // that occurs as the element is placed into the DOM, which should\n",
       "            // otherwise not happen due to the minimum size styling.\n",
       "            if (width != 0 && height != 0) {\n",
       "                fig.request_resize(width, height);\n",
       "            }\n",
       "        }\n",
       "    });\n",
       "    resizeObserver.observe(canvas_div);\n",
       "\n",
       "    function on_mouse_event_closure(name) {\n",
       "        return function (event) {\n",
       "            return fig.mouse_event(event, name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mousedown',\n",
       "        on_mouse_event_closure('button_press')\n",
       "    );\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mouseup',\n",
       "        on_mouse_event_closure('button_release')\n",
       "    );\n",
       "    // Throttle sequential mouse events to 1 every 20ms.\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mousemove',\n",
       "        on_mouse_event_closure('motion_notify')\n",
       "    );\n",
       "\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mouseenter',\n",
       "        on_mouse_event_closure('figure_enter')\n",
       "    );\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mouseleave',\n",
       "        on_mouse_event_closure('figure_leave')\n",
       "    );\n",
       "\n",
       "    canvas_div.addEventListener('wheel', function (event) {\n",
       "        if (event.deltaY < 0) {\n",
       "            event.step = 1;\n",
       "        } else {\n",
       "            event.step = -1;\n",
       "        }\n",
       "        on_mouse_event_closure('scroll')(event);\n",
       "    });\n",
       "\n",
       "    canvas_div.appendChild(canvas);\n",
       "    canvas_div.appendChild(rubberband_canvas);\n",
       "\n",
       "    this.rubberband_context = rubberband_canvas.getContext('2d');\n",
       "    this.rubberband_context.strokeStyle = '#000000';\n",
       "\n",
       "    this._resize_canvas = function (width, height, forward) {\n",
       "        if (forward) {\n",
       "            canvas_div.style.width = width + 'px';\n",
       "            canvas_div.style.height = height + 'px';\n",
       "        }\n",
       "    };\n",
       "\n",
       "    // Disable right mouse context menu.\n",
       "    this.rubberband_canvas.addEventListener('contextmenu', function (_e) {\n",
       "        event.preventDefault();\n",
       "        return false;\n",
       "    });\n",
       "\n",
       "    function set_focus() {\n",
       "        canvas.focus();\n",
       "        canvas_div.focus();\n",
       "    }\n",
       "\n",
       "    window.setTimeout(set_focus, 100);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._init_toolbar = function () {\n",
       "    var fig = this;\n",
       "\n",
       "    var toolbar = document.createElement('div');\n",
       "    toolbar.classList = 'mpl-toolbar';\n",
       "    this.root.appendChild(toolbar);\n",
       "\n",
       "    function on_click_closure(name) {\n",
       "        return function (_event) {\n",
       "            return fig.toolbar_button_onclick(name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    function on_mouseover_closure(tooltip) {\n",
       "        return function (event) {\n",
       "            if (!event.currentTarget.disabled) {\n",
       "                return fig.toolbar_button_onmouseover(tooltip);\n",
       "            }\n",
       "        };\n",
       "    }\n",
       "\n",
       "    fig.buttons = {};\n",
       "    var buttonGroup = document.createElement('div');\n",
       "    buttonGroup.classList = 'mpl-button-group';\n",
       "    for (var toolbar_ind in mpl.toolbar_items) {\n",
       "        var name = mpl.toolbar_items[toolbar_ind][0];\n",
       "        var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
       "        var image = mpl.toolbar_items[toolbar_ind][2];\n",
       "        var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
       "\n",
       "        if (!name) {\n",
       "            /* Instead of a spacer, we start a new button group. */\n",
       "            if (buttonGroup.hasChildNodes()) {\n",
       "                toolbar.appendChild(buttonGroup);\n",
       "            }\n",
       "            buttonGroup = document.createElement('div');\n",
       "            buttonGroup.classList = 'mpl-button-group';\n",
       "            continue;\n",
       "        }\n",
       "\n",
       "        var button = (fig.buttons[name] = document.createElement('button'));\n",
       "        button.classList = 'mpl-widget';\n",
       "        button.setAttribute('role', 'button');\n",
       "        button.setAttribute('aria-disabled', 'false');\n",
       "        button.addEventListener('click', on_click_closure(method_name));\n",
       "        button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
       "\n",
       "        var icon_img = document.createElement('img');\n",
       "        icon_img.src = '_images/' + image + '.png';\n",
       "        icon_img.srcset = '_images/' + image + '_large.png 2x';\n",
       "        icon_img.alt = tooltip;\n",
       "        button.appendChild(icon_img);\n",
       "\n",
       "        buttonGroup.appendChild(button);\n",
       "    }\n",
       "\n",
       "    if (buttonGroup.hasChildNodes()) {\n",
       "        toolbar.appendChild(buttonGroup);\n",
       "    }\n",
       "\n",
       "    var fmt_picker = document.createElement('select');\n",
       "    fmt_picker.classList = 'mpl-widget';\n",
       "    toolbar.appendChild(fmt_picker);\n",
       "    this.format_dropdown = fmt_picker;\n",
       "\n",
       "    for (var ind in mpl.extensions) {\n",
       "        var fmt = mpl.extensions[ind];\n",
       "        var option = document.createElement('option');\n",
       "        option.selected = fmt === mpl.default_extension;\n",
       "        option.innerHTML = fmt;\n",
       "        fmt_picker.appendChild(option);\n",
       "    }\n",
       "\n",
       "    var status_bar = document.createElement('span');\n",
       "    status_bar.classList = 'mpl-message';\n",
       "    toolbar.appendChild(status_bar);\n",
       "    this.message = status_bar;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.request_resize = function (x_pixels, y_pixels) {\n",
       "    // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
       "    // which will in turn request a refresh of the image.\n",
       "    this.send_message('resize', { width: x_pixels, height: y_pixels });\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.send_message = function (type, properties) {\n",
       "    properties['type'] = type;\n",
       "    properties['figure_id'] = this.id;\n",
       "    this.ws.send(JSON.stringify(properties));\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.send_draw_message = function () {\n",
       "    if (!this.waiting) {\n",
       "        this.waiting = true;\n",
       "        this.ws.send(JSON.stringify({ type: 'draw', figure_id: this.id }));\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
       "    var format_dropdown = fig.format_dropdown;\n",
       "    var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
       "    fig.ondownload(fig, format);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_resize = function (fig, msg) {\n",
       "    var size = msg['size'];\n",
       "    if (size[0] !== fig.canvas.width || size[1] !== fig.canvas.height) {\n",
       "        fig._resize_canvas(size[0], size[1], msg['forward']);\n",
       "        fig.send_message('refresh', {});\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_rubberband = function (fig, msg) {\n",
       "    var x0 = msg['x0'] / fig.ratio;\n",
       "    var y0 = (fig.canvas.height - msg['y0']) / fig.ratio;\n",
       "    var x1 = msg['x1'] / fig.ratio;\n",
       "    var y1 = (fig.canvas.height - msg['y1']) / fig.ratio;\n",
       "    x0 = Math.floor(x0) + 0.5;\n",
       "    y0 = Math.floor(y0) + 0.5;\n",
       "    x1 = Math.floor(x1) + 0.5;\n",
       "    y1 = Math.floor(y1) + 0.5;\n",
       "    var min_x = Math.min(x0, x1);\n",
       "    var min_y = Math.min(y0, y1);\n",
       "    var width = Math.abs(x1 - x0);\n",
       "    var height = Math.abs(y1 - y0);\n",
       "\n",
       "    fig.rubberband_context.clearRect(\n",
       "        0,\n",
       "        0,\n",
       "        fig.canvas.width / fig.ratio,\n",
       "        fig.canvas.height / fig.ratio\n",
       "    );\n",
       "\n",
       "    fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_figure_label = function (fig, msg) {\n",
       "    // Updates the figure title.\n",
       "    fig.header.textContent = msg['label'];\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_cursor = function (fig, msg) {\n",
       "    var cursor = msg['cursor'];\n",
       "    switch (cursor) {\n",
       "        case 0:\n",
       "            cursor = 'pointer';\n",
       "            break;\n",
       "        case 1:\n",
       "            cursor = 'default';\n",
       "            break;\n",
       "        case 2:\n",
       "            cursor = 'crosshair';\n",
       "            break;\n",
       "        case 3:\n",
       "            cursor = 'move';\n",
       "            break;\n",
       "    }\n",
       "    fig.rubberband_canvas.style.cursor = cursor;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_message = function (fig, msg) {\n",
       "    fig.message.textContent = msg['message'];\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_draw = function (fig, _msg) {\n",
       "    // Request the server to send over a new figure.\n",
       "    fig.send_draw_message();\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_image_mode = function (fig, msg) {\n",
       "    fig.image_mode = msg['mode'];\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_history_buttons = function (fig, msg) {\n",
       "    for (var key in msg) {\n",
       "        if (!(key in fig.buttons)) {\n",
       "            continue;\n",
       "        }\n",
       "        fig.buttons[key].disabled = !msg[key];\n",
       "        fig.buttons[key].setAttribute('aria-disabled', !msg[key]);\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_navigate_mode = function (fig, msg) {\n",
       "    if (msg['mode'] === 'PAN') {\n",
       "        fig.buttons['Pan'].classList.add('active');\n",
       "        fig.buttons['Zoom'].classList.remove('active');\n",
       "    } else if (msg['mode'] === 'ZOOM') {\n",
       "        fig.buttons['Pan'].classList.remove('active');\n",
       "        fig.buttons['Zoom'].classList.add('active');\n",
       "    } else {\n",
       "        fig.buttons['Pan'].classList.remove('active');\n",
       "        fig.buttons['Zoom'].classList.remove('active');\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.updated_canvas_event = function () {\n",
       "    // Called whenever the canvas gets updated.\n",
       "    this.send_message('ack', {});\n",
       "};\n",
       "\n",
       "// A function to construct a web socket function for onmessage handling.\n",
       "// Called in the figure constructor.\n",
       "mpl.figure.prototype._make_on_message_function = function (fig) {\n",
       "    return function socket_on_message(evt) {\n",
       "        if (evt.data instanceof Blob) {\n",
       "            /* FIXME: We get \"Resource interpreted as Image but\n",
       "             * transferred with MIME type text/plain:\" errors on\n",
       "             * Chrome.  But how to set the MIME type?  It doesn't seem\n",
       "             * to be part of the websocket stream */\n",
       "            evt.data.type = 'image/png';\n",
       "\n",
       "            /* Free the memory for the previous frames */\n",
       "            if (fig.imageObj.src) {\n",
       "                (window.URL || window.webkitURL).revokeObjectURL(\n",
       "                    fig.imageObj.src\n",
       "                );\n",
       "            }\n",
       "\n",
       "            fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
       "                evt.data\n",
       "            );\n",
       "            fig.updated_canvas_event();\n",
       "            fig.waiting = false;\n",
       "            return;\n",
       "        } else if (\n",
       "            typeof evt.data === 'string' &&\n",
       "            evt.data.slice(0, 21) === 'data:image/png;base64'\n",
       "        ) {\n",
       "            fig.imageObj.src = evt.data;\n",
       "            fig.updated_canvas_event();\n",
       "            fig.waiting = false;\n",
       "            return;\n",
       "        }\n",
       "\n",
       "        var msg = JSON.parse(evt.data);\n",
       "        var msg_type = msg['type'];\n",
       "\n",
       "        // Call the  \"handle_{type}\" callback, which takes\n",
       "        // the figure and JSON message as its only arguments.\n",
       "        try {\n",
       "            var callback = fig['handle_' + msg_type];\n",
       "        } catch (e) {\n",
       "            console.log(\n",
       "                \"No handler for the '\" + msg_type + \"' message type: \",\n",
       "                msg\n",
       "            );\n",
       "            return;\n",
       "        }\n",
       "\n",
       "        if (callback) {\n",
       "            try {\n",
       "                // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
       "                callback(fig, msg);\n",
       "            } catch (e) {\n",
       "                console.log(\n",
       "                    \"Exception inside the 'handler_\" + msg_type + \"' callback:\",\n",
       "                    e,\n",
       "                    e.stack,\n",
       "                    msg\n",
       "                );\n",
       "            }\n",
       "        }\n",
       "    };\n",
       "};\n",
       "\n",
       "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n",
       "mpl.findpos = function (e) {\n",
       "    //this section is from http://www.quirksmode.org/js/events_properties.html\n",
       "    var targ;\n",
       "    if (!e) {\n",
       "        e = window.event;\n",
       "    }\n",
       "    if (e.target) {\n",
       "        targ = e.target;\n",
       "    } else if (e.srcElement) {\n",
       "        targ = e.srcElement;\n",
       "    }\n",
       "    if (targ.nodeType === 3) {\n",
       "        // defeat Safari bug\n",
       "        targ = targ.parentNode;\n",
       "    }\n",
       "\n",
       "    // pageX,Y are the mouse positions relative to the document\n",
       "    var boundingRect = targ.getBoundingClientRect();\n",
       "    var x = e.pageX - (boundingRect.left + document.body.scrollLeft);\n",
       "    var y = e.pageY - (boundingRect.top + document.body.scrollTop);\n",
       "\n",
       "    return { x: x, y: y };\n",
       "};\n",
       "\n",
       "/*\n",
       " * return a copy of an object with only non-object keys\n",
       " * we need this to avoid circular references\n",
       " * http://stackoverflow.com/a/24161582/3208463\n",
       " */\n",
       "function simpleKeys(original) {\n",
       "    return Object.keys(original).reduce(function (obj, key) {\n",
       "        if (typeof original[key] !== 'object') {\n",
       "            obj[key] = original[key];\n",
       "        }\n",
       "        return obj;\n",
       "    }, {});\n",
       "}\n",
       "\n",
       "mpl.figure.prototype.mouse_event = function (event, name) {\n",
       "    var canvas_pos = mpl.findpos(event);\n",
       "\n",
       "    if (name === 'button_press') {\n",
       "        this.canvas.focus();\n",
       "        this.canvas_div.focus();\n",
       "    }\n",
       "\n",
       "    var x = canvas_pos.x * this.ratio;\n",
       "    var y = canvas_pos.y * this.ratio;\n",
       "\n",
       "    this.send_message(name, {\n",
       "        x: x,\n",
       "        y: y,\n",
       "        button: event.button,\n",
       "        step: event.step,\n",
       "        guiEvent: simpleKeys(event),\n",
       "    });\n",
       "\n",
       "    /* This prevents the web browser from automatically changing to\n",
       "     * the text insertion cursor when the button is pressed.  We want\n",
       "     * to control all of the cursor setting manually through the\n",
       "     * 'cursor' event from matplotlib */\n",
       "    event.preventDefault();\n",
       "    return false;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._key_event_extra = function (_event, _name) {\n",
       "    // Handle any extra behaviour associated with a key event\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.key_event = function (event, name) {\n",
       "    // Prevent repeat events\n",
       "    if (name === 'key_press') {\n",
       "        if (event.which === this._key) {\n",
       "            return;\n",
       "        } else {\n",
       "            this._key = event.which;\n",
       "        }\n",
       "    }\n",
       "    if (name === 'key_release') {\n",
       "        this._key = null;\n",
       "    }\n",
       "\n",
       "    var value = '';\n",
       "    if (event.ctrlKey && event.which !== 17) {\n",
       "        value += 'ctrl+';\n",
       "    }\n",
       "    if (event.altKey && event.which !== 18) {\n",
       "        value += 'alt+';\n",
       "    }\n",
       "    if (event.shiftKey && event.which !== 16) {\n",
       "        value += 'shift+';\n",
       "    }\n",
       "\n",
       "    value += 'k';\n",
       "    value += event.which.toString();\n",
       "\n",
       "    this._key_event_extra(event, name);\n",
       "\n",
       "    this.send_message(name, { key: value, guiEvent: simpleKeys(event) });\n",
       "    return false;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.toolbar_button_onclick = function (name) {\n",
       "    if (name === 'download') {\n",
       "        this.handle_save(this, null);\n",
       "    } else {\n",
       "        this.send_message('toolbar_button', { name: name });\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.toolbar_button_onmouseover = function (tooltip) {\n",
       "    this.message.textContent = tooltip;\n",
       "};\n",
       "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Left button pans, Right button zooms\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
       "\n",
       "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n",
       "\n",
       "mpl.default_extension = \"png\";/* global mpl */\n",
       "\n",
       "var comm_websocket_adapter = function (comm) {\n",
       "    // Create a \"websocket\"-like object which calls the given IPython comm\n",
       "    // object with the appropriate methods. Currently this is a non binary\n",
       "    // socket, so there is still some room for performance tuning.\n",
       "    var ws = {};\n",
       "\n",
       "    ws.close = function () {\n",
       "        comm.close();\n",
       "    };\n",
       "    ws.send = function (m) {\n",
       "        //console.log('sending', m);\n",
       "        comm.send(m);\n",
       "    };\n",
       "    // Register the callback with on_msg.\n",
       "    comm.on_msg(function (msg) {\n",
       "        //console.log('receiving', msg['content']['data'], msg);\n",
       "        // Pass the mpl event to the overridden (by mpl) onmessage function.\n",
       "        ws.onmessage(msg['content']['data']);\n",
       "    });\n",
       "    return ws;\n",
       "};\n",
       "\n",
       "mpl.mpl_figure_comm = function (comm, msg) {\n",
       "    // This is the function which gets called when the mpl process\n",
       "    // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
       "\n",
       "    var id = msg.content.data.id;\n",
       "    // Get hold of the div created by the display call when the Comm\n",
       "    // socket was opened in Python.\n",
       "    var element = document.getElementById(id);\n",
       "    var ws_proxy = comm_websocket_adapter(comm);\n",
       "\n",
       "    function ondownload(figure, _format) {\n",
       "        window.open(figure.canvas.toDataURL());\n",
       "    }\n",
       "\n",
       "    var fig = new mpl.figure(id, ws_proxy, ondownload, element);\n",
       "\n",
       "    // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
       "    // web socket which is closed, not our websocket->open comm proxy.\n",
       "    ws_proxy.onopen();\n",
       "\n",
       "    fig.parent_element = element;\n",
       "    fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n",
       "    if (!fig.cell_info) {\n",
       "        console.error('Failed to find cell for figure', id, fig);\n",
       "        return;\n",
       "    }\n",
       "    fig.cell_info[0].output_area.element.one(\n",
       "        'cleared',\n",
       "        { fig: fig },\n",
       "        fig._remove_fig_handler\n",
       "    );\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_close = function (fig, msg) {\n",
       "    var width = fig.canvas.width / fig.ratio;\n",
       "    fig.cell_info[0].output_area.element.off(\n",
       "        'cleared',\n",
       "        fig._remove_fig_handler\n",
       "    );\n",
       "\n",
       "    // Update the output cell to use the data from the current canvas.\n",
       "    fig.push_to_output();\n",
       "    var dataURL = fig.canvas.toDataURL();\n",
       "    // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
       "    // the notebook keyboard shortcuts fail.\n",
       "    IPython.keyboard_manager.enable();\n",
       "    fig.parent_element.innerHTML =\n",
       "        '<img src=\"' + dataURL + '\" width=\"' + width + '\">';\n",
       "    fig.close_ws(fig, msg);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.close_ws = function (fig, msg) {\n",
       "    fig.send_message('closing', msg);\n",
       "    // fig.ws.close()\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.push_to_output = function (_remove_interactive) {\n",
       "    // Turn the data on the canvas into data in the output cell.\n",
       "    var width = this.canvas.width / this.ratio;\n",
       "    var dataURL = this.canvas.toDataURL();\n",
       "    this.cell_info[1]['text/html'] =\n",
       "        '<img src=\"' + dataURL + '\" width=\"' + width + '\">';\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.updated_canvas_event = function () {\n",
       "    // Tell IPython that the notebook contents must change.\n",
       "    IPython.notebook.set_dirty(true);\n",
       "    this.send_message('ack', {});\n",
       "    var fig = this;\n",
       "    // Wait a second, then push the new image to the DOM so\n",
       "    // that it is saved nicely (might be nice to debounce this).\n",
       "    setTimeout(function () {\n",
       "        fig.push_to_output();\n",
       "    }, 1000);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._init_toolbar = function () {\n",
       "    var fig = this;\n",
       "\n",
       "    var toolbar = document.createElement('div');\n",
       "    toolbar.classList = 'btn-toolbar';\n",
       "    this.root.appendChild(toolbar);\n",
       "\n",
       "    function on_click_closure(name) {\n",
       "        return function (_event) {\n",
       "            return fig.toolbar_button_onclick(name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    function on_mouseover_closure(tooltip) {\n",
       "        return function (event) {\n",
       "            if (!event.currentTarget.disabled) {\n",
       "                return fig.toolbar_button_onmouseover(tooltip);\n",
       "            }\n",
       "        };\n",
       "    }\n",
       "\n",
       "    fig.buttons = {};\n",
       "    var buttonGroup = document.createElement('div');\n",
       "    buttonGroup.classList = 'btn-group';\n",
       "    var button;\n",
       "    for (var toolbar_ind in mpl.toolbar_items) {\n",
       "        var name = mpl.toolbar_items[toolbar_ind][0];\n",
       "        var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
       "        var image = mpl.toolbar_items[toolbar_ind][2];\n",
       "        var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
       "\n",
       "        if (!name) {\n",
       "            /* Instead of a spacer, we start a new button group. */\n",
       "            if (buttonGroup.hasChildNodes()) {\n",
       "                toolbar.appendChild(buttonGroup);\n",
       "            }\n",
       "            buttonGroup = document.createElement('div');\n",
       "            buttonGroup.classList = 'btn-group';\n",
       "            continue;\n",
       "        }\n",
       "\n",
       "        button = fig.buttons[name] = document.createElement('button');\n",
       "        button.classList = 'btn btn-default';\n",
       "        button.href = '#';\n",
       "        button.title = name;\n",
       "        button.innerHTML = '<i class=\"fa ' + image + ' fa-lg\"></i>';\n",
       "        button.addEventListener('click', on_click_closure(method_name));\n",
       "        button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
       "        buttonGroup.appendChild(button);\n",
       "    }\n",
       "\n",
       "    if (buttonGroup.hasChildNodes()) {\n",
       "        toolbar.appendChild(buttonGroup);\n",
       "    }\n",
       "\n",
       "    // Add the status bar.\n",
       "    var status_bar = document.createElement('span');\n",
       "    status_bar.classList = 'mpl-message pull-right';\n",
       "    toolbar.appendChild(status_bar);\n",
       "    this.message = status_bar;\n",
       "\n",
       "    // Add the close button to the window.\n",
       "    var buttongrp = document.createElement('div');\n",
       "    buttongrp.classList = 'btn-group inline pull-right';\n",
       "    button = document.createElement('button');\n",
       "    button.classList = 'btn btn-mini btn-primary';\n",
       "    button.href = '#';\n",
       "    button.title = 'Stop Interaction';\n",
       "    button.innerHTML = '<i class=\"fa fa-power-off icon-remove icon-large\"></i>';\n",
       "    button.addEventListener('click', function (_evt) {\n",
       "        fig.handle_close(fig, {});\n",
       "    });\n",
       "    button.addEventListener(\n",
       "        'mouseover',\n",
       "        on_mouseover_closure('Stop Interaction')\n",
       "    );\n",
       "    buttongrp.appendChild(button);\n",
       "    var titlebar = this.root.querySelector('.ui-dialog-titlebar');\n",
       "    titlebar.insertBefore(buttongrp, titlebar.firstChild);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._remove_fig_handler = function (event) {\n",
       "    var fig = event.data.fig;\n",
       "    fig.close_ws(fig, {});\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._root_extra_style = function (el) {\n",
       "    el.style.boxSizing = 'content-box'; // override notebook setting of border-box.\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._canvas_extra_style = function (el) {\n",
       "    // this is important to make the div 'focusable\n",
       "    el.setAttribute('tabindex', 0);\n",
       "    // reach out to IPython and tell the keyboard manager to turn it's self\n",
       "    // off when our div gets focus\n",
       "\n",
       "    // location in version 3\n",
       "    if (IPython.notebook.keyboard_manager) {\n",
       "        IPython.notebook.keyboard_manager.register_events(el);\n",
       "    } else {\n",
       "        // location in version 2\n",
       "        IPython.keyboard_manager.register_events(el);\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._key_event_extra = function (event, _name) {\n",
       "    var manager = IPython.notebook.keyboard_manager;\n",
       "    if (!manager) {\n",
       "        manager = IPython.keyboard_manager;\n",
       "    }\n",
       "\n",
       "    // Check for shift+enter\n",
       "    if (event.shiftKey && event.which === 13) {\n",
       "        this.canvas_div.blur();\n",
       "        // select the cell after this one\n",
       "        var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n",
       "        IPython.notebook.select(index + 1);\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
       "    fig.ondownload(fig, null);\n",
       "};\n",
       "\n",
       "mpl.find_output_cell = function (html_output) {\n",
       "    // Return the cell and output element which can be found *uniquely* in the notebook.\n",
       "    // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
       "    // IPython event is triggered only after the cells have been serialised, which for\n",
       "    // our purposes (turning an active figure into a static one), is too late.\n",
       "    var cells = IPython.notebook.get_cells();\n",
       "    var ncells = cells.length;\n",
       "    for (var i = 0; i < ncells; i++) {\n",
       "        var cell = cells[i];\n",
       "        if (cell.cell_type === 'code') {\n",
       "            for (var j = 0; j < cell.output_area.outputs.length; j++) {\n",
       "                var data = cell.output_area.outputs[j];\n",
       "                if (data.data) {\n",
       "                    // IPython >= 3 moved mimebundle to data attribute of output\n",
       "                    data = data.data;\n",
       "                }\n",
       "                if (data['text/html'] === html_output) {\n",
       "                    return [cell, data, j];\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "};\n",
       "\n",
       "// Register the function which deals with the matplotlib target/channel.\n",
       "// The kernel may be null if the page has been refreshed.\n",
       "if (IPython.notebook.kernel !== null) {\n",
       "    IPython.notebook.kernel.comm_manager.register_target(\n",
       "        'matplotlib',\n",
       "        mpl.mpl_figure_comm\n",
       "    );\n",
       "}\n"
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<img src=\"data:image/png;base64,[encoded data, 28264 characters]\" width=\"640\">"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "Temps d'execution de fibo avec n=99010 : 0.08708674800000082\n"
     ]
    }
   ],
   "source": [
    "def fibo(n: int) -> int:\n",
    "    \"\"\" Calcule les termes de la suite de Fibonacci (n>=0) \"\"\"\n",
    "    assert isinstance(n, int) and n >= 0, \"n must be integer and positive\"\n",
    "    \n",
    "    if n <= 1: return 1\n",
    "    elif n <= 0: return 0\n",
    "\n",
    "    un_moins_2 = 0\n",
    "    un_moins_1 = 1\n",
    "    \n",
    "    for i in range(2,n+1):\n",
    "        un = un_moins_1 + un_moins_2\n",
    "        un_moins_2 = un_moins_1\n",
    "        un_moins_1 = un\n",
    "    return un\n",
    "\n",
    "# Mesure du temps et tracés\n",
    "import time\n",
    "%matplotlib notebook\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "n = [i for i in range(10, 100000, 1000)]\n",
    "liste_temps = []\n",
    "\n",
    "for i in n:\n",
    "    print(f\"Test avec n={i}\", end = \" - \")\n",
    "    temps = 0.0\n",
    "    nb_loops = 10\n",
    "    for test in range(nb_loops):\n",
    "        start = time.process_time()\n",
    "        fibo(i)\n",
    "        temps += time.process_time() - start\n",
    "    temps /= nb_loops\n",
    "    liste_temps.append(temps)\n",
    "\n",
    "plt.plot(n, liste_temps, label=\"fibo\")\n",
    "plt.xlabel(\"n\")\n",
    "plt.grid(True)\n",
    "print(f\"\\n\\nTemps d'execution de fibo avec n={n[-1]} : {liste_temps[-1]}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Nous obtenons des résultats identiques à la fonction précédente, ce qui est normal puisque ces fonctions sont presques identiques.\n",
    "\n",
    "- **Copier-coller** la définition de votre fonction `fibor` au début de la cellule suivante et exécutez la cellule pour analyser les performances."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Test avec n=5 - Test avec n=7 - Test avec n=9 - Test avec n=11 - Test avec n=13 - Test avec n=15 - Test avec n=17 - Test avec n=19 - Test avec n=21 - Test avec n=23 - Test avec n=25 - Test avec n=27 - Test avec n=29 - Test avec n=31 - Test avec n=33 - Test avec n=35 - Test avec n=37 - Test avec n=39 - "
     ]
    },
    {
     "data": {
      "application/javascript": [
       "/* Put everything inside the global mpl namespace */\n",
       "/* global mpl */\n",
       "window.mpl = {};\n",
       "\n",
       "mpl.get_websocket_type = function () {\n",
       "    if (typeof WebSocket !== 'undefined') {\n",
       "        return WebSocket;\n",
       "    } else if (typeof MozWebSocket !== 'undefined') {\n",
       "        return MozWebSocket;\n",
       "    } else {\n",
       "        alert(\n",
       "            'Your browser does not have WebSocket support. ' +\n",
       "                'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
       "                'Firefox 4 and 5 are also supported but you ' +\n",
       "                'have to enable WebSockets in about:config.'\n",
       "        );\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure = function (figure_id, websocket, ondownload, parent_element) {\n",
       "    this.id = figure_id;\n",
       "\n",
       "    this.ws = websocket;\n",
       "\n",
       "    this.supports_binary = this.ws.binaryType !== undefined;\n",
       "\n",
       "    if (!this.supports_binary) {\n",
       "        var warnings = document.getElementById('mpl-warnings');\n",
       "        if (warnings) {\n",
       "            warnings.style.display = 'block';\n",
       "            warnings.textContent =\n",
       "                'This browser does not support binary websocket messages. ' +\n",
       "                'Performance may be slow.';\n",
       "        }\n",
       "    }\n",
       "\n",
       "    this.imageObj = new Image();\n",
       "\n",
       "    this.context = undefined;\n",
       "    this.message = undefined;\n",
       "    this.canvas = undefined;\n",
       "    this.rubberband_canvas = undefined;\n",
       "    this.rubberband_context = undefined;\n",
       "    this.format_dropdown = undefined;\n",
       "\n",
       "    this.image_mode = 'full';\n",
       "\n",
       "    this.root = document.createElement('div');\n",
       "    this.root.setAttribute('style', 'display: inline-block');\n",
       "    this._root_extra_style(this.root);\n",
       "\n",
       "    parent_element.appendChild(this.root);\n",
       "\n",
       "    this._init_header(this);\n",
       "    this._init_canvas(this);\n",
       "    this._init_toolbar(this);\n",
       "\n",
       "    var fig = this;\n",
       "\n",
       "    this.waiting = false;\n",
       "\n",
       "    this.ws.onopen = function () {\n",
       "        fig.send_message('supports_binary', { value: fig.supports_binary });\n",
       "        fig.send_message('send_image_mode', {});\n",
       "        if (fig.ratio !== 1) {\n",
       "            fig.send_message('set_dpi_ratio', { dpi_ratio: fig.ratio });\n",
       "        }\n",
       "        fig.send_message('refresh', {});\n",
       "    };\n",
       "\n",
       "    this.imageObj.onload = function () {\n",
       "        if (fig.image_mode === 'full') {\n",
       "            // Full images could contain transparency (where diff images\n",
       "            // almost always do), so we need to clear the canvas so that\n",
       "            // there is no ghosting.\n",
       "            fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
       "        }\n",
       "        fig.context.drawImage(fig.imageObj, 0, 0);\n",
       "    };\n",
       "\n",
       "    this.imageObj.onunload = function () {\n",
       "        fig.ws.close();\n",
       "    };\n",
       "\n",
       "    this.ws.onmessage = this._make_on_message_function(this);\n",
       "\n",
       "    this.ondownload = ondownload;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._init_header = function () {\n",
       "    var titlebar = document.createElement('div');\n",
       "    titlebar.classList =\n",
       "        'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\n",
       "    var titletext = document.createElement('div');\n",
       "    titletext.classList = 'ui-dialog-title';\n",
       "    titletext.setAttribute(\n",
       "        'style',\n",
       "        'width: 100%; text-align: center; padding: 3px;'\n",
       "    );\n",
       "    titlebar.appendChild(titletext);\n",
       "    this.root.appendChild(titlebar);\n",
       "    this.header = titletext;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\n",
       "\n",
       "mpl.figure.prototype._root_extra_style = function (_canvas_div) {};\n",
       "\n",
       "mpl.figure.prototype._init_canvas = function () {\n",
       "    var fig = this;\n",
       "\n",
       "    var canvas_div = (this.canvas_div = document.createElement('div'));\n",
       "    canvas_div.setAttribute(\n",
       "        'style',\n",
       "        'border: 1px solid #ddd;' +\n",
       "            'box-sizing: content-box;' +\n",
       "            'clear: both;' +\n",
       "            'min-height: 1px;' +\n",
       "            'min-width: 1px;' +\n",
       "            'outline: 0;' +\n",
       "            'overflow: hidden;' +\n",
       "            'position: relative;' +\n",
       "            'resize: both;'\n",
       "    );\n",
       "\n",
       "    function on_keyboard_event_closure(name) {\n",
       "        return function (event) {\n",
       "            return fig.key_event(event, name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    canvas_div.addEventListener(\n",
       "        'keydown',\n",
       "        on_keyboard_event_closure('key_press')\n",
       "    );\n",
       "    canvas_div.addEventListener(\n",
       "        'keyup',\n",
       "        on_keyboard_event_closure('key_release')\n",
       "    );\n",
       "\n",
       "    this._canvas_extra_style(canvas_div);\n",
       "    this.root.appendChild(canvas_div);\n",
       "\n",
       "    var canvas = (this.canvas = document.createElement('canvas'));\n",
       "    canvas.classList.add('mpl-canvas');\n",
       "    canvas.setAttribute('style', 'box-sizing: content-box;');\n",
       "\n",
       "    this.context = canvas.getContext('2d');\n",
       "\n",
       "    var backingStore =\n",
       "        this.context.backingStorePixelRatio ||\n",
       "        this.context.webkitBackingStorePixelRatio ||\n",
       "        this.context.mozBackingStorePixelRatio ||\n",
       "        this.context.msBackingStorePixelRatio ||\n",
       "        this.context.oBackingStorePixelRatio ||\n",
       "        this.context.backingStorePixelRatio ||\n",
       "        1;\n",
       "\n",
       "    this.ratio = (window.devicePixelRatio || 1) / backingStore;\n",
       "    if (this.ratio !== 1) {\n",
       "        fig.send_message('set_dpi_ratio', { dpi_ratio: this.ratio });\n",
       "    }\n",
       "\n",
       "    var rubberband_canvas = (this.rubberband_canvas = document.createElement(\n",
       "        'canvas'\n",
       "    ));\n",
       "    rubberband_canvas.setAttribute(\n",
       "        'style',\n",
       "        'box-sizing: content-box; position: absolute; left: 0; top: 0; z-index: 1;'\n",
       "    );\n",
       "\n",
       "    var resizeObserver = new ResizeObserver(function (entries) {\n",
       "        var nentries = entries.length;\n",
       "        for (var i = 0; i < nentries; i++) {\n",
       "            var entry = entries[i];\n",
       "            var width, height;\n",
       "            if (entry.contentBoxSize) {\n",
       "                if (entry.contentBoxSize instanceof Array) {\n",
       "                    // Chrome 84 implements new version of spec.\n",
       "                    width = entry.contentBoxSize[0].inlineSize;\n",
       "                    height = entry.contentBoxSize[0].blockSize;\n",
       "                } else {\n",
       "                    // Firefox implements old version of spec.\n",
       "                    width = entry.contentBoxSize.inlineSize;\n",
       "                    height = entry.contentBoxSize.blockSize;\n",
       "                }\n",
       "            } else {\n",
       "                // Chrome <84 implements even older version of spec.\n",
       "                width = entry.contentRect.width;\n",
       "                height = entry.contentRect.height;\n",
       "            }\n",
       "\n",
       "            // Keep the size of the canvas and rubber band canvas in sync with\n",
       "            // the canvas container.\n",
       "            if (entry.devicePixelContentBoxSize) {\n",
       "                // Chrome 84 implements new version of spec.\n",
       "                canvas.setAttribute(\n",
       "                    'width',\n",
       "                    entry.devicePixelContentBoxSize[0].inlineSize\n",
       "                );\n",
       "                canvas.setAttribute(\n",
       "                    'height',\n",
       "                    entry.devicePixelContentBoxSize[0].blockSize\n",
       "                );\n",
       "            } else {\n",
       "                canvas.setAttribute('width', width * fig.ratio);\n",
       "                canvas.setAttribute('height', height * fig.ratio);\n",
       "            }\n",
       "            canvas.setAttribute(\n",
       "                'style',\n",
       "                'width: ' + width + 'px; height: ' + height + 'px;'\n",
       "            );\n",
       "\n",
       "            rubberband_canvas.setAttribute('width', width);\n",
       "            rubberband_canvas.setAttribute('height', height);\n",
       "\n",
       "            // And update the size in Python. We ignore the initial 0/0 size\n",
       "            // that occurs as the element is placed into the DOM, which should\n",
       "            // otherwise not happen due to the minimum size styling.\n",
       "            if (width != 0 && height != 0) {\n",
       "                fig.request_resize(width, height);\n",
       "            }\n",
       "        }\n",
       "    });\n",
       "    resizeObserver.observe(canvas_div);\n",
       "\n",
       "    function on_mouse_event_closure(name) {\n",
       "        return function (event) {\n",
       "            return fig.mouse_event(event, name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mousedown',\n",
       "        on_mouse_event_closure('button_press')\n",
       "    );\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mouseup',\n",
       "        on_mouse_event_closure('button_release')\n",
       "    );\n",
       "    // Throttle sequential mouse events to 1 every 20ms.\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mousemove',\n",
       "        on_mouse_event_closure('motion_notify')\n",
       "    );\n",
       "\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mouseenter',\n",
       "        on_mouse_event_closure('figure_enter')\n",
       "    );\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mouseleave',\n",
       "        on_mouse_event_closure('figure_leave')\n",
       "    );\n",
       "\n",
       "    canvas_div.addEventListener('wheel', function (event) {\n",
       "        if (event.deltaY < 0) {\n",
       "            event.step = 1;\n",
       "        } else {\n",
       "            event.step = -1;\n",
       "        }\n",
       "        on_mouse_event_closure('scroll')(event);\n",
       "    });\n",
       "\n",
       "    canvas_div.appendChild(canvas);\n",
       "    canvas_div.appendChild(rubberband_canvas);\n",
       "\n",
       "    this.rubberband_context = rubberband_canvas.getContext('2d');\n",
       "    this.rubberband_context.strokeStyle = '#000000';\n",
       "\n",
       "    this._resize_canvas = function (width, height, forward) {\n",
       "        if (forward) {\n",
       "            canvas_div.style.width = width + 'px';\n",
       "            canvas_div.style.height = height + 'px';\n",
       "        }\n",
       "    };\n",
       "\n",
       "    // Disable right mouse context menu.\n",
       "    this.rubberband_canvas.addEventListener('contextmenu', function (_e) {\n",
       "        event.preventDefault();\n",
       "        return false;\n",
       "    });\n",
       "\n",
       "    function set_focus() {\n",
       "        canvas.focus();\n",
       "        canvas_div.focus();\n",
       "    }\n",
       "\n",
       "    window.setTimeout(set_focus, 100);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._init_toolbar = function () {\n",
       "    var fig = this;\n",
       "\n",
       "    var toolbar = document.createElement('div');\n",
       "    toolbar.classList = 'mpl-toolbar';\n",
       "    this.root.appendChild(toolbar);\n",
       "\n",
       "    function on_click_closure(name) {\n",
       "        return function (_event) {\n",
       "            return fig.toolbar_button_onclick(name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    function on_mouseover_closure(tooltip) {\n",
       "        return function (event) {\n",
       "            if (!event.currentTarget.disabled) {\n",
       "                return fig.toolbar_button_onmouseover(tooltip);\n",
       "            }\n",
       "        };\n",
       "    }\n",
       "\n",
       "    fig.buttons = {};\n",
       "    var buttonGroup = document.createElement('div');\n",
       "    buttonGroup.classList = 'mpl-button-group';\n",
       "    for (var toolbar_ind in mpl.toolbar_items) {\n",
       "        var name = mpl.toolbar_items[toolbar_ind][0];\n",
       "        var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
       "        var image = mpl.toolbar_items[toolbar_ind][2];\n",
       "        var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
       "\n",
       "        if (!name) {\n",
       "            /* Instead of a spacer, we start a new button group. */\n",
       "            if (buttonGroup.hasChildNodes()) {\n",
       "                toolbar.appendChild(buttonGroup);\n",
       "            }\n",
       "            buttonGroup = document.createElement('div');\n",
       "            buttonGroup.classList = 'mpl-button-group';\n",
       "            continue;\n",
       "        }\n",
       "\n",
       "        var button = (fig.buttons[name] = document.createElement('button'));\n",
       "        button.classList = 'mpl-widget';\n",
       "        button.setAttribute('role', 'button');\n",
       "        button.setAttribute('aria-disabled', 'false');\n",
       "        button.addEventListener('click', on_click_closure(method_name));\n",
       "        button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
       "\n",
       "        var icon_img = document.createElement('img');\n",
       "        icon_img.src = '_images/' + image + '.png';\n",
       "        icon_img.srcset = '_images/' + image + '_large.png 2x';\n",
       "        icon_img.alt = tooltip;\n",
       "        button.appendChild(icon_img);\n",
       "\n",
       "        buttonGroup.appendChild(button);\n",
       "    }\n",
       "\n",
       "    if (buttonGroup.hasChildNodes()) {\n",
       "        toolbar.appendChild(buttonGroup);\n",
       "    }\n",
       "\n",
       "    var fmt_picker = document.createElement('select');\n",
       "    fmt_picker.classList = 'mpl-widget';\n",
       "    toolbar.appendChild(fmt_picker);\n",
       "    this.format_dropdown = fmt_picker;\n",
       "\n",
       "    for (var ind in mpl.extensions) {\n",
       "        var fmt = mpl.extensions[ind];\n",
       "        var option = document.createElement('option');\n",
       "        option.selected = fmt === mpl.default_extension;\n",
       "        option.innerHTML = fmt;\n",
       "        fmt_picker.appendChild(option);\n",
       "    }\n",
       "\n",
       "    var status_bar = document.createElement('span');\n",
       "    status_bar.classList = 'mpl-message';\n",
       "    toolbar.appendChild(status_bar);\n",
       "    this.message = status_bar;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.request_resize = function (x_pixels, y_pixels) {\n",
       "    // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
       "    // which will in turn request a refresh of the image.\n",
       "    this.send_message('resize', { width: x_pixels, height: y_pixels });\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.send_message = function (type, properties) {\n",
       "    properties['type'] = type;\n",
       "    properties['figure_id'] = this.id;\n",
       "    this.ws.send(JSON.stringify(properties));\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.send_draw_message = function () {\n",
       "    if (!this.waiting) {\n",
       "        this.waiting = true;\n",
       "        this.ws.send(JSON.stringify({ type: 'draw', figure_id: this.id }));\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
       "    var format_dropdown = fig.format_dropdown;\n",
       "    var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
       "    fig.ondownload(fig, format);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_resize = function (fig, msg) {\n",
       "    var size = msg['size'];\n",
       "    if (size[0] !== fig.canvas.width || size[1] !== fig.canvas.height) {\n",
       "        fig._resize_canvas(size[0], size[1], msg['forward']);\n",
       "        fig.send_message('refresh', {});\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_rubberband = function (fig, msg) {\n",
       "    var x0 = msg['x0'] / fig.ratio;\n",
       "    var y0 = (fig.canvas.height - msg['y0']) / fig.ratio;\n",
       "    var x1 = msg['x1'] / fig.ratio;\n",
       "    var y1 = (fig.canvas.height - msg['y1']) / fig.ratio;\n",
       "    x0 = Math.floor(x0) + 0.5;\n",
       "    y0 = Math.floor(y0) + 0.5;\n",
       "    x1 = Math.floor(x1) + 0.5;\n",
       "    y1 = Math.floor(y1) + 0.5;\n",
       "    var min_x = Math.min(x0, x1);\n",
       "    var min_y = Math.min(y0, y1);\n",
       "    var width = Math.abs(x1 - x0);\n",
       "    var height = Math.abs(y1 - y0);\n",
       "\n",
       "    fig.rubberband_context.clearRect(\n",
       "        0,\n",
       "        0,\n",
       "        fig.canvas.width / fig.ratio,\n",
       "        fig.canvas.height / fig.ratio\n",
       "    );\n",
       "\n",
       "    fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_figure_label = function (fig, msg) {\n",
       "    // Updates the figure title.\n",
       "    fig.header.textContent = msg['label'];\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_cursor = function (fig, msg) {\n",
       "    var cursor = msg['cursor'];\n",
       "    switch (cursor) {\n",
       "        case 0:\n",
       "            cursor = 'pointer';\n",
       "            break;\n",
       "        case 1:\n",
       "            cursor = 'default';\n",
       "            break;\n",
       "        case 2:\n",
       "            cursor = 'crosshair';\n",
       "            break;\n",
       "        case 3:\n",
       "            cursor = 'move';\n",
       "            break;\n",
       "    }\n",
       "    fig.rubberband_canvas.style.cursor = cursor;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_message = function (fig, msg) {\n",
       "    fig.message.textContent = msg['message'];\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_draw = function (fig, _msg) {\n",
       "    // Request the server to send over a new figure.\n",
       "    fig.send_draw_message();\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_image_mode = function (fig, msg) {\n",
       "    fig.image_mode = msg['mode'];\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_history_buttons = function (fig, msg) {\n",
       "    for (var key in msg) {\n",
       "        if (!(key in fig.buttons)) {\n",
       "            continue;\n",
       "        }\n",
       "        fig.buttons[key].disabled = !msg[key];\n",
       "        fig.buttons[key].setAttribute('aria-disabled', !msg[key]);\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_navigate_mode = function (fig, msg) {\n",
       "    if (msg['mode'] === 'PAN') {\n",
       "        fig.buttons['Pan'].classList.add('active');\n",
       "        fig.buttons['Zoom'].classList.remove('active');\n",
       "    } else if (msg['mode'] === 'ZOOM') {\n",
       "        fig.buttons['Pan'].classList.remove('active');\n",
       "        fig.buttons['Zoom'].classList.add('active');\n",
       "    } else {\n",
       "        fig.buttons['Pan'].classList.remove('active');\n",
       "        fig.buttons['Zoom'].classList.remove('active');\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.updated_canvas_event = function () {\n",
       "    // Called whenever the canvas gets updated.\n",
       "    this.send_message('ack', {});\n",
       "};\n",
       "\n",
       "// A function to construct a web socket function for onmessage handling.\n",
       "// Called in the figure constructor.\n",
       "mpl.figure.prototype._make_on_message_function = function (fig) {\n",
       "    return function socket_on_message(evt) {\n",
       "        if (evt.data instanceof Blob) {\n",
       "            /* FIXME: We get \"Resource interpreted as Image but\n",
       "             * transferred with MIME type text/plain:\" errors on\n",
       "             * Chrome.  But how to set the MIME type?  It doesn't seem\n",
       "             * to be part of the websocket stream */\n",
       "            evt.data.type = 'image/png';\n",
       "\n",
       "            /* Free the memory for the previous frames */\n",
       "            if (fig.imageObj.src) {\n",
       "                (window.URL || window.webkitURL).revokeObjectURL(\n",
       "                    fig.imageObj.src\n",
       "                );\n",
       "            }\n",
       "\n",
       "            fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
       "                evt.data\n",
       "            );\n",
       "            fig.updated_canvas_event();\n",
       "            fig.waiting = false;\n",
       "            return;\n",
       "        } else if (\n",
       "            typeof evt.data === 'string' &&\n",
       "            evt.data.slice(0, 21) === 'data:image/png;base64'\n",
       "        ) {\n",
       "            fig.imageObj.src = evt.data;\n",
       "            fig.updated_canvas_event();\n",
       "            fig.waiting = false;\n",
       "            return;\n",
       "        }\n",
       "\n",
       "        var msg = JSON.parse(evt.data);\n",
       "        var msg_type = msg['type'];\n",
       "\n",
       "        // Call the  \"handle_{type}\" callback, which takes\n",
       "        // the figure and JSON message as its only arguments.\n",
       "        try {\n",
       "            var callback = fig['handle_' + msg_type];\n",
       "        } catch (e) {\n",
       "            console.log(\n",
       "                \"No handler for the '\" + msg_type + \"' message type: \",\n",
       "                msg\n",
       "            );\n",
       "            return;\n",
       "        }\n",
       "\n",
       "        if (callback) {\n",
       "            try {\n",
       "                // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
       "                callback(fig, msg);\n",
       "            } catch (e) {\n",
       "                console.log(\n",
       "                    \"Exception inside the 'handler_\" + msg_type + \"' callback:\",\n",
       "                    e,\n",
       "                    e.stack,\n",
       "                    msg\n",
       "                );\n",
       "            }\n",
       "        }\n",
       "    };\n",
       "};\n",
       "\n",
       "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n",
       "mpl.findpos = function (e) {\n",
       "    //this section is from http://www.quirksmode.org/js/events_properties.html\n",
       "    var targ;\n",
       "    if (!e) {\n",
       "        e = window.event;\n",
       "    }\n",
       "    if (e.target) {\n",
       "        targ = e.target;\n",
       "    } else if (e.srcElement) {\n",
       "        targ = e.srcElement;\n",
       "    }\n",
       "    if (targ.nodeType === 3) {\n",
       "        // defeat Safari bug\n",
       "        targ = targ.parentNode;\n",
       "    }\n",
       "\n",
       "    // pageX,Y are the mouse positions relative to the document\n",
       "    var boundingRect = targ.getBoundingClientRect();\n",
       "    var x = e.pageX - (boundingRect.left + document.body.scrollLeft);\n",
       "    var y = e.pageY - (boundingRect.top + document.body.scrollTop);\n",
       "\n",
       "    return { x: x, y: y };\n",
       "};\n",
       "\n",
       "/*\n",
       " * return a copy of an object with only non-object keys\n",
       " * we need this to avoid circular references\n",
       " * http://stackoverflow.com/a/24161582/3208463\n",
       " */\n",
       "function simpleKeys(original) {\n",
       "    return Object.keys(original).reduce(function (obj, key) {\n",
       "        if (typeof original[key] !== 'object') {\n",
       "            obj[key] = original[key];\n",
       "        }\n",
       "        return obj;\n",
       "    }, {});\n",
       "}\n",
       "\n",
       "mpl.figure.prototype.mouse_event = function (event, name) {\n",
       "    var canvas_pos = mpl.findpos(event);\n",
       "\n",
       "    if (name === 'button_press') {\n",
       "        this.canvas.focus();\n",
       "        this.canvas_div.focus();\n",
       "    }\n",
       "\n",
       "    var x = canvas_pos.x * this.ratio;\n",
       "    var y = canvas_pos.y * this.ratio;\n",
       "\n",
       "    this.send_message(name, {\n",
       "        x: x,\n",
       "        y: y,\n",
       "        button: event.button,\n",
       "        step: event.step,\n",
       "        guiEvent: simpleKeys(event),\n",
       "    });\n",
       "\n",
       "    /* This prevents the web browser from automatically changing to\n",
       "     * the text insertion cursor when the button is pressed.  We want\n",
       "     * to control all of the cursor setting manually through the\n",
       "     * 'cursor' event from matplotlib */\n",
       "    event.preventDefault();\n",
       "    return false;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._key_event_extra = function (_event, _name) {\n",
       "    // Handle any extra behaviour associated with a key event\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.key_event = function (event, name) {\n",
       "    // Prevent repeat events\n",
       "    if (name === 'key_press') {\n",
       "        if (event.which === this._key) {\n",
       "            return;\n",
       "        } else {\n",
       "            this._key = event.which;\n",
       "        }\n",
       "    }\n",
       "    if (name === 'key_release') {\n",
       "        this._key = null;\n",
       "    }\n",
       "\n",
       "    var value = '';\n",
       "    if (event.ctrlKey && event.which !== 17) {\n",
       "        value += 'ctrl+';\n",
       "    }\n",
       "    if (event.altKey && event.which !== 18) {\n",
       "        value += 'alt+';\n",
       "    }\n",
       "    if (event.shiftKey && event.which !== 16) {\n",
       "        value += 'shift+';\n",
       "    }\n",
       "\n",
       "    value += 'k';\n",
       "    value += event.which.toString();\n",
       "\n",
       "    this._key_event_extra(event, name);\n",
       "\n",
       "    this.send_message(name, { key: value, guiEvent: simpleKeys(event) });\n",
       "    return false;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.toolbar_button_onclick = function (name) {\n",
       "    if (name === 'download') {\n",
       "        this.handle_save(this, null);\n",
       "    } else {\n",
       "        this.send_message('toolbar_button', { name: name });\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.toolbar_button_onmouseover = function (tooltip) {\n",
       "    this.message.textContent = tooltip;\n",
       "};\n",
       "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Left button pans, Right button zooms\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
       "\n",
       "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n",
       "\n",
       "mpl.default_extension = \"png\";/* global mpl */\n",
       "\n",
       "var comm_websocket_adapter = function (comm) {\n",
       "    // Create a \"websocket\"-like object which calls the given IPython comm\n",
       "    // object with the appropriate methods. Currently this is a non binary\n",
       "    // socket, so there is still some room for performance tuning.\n",
       "    var ws = {};\n",
       "\n",
       "    ws.close = function () {\n",
       "        comm.close();\n",
       "    };\n",
       "    ws.send = function (m) {\n",
       "        //console.log('sending', m);\n",
       "        comm.send(m);\n",
       "    };\n",
       "    // Register the callback with on_msg.\n",
       "    comm.on_msg(function (msg) {\n",
       "        //console.log('receiving', msg['content']['data'], msg);\n",
       "        // Pass the mpl event to the overridden (by mpl) onmessage function.\n",
       "        ws.onmessage(msg['content']['data']);\n",
       "    });\n",
       "    return ws;\n",
       "};\n",
       "\n",
       "mpl.mpl_figure_comm = function (comm, msg) {\n",
       "    // This is the function which gets called when the mpl process\n",
       "    // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
       "\n",
       "    var id = msg.content.data.id;\n",
       "    // Get hold of the div created by the display call when the Comm\n",
       "    // socket was opened in Python.\n",
       "    var element = document.getElementById(id);\n",
       "    var ws_proxy = comm_websocket_adapter(comm);\n",
       "\n",
       "    function ondownload(figure, _format) {\n",
       "        window.open(figure.canvas.toDataURL());\n",
       "    }\n",
       "\n",
       "    var fig = new mpl.figure(id, ws_proxy, ondownload, element);\n",
       "\n",
       "    // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
       "    // web socket which is closed, not our websocket->open comm proxy.\n",
       "    ws_proxy.onopen();\n",
       "\n",
       "    fig.parent_element = element;\n",
       "    fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n",
       "    if (!fig.cell_info) {\n",
       "        console.error('Failed to find cell for figure', id, fig);\n",
       "        return;\n",
       "    }\n",
       "    fig.cell_info[0].output_area.element.one(\n",
       "        'cleared',\n",
       "        { fig: fig },\n",
       "        fig._remove_fig_handler\n",
       "    );\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_close = function (fig, msg) {\n",
       "    var width = fig.canvas.width / fig.ratio;\n",
       "    fig.cell_info[0].output_area.element.off(\n",
       "        'cleared',\n",
       "        fig._remove_fig_handler\n",
       "    );\n",
       "\n",
       "    // Update the output cell to use the data from the current canvas.\n",
       "    fig.push_to_output();\n",
       "    var dataURL = fig.canvas.toDataURL();\n",
       "    // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
       "    // the notebook keyboard shortcuts fail.\n",
       "    IPython.keyboard_manager.enable();\n",
       "    fig.parent_element.innerHTML =\n",
       "        '<img src=\"' + dataURL + '\" width=\"' + width + '\">';\n",
       "    fig.close_ws(fig, msg);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.close_ws = function (fig, msg) {\n",
       "    fig.send_message('closing', msg);\n",
       "    // fig.ws.close()\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.push_to_output = function (_remove_interactive) {\n",
       "    // Turn the data on the canvas into data in the output cell.\n",
       "    var width = this.canvas.width / this.ratio;\n",
       "    var dataURL = this.canvas.toDataURL();\n",
       "    this.cell_info[1]['text/html'] =\n",
       "        '<img src=\"' + dataURL + '\" width=\"' + width + '\">';\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.updated_canvas_event = function () {\n",
       "    // Tell IPython that the notebook contents must change.\n",
       "    IPython.notebook.set_dirty(true);\n",
       "    this.send_message('ack', {});\n",
       "    var fig = this;\n",
       "    // Wait a second, then push the new image to the DOM so\n",
       "    // that it is saved nicely (might be nice to debounce this).\n",
       "    setTimeout(function () {\n",
       "        fig.push_to_output();\n",
       "    }, 1000);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._init_toolbar = function () {\n",
       "    var fig = this;\n",
       "\n",
       "    var toolbar = document.createElement('div');\n",
       "    toolbar.classList = 'btn-toolbar';\n",
       "    this.root.appendChild(toolbar);\n",
       "\n",
       "    function on_click_closure(name) {\n",
       "        return function (_event) {\n",
       "            return fig.toolbar_button_onclick(name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    function on_mouseover_closure(tooltip) {\n",
       "        return function (event) {\n",
       "            if (!event.currentTarget.disabled) {\n",
       "                return fig.toolbar_button_onmouseover(tooltip);\n",
       "            }\n",
       "        };\n",
       "    }\n",
       "\n",
       "    fig.buttons = {};\n",
       "    var buttonGroup = document.createElement('div');\n",
       "    buttonGroup.classList = 'btn-group';\n",
       "    var button;\n",
       "    for (var toolbar_ind in mpl.toolbar_items) {\n",
       "        var name = mpl.toolbar_items[toolbar_ind][0];\n",
       "        var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
       "        var image = mpl.toolbar_items[toolbar_ind][2];\n",
       "        var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
       "\n",
       "        if (!name) {\n",
       "            /* Instead of a spacer, we start a new button group. */\n",
       "            if (buttonGroup.hasChildNodes()) {\n",
       "                toolbar.appendChild(buttonGroup);\n",
       "            }\n",
       "            buttonGroup = document.createElement('div');\n",
       "            buttonGroup.classList = 'btn-group';\n",
       "            continue;\n",
       "        }\n",
       "\n",
       "        button = fig.buttons[name] = document.createElement('button');\n",
       "        button.classList = 'btn btn-default';\n",
       "        button.href = '#';\n",
       "        button.title = name;\n",
       "        button.innerHTML = '<i class=\"fa ' + image + ' fa-lg\"></i>';\n",
       "        button.addEventListener('click', on_click_closure(method_name));\n",
       "        button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
       "        buttonGroup.appendChild(button);\n",
       "    }\n",
       "\n",
       "    if (buttonGroup.hasChildNodes()) {\n",
       "        toolbar.appendChild(buttonGroup);\n",
       "    }\n",
       "\n",
       "    // Add the status bar.\n",
       "    var status_bar = document.createElement('span');\n",
       "    status_bar.classList = 'mpl-message pull-right';\n",
       "    toolbar.appendChild(status_bar);\n",
       "    this.message = status_bar;\n",
       "\n",
       "    // Add the close button to the window.\n",
       "    var buttongrp = document.createElement('div');\n",
       "    buttongrp.classList = 'btn-group inline pull-right';\n",
       "    button = document.createElement('button');\n",
       "    button.classList = 'btn btn-mini btn-primary';\n",
       "    button.href = '#';\n",
       "    button.title = 'Stop Interaction';\n",
       "    button.innerHTML = '<i class=\"fa fa-power-off icon-remove icon-large\"></i>';\n",
       "    button.addEventListener('click', function (_evt) {\n",
       "        fig.handle_close(fig, {});\n",
       "    });\n",
       "    button.addEventListener(\n",
       "        'mouseover',\n",
       "        on_mouseover_closure('Stop Interaction')\n",
       "    );\n",
       "    buttongrp.appendChild(button);\n",
       "    var titlebar = this.root.querySelector('.ui-dialog-titlebar');\n",
       "    titlebar.insertBefore(buttongrp, titlebar.firstChild);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._remove_fig_handler = function (event) {\n",
       "    var fig = event.data.fig;\n",
       "    fig.close_ws(fig, {});\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._root_extra_style = function (el) {\n",
       "    el.style.boxSizing = 'content-box'; // override notebook setting of border-box.\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._canvas_extra_style = function (el) {\n",
       "    // this is important to make the div 'focusable\n",
       "    el.setAttribute('tabindex', 0);\n",
       "    // reach out to IPython and tell the keyboard manager to turn it's self\n",
       "    // off when our div gets focus\n",
       "\n",
       "    // location in version 3\n",
       "    if (IPython.notebook.keyboard_manager) {\n",
       "        IPython.notebook.keyboard_manager.register_events(el);\n",
       "    } else {\n",
       "        // location in version 2\n",
       "        IPython.keyboard_manager.register_events(el);\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._key_event_extra = function (event, _name) {\n",
       "    var manager = IPython.notebook.keyboard_manager;\n",
       "    if (!manager) {\n",
       "        manager = IPython.keyboard_manager;\n",
       "    }\n",
       "\n",
       "    // Check for shift+enter\n",
       "    if (event.shiftKey && event.which === 13) {\n",
       "        this.canvas_div.blur();\n",
       "        // select the cell after this one\n",
       "        var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n",
       "        IPython.notebook.select(index + 1);\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
       "    fig.ondownload(fig, null);\n",
       "};\n",
       "\n",
       "mpl.find_output_cell = function (html_output) {\n",
       "    // Return the cell and output element which can be found *uniquely* in the notebook.\n",
       "    // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
       "    // IPython event is triggered only after the cells have been serialised, which for\n",
       "    // our purposes (turning an active figure into a static one), is too late.\n",
       "    var cells = IPython.notebook.get_cells();\n",
       "    var ncells = cells.length;\n",
       "    for (var i = 0; i < ncells; i++) {\n",
       "        var cell = cells[i];\n",
       "        if (cell.cell_type === 'code') {\n",
       "            for (var j = 0; j < cell.output_area.outputs.length; j++) {\n",
       "                var data = cell.output_area.outputs[j];\n",
       "                if (data.data) {\n",
       "                    // IPython >= 3 moved mimebundle to data attribute of output\n",
       "                    data = data.data;\n",
       "                }\n",
       "                if (data['text/html'] === html_output) {\n",
       "                    return [cell, data, j];\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "};\n",
       "\n",
       "// Register the function which deals with the matplotlib target/channel.\n",
       "// The kernel may be null if the page has been refreshed.\n",
       "if (IPython.notebook.kernel !== null) {\n",
       "    IPython.notebook.kernel.comm_manager.register_target(\n",
       "        'matplotlib',\n",
       "        mpl.mpl_figure_comm\n",
       "    );\n",
       "}\n"
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<img src=\"data:image/png;base64,[encoded data, 25416 characters]\" width=\"640\">"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "Temps d'execution de fibor avec n=39 : 25.778192887666663\n"
     ]
    }
   ],
   "source": [
    "def fibor(n: int) -> int:\n",
    "    \"\"\" Calcule les termes de la suite de Fibonacci récursivement (n>=0) \"\"\"\n",
    "    assert isinstance(n, int) and n >= 0, \"n must be integer and positive\"\n",
    "    if n <= 0: return 0\n",
    "    elif n <= 1: return 1\n",
    "    else: return fibor(n-1) + fibor(n-2)\n",
    "\n",
    "# Mesure du temps et tracés\n",
    "import time\n",
    "%matplotlib notebook\n",
    "import matplotlib.pyplot as plt\n",
    "n = [i for i in range(5, 40, 2)]\n",
    "liste_temps = []\n",
    "\n",
    "for i in n:\n",
    "    print(f\"Test avec n={i}\", end = \" - \")\n",
    "    temps = 0.0\n",
    "    nb_loops = 3\n",
    "    for test in range(nb_loops):\n",
    "        start = time.process_time()\n",
    "        fibor(i)\n",
    "        temps += time.process_time() - start\n",
    "    temps /= nb_loops\n",
    "    liste_temps.append(temps)\n",
    "\n",
    "plt.plot(n, liste_temps, label=\"fibor\")\n",
    "plt.xlabel(\"n\")\n",
    "plt.grid(True)\n",
    "print(f\"\\n\\nTemps d'execution de fibor avec n={n[-1]} : {liste_temps[-1]}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Comme prévu, le temps d'exécution est bien **exponentiel** en fonction du nombre n. Cet algorithme **récursif** est très **esthétique** dans son écriture mais c'est une **catastrophe en terme de performance** : 25 sec pour n = 39 seulement !\n",
    "\n",
    "- **Copier-coller** la définition de votre fonction `fibordyn` au début de la cellule suivante et exécutez la cellule pour analyser les performances."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Test avec n=10 - Test avec n=35 - Test avec n=60 - Test avec n=85 - Test avec n=110 - Test avec n=135 - Test avec n=160 - Test avec n=185 - Test avec n=210 - Test avec n=235 - Test avec n=260 - Test avec n=285 - Test avec n=310 - Test avec n=335 - Test avec n=360 - Test avec n=385 - Test avec n=410 - Test avec n=435 - Test avec n=460 - Test avec n=485 - Test avec n=510 - Test avec n=535 - Test avec n=560 - Test avec n=585 - Test avec n=610 - Test avec n=635 - Test avec n=660 - Test avec n=685 - Test avec n=710 - Test avec n=735 - Test avec n=760 - Test avec n=785 - Test avec n=810 - Test avec n=835 - Test avec n=860 - Test avec n=885 - Test avec n=910 - Test avec n=935 - Test avec n=960 - Test avec n=985 - Test avec n=1010 - Test avec n=1035 - Test avec n=1060 - Test avec n=1085 - Test avec n=1110 - Test avec n=1135 - Test avec n=1160 - Test avec n=1185 - Test avec n=1210 - Test avec n=1235 - Test avec n=1260 - Test avec n=1285 - Test avec n=1310 - Test avec n=1335 - Test avec n=1360 - Test avec n=1385 - Test avec n=1410 - Test avec n=1435 - Test avec n=1460 - Test avec n=1485 - Test avec n=1510 - Test avec n=1535 - Test avec n=1560 - Test avec n=1585 - Test avec n=1610 - Test avec n=1635 - Test avec n=1660 - Test avec n=1685 - Test avec n=1710 - Test avec n=1735 - Test avec n=1760 - Test avec n=1785 - Test avec n=1810 - Test avec n=1835 - Test avec n=1860 - Test avec n=1885 - Test avec n=1910 - Test avec n=1935 - Test avec n=1960 - Test avec n=1985 - Test avec n=2010 - Test avec n=2035 - Test avec n=2060 - Test avec n=2085 - Test avec n=2110 - Test avec n=2135 - Test avec n=2160 - Test avec n=2185 - Test avec n=2210 - Test avec n=2235 - Test avec n=2260 - Test avec n=2285 - Test avec n=2310 - Test avec n=2335 - Test avec n=2360 - Test avec n=2385 - Test avec n=2410 - Test avec n=2435 - Test avec n=2460 - Test avec n=2485 - Test avec n=2510 - Test avec n=2535 - Test avec n=2560 - Test avec n=2585 - Test avec n=2610 - Test avec n=2635 - Test avec n=2660 - Test avec n=2685 - Test avec n=2710 - Test avec n=2735 - Test avec n=2760 - Test avec n=2785 - Test avec n=2810 - Test avec n=2835 - Test avec n=2860 - Test avec n=2885 - Test avec n=2910 - Test avec n=2935 - Test avec n=2960 - "
     ]
    },
    {
     "data": {
      "application/javascript": [
       "/* Put everything inside the global mpl namespace */\n",
       "/* global mpl */\n",
       "window.mpl = {};\n",
       "\n",
       "mpl.get_websocket_type = function () {\n",
       "    if (typeof WebSocket !== 'undefined') {\n",
       "        return WebSocket;\n",
       "    } else if (typeof MozWebSocket !== 'undefined') {\n",
       "        return MozWebSocket;\n",
       "    } else {\n",
       "        alert(\n",
       "            'Your browser does not have WebSocket support. ' +\n",
       "                'Please try Chrome, Safari or Firefox ≥ 6. ' +\n",
       "                'Firefox 4 and 5 are also supported but you ' +\n",
       "                'have to enable WebSockets in about:config.'\n",
       "        );\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure = function (figure_id, websocket, ondownload, parent_element) {\n",
       "    this.id = figure_id;\n",
       "\n",
       "    this.ws = websocket;\n",
       "\n",
       "    this.supports_binary = this.ws.binaryType !== undefined;\n",
       "\n",
       "    if (!this.supports_binary) {\n",
       "        var warnings = document.getElementById('mpl-warnings');\n",
       "        if (warnings) {\n",
       "            warnings.style.display = 'block';\n",
       "            warnings.textContent =\n",
       "                'This browser does not support binary websocket messages. ' +\n",
       "                'Performance may be slow.';\n",
       "        }\n",
       "    }\n",
       "\n",
       "    this.imageObj = new Image();\n",
       "\n",
       "    this.context = undefined;\n",
       "    this.message = undefined;\n",
       "    this.canvas = undefined;\n",
       "    this.rubberband_canvas = undefined;\n",
       "    this.rubberband_context = undefined;\n",
       "    this.format_dropdown = undefined;\n",
       "\n",
       "    this.image_mode = 'full';\n",
       "\n",
       "    this.root = document.createElement('div');\n",
       "    this.root.setAttribute('style', 'display: inline-block');\n",
       "    this._root_extra_style(this.root);\n",
       "\n",
       "    parent_element.appendChild(this.root);\n",
       "\n",
       "    this._init_header(this);\n",
       "    this._init_canvas(this);\n",
       "    this._init_toolbar(this);\n",
       "\n",
       "    var fig = this;\n",
       "\n",
       "    this.waiting = false;\n",
       "\n",
       "    this.ws.onopen = function () {\n",
       "        fig.send_message('supports_binary', { value: fig.supports_binary });\n",
       "        fig.send_message('send_image_mode', {});\n",
       "        if (fig.ratio !== 1) {\n",
       "            fig.send_message('set_dpi_ratio', { dpi_ratio: fig.ratio });\n",
       "        }\n",
       "        fig.send_message('refresh', {});\n",
       "    };\n",
       "\n",
       "    this.imageObj.onload = function () {\n",
       "        if (fig.image_mode === 'full') {\n",
       "            // Full images could contain transparency (where diff images\n",
       "            // almost always do), so we need to clear the canvas so that\n",
       "            // there is no ghosting.\n",
       "            fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n",
       "        }\n",
       "        fig.context.drawImage(fig.imageObj, 0, 0);\n",
       "    };\n",
       "\n",
       "    this.imageObj.onunload = function () {\n",
       "        fig.ws.close();\n",
       "    };\n",
       "\n",
       "    this.ws.onmessage = this._make_on_message_function(this);\n",
       "\n",
       "    this.ondownload = ondownload;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._init_header = function () {\n",
       "    var titlebar = document.createElement('div');\n",
       "    titlebar.classList =\n",
       "        'ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix';\n",
       "    var titletext = document.createElement('div');\n",
       "    titletext.classList = 'ui-dialog-title';\n",
       "    titletext.setAttribute(\n",
       "        'style',\n",
       "        'width: 100%; text-align: center; padding: 3px;'\n",
       "    );\n",
       "    titlebar.appendChild(titletext);\n",
       "    this.root.appendChild(titlebar);\n",
       "    this.header = titletext;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._canvas_extra_style = function (_canvas_div) {};\n",
       "\n",
       "mpl.figure.prototype._root_extra_style = function (_canvas_div) {};\n",
       "\n",
       "mpl.figure.prototype._init_canvas = function () {\n",
       "    var fig = this;\n",
       "\n",
       "    var canvas_div = (this.canvas_div = document.createElement('div'));\n",
       "    canvas_div.setAttribute(\n",
       "        'style',\n",
       "        'border: 1px solid #ddd;' +\n",
       "            'box-sizing: content-box;' +\n",
       "            'clear: both;' +\n",
       "            'min-height: 1px;' +\n",
       "            'min-width: 1px;' +\n",
       "            'outline: 0;' +\n",
       "            'overflow: hidden;' +\n",
       "            'position: relative;' +\n",
       "            'resize: both;'\n",
       "    );\n",
       "\n",
       "    function on_keyboard_event_closure(name) {\n",
       "        return function (event) {\n",
       "            return fig.key_event(event, name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    canvas_div.addEventListener(\n",
       "        'keydown',\n",
       "        on_keyboard_event_closure('key_press')\n",
       "    );\n",
       "    canvas_div.addEventListener(\n",
       "        'keyup',\n",
       "        on_keyboard_event_closure('key_release')\n",
       "    );\n",
       "\n",
       "    this._canvas_extra_style(canvas_div);\n",
       "    this.root.appendChild(canvas_div);\n",
       "\n",
       "    var canvas = (this.canvas = document.createElement('canvas'));\n",
       "    canvas.classList.add('mpl-canvas');\n",
       "    canvas.setAttribute('style', 'box-sizing: content-box;');\n",
       "\n",
       "    this.context = canvas.getContext('2d');\n",
       "\n",
       "    var backingStore =\n",
       "        this.context.backingStorePixelRatio ||\n",
       "        this.context.webkitBackingStorePixelRatio ||\n",
       "        this.context.mozBackingStorePixelRatio ||\n",
       "        this.context.msBackingStorePixelRatio ||\n",
       "        this.context.oBackingStorePixelRatio ||\n",
       "        this.context.backingStorePixelRatio ||\n",
       "        1;\n",
       "\n",
       "    this.ratio = (window.devicePixelRatio || 1) / backingStore;\n",
       "    if (this.ratio !== 1) {\n",
       "        fig.send_message('set_dpi_ratio', { dpi_ratio: this.ratio });\n",
       "    }\n",
       "\n",
       "    var rubberband_canvas = (this.rubberband_canvas = document.createElement(\n",
       "        'canvas'\n",
       "    ));\n",
       "    rubberband_canvas.setAttribute(\n",
       "        'style',\n",
       "        'box-sizing: content-box; position: absolute; left: 0; top: 0; z-index: 1;'\n",
       "    );\n",
       "\n",
       "    var resizeObserver = new ResizeObserver(function (entries) {\n",
       "        var nentries = entries.length;\n",
       "        for (var i = 0; i < nentries; i++) {\n",
       "            var entry = entries[i];\n",
       "            var width, height;\n",
       "            if (entry.contentBoxSize) {\n",
       "                if (entry.contentBoxSize instanceof Array) {\n",
       "                    // Chrome 84 implements new version of spec.\n",
       "                    width = entry.contentBoxSize[0].inlineSize;\n",
       "                    height = entry.contentBoxSize[0].blockSize;\n",
       "                } else {\n",
       "                    // Firefox implements old version of spec.\n",
       "                    width = entry.contentBoxSize.inlineSize;\n",
       "                    height = entry.contentBoxSize.blockSize;\n",
       "                }\n",
       "            } else {\n",
       "                // Chrome <84 implements even older version of spec.\n",
       "                width = entry.contentRect.width;\n",
       "                height = entry.contentRect.height;\n",
       "            }\n",
       "\n",
       "            // Keep the size of the canvas and rubber band canvas in sync with\n",
       "            // the canvas container.\n",
       "            if (entry.devicePixelContentBoxSize) {\n",
       "                // Chrome 84 implements new version of spec.\n",
       "                canvas.setAttribute(\n",
       "                    'width',\n",
       "                    entry.devicePixelContentBoxSize[0].inlineSize\n",
       "                );\n",
       "                canvas.setAttribute(\n",
       "                    'height',\n",
       "                    entry.devicePixelContentBoxSize[0].blockSize\n",
       "                );\n",
       "            } else {\n",
       "                canvas.setAttribute('width', width * fig.ratio);\n",
       "                canvas.setAttribute('height', height * fig.ratio);\n",
       "            }\n",
       "            canvas.setAttribute(\n",
       "                'style',\n",
       "                'width: ' + width + 'px; height: ' + height + 'px;'\n",
       "            );\n",
       "\n",
       "            rubberband_canvas.setAttribute('width', width);\n",
       "            rubberband_canvas.setAttribute('height', height);\n",
       "\n",
       "            // And update the size in Python. We ignore the initial 0/0 size\n",
       "            // that occurs as the element is placed into the DOM, which should\n",
       "            // otherwise not happen due to the minimum size styling.\n",
       "            if (width != 0 && height != 0) {\n",
       "                fig.request_resize(width, height);\n",
       "            }\n",
       "        }\n",
       "    });\n",
       "    resizeObserver.observe(canvas_div);\n",
       "\n",
       "    function on_mouse_event_closure(name) {\n",
       "        return function (event) {\n",
       "            return fig.mouse_event(event, name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mousedown',\n",
       "        on_mouse_event_closure('button_press')\n",
       "    );\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mouseup',\n",
       "        on_mouse_event_closure('button_release')\n",
       "    );\n",
       "    // Throttle sequential mouse events to 1 every 20ms.\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mousemove',\n",
       "        on_mouse_event_closure('motion_notify')\n",
       "    );\n",
       "\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mouseenter',\n",
       "        on_mouse_event_closure('figure_enter')\n",
       "    );\n",
       "    rubberband_canvas.addEventListener(\n",
       "        'mouseleave',\n",
       "        on_mouse_event_closure('figure_leave')\n",
       "    );\n",
       "\n",
       "    canvas_div.addEventListener('wheel', function (event) {\n",
       "        if (event.deltaY < 0) {\n",
       "            event.step = 1;\n",
       "        } else {\n",
       "            event.step = -1;\n",
       "        }\n",
       "        on_mouse_event_closure('scroll')(event);\n",
       "    });\n",
       "\n",
       "    canvas_div.appendChild(canvas);\n",
       "    canvas_div.appendChild(rubberband_canvas);\n",
       "\n",
       "    this.rubberband_context = rubberband_canvas.getContext('2d');\n",
       "    this.rubberband_context.strokeStyle = '#000000';\n",
       "\n",
       "    this._resize_canvas = function (width, height, forward) {\n",
       "        if (forward) {\n",
       "            canvas_div.style.width = width + 'px';\n",
       "            canvas_div.style.height = height + 'px';\n",
       "        }\n",
       "    };\n",
       "\n",
       "    // Disable right mouse context menu.\n",
       "    this.rubberband_canvas.addEventListener('contextmenu', function (_e) {\n",
       "        event.preventDefault();\n",
       "        return false;\n",
       "    });\n",
       "\n",
       "    function set_focus() {\n",
       "        canvas.focus();\n",
       "        canvas_div.focus();\n",
       "    }\n",
       "\n",
       "    window.setTimeout(set_focus, 100);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._init_toolbar = function () {\n",
       "    var fig = this;\n",
       "\n",
       "    var toolbar = document.createElement('div');\n",
       "    toolbar.classList = 'mpl-toolbar';\n",
       "    this.root.appendChild(toolbar);\n",
       "\n",
       "    function on_click_closure(name) {\n",
       "        return function (_event) {\n",
       "            return fig.toolbar_button_onclick(name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    function on_mouseover_closure(tooltip) {\n",
       "        return function (event) {\n",
       "            if (!event.currentTarget.disabled) {\n",
       "                return fig.toolbar_button_onmouseover(tooltip);\n",
       "            }\n",
       "        };\n",
       "    }\n",
       "\n",
       "    fig.buttons = {};\n",
       "    var buttonGroup = document.createElement('div');\n",
       "    buttonGroup.classList = 'mpl-button-group';\n",
       "    for (var toolbar_ind in mpl.toolbar_items) {\n",
       "        var name = mpl.toolbar_items[toolbar_ind][0];\n",
       "        var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
       "        var image = mpl.toolbar_items[toolbar_ind][2];\n",
       "        var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
       "\n",
       "        if (!name) {\n",
       "            /* Instead of a spacer, we start a new button group. */\n",
       "            if (buttonGroup.hasChildNodes()) {\n",
       "                toolbar.appendChild(buttonGroup);\n",
       "            }\n",
       "            buttonGroup = document.createElement('div');\n",
       "            buttonGroup.classList = 'mpl-button-group';\n",
       "            continue;\n",
       "        }\n",
       "\n",
       "        var button = (fig.buttons[name] = document.createElement('button'));\n",
       "        button.classList = 'mpl-widget';\n",
       "        button.setAttribute('role', 'button');\n",
       "        button.setAttribute('aria-disabled', 'false');\n",
       "        button.addEventListener('click', on_click_closure(method_name));\n",
       "        button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
       "\n",
       "        var icon_img = document.createElement('img');\n",
       "        icon_img.src = '_images/' + image + '.png';\n",
       "        icon_img.srcset = '_images/' + image + '_large.png 2x';\n",
       "        icon_img.alt = tooltip;\n",
       "        button.appendChild(icon_img);\n",
       "\n",
       "        buttonGroup.appendChild(button);\n",
       "    }\n",
       "\n",
       "    if (buttonGroup.hasChildNodes()) {\n",
       "        toolbar.appendChild(buttonGroup);\n",
       "    }\n",
       "\n",
       "    var fmt_picker = document.createElement('select');\n",
       "    fmt_picker.classList = 'mpl-widget';\n",
       "    toolbar.appendChild(fmt_picker);\n",
       "    this.format_dropdown = fmt_picker;\n",
       "\n",
       "    for (var ind in mpl.extensions) {\n",
       "        var fmt = mpl.extensions[ind];\n",
       "        var option = document.createElement('option');\n",
       "        option.selected = fmt === mpl.default_extension;\n",
       "        option.innerHTML = fmt;\n",
       "        fmt_picker.appendChild(option);\n",
       "    }\n",
       "\n",
       "    var status_bar = document.createElement('span');\n",
       "    status_bar.classList = 'mpl-message';\n",
       "    toolbar.appendChild(status_bar);\n",
       "    this.message = status_bar;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.request_resize = function (x_pixels, y_pixels) {\n",
       "    // Request matplotlib to resize the figure. Matplotlib will then trigger a resize in the client,\n",
       "    // which will in turn request a refresh of the image.\n",
       "    this.send_message('resize', { width: x_pixels, height: y_pixels });\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.send_message = function (type, properties) {\n",
       "    properties['type'] = type;\n",
       "    properties['figure_id'] = this.id;\n",
       "    this.ws.send(JSON.stringify(properties));\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.send_draw_message = function () {\n",
       "    if (!this.waiting) {\n",
       "        this.waiting = true;\n",
       "        this.ws.send(JSON.stringify({ type: 'draw', figure_id: this.id }));\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
       "    var format_dropdown = fig.format_dropdown;\n",
       "    var format = format_dropdown.options[format_dropdown.selectedIndex].value;\n",
       "    fig.ondownload(fig, format);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_resize = function (fig, msg) {\n",
       "    var size = msg['size'];\n",
       "    if (size[0] !== fig.canvas.width || size[1] !== fig.canvas.height) {\n",
       "        fig._resize_canvas(size[0], size[1], msg['forward']);\n",
       "        fig.send_message('refresh', {});\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_rubberband = function (fig, msg) {\n",
       "    var x0 = msg['x0'] / fig.ratio;\n",
       "    var y0 = (fig.canvas.height - msg['y0']) / fig.ratio;\n",
       "    var x1 = msg['x1'] / fig.ratio;\n",
       "    var y1 = (fig.canvas.height - msg['y1']) / fig.ratio;\n",
       "    x0 = Math.floor(x0) + 0.5;\n",
       "    y0 = Math.floor(y0) + 0.5;\n",
       "    x1 = Math.floor(x1) + 0.5;\n",
       "    y1 = Math.floor(y1) + 0.5;\n",
       "    var min_x = Math.min(x0, x1);\n",
       "    var min_y = Math.min(y0, y1);\n",
       "    var width = Math.abs(x1 - x0);\n",
       "    var height = Math.abs(y1 - y0);\n",
       "\n",
       "    fig.rubberband_context.clearRect(\n",
       "        0,\n",
       "        0,\n",
       "        fig.canvas.width / fig.ratio,\n",
       "        fig.canvas.height / fig.ratio\n",
       "    );\n",
       "\n",
       "    fig.rubberband_context.strokeRect(min_x, min_y, width, height);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_figure_label = function (fig, msg) {\n",
       "    // Updates the figure title.\n",
       "    fig.header.textContent = msg['label'];\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_cursor = function (fig, msg) {\n",
       "    var cursor = msg['cursor'];\n",
       "    switch (cursor) {\n",
       "        case 0:\n",
       "            cursor = 'pointer';\n",
       "            break;\n",
       "        case 1:\n",
       "            cursor = 'default';\n",
       "            break;\n",
       "        case 2:\n",
       "            cursor = 'crosshair';\n",
       "            break;\n",
       "        case 3:\n",
       "            cursor = 'move';\n",
       "            break;\n",
       "    }\n",
       "    fig.rubberband_canvas.style.cursor = cursor;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_message = function (fig, msg) {\n",
       "    fig.message.textContent = msg['message'];\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_draw = function (fig, _msg) {\n",
       "    // Request the server to send over a new figure.\n",
       "    fig.send_draw_message();\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_image_mode = function (fig, msg) {\n",
       "    fig.image_mode = msg['mode'];\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_history_buttons = function (fig, msg) {\n",
       "    for (var key in msg) {\n",
       "        if (!(key in fig.buttons)) {\n",
       "            continue;\n",
       "        }\n",
       "        fig.buttons[key].disabled = !msg[key];\n",
       "        fig.buttons[key].setAttribute('aria-disabled', !msg[key]);\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_navigate_mode = function (fig, msg) {\n",
       "    if (msg['mode'] === 'PAN') {\n",
       "        fig.buttons['Pan'].classList.add('active');\n",
       "        fig.buttons['Zoom'].classList.remove('active');\n",
       "    } else if (msg['mode'] === 'ZOOM') {\n",
       "        fig.buttons['Pan'].classList.remove('active');\n",
       "        fig.buttons['Zoom'].classList.add('active');\n",
       "    } else {\n",
       "        fig.buttons['Pan'].classList.remove('active');\n",
       "        fig.buttons['Zoom'].classList.remove('active');\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.updated_canvas_event = function () {\n",
       "    // Called whenever the canvas gets updated.\n",
       "    this.send_message('ack', {});\n",
       "};\n",
       "\n",
       "// A function to construct a web socket function for onmessage handling.\n",
       "// Called in the figure constructor.\n",
       "mpl.figure.prototype._make_on_message_function = function (fig) {\n",
       "    return function socket_on_message(evt) {\n",
       "        if (evt.data instanceof Blob) {\n",
       "            /* FIXME: We get \"Resource interpreted as Image but\n",
       "             * transferred with MIME type text/plain:\" errors on\n",
       "             * Chrome.  But how to set the MIME type?  It doesn't seem\n",
       "             * to be part of the websocket stream */\n",
       "            evt.data.type = 'image/png';\n",
       "\n",
       "            /* Free the memory for the previous frames */\n",
       "            if (fig.imageObj.src) {\n",
       "                (window.URL || window.webkitURL).revokeObjectURL(\n",
       "                    fig.imageObj.src\n",
       "                );\n",
       "            }\n",
       "\n",
       "            fig.imageObj.src = (window.URL || window.webkitURL).createObjectURL(\n",
       "                evt.data\n",
       "            );\n",
       "            fig.updated_canvas_event();\n",
       "            fig.waiting = false;\n",
       "            return;\n",
       "        } else if (\n",
       "            typeof evt.data === 'string' &&\n",
       "            evt.data.slice(0, 21) === 'data:image/png;base64'\n",
       "        ) {\n",
       "            fig.imageObj.src = evt.data;\n",
       "            fig.updated_canvas_event();\n",
       "            fig.waiting = false;\n",
       "            return;\n",
       "        }\n",
       "\n",
       "        var msg = JSON.parse(evt.data);\n",
       "        var msg_type = msg['type'];\n",
       "\n",
       "        // Call the  \"handle_{type}\" callback, which takes\n",
       "        // the figure and JSON message as its only arguments.\n",
       "        try {\n",
       "            var callback = fig['handle_' + msg_type];\n",
       "        } catch (e) {\n",
       "            console.log(\n",
       "                \"No handler for the '\" + msg_type + \"' message type: \",\n",
       "                msg\n",
       "            );\n",
       "            return;\n",
       "        }\n",
       "\n",
       "        if (callback) {\n",
       "            try {\n",
       "                // console.log(\"Handling '\" + msg_type + \"' message: \", msg);\n",
       "                callback(fig, msg);\n",
       "            } catch (e) {\n",
       "                console.log(\n",
       "                    \"Exception inside the 'handler_\" + msg_type + \"' callback:\",\n",
       "                    e,\n",
       "                    e.stack,\n",
       "                    msg\n",
       "                );\n",
       "            }\n",
       "        }\n",
       "    };\n",
       "};\n",
       "\n",
       "// from http://stackoverflow.com/questions/1114465/getting-mouse-location-in-canvas\n",
       "mpl.findpos = function (e) {\n",
       "    //this section is from http://www.quirksmode.org/js/events_properties.html\n",
       "    var targ;\n",
       "    if (!e) {\n",
       "        e = window.event;\n",
       "    }\n",
       "    if (e.target) {\n",
       "        targ = e.target;\n",
       "    } else if (e.srcElement) {\n",
       "        targ = e.srcElement;\n",
       "    }\n",
       "    if (targ.nodeType === 3) {\n",
       "        // defeat Safari bug\n",
       "        targ = targ.parentNode;\n",
       "    }\n",
       "\n",
       "    // pageX,Y are the mouse positions relative to the document\n",
       "    var boundingRect = targ.getBoundingClientRect();\n",
       "    var x = e.pageX - (boundingRect.left + document.body.scrollLeft);\n",
       "    var y = e.pageY - (boundingRect.top + document.body.scrollTop);\n",
       "\n",
       "    return { x: x, y: y };\n",
       "};\n",
       "\n",
       "/*\n",
       " * return a copy of an object with only non-object keys\n",
       " * we need this to avoid circular references\n",
       " * http://stackoverflow.com/a/24161582/3208463\n",
       " */\n",
       "function simpleKeys(original) {\n",
       "    return Object.keys(original).reduce(function (obj, key) {\n",
       "        if (typeof original[key] !== 'object') {\n",
       "            obj[key] = original[key];\n",
       "        }\n",
       "        return obj;\n",
       "    }, {});\n",
       "}\n",
       "\n",
       "mpl.figure.prototype.mouse_event = function (event, name) {\n",
       "    var canvas_pos = mpl.findpos(event);\n",
       "\n",
       "    if (name === 'button_press') {\n",
       "        this.canvas.focus();\n",
       "        this.canvas_div.focus();\n",
       "    }\n",
       "\n",
       "    var x = canvas_pos.x * this.ratio;\n",
       "    var y = canvas_pos.y * this.ratio;\n",
       "\n",
       "    this.send_message(name, {\n",
       "        x: x,\n",
       "        y: y,\n",
       "        button: event.button,\n",
       "        step: event.step,\n",
       "        guiEvent: simpleKeys(event),\n",
       "    });\n",
       "\n",
       "    /* This prevents the web browser from automatically changing to\n",
       "     * the text insertion cursor when the button is pressed.  We want\n",
       "     * to control all of the cursor setting manually through the\n",
       "     * 'cursor' event from matplotlib */\n",
       "    event.preventDefault();\n",
       "    return false;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._key_event_extra = function (_event, _name) {\n",
       "    // Handle any extra behaviour associated with a key event\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.key_event = function (event, name) {\n",
       "    // Prevent repeat events\n",
       "    if (name === 'key_press') {\n",
       "        if (event.which === this._key) {\n",
       "            return;\n",
       "        } else {\n",
       "            this._key = event.which;\n",
       "        }\n",
       "    }\n",
       "    if (name === 'key_release') {\n",
       "        this._key = null;\n",
       "    }\n",
       "\n",
       "    var value = '';\n",
       "    if (event.ctrlKey && event.which !== 17) {\n",
       "        value += 'ctrl+';\n",
       "    }\n",
       "    if (event.altKey && event.which !== 18) {\n",
       "        value += 'alt+';\n",
       "    }\n",
       "    if (event.shiftKey && event.which !== 16) {\n",
       "        value += 'shift+';\n",
       "    }\n",
       "\n",
       "    value += 'k';\n",
       "    value += event.which.toString();\n",
       "\n",
       "    this._key_event_extra(event, name);\n",
       "\n",
       "    this.send_message(name, { key: value, guiEvent: simpleKeys(event) });\n",
       "    return false;\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.toolbar_button_onclick = function (name) {\n",
       "    if (name === 'download') {\n",
       "        this.handle_save(this, null);\n",
       "    } else {\n",
       "        this.send_message('toolbar_button', { name: name });\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.toolbar_button_onmouseover = function (tooltip) {\n",
       "    this.message.textContent = tooltip;\n",
       "};\n",
       "mpl.toolbar_items = [[\"Home\", \"Reset original view\", \"fa fa-home icon-home\", \"home\"], [\"Back\", \"Back to previous view\", \"fa fa-arrow-left icon-arrow-left\", \"back\"], [\"Forward\", \"Forward to next view\", \"fa fa-arrow-right icon-arrow-right\", \"forward\"], [\"\", \"\", \"\", \"\"], [\"Pan\", \"Left button pans, Right button zooms\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-arrows icon-move\", \"pan\"], [\"Zoom\", \"Zoom to rectangle\\nx/y fixes axis, CTRL fixes aspect\", \"fa fa-square-o icon-check-empty\", \"zoom\"], [\"\", \"\", \"\", \"\"], [\"Download\", \"Download plot\", \"fa fa-floppy-o icon-save\", \"download\"]];\n",
       "\n",
       "mpl.extensions = [\"eps\", \"jpeg\", \"pdf\", \"png\", \"ps\", \"raw\", \"svg\", \"tif\"];\n",
       "\n",
       "mpl.default_extension = \"png\";/* global mpl */\n",
       "\n",
       "var comm_websocket_adapter = function (comm) {\n",
       "    // Create a \"websocket\"-like object which calls the given IPython comm\n",
       "    // object with the appropriate methods. Currently this is a non binary\n",
       "    // socket, so there is still some room for performance tuning.\n",
       "    var ws = {};\n",
       "\n",
       "    ws.close = function () {\n",
       "        comm.close();\n",
       "    };\n",
       "    ws.send = function (m) {\n",
       "        //console.log('sending', m);\n",
       "        comm.send(m);\n",
       "    };\n",
       "    // Register the callback with on_msg.\n",
       "    comm.on_msg(function (msg) {\n",
       "        //console.log('receiving', msg['content']['data'], msg);\n",
       "        // Pass the mpl event to the overridden (by mpl) onmessage function.\n",
       "        ws.onmessage(msg['content']['data']);\n",
       "    });\n",
       "    return ws;\n",
       "};\n",
       "\n",
       "mpl.mpl_figure_comm = function (comm, msg) {\n",
       "    // This is the function which gets called when the mpl process\n",
       "    // starts-up an IPython Comm through the \"matplotlib\" channel.\n",
       "\n",
       "    var id = msg.content.data.id;\n",
       "    // Get hold of the div created by the display call when the Comm\n",
       "    // socket was opened in Python.\n",
       "    var element = document.getElementById(id);\n",
       "    var ws_proxy = comm_websocket_adapter(comm);\n",
       "\n",
       "    function ondownload(figure, _format) {\n",
       "        window.open(figure.canvas.toDataURL());\n",
       "    }\n",
       "\n",
       "    var fig = new mpl.figure(id, ws_proxy, ondownload, element);\n",
       "\n",
       "    // Call onopen now - mpl needs it, as it is assuming we've passed it a real\n",
       "    // web socket which is closed, not our websocket->open comm proxy.\n",
       "    ws_proxy.onopen();\n",
       "\n",
       "    fig.parent_element = element;\n",
       "    fig.cell_info = mpl.find_output_cell(\"<div id='\" + id + \"'></div>\");\n",
       "    if (!fig.cell_info) {\n",
       "        console.error('Failed to find cell for figure', id, fig);\n",
       "        return;\n",
       "    }\n",
       "    fig.cell_info[0].output_area.element.one(\n",
       "        'cleared',\n",
       "        { fig: fig },\n",
       "        fig._remove_fig_handler\n",
       "    );\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_close = function (fig, msg) {\n",
       "    var width = fig.canvas.width / fig.ratio;\n",
       "    fig.cell_info[0].output_area.element.off(\n",
       "        'cleared',\n",
       "        fig._remove_fig_handler\n",
       "    );\n",
       "\n",
       "    // Update the output cell to use the data from the current canvas.\n",
       "    fig.push_to_output();\n",
       "    var dataURL = fig.canvas.toDataURL();\n",
       "    // Re-enable the keyboard manager in IPython - without this line, in FF,\n",
       "    // the notebook keyboard shortcuts fail.\n",
       "    IPython.keyboard_manager.enable();\n",
       "    fig.parent_element.innerHTML =\n",
       "        '<img src=\"' + dataURL + '\" width=\"' + width + '\">';\n",
       "    fig.close_ws(fig, msg);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.close_ws = function (fig, msg) {\n",
       "    fig.send_message('closing', msg);\n",
       "    // fig.ws.close()\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.push_to_output = function (_remove_interactive) {\n",
       "    // Turn the data on the canvas into data in the output cell.\n",
       "    var width = this.canvas.width / this.ratio;\n",
       "    var dataURL = this.canvas.toDataURL();\n",
       "    this.cell_info[1]['text/html'] =\n",
       "        '<img src=\"' + dataURL + '\" width=\"' + width + '\">';\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.updated_canvas_event = function () {\n",
       "    // Tell IPython that the notebook contents must change.\n",
       "    IPython.notebook.set_dirty(true);\n",
       "    this.send_message('ack', {});\n",
       "    var fig = this;\n",
       "    // Wait a second, then push the new image to the DOM so\n",
       "    // that it is saved nicely (might be nice to debounce this).\n",
       "    setTimeout(function () {\n",
       "        fig.push_to_output();\n",
       "    }, 1000);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._init_toolbar = function () {\n",
       "    var fig = this;\n",
       "\n",
       "    var toolbar = document.createElement('div');\n",
       "    toolbar.classList = 'btn-toolbar';\n",
       "    this.root.appendChild(toolbar);\n",
       "\n",
       "    function on_click_closure(name) {\n",
       "        return function (_event) {\n",
       "            return fig.toolbar_button_onclick(name);\n",
       "        };\n",
       "    }\n",
       "\n",
       "    function on_mouseover_closure(tooltip) {\n",
       "        return function (event) {\n",
       "            if (!event.currentTarget.disabled) {\n",
       "                return fig.toolbar_button_onmouseover(tooltip);\n",
       "            }\n",
       "        };\n",
       "    }\n",
       "\n",
       "    fig.buttons = {};\n",
       "    var buttonGroup = document.createElement('div');\n",
       "    buttonGroup.classList = 'btn-group';\n",
       "    var button;\n",
       "    for (var toolbar_ind in mpl.toolbar_items) {\n",
       "        var name = mpl.toolbar_items[toolbar_ind][0];\n",
       "        var tooltip = mpl.toolbar_items[toolbar_ind][1];\n",
       "        var image = mpl.toolbar_items[toolbar_ind][2];\n",
       "        var method_name = mpl.toolbar_items[toolbar_ind][3];\n",
       "\n",
       "        if (!name) {\n",
       "            /* Instead of a spacer, we start a new button group. */\n",
       "            if (buttonGroup.hasChildNodes()) {\n",
       "                toolbar.appendChild(buttonGroup);\n",
       "            }\n",
       "            buttonGroup = document.createElement('div');\n",
       "            buttonGroup.classList = 'btn-group';\n",
       "            continue;\n",
       "        }\n",
       "\n",
       "        button = fig.buttons[name] = document.createElement('button');\n",
       "        button.classList = 'btn btn-default';\n",
       "        button.href = '#';\n",
       "        button.title = name;\n",
       "        button.innerHTML = '<i class=\"fa ' + image + ' fa-lg\"></i>';\n",
       "        button.addEventListener('click', on_click_closure(method_name));\n",
       "        button.addEventListener('mouseover', on_mouseover_closure(tooltip));\n",
       "        buttonGroup.appendChild(button);\n",
       "    }\n",
       "\n",
       "    if (buttonGroup.hasChildNodes()) {\n",
       "        toolbar.appendChild(buttonGroup);\n",
       "    }\n",
       "\n",
       "    // Add the status bar.\n",
       "    var status_bar = document.createElement('span');\n",
       "    status_bar.classList = 'mpl-message pull-right';\n",
       "    toolbar.appendChild(status_bar);\n",
       "    this.message = status_bar;\n",
       "\n",
       "    // Add the close button to the window.\n",
       "    var buttongrp = document.createElement('div');\n",
       "    buttongrp.classList = 'btn-group inline pull-right';\n",
       "    button = document.createElement('button');\n",
       "    button.classList = 'btn btn-mini btn-primary';\n",
       "    button.href = '#';\n",
       "    button.title = 'Stop Interaction';\n",
       "    button.innerHTML = '<i class=\"fa fa-power-off icon-remove icon-large\"></i>';\n",
       "    button.addEventListener('click', function (_evt) {\n",
       "        fig.handle_close(fig, {});\n",
       "    });\n",
       "    button.addEventListener(\n",
       "        'mouseover',\n",
       "        on_mouseover_closure('Stop Interaction')\n",
       "    );\n",
       "    buttongrp.appendChild(button);\n",
       "    var titlebar = this.root.querySelector('.ui-dialog-titlebar');\n",
       "    titlebar.insertBefore(buttongrp, titlebar.firstChild);\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._remove_fig_handler = function (event) {\n",
       "    var fig = event.data.fig;\n",
       "    fig.close_ws(fig, {});\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._root_extra_style = function (el) {\n",
       "    el.style.boxSizing = 'content-box'; // override notebook setting of border-box.\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._canvas_extra_style = function (el) {\n",
       "    // this is important to make the div 'focusable\n",
       "    el.setAttribute('tabindex', 0);\n",
       "    // reach out to IPython and tell the keyboard manager to turn it's self\n",
       "    // off when our div gets focus\n",
       "\n",
       "    // location in version 3\n",
       "    if (IPython.notebook.keyboard_manager) {\n",
       "        IPython.notebook.keyboard_manager.register_events(el);\n",
       "    } else {\n",
       "        // location in version 2\n",
       "        IPython.keyboard_manager.register_events(el);\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype._key_event_extra = function (event, _name) {\n",
       "    var manager = IPython.notebook.keyboard_manager;\n",
       "    if (!manager) {\n",
       "        manager = IPython.keyboard_manager;\n",
       "    }\n",
       "\n",
       "    // Check for shift+enter\n",
       "    if (event.shiftKey && event.which === 13) {\n",
       "        this.canvas_div.blur();\n",
       "        // select the cell after this one\n",
       "        var index = IPython.notebook.find_cell_index(this.cell_info[0]);\n",
       "        IPython.notebook.select(index + 1);\n",
       "    }\n",
       "};\n",
       "\n",
       "mpl.figure.prototype.handle_save = function (fig, _msg) {\n",
       "    fig.ondownload(fig, null);\n",
       "};\n",
       "\n",
       "mpl.find_output_cell = function (html_output) {\n",
       "    // Return the cell and output element which can be found *uniquely* in the notebook.\n",
       "    // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n",
       "    // IPython event is triggered only after the cells have been serialised, which for\n",
       "    // our purposes (turning an active figure into a static one), is too late.\n",
       "    var cells = IPython.notebook.get_cells();\n",
       "    var ncells = cells.length;\n",
       "    for (var i = 0; i < ncells; i++) {\n",
       "        var cell = cells[i];\n",
       "        if (cell.cell_type === 'code') {\n",
       "            for (var j = 0; j < cell.output_area.outputs.length; j++) {\n",
       "                var data = cell.output_area.outputs[j];\n",
       "                if (data.data) {\n",
       "                    // IPython >= 3 moved mimebundle to data attribute of output\n",
       "                    data = data.data;\n",
       "                }\n",
       "                if (data['text/html'] === html_output) {\n",
       "                    return [cell, data, j];\n",
       "                }\n",
       "            }\n",
       "        }\n",
       "    }\n",
       "};\n",
       "\n",
       "// Register the function which deals with the matplotlib target/channel.\n",
       "// The kernel may be null if the page has been refreshed.\n",
       "if (IPython.notebook.kernel !== null) {\n",
       "    IPython.notebook.kernel.comm_manager.register_target(\n",
       "        'matplotlib',\n",
       "        mpl.mpl_figure_comm\n",
       "    );\n",
       "}\n"
      ],
      "text/plain": [
       "<IPython.core.display.Javascript object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "<img src=\"data:image/png;base64,[encoded data, 36600 characters]\" width=\"640\">"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "Temps d'execution de fibor avec n=2960 : 0.001542809620000014\n"
     ]
    }
   ],
   "source": [
    "def fibordyn(n: int) -> int:\n",
    "    \"\"\" Lanceur de la fonction fibor (n>=0) : initialisation du tableau de résultats \"\"\"\n",
    "    assert isinstance(n, int) and n >= 0, \"n must be integer and positive\"\n",
    "    resultats = [None for i in range(n+2)]\n",
    "    resultats[0] = 0\n",
    "    resultats[1] = 1\n",
    "    \n",
    "    # === Nested function ===\n",
    "    def fibor(n: int) -> int:\n",
    "        \"\"\" Calcule les termes de la suite de Fibonacci récursivement avec programmation dynamique (n>=0) \"\"\"\n",
    "        assert isinstance(n, int) and n >= 0, \"n must be integer and positive\"\n",
    "\n",
    "        if resultats[n] != None: return resultats[n]\n",
    "        if resultats[n-1] == None: resultats[n-1] = fibor(n-1)\n",
    "        if resultats[n-2] == None: resultats[n-2] = fibor(n-2)\n",
    "        return resultats[n-1] + resultats[n-2]\n",
    "    # === End of nested function ===\n",
    "    \n",
    "    return fibor(n)\n",
    "\n",
    "# Mesure du temps et tracés\n",
    "import time\n",
    "%matplotlib notebook\n",
    "import matplotlib.pyplot as plt\n",
    "n = [i for i in range(10, 2985, 25)]\n",
    "liste_temps = []\n",
    "\n",
    "for i in n:\n",
    "    print(f\"Test avec n={i}\", end = \" - \")\n",
    "    temps = 0.0\n",
    "    nb_loops = 100\n",
    "    for test in range(nb_loops):\n",
    "        start = time.process_time()\n",
    "        fibordyn(i)\n",
    "        temps += time.process_time() - start\n",
    "    temps /= nb_loops\n",
    "    liste_temps.append(temps)\n",
    "\n",
    "plt.plot(n, liste_temps, label=\"fibor\")\n",
    "plt.xlabel(\"n\")\n",
    "plt.grid(True)\n",
    "print(f\"\\n\\nTemps d'execution de fibor avec n={n[-1]} : {liste_temps[-1]}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Ici le temps d'exécution est bien **linéaire** en fonction de n.\n",
    "\n",
    "⚠️ Mais il y a **trop d'appels de fonctions** imbriqués et Python ne peut pas calculer au delà de n=2900.\n",
    "\n",
    "Malgré tout, les performances sont bien en dessous de nos premiers algorithmes car ici il faut environ 1 ms pour calculer le terme avec n=2960 alors qu'il en fallait à peine 0.25 ms avec les premiers.\n",
    "\n",
    "# Conclusion\n",
    "\n",
    "⚠️ La **récursivité** permet de résoudre **facilement** des **problèmes complexes** mais elle s'accompagne souvent de **problèmes de performances**.\n",
    "\n",
    "⚠️ La **programmation dynamique** permet de gagner du temps dans les algorithmes car elle consiste à **enregistrer les résultats intermédiaires calculés** afin de les **ré-utiliser plus tard** dans l'algorithme.\n",
    "\n",
    "Cette technique est souvent utilisée dans les problèmes **d'optimisation** car dans ce domaine, les calculs utilisent souvent **plusieurs fois les mêmes valeurs**."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.7"
  },
  "widgets": {
   "application/vnd.jupyter.widget-state+json": {
    "state": {},
    "version_major": 2,
    "version_minor": 0
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
