# :notebook: Notebooks pour l'agrégation :fr:

Ce dossier contient des [notebooks Jupyter](http://jupyter.org/), écrits en [Python (version 3)](https://docs.python.org/3/), pour [l'option informatique (D)](http://www.dit.ens-rennes.fr/agregation-option-d/programme-de-l-option-informatique-de-l-agregation-de-mathematiques-48358.kjsp) de l'[agrégation de mathématiques](http://agreg.org/) (en France).

Ces documents sont les seules corrections de texte de modélisation d'option info pour l'agrég de maths que vous pourrez trouver en ligne ([j'ai cherché](https://www.google.fr/search?q=correction+texte+modélisation+agrégation+informatique+ocaml) [partout](https://duckduckgo.com/?q=correction+texte+mod%C3%A9lisation+agr%C3%A9gation+informatique+ocaml&t=canonical&ia=web)).
Profitez en bien !

[Liste des notebooks sur nbviewer.jupyter.org](https://nbviewer.jupyter.org/github/Naereen/notebooks/tree/master/agreg/)

----

> :warning: Si vous êtes en train de préparer l'agrégation, lire des corrections sans avoir travailler (très sérieusement) le texte ou le développement avant, **ça ne sert à rien** !!
> Si vous êtes parmi mes élèves, **n'utilisez pas ces ressources pour tricher pendant les oraux blancs** : ça ne sert à rien, je le verrai, et vous n'aurez rien appris (spoiler alert : le jour des oraux, on ne peut pas tricher...).


> Cela étant dit, si vous avez travaillé un texte, n'hésitez pas à jeter un oeil à la correction et à la travailler aussi.
> Vous faites les choses différemment, et souvent plus vite et mieux, donc si vous avez envie, [contactez moi](http://perso.crans.org/besson/contact/) pour me signaler n'importe quoi (un bug, une meilleure façon de faire, une question ou autre).

## :pencil: Implémentation pour des leçons ou des développements
- [Algorithme de Cocke-Kasami-Younger](https://fr.wikipedia.org/wiki/Algorithme_de_Cocke-Younger-Kasami), pour résoudre le problème du mot pour une grammaire sous forme normale de Chomsky (et la mise en forme normale de Chomsky depuis la forme normale, en bonus) : [Algorithme de Cocke-Kasami-Younger (python3).ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Algorithme%20de%20Cocke-Kasami-Younger%20%28python3%29.ipynb) ([sur GitHub](Algorithme%20de%20Cocke-Kasami-Younger%20%28python3%29.ipynb)) -- Leçons 906, 907, 910, 923.
- [Calcul du plus long sous mot commun](https://fr.wikipedia.org/wiki/Plus_longue_sous-séquence_commune) : [Plus long sous mot commun (python3).ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Plus%20long%20sous%20mot%20commun%20%28python3%29.ipynb) ([sur GitHub](Plus%20long%20sous%20mot%20commun%20%28python3%29.ipynb)) -- Leçons 906, 907.
- [Tris à bulles et cocktail](https://fr.wikipedia.org/wiki/Tri_cocktail) : [Tri_a_bulle_et_tri_cocktail.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Tri_a_bulle_et_tri_cocktail.ipynb) ([sur GitHub](Tri_a_bulle_et_tri_cocktail.ipynb)) -- 903, 926, 927.
- [Lambda-Calcul embarqué en OCaml](https://fr.wikipedia.org/wiki/Lambda-calcul) : [Lambda_Calcul_en_OCaml.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Lambda_Calcul_en_OCaml.ipynb) ([sur GitHub](Lambda_Calcul_en_OCaml.ipynb)) -- 929.
- [Mémoïsation générique, en Python et en OCaml](https://fr.wikipedia.org/wiki/M%C3%A9mo%C3%AFsation) : [Mémoisation_en_Python_et_OCaml.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Mémoisation_en_Python_et_OCaml.ipynb) ([sur GitHub](Mémoisation_en_Python_et_OCaml.ipynb)) -- Leçons 906, 907.
- [Bitsets en OCaml et comparaison avec un `bool array` et un `Set.Make(Int)`](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Bitsets_en_OCaml.ipynb) ([sur GitHub](Bitsets_en_OCaml.ipynb)) -- Leçon ?

----

## :pencil: Textes de modélisation
### Premier exemple
- Pour le texte [public2012-D3](http://agreg.org/Textes/public2012-D3.pdf) : [public2012_D3.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/public2012_D3.ipynb) ([sur GitHub](public2012_D3.ipynb)) en Python 3, [public2012_D3.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/public2012_D3%20%28OCaml%29.ipynb) ([sur GitHub](public2012_D3%20%28OCaml%29.ipynb)) en OCaml.

### Textes les plus récents (2018)
- Pour le texte [public2018-D1](http://agreg.org/Textes/public2018-D1.pdf) : [public2018_D1.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/public2018_D1.ipynb) ([sur GitHub](public2018_D1.ipynb)) en OCaml.
- Pour le texte [public2018-D2](http://agreg.org/Textes/public2018-D2.pdf) : [public2018_D2.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/public2018_D2.ipynb) ([sur GitHub](public2018_D2.ipynb)) en OCaml.

> Note: ces textes ont enfin été mis en ligne récemment (décembre 2017), et je les ai corrigé le plus rapidement possible.

### Oraux blancs (1/2)
Pour quatre textes donnés pour les oraux blancs début avril 2017 :

- lundi 3 avril :
    + [Crime parfait](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Crime_parfait.ipynb),
    + et [Sudoku](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Sudoku.ipynb),

- vendredi 7 avril :
    + [Contraintes temporelles](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Contraintes_temporelles.ipynb),
    + et [Chapeaux](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Chapeaux.ipynb)

(tous en OCaml, pour des textes non officiels).

### Entraînements en mars
- Pour le texte [public2012-D6](http://agreg.org/Textes/public2012-D6.pdf) : [Mots_bien_formes.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Mots_bien_formes.ipynb) en OCaml.
- Pour le texte [pub2008-D1](http://agreg.org/Textes/pub2008-D1.pdf) : [Robots.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Robots.ipynb) en OCaml.

### Oraux blancs (2/2)
Pour quatre textes donnés pour les oraux blancs fin mai 2017 :

- lundi 22 mai :
    + [Tissu cellulaire](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Tissu_cellulaire.ipynb) ([public2010-D2.pdf](http://agreg.org/Textes/public2010-D2.pdf)),
    + et [Eclairage graphe](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Eclairage_graphe.ipynb) ([public2012-D1.pdf](http://agreg.org/Textes/public2012-D1.pdf)),

- lundi 29 mai :
    + [Taquin](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Taquin.ipynb) ([pub2008-D2.pdf](http://agreg.org/Textes/pub2008-D2.pdf)),
    + et [Circuits](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Circuits.ipynb) ([public2010-D1.pdf](http://agreg.org/Textes/public2010-D1.pdf))

(tous en OCaml).

----

### :information_desk_person: Plus d'informations ?
> - Plus d'informations sur ce dépôt se trouvent [ici](..).
> - Plus d'informations sur [les notebooks (documentation de IPython)](https://nbviewer.jupyter.org/github/ipython/ipython/blob/3.x/examples/Notebook/Index.ipynb) ou [FAQ sur le site de Jupyter](https://nbviewer.jupyter.org/faq).

### [Utiliser OCaml avec Jupyter](https://github.com/akabe/ocaml-jupyter)
Les solutions présentes ici sont rédigés comme des [notebooks](https://jupyter.org/documentation.html) [Jupyter](https://jupyter.org/).
J'utilise un *kernel* spécifique pour coder en OCaml via Jupyter.

Il ne devrait pas être trop compliqué à installer, avec [opam](https://opam.ocaml.org/) :
```bash
opam install jupyter
```

Cela demande d'avoir [déjà installé Jupyter](https://jupyter.org/install.html).

Note :  [ce petit article en français](http://pascal.ortiz.free.fr/contents/autres/jupyter_ocaml/jupyter_ocaml.html) présente comment (essayer d') installer OCaml et Jupyter et `ocaml-jupyter` sur un système Windows (version 10 ou plus récente).

### :scroll: Licence
Tout ces documents sont distribues publiquement sous les conditions de la [licence MIT](http://lbesson.mit-license.org/) (fichier [LICENSE.txt](LICENSE.txt), en anglais).
© [Lilian Besson](https://github.com/Naereen), 2016-17.

[![made-with-jupyter](https://img.shields.io/badge/Made%20with-Jupyter-1f425f.svg)](http://jupyter.org/)
[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)
[![made-with-ocaml](https://img.shields.io/badge/Made%20with-OCaml-1f425f.svg)](https://ocaml.org/)

[![Demandez moi n'importe quoi !](https://img.shields.io/badge/Demandez%20moi-n'%20importe%20quoi-1abc9c.svg)](https://GitHub.com/Naereen/ama.fr)
[![Analytics](https://ga-beacon.appspot.com/UA-38514290-17/github.com/Naereen/notebooks/agreg/README.md?pixel)](https://github.com/Naereen/notebooks/)
[ICO]NameLast modifiedSizeDescription
[PARENTDIR]Parent Directory  -  
[DIR]TP_Programmation_2017-18/2022-03-13 20:39 -  
[DIR]TP_SQL/2020-09-14 15:40 -  
[DIR]images/2020-04-27 12:14 -  
[   ]Algorithme de Cocke-Kasami-Younger (python3).ipynb2021-01-26 20:40 115K 
[   ]Algorithme de Cocke-Kasami-Younger (python3).pdf2019-05-21 10:43 12K 
[TXT]Algorithme de Cocke-Kasami-Younger (python3).py2021-01-26 20:40 34K 
[   ]Algorithme_de_Cocke-Kasami-Younger__python3_.pdf2019-05-21 10:43 12K 
[   ]Algorithme_genetique_pour_generer_des_eclairages_modelisation_agreg.ipynb2019-03-12 19:05 39K 
[   ]Algorithme_genetique_pour_generer_des_eclairages_modelisation_agreg.pdf2019-05-21 10:43 116K 
[TXT]Algorithme_genetique_pour_generer_des_eclairages_modelisation_agreg.py2019-03-12 19:06 17K 
[   ]Arithmetique_sur_les_posits.ipynb2018-06-25 13:24 72K 
[TXT]Arithmetique_sur_les_posits.ml2018-06-25 10:34 39K 
[   ]Arithmetique_sur_les_posits.pdf2019-05-21 10:43 659K 
[   ]Bitsets_en_OCaml.ipynb2018-02-21 15:55 47K 
[TXT]Bitsets_en_OCaml.ml2018-02-21 15:55 14K 
[   ]Bitsets_en_OCaml.pdf2019-05-21 10:43 54K 
[   ]Chapeaux.ipynb2017-09-13 19:46 46K 
[TXT]Chapeaux.ml2017-10-06 15:42 20K 
[   ]Chapeaux.pdf2017-09-13 20:50 80K 
[   ]Circuits.ipynb2017-09-13 19:48 18K 
[TXT]Circuits.ml2017-10-06 15:42 7.0K 
[   ]Circuits.pdf2017-09-13 20:50 51K 
[   ]Contraintes_temporelles.ipynb2019-05-18 17:45 228K 
[TXT]Contraintes_temporelles.ml2019-05-19 09:57 28K 
[   ]Contraintes_temporelles.pdf2019-05-21 10:44 251K 
[   ]Crime_parfait.ipynb2017-09-13 19:51 54K 
[TXT]Crime_parfait.ml2017-10-06 15:42 30K 
[   ]Crime_parfait.pdf2017-09-13 20:50 342K 
[   ]Droite Discrète - public 2012 D5.ipynb2021-01-26 20:40 446K 
[TXT]Droite Discrète - public 2012 D5.py2021-01-26 20:40 37K 
[   ]Eclairage_graphe.ipynb2019-03-12 19:06 65K 
[TXT]Eclairage_graphe.ml2019-03-07 19:53 27K 
[   ]Eclairage_graphe.pdf2019-05-21 10:43 138K 
[   ]Jonglage.ipynb2019-05-21 10:39 49K 
[TXT]Jonglage.ml2019-05-21 10:40 20K 
[   ]Jonglage.pdf2019-05-21 10:44 96K 
[   ]Lambda_Calcul_en_OCaml.ipynb2019-04-02 12:26 55K 
[TXT]Lambda_Calcul_en_OCaml.ml2019-04-02 20:39 16K 
[   ]Lambda_Calcul_en_OCaml.pdf2019-05-21 10:43 67K 
[   ]Memoisation_en_Python_et_OCaml.pdf2017-10-05 17:47 45K 
[   ]Mots_bien_formes.ipynb2019-05-07 14:08 70K 
[TXT]Mots_bien_formes.ml2019-05-07 16:47 32K 
[   ]Mots_bien_formes.pdf2019-05-21 10:43 125K 
[   ]Médiane des médianes - sélection en temps linéaire.ipynb2021-01-26 20:40 215K 
[TXT]Médiane des médianes - sélection en temps linéaire.py2021-01-26 20:40 18K 
[   ]Mémoisation_en_Python_et_OCaml.ipynb2021-01-26 20:40 30K 
[   ]Mémoisation_en_Python_et_OCaml.pdf2017-10-05 17:47 45K 
[   ]Plus long sous mot commun (python3).ipynb2021-01-26 20:40 116K 
[   ]Plus long sous mot commun (python3).pdf2019-05-21 10:43 12K 
[TXT]Plus long sous mot commun (python3).py2021-01-26 20:40 34K 
[   ]Plus_long_sous_mot_commun__python3_.pdf2019-05-21 10:43 12K 
[TXT]README__appendix.md2017-10-02 11:32 2.4K 
[   ]Robots.ipynb2018-01-12 12:49 51K 
[TXT]Robots.ml2018-01-12 15:17 21K 
[   ]Robots.pdf2019-05-21 10:43 85K 
[   ]Sudoku.ipynb2020-01-28 09:57 33K 
[TXT]Sudoku.ml2020-02-14 14:44 15K 
[   ]Sudoku.pdf2017-09-13 20:50 89K 
[   ]Sudoku_resolus_par_algorithme_genetique.ipynb2018-02-20 13:25 29K 
[   ]Sudoku_resolus_par_algorithme_genetique.pdf2019-05-21 10:43 101K 
[   ]Taquin.ipynb2019-05-17 23:06 32K 
[TXT]Taquin.ml2019-05-20 11:02 15K 
[   ]Taquin.pdf2019-05-21 10:44 108K 
[   ]Tissu_cellulaire.ipynb2019-05-14 09:10 39K 
[TXT]Tissu_cellulaire.ml2019-05-14 14:13 17K 
[   ]Tissu_cellulaire.pdf2019-05-21 10:44 210K 
[   ]Tri_a_bulle_et_tri_cocktail.ipynb2019-12-04 16:47 30K 
[TXT]Tri_a_bulle_et_tri_cocktail.ml2019-12-04 16:47 12K 
[   ]Tri_a_bulle_et_tri_cocktail.pdf2019-05-21 10:43 52K 
[   ]Un exercice d'algorithmique - mise en page de paragraphe, résolutions gourmande et dynamique.ipynb2021-02-04 14:45 39K 
[TXT]Un exercice d'algorithmique - mise en page de paragraphe, résolutions gourmande et dynamique.py2021-02-04 14:46 18K 
[   ]Untitled.ipynb2018-02-21 12:12 72  
[TXT]memoisation.ml2017-10-03 17:31 1.0K 
[TXT]memoisation.py2017-10-03 17:49 1.6K 
[   ]public2012_D3 (OCaml).ipynb2021-01-26 20:40 71K 
[TXT]public2012_D3 (OCaml).ml2021-01-26 20:40 19K 
[   ]public2012_D3.ipynb2017-01-11 14:18 70K 
[TXT]public2012_D3.py2017-10-06 13:54 16K 
[   ]public2012_D5_OCaml.ipynb2019-05-13 19:31 27K 
[TXT]public2012_D5_OCaml.ml2019-05-13 19:31 15K 
[   ]public2018-D1.ipynb2017-12-06 19:03 55K 
[TXT]public2018-D1.ml2017-12-06 19:06 24K 
[   ]public2018-D1.pdf2017-12-11 14:42 100K 
[   ]public2018-D2.ipynb2017-12-06 19:11 19K 
[   ]public2018_D1.annot2019-01-10 18:57 157K 
[   ]public2018_D1.ipynb2017-12-06 19:03 55K 
[TXT]public2018_D1.ml2019-01-11 16:05 17K 
[   ]public2018_D1.pdf2017-12-11 14:42 100K 
[TXT]public2018_D1_petit.ml2019-01-11 16:19 5.4K 
[   ]public2018_D2.ipynb2017-12-06 19:11 19K 
[TXT]public2018_D2.ml2018-01-05 18:28 9.0K 
[   ]public2018_D2.pdf2019-05-21 10:42 48K 
[TXT]Algorithme de Cocke-Kasami-Younger (python3).html2018-09-25 17:35 386KAlgorithme de Cocke-Kasami-Younger (python3)
[TXT]Algorithme_de_Cocke-Kasami-Younger__python3_.html2018-09-25 17:35 386KAlgorithme de Cocke-Kasami-Younger (python3)
[TXT]Algorithme_genetique_pour_generer_des_eclairages_modelisation_agreg.html2019-03-12 19:06 355KAlgorithme_genetique_pour_generer_des_eclairages_modelisation_agreg
[TXT]Arithmetique_sur_les_posits.html2018-06-25 10:34 378KArithmetique_sur_les_posits
[TXT]Bitsets_en_OCaml.html2018-03-09 11:31 341KBitsets_en_OCaml
[TXT]Chapeaux.html2018-03-09 11:31 332KChapeaux
[TXT]Circuits.html2018-03-09 11:31 279KCircuits
[TXT]Contraintes_temporelles.html2019-05-19 09:57 521KContraintes_temporelles
[TXT]Crime_parfait.html2018-03-09 11:31 346KCrime_parfait
[TXT]Droite Discrète - public 2012 D5.html2021-01-26 09:34 1.1MDroite Discrète - public 2012 D5
[TXT]Droite_Discrete__public_2012_D5.html2021-01-26 09:34 1.1MDroite Discrète - public 2012 D5
[TXT]Eclairage_graphe.html2019-03-07 19:53 392KEclairage_graphe
[TXT]Jonglage.html2019-05-21 10:40 363KJonglage
[TXT]Lambda_Calcul_en_OCaml.html2019-04-02 20:39 376KLambda_Calcul_en_OCaml
[TXT]Mots_bien_formes.html2019-05-07 16:47 430KMots_bien_formes
[TXT]Mediane_des_medianes__selection_en_temps_lineaire.html2020-09-30 14:49 798KMédiane des médianes - sélection en temps linéaire
[TXT]Médiane des médianes - sélection en temps linéaire.html2020-09-30 14:49 798KMédiane des médianes - sélection en temps linéaire
[TXT]Memoisation_en_Python_et_OCaml.html2020-10-12 18:26 313KMémoisation_en_Python_et_OCaml
[TXT]Mémoisation_en_Python_et_OCaml.html2020-10-12 18:26 313KMémoisation_en_Python_et_OCaml
[TXT]Plus long sous mot commun (python3).html2018-09-25 13:29 392KPlus long sous mot commun (python3)
[TXT]Plus_long_sous_mot_commun__python3_.html2018-09-25 13:29 392KPlus long sous mot commun (python3)
[TXT]Robots.html2018-03-09 11:31 350KRobots
[TXT]Sudoku.html2018-03-09 11:31 319KSudoku
[TXT]Sudoku_resolus_par_algorithme_genetique.html2018-03-09 11:31 309KSudoku_resolus_par_algorithme_genetique
[TXT]Taquin.html2019-05-20 11:02 338KTaquin
[TXT]Tissu_cellulaire.html2019-05-14 14:13 336KTissu_cellulaire
[TXT]Tri_a_bulle_et_tri_cocktail.html2019-12-04 16:47 307KTri_a_bulle_et_tri_cocktail
[TXT]Un exercice d'algorithmique - mise en page de paragraphe, résolutions gourmande et dynamique.html2021-02-04 14:46 628KUn exercice d'algorithmique - mise en page de paragraphe, résolutions gourmande et dynamique
[TXT]public2012_D3.html2018-03-09 11:31 311Kpublic2012_D3
[TXT]public2012_D3 (OCaml).html2018-03-09 11:31 348Kpublic2012_D3 (OCaml)
[TXT]public2012_D3__OCaml_.html2018-03-09 11:31 348Kpublic2012_D3 (OCaml)
[TXT]public2012_D5_OCaml.html2019-05-13 19:31 326Kpublic2012_D5_OCaml
[TXT]public2018-D1.html2017-12-06 19:06 365Kpublic2018-D1
[TXT]public2018_D1.html2018-03-09 11:31 368Kpublic2018_D1
[TXT]public2018_D2.html2018-03-09 11:31 278Kpublic2018_D2
# :notebook: Notebooks pour l'agrégation :fr:

Ce dossier contient des [notebooks Jupyter](http://jupyter.org/), écrits en [Python (version 3)](https://docs.python.org/3/), pour [l'option informatique (D)](http://www.dit.ens-rennes.fr/agregation-option-d/programme-de-l-option-informatique-de-l-agregation-de-mathematiques-48358.kjsp) de l'[agrégation de mathématiques](http://agreg.org/) (en France).

Ces documents sont les seules corrections de texte de modélisation d'option info pour l'agrég de maths que vous pourrez trouver en ligne ([j'ai cherché](https://www.google.fr/search?q=correction+texte+modélisation+agrégation+informatique+ocaml) [partout](https://duckduckgo.com/?q=correction+texte+mod%C3%A9lisation+agr%C3%A9gation+informatique+ocaml&t=canonical&ia=web)).
Profitez en bien !

[Liste des notebooks sur nbviewer.jupyter.org](https://nbviewer.jupyter.org/github/Naereen/notebooks/tree/master/agreg/)

----

> :warning: Si vous êtes en train de préparer l'agrégation, lire des corrections sans avoir travailler (très sérieusement) le texte ou le développement avant, **ça ne sert à rien** !!
> Si vous êtes parmi mes élèves, **n'utilisez pas ces ressources pour tricher pendant les oraux blancs** : ça ne sert à rien, je le verrai, et vous n'aurez rien appris (spoiler alert : le jour des oraux, on ne peut pas tricher...).


> Cela étant dit, si vous avez travaillé un texte, n'hésitez pas à jeter un oeil à la correction et à la travailler aussi.
> Vous faites les choses différemment, et souvent plus vite et mieux, donc si vous avez envie, [contactez moi](http://perso.crans.org/besson/contact/) pour me signaler n'importe quoi (un bug, une meilleure façon de faire, une question ou autre).

## :pencil: Implémentation pour des leçons ou des développements
- [Algorithme de Cocke-Kasami-Younger](https://fr.wikipedia.org/wiki/Algorithme_de_Cocke-Younger-Kasami), pour résoudre le problème du mot pour une grammaire sous forme normale de Chomsky (et la mise en forme normale de Chomsky depuis la forme normale, en bonus) : [Algorithme de Cocke-Kasami-Younger (python3).ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Algorithme%20de%20Cocke-Kasami-Younger%20%28python3%29.ipynb) ([sur GitHub](Algorithme%20de%20Cocke-Kasami-Younger%20%28python3%29.ipynb)) -- Leçons 906, 907, 910, 923.
- [Calcul du plus long sous mot commun](https://fr.wikipedia.org/wiki/Plus_longue_sous-séquence_commune) : [Plus long sous mot commun (python3).ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Plus%20long%20sous%20mot%20commun%20%28python3%29.ipynb) ([sur GitHub](Plus%20long%20sous%20mot%20commun%20%28python3%29.ipynb)) -- Leçons 906, 907.
- [Tris à bulles et cocktail](https://fr.wikipedia.org/wiki/Tri_cocktail) : [Tri_a_bulle_et_tri_cocktail.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Tri_a_bulle_et_tri_cocktail.ipynb) ([sur GitHub](Tri_a_bulle_et_tri_cocktail.ipynb)) -- 903, 926, 927.
- [Lambda-Calcul embarqué en OCaml](https://fr.wikipedia.org/wiki/Lambda-calcul) : [Lambda_Calcul_en_OCaml.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Lambda_Calcul_en_OCaml.ipynb) ([sur GitHub](Lambda_Calcul_en_OCaml.ipynb)) -- 929.
- [Mémoïsation générique, en Python et en OCaml](https://fr.wikipedia.org/wiki/M%C3%A9mo%C3%AFsation) : [Mémoisation_en_Python_et_OCaml.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Mémoisation_en_Python_et_OCaml.ipynb) ([sur GitHub](Mémoisation_en_Python_et_OCaml.ipynb)) -- Leçons 906, 907.
- [Bitsets en OCaml et comparaison avec un `bool array` et un `Set.Make(Int)`](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Bitsets_en_OCaml.ipynb) ([sur GitHub](Bitsets_en_OCaml.ipynb)) -- Leçon ?

----

## :pencil: Textes de modélisation
### Premier exemple
- Pour le texte [public2012-D3](http://agreg.org/Textes/public2012-D3.pdf) : [public2012_D3.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/public2012_D3.ipynb) ([sur GitHub](public2012_D3.ipynb)) en Python 3, [public2012_D3.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/public2012_D3%20%28OCaml%29.ipynb) ([sur GitHub](public2012_D3%20%28OCaml%29.ipynb)) en OCaml.

### Textes les plus récents (2018)
- Pour le texte [public2018-D1](http://agreg.org/Textes/public2018-D1.pdf) : [public2018_D1.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/public2018_D1.ipynb) ([sur GitHub](public2018_D1.ipynb)) en OCaml.
- Pour le texte [public2018-D2](http://agreg.org/Textes/public2018-D2.pdf) : [public2018_D2.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/public2018_D2.ipynb) ([sur GitHub](public2018_D2.ipynb)) en OCaml.

> Note: ces textes ont enfin été mis en ligne récemment (décembre 2017), et je les ai corrigé le plus rapidement possible.

### Oraux blancs (1/2)
Pour quatre textes donnés pour les oraux blancs début avril 2017 :

- lundi 3 avril :
    + [Crime parfait](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Crime_parfait.ipynb),
    + et [Sudoku](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Sudoku.ipynb),

- vendredi 7 avril :
    + [Contraintes temporelles](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Contraintes_temporelles.ipynb),
    + et [Chapeaux](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Chapeaux.ipynb)

(tous en OCaml, pour des textes non officiels).

### Entraînements en mars
- Pour le texte [public2012-D6](http://agreg.org/Textes/public2012-D6.pdf) : [Mots_bien_formes.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Mots_bien_formes.ipynb) en OCaml.
- Pour le texte [pub2008-D1](http://agreg.org/Textes/pub2008-D1.pdf) : [Robots.ipynb](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Robots.ipynb) en OCaml.

### Oraux blancs (2/2)
Pour quatre textes donnés pour les oraux blancs fin mai 2017 :

- lundi 22 mai :
    + [Tissu cellulaire](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Tissu_cellulaire.ipynb) ([public2010-D2.pdf](http://agreg.org/Textes/public2010-D2.pdf)),
    + et [Eclairage graphe](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Eclairage_graphe.ipynb) ([public2012-D1.pdf](http://agreg.org/Textes/public2012-D1.pdf)),

- lundi 29 mai :
    + [Taquin](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Taquin.ipynb) ([pub2008-D2.pdf](http://agreg.org/Textes/pub2008-D2.pdf)),
    + et [Circuits](https://nbviewer.jupyter.org/github/Naereen/notebooks/blob/master/agreg/Circuits.ipynb) ([public2010-D1.pdf](http://agreg.org/Textes/public2010-D1.pdf))

(tous en OCaml).

----

### :information_desk_person: Plus d'informations ?
> - Plus d'informations sur ce dépôt se trouvent [ici](..).
> - Plus d'informations sur [les notebooks (documentation de IPython)](https://nbviewer.jupyter.org/github/ipython/ipython/blob/3.x/examples/Notebook/Index.ipynb) ou [FAQ sur le site de Jupyter](https://nbviewer.jupyter.org/faq).

### [Utiliser OCaml avec Jupyter](https://github.com/akabe/ocaml-jupyter)
Les solutions présentes ici sont rédigés comme des [notebooks](https://jupyter.org/documentation.html) [Jupyter](https://jupyter.org/).
J'utilise un *kernel* spécifique pour coder en OCaml via Jupyter.

Il ne devrait pas être trop compliqué à installer, avec [opam](https://opam.ocaml.org/) :
```bash
opam install jupyter
```

Cela demande d'avoir [déjà installé Jupyter](https://jupyter.org/install.html).

Note :  [ce petit article en français](http://pascal.ortiz.free.fr/contents/autres/jupyter_ocaml/jupyter_ocaml.html) présente comment (essayer d') installer OCaml et Jupyter et `ocaml-jupyter` sur un système Windows (version 10 ou plus récente).

### :scroll: Licence
Tout ces documents sont distribues publiquement sous les conditions de la [licence MIT](http://lbesson.mit-license.org/) (fichier [LICENSE.txt](LICENSE.txt), en anglais).
© [Lilian Besson](https://github.com/Naereen), 2016-17.

[![made-with-jupyter](https://img.shields.io/badge/Made%20with-Jupyter-1f425f.svg)](http://jupyter.org/)
[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)
[![made-with-ocaml](https://img.shields.io/badge/Made%20with-OCaml-1f425f.svg)](https://ocaml.org/)

[![Demandez moi n'importe quoi !](https://img.shields.io/badge/Demandez%20moi-n'%20importe%20quoi-1abc9c.svg)](https://GitHub.com/Naereen/ama.fr)
[![Analytics](https://ga-beacon.appspot.com/UA-38514290-17/github.com/Naereen/notebooks/agreg/README.md?pixel)](https://github.com/Naereen/notebooks/)