# :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/)