diff --git a/Cours/M313_2020_2021_CM4.pdf b/Cours/M313_2020_2021_CM4.pdf new file mode 100644 index 0000000..af9a34d Binary files /dev/null and b/Cours/M313_2020_2021_CM4.pdf differ diff --git a/Cours/M313_CM5.pdf b/Cours/M313_CM5.pdf new file mode 100644 index 0000000..08a3277 Binary files /dev/null and b/Cours/M313_CM5.pdf differ diff --git a/Enoncés/TP/AlgoPartieC.txt b/Enoncés/TP/AlgoPartieC.txt new file mode 100644 index 0000000..1618c5b --- /dev/null +++ b/Enoncés/TP/AlgoPartieC.txt @@ -0,0 +1,14 @@ +Begin +if isEmpty(msg) // Si msg"-.." +then return getUserObject(morse) // +else if charAt(msg,O)=='-' then // "-" +return decodeletterInmorse(leftChild(morse),substring(msg,1)) // ".." +else if charAt(msg,0)=='.' then +return decodeletterInMorse(rightChild(morse),substring(msg,1)) +else return decodeLetterInMorse(morse,substring(msg,1)) // + + +Function decodeInmorse(ABin morse,ABin morseInUse,String msg); String +In: alphabet morse morse dans un arbre binaire et une copie morseInuse pour pouvoir "remonter à la racine" +Do: renvoie le message en alphabet A-2 +Begin \ No newline at end of file diff --git a/Enoncés/TP/AlgoPartieD.txt b/Enoncés/TP/AlgoPartieD.txt new file mode 100644 index 0000000..32d5652 --- /dev/null +++ b/Enoncés/TP/AlgoPartieD.txt @@ -0,0 +1,18 @@ +Function decodeInmorse(ABin morse,ABin morseInUse,String msg); String +In: alphabet morse morse dans un arbre binaire et une copie morseInuse pour pouvoir "remonter à la racine" +Do: renvoie le message en alphabet A-2 +Begin + +if isEmpty(msg) + then return getUserObject(morseInUse) +else if charAt(msg,0)=='-' then +return decodeInMorse(morse,leftchild(morseinuse),substring(msg,1)) +else if charAt(msg,0)=='.' then +return decodeletterInMorse(rightChild(morse),substring(msg,1)) +else return decodeLetterInMorse(morse,substring(msg,1)) +else if charAt(msg,0)=='/' then +return getUserObject(morseInUse)+decodeInmorse(morse,morse,SubString(msg,1)) +else if charAt(msg,0)==' ' then +return getUserObject(morseInUse)+' '+ decodeInmorse(morse,morse,SubString(msg,1)) +else //optionel/ +return getUserObject(morse,morseInUse,substring(msg,1)) diff --git a/Enoncés/TP/TP5_Arbre_Seance2.pdf b/Enoncés/TP/TP5_Arbre_Seance2.pdf new file mode 100644 index 0000000..9adeacf Binary files /dev/null and b/Enoncés/TP/TP5_Arbre_Seance2.pdf differ