Вы находитесь на странице: 1из 1

Fichee n°1 (Ra

appel)
Exeercice n°1.
On souhaite éétudier dans une chainne de caracctères les séquences
s de caractèrres identiq
ques, exempple :
la séquence ˝ bbbb˝ de la
l chaine ˝aabbbbc˝. Ill faut bien sûr qu’unee séquencee de caractèères identiqques
commporte au m
moins deuxx caractèrees pour qu’elle soit prrise en com
mpte !

Don
nc soit unee chaine Ch
h triée par ordre
o croisssant.
a. Ecrire unne fonctionn NbSequeence qui reetourne le nombre
n de séquencess de caractèères identiqques
que Ch ccontient. Exemple
E ˝aa
aabbc˝ le nnombre de séquencess=2.
b. Ecrire uune fonctioon LongSequence quui retournee la longueeur de la pplus longue séquencee de
caractèrees identiquue que conttient Ch ett 0 si elle n’en
n contieent pas. Exeemple pou
ur ˝aaaabbcc˝ la
longueurr de la séquuence la pllus longue = 4.
c. soit un tableau T de n chaine de carractères (n n<= 100). Ecrire l’allgorithme permettant de
remplir TT, puis d’aafficher la 1ére
1 chainee qui a le plus
p grand nombre dee séquencés de caracttères
identiquees ainsi quue la 1ére qui
q a la pluss longue sééquence dee caractèress identiquees.
NB : les chainnes se term
minent par la marque dde fin de ch
haine ‘\0’

Exeercice n°2.
On
O disposee d’un tablleau T[1..n n] contenannt tous les entiers de l’intervallle 1..n+1, sauf un enntier.
On
O veut détterminer quuel est l’en
ntier manquuant de T.
a-
a Donner un algorithhme qui résout le prooblème en temps
t dratique ( O(n2)).
quad
b Donner un algorithme qui résout le problème en temps linéaire, sans utilisser de tableau
b-
aux
xiliaire.

Exeercice n°3
On définit unee suite d’enntiers naturrels de la fa
façon suivaante :
a. lee premier tterme sera lu de l’extéérieur ; U1= =a ; (a :enttier donné))
b. lees autres teermes sont définis parr la formulle récurren nte :
Un/2 si n est paair
Un+1=
3Un+4 sinon.
1. Écrire
É la foonction loggique Pair((x). Cette ffonction do oit fournir la valeur V
VRAI si x est
e pair, FA
AUX
sinoon.
2. Écrire
É l’alggorithme quui calcule les termes dde cette suiite pour N donnée enn utilisant Pair(x).
P

Exeercice n°4.
Écrrire l’algoriithme qui calcule
c la quantité
q C ssuivante :
1. A l’aide dess boucles « Répéter » ;
2. A l’aide dess boucles « Tantque ».»

Y a-t-il
a une diifférence enntre l’utilissation des bboucles rép
péter et tan
nt que ?

Вам также может понравиться

  • Access
    Access
    Документ65 страниц
    Access
    Youcef Benjillali
    Оценок пока нет
  • Équations différentielles: Les Grands Articles d'Universalis
    Équations différentielles: Les Grands Articles d'Universalis
    От Everand
    Équations différentielles: Les Grands Articles d'Universalis
    Оценок пока нет
  • 3 - Exercices Corriges Theorie de Langages 4info
    3 - Exercices Corriges Theorie de Langages 4info
    Документ47 страниц
    3 - Exercices Corriges Theorie de Langages 4info
    Fatiha Ait Bourhou
    100% (7)
  • Exercices Python3
    Exercices Python3
    Документ13 страниц
    Exercices Python3
    tamelah fabrice
    Оценок пока нет
  • Elements
    Elements
    Документ484 страницы
    Elements
    Youcef Benjillali
    Оценок пока нет
  • Chapitre I-Les Structures de Données PDF
    Chapitre I-Les Structures de Données PDF
    Документ5 страниц
    Chapitre I-Les Structures de Données PDF
    Kais Ben Aicha
    Оценок пока нет
  • Exercices Corriges D Algorithmique
    Exercices Corriges D Algorithmique
    Документ54 страницы
    Exercices Corriges D Algorithmique
    armelo simbe
    Оценок пока нет
  • 117 Reincarnation
    117 Reincarnation
    Документ13 страниц
    117 Reincarnation
    Papy Rys
    Оценок пока нет
  • La Communication
    La Communication
    Документ53 страницы
    La Communication
    Youcef Benjillali
    Оценок пока нет
  • Techniques Et Management Du Commerce Internnational
    Techniques Et Management Du Commerce Internnational
    Документ110 страниц
    Techniques Et Management Du Commerce Internnational
    sigulda2020
    Оценок пока нет
  • 2 Installation LAN
    2 Installation LAN
    Документ28 страниц
    2 Installation LAN
    Youcef Benjillali
    Оценок пока нет
  • La Gestion Des Ressources Humaines (GRH) (Enregistrement Que
    La Gestion Des Ressources Humaines (GRH) (Enregistrement Que
    Документ79 страниц
    La Gestion Des Ressources Humaines (GRH) (Enregistrement Que
    Amine Moustarhim
    100% (1)
  • TD 2 - Archi - Sol
    TD 2 - Archi - Sol
    Документ4 страницы
    TD 2 - Archi - Sol
    Youcef Benjillali
    Оценок пока нет
  • Cours Ondes Electromagnetiques
    Cours Ondes Electromagnetiques
    Документ174 страницы
    Cours Ondes Electromagnetiques
    Youcef Benjillali
    100% (1)
  • Cours Complexite
    Cours Complexite
    Документ145 страниц
    Cours Complexite
    Fares Mezrag
    Оценок пока нет
  • Exos Fonctions Structures Donnees
    Exos Fonctions Structures Donnees
    Документ3 страницы
    Exos Fonctions Structures Donnees
    jupitemma19
    Оценок пока нет
  • Python Listes Et Chaînes de Caractères
    Python Listes Et Chaînes de Caractères
    Документ2 страницы
    Python Listes Et Chaînes de Caractères
    Mouna Boumezbeur
    Оценок пока нет
  • Algo
    Algo
    Документ30 страниц
    Algo
    Bessem Bessem
    Оценок пока нет
  • Série N°1 Algorithmique Série Récursivité 2012 2013 (Fathia)
    Série N°1 Algorithmique Série Récursivité 2012 2013 (Fathia)
    Документ1 страница
    Série N°1 Algorithmique Série Récursivité 2012 2013 (Fathia)
    jenesaispas
    Оценок пока нет
  • Info 03
    Info 03
    Документ2 страницы
    Info 03
    Philip Leve
    Оценок пока нет
  • Icc Serie 2.3
    Icc Serie 2.3
    Документ4 страницы
    Icc Serie 2.3
    Nour Menii
    Оценок пока нет
  • DL 1
    DL 1
    Документ2 страницы
    DL 1
    Chérif Kagni
    Оценок пока нет
  • TPnote 17
    TPnote 17
    Документ4 страницы
    TPnote 17
    Clement Hergé
    Оценок пока нет
  • Administration Réseaux Et Systèmes
    Administration Réseaux Et Systèmes
    Документ37 страниц
    Administration Réseaux Et Systèmes
    Saliou GAYE
    Оценок пока нет
  • tp3 Fonction
    tp3 Fonction
    Документ5 страниц
    tp3 Fonction
    Hafsi Nawfel
    Оценок пока нет
  • FeuilleRecursivite 2020
    FeuilleRecursivite 2020
    Документ3 страницы
    FeuilleRecursivite 2020
    kukis14
    Оценок пока нет
  • LES CLASSES Scanner, String, StringBuffer, StringTokenizer Et Math
    LES CLASSES Scanner, String, StringBuffer, StringTokenizer Et Math
    Документ6 страниц
    LES CLASSES Scanner, String, StringBuffer, StringTokenizer Et Math
    api-26420184
    Оценок пока нет
  • Info B2023
    Info B2023
    Документ15 страниц
    Info B2023
    Del-christ Ouédraogo
    Оценок пока нет
  • Complexité
    Complexité
    Документ2 страницы
    Complexité
    yousfi majd
    Оценок пока нет
  • Chaine de Caractere
    Chaine de Caractere
    Документ4 страницы
    Chaine de Caractere
    barhoumi oussama
    Оценок пока нет
  • Série N 3
    Série N 3
    Документ3 страницы
    Série N 3
    Zaghbani Habib
    100% (1)
  • Mu4in511 TD Algo
    Mu4in511 TD Algo
    Документ14 страниц
    Mu4in511 TD Algo
    SADOK
    Оценок пока нет
  • Adt CC 2015
    Adt CC 2015
    Документ2 страницы
    Adt CC 2015
    khicha01ines
    Оценок пока нет
  • Algo td4
    Algo td4
    Документ2 страницы
    Algo td4
    Leila Ba
    Оценок пока нет
  • X Ens Informatique 2011 MP PC Epreuve
    X Ens Informatique 2011 MP PC Epreuve
    Документ4 страницы
    X Ens Informatique 2011 MP PC Epreuve
    Jihane Rached
    Оценок пока нет
  • TP2 2012
    TP2 2012
    Документ3 страницы
    TP2 2012
    hassan
    Оценок пока нет
  • Serie1 1
    Serie1 1
    Документ1 страница
    Serie1 1
    ethiba130
    Оценок пока нет
  • Série 1 - Les Chaînes de Caractères
    Série 1 - Les Chaînes de Caractères
    Документ3 страницы
    Série 1 - Les Chaînes de Caractères
    talibi abdel
    Оценок пока нет
  • TP No 5 Utilisation Des Listes Et Chaînes de Caractères
    TP No 5 Utilisation Des Listes Et Chaînes de Caractères
    Документ2 страницы
    TP No 5 Utilisation Des Listes Et Chaînes de Caractères
    MUX AMV
    Оценок пока нет
  • DM7 Python Equadiff
    DM7 Python Equadiff
    Документ3 страницы
    DM7 Python Equadiff
    Mayeul
    Оценок пока нет
  • TI1 F Chaines
    TI1 F Chaines
    Документ5 страниц
    TI1 F Chaines
    Mohamed
    Оценок пока нет
  • 2 TD MBD SIM
    2 TD MBD SIM
    Документ2 страницы
    2 TD MBD SIM
    MD
    Оценок пока нет
  • 2 TD MBD SIM PDF
    2 TD MBD SIM PDF
    Документ2 страницы
    2 TD MBD SIM PDF
    MD
    Оценок пока нет
  • Analyse Math Bac
    Analyse Math Bac
    Документ52 страницы
    Analyse Math Bac
    Kabila
    Оценок пока нет
  • TD 2
    TD 2
    Документ2 страницы
    TD 2
    Peguy Nkouebo
    Оценок пока нет
  • Python TD 3
    Python TD 3
    Документ3 страницы
    Python TD 3
    Clo Gueus
    Оценок пока нет
  • TD L3 Télécom-2022
    TD L3 Télécom-2022
    Документ8 страниц
    TD L3 Télécom-2022
    Paypal Rezult
    Оценок пока нет
  • Examen MatLab I
    Examen MatLab I
    Документ2 страницы
    Examen MatLab I
    Katia Katou
    Оценок пока нет
  • Oral Math Exo Types
    Oral Math Exo Types
    Документ7 страниц
    Oral Math Exo Types
    Mohamed MAHJOUB
    Оценок пока нет
  • Sud-Tulan Algorithmique - Et - Structures - de - Donnees
    Sud-Tulan Algorithmique - Et - Structures - de - Donnees
    Документ18 страниц
    Sud-Tulan Algorithmique - Et - Structures - de - Donnees
    Anw aar
    Оценок пока нет
  • TD ch1
    TD ch1
    Документ3 страницы
    TD ch1
    Fefe Nz
    Оценок пока нет
  • Révisions Excel
    Révisions Excel
    Документ4 страницы
    Révisions Excel
    sberrached96
    Оценок пока нет
  • Sujet 23 05 17
    Sujet 23 05 17
    Документ5 страниц
    Sujet 23 05 17
    Richard Mogou
    Оценок пока нет
  • Devoirc 2011
    Devoirc 2011
    Документ5 страниц
    Devoirc 2011
    Jad Abou Khalil
    Оценок пока нет
  • Tpnote 1617
    Tpnote 1617
    Документ2 страницы
    Tpnote 1617
    dridi
    Оценок пока нет
  • TD 1 Notions de Base
    TD 1 Notions de Base
    Документ2 страницы
    TD 1 Notions de Base
    Yassmina
    Оценок пока нет
  • TP 6 Les Chaines de Caracteres
    TP 6 Les Chaines de Caracteres
    Документ3 страницы
    TP 6 Les Chaines de Caracteres
    Slim Yaiche
    Оценок пока нет
  • Correction td5
    Correction td5
    Документ4 страницы
    Correction td5
    Assimi Diallo
    Оценок пока нет
  • Theme 1-Programmation
    Theme 1-Programmation
    Документ8 страниц
    Theme 1-Programmation
    Rayane Chk
    Оценок пока нет
  • Enoncé
    Enoncé
    Документ4 страницы
    Enoncé
    samir saha
    Оценок пока нет
  • Cordee TP Info 1 3
    Cordee TP Info 1 3
    Документ5 страниц
    Cordee TP Info 1 3
    Kenzy Sadaoui
    Оценок пока нет
  • Complexité 2013-2014
    Complexité 2013-2014
    Документ1 страница
    Complexité 2013-2014
    Soumia Dje
    Оценок пока нет
  • TD 2: Information Selon Shannon Et Codage Optimal: 1 Inégalité de Kraft (Suite)
    TD 2: Information Selon Shannon Et Codage Optimal: 1 Inégalité de Kraft (Suite)
    Документ2 страницы
    TD 2: Information Selon Shannon Et Codage Optimal: 1 Inégalité de Kraft (Suite)
    Sãb Îne
    Оценок пока нет
  • Chapitre2-Les Chaines
    Chapitre2-Les Chaines
    Документ15 страниц
    Chapitre2-Les Chaines
    Anw aar
    Оценок пока нет
  • TP 1 Expressions Régulière-1
    TP 1 Expressions Régulière-1
    Документ8 страниц
    TP 1 Expressions Régulière-1
    Blh Oussama
    Оценок пока нет
  • Notnow Python-3
    Notnow Python-3
    Документ3 страницы
    Notnow Python-3
    Ravikanth L
    Оценок пока нет
  • Miashs S3 2022-2023
    Miashs S3 2022-2023
    Документ24 страницы
    Miashs S3 2022-2023
    matt.33lacroix12
    Оценок пока нет
  • Resume Des Commandes de Base en Python: 1-Les Variables
    Resume Des Commandes de Base en Python: 1-Les Variables
    Документ10 страниц
    Resume Des Commandes de Base en Python: 1-Les Variables
    Harlem LE Roi Cisse
    Оценок пока нет
  • 2 TD Recursivite
    2 TD Recursivite
    Документ5 страниц
    2 TD Recursivite
    arc gooft
    Оценок пока нет
  • TD2 - Python - Correction
    TD2 - Python - Correction
    Документ15 страниц
    TD2 - Python - Correction
    azer2022
    Оценок пока нет
  • TP1 Boucles
    TP1 Boucles
    Документ8 страниц
    TP1 Boucles
    Jean Albert
    Оценок пока нет
  • Chapitre3 ADO
    Chapitre3 ADO
    Документ20 страниц
    Chapitre3 ADO
    Youcef Benjillali
    Оценок пока нет
  • CT Amphi4 Mips
    CT Amphi4 Mips
    Документ58 страниц
    CT Amphi4 Mips
    Youcef Benjillali
    Оценок пока нет
  • Série de TD N°2 SII
    Série de TD N°2 SII
    Документ2 страницы
    Série de TD N°2 SII
    Youcef Benjillali
    Оценок пока нет
  • CoursWindev Id4201
    CoursWindev Id4201
    Документ59 страниц
    CoursWindev Id4201
    Youcef Benjillali
    Оценок пока нет
  • Formation Linux
    Formation Linux
    Документ316 страниц
    Formation Linux
    ARSENE
    Оценок пока нет
  • PK0307 Facsimile 346de6
    PK0307 Facsimile 346de6
    Документ18 страниц
    PK0307 Facsimile 346de6
    bencharqui
    Оценок пока нет
  • Fonctionnalites WinDev
    Fonctionnalites WinDev
    Документ310 страниц
    Fonctionnalites WinDev
    filalihamid
    Оценок пока нет
  • Cours Ibs &tva Sadoudi
    Cours Ibs &tva Sadoudi
    Документ22 страницы
    Cours Ibs &tva Sadoudi
    Youcef Benjillali
    Оценок пока нет
  • Matlab Introduction
    Matlab Introduction
    Документ4 страницы
    Matlab Introduction
    Youcef Benjillali
    Оценок пока нет
  • Soupe Au Potiron
    Soupe Au Potiron
    Документ2 страницы
    Soupe Au Potiron
    Youcef Benjillali
    100% (1)
  • Soupe Au Potiron
    Soupe Au Potiron
    Документ2 страницы
    Soupe Au Potiron
    Youcef Benjillali
    100% (1)
  • Le Marketing Et L'environnement
    Le Marketing Et L'environnement
    Документ42 страницы
    Le Marketing Et L'environnement
    Youcef Benjillali
    Оценок пока нет
  • Solution de Lexamen 2020-2021
    Solution de Lexamen 2020-2021
    Документ2 страницы
    Solution de Lexamen 2020-2021
    Zinou Zin
    Оценок пока нет
  • Controle - Algo V
    Controle - Algo V
    Документ5 страниц
    Controle - Algo V
    sadik
    Оценок пока нет
  • Chapitre 2 Complexité
    Chapitre 2 Complexité
    Документ33 страницы
    Chapitre 2 Complexité
    donix w.m
    Оценок пока нет
  • Chapitre 0
    Chapitre 0
    Документ34 страницы
    Chapitre 0
    ouma ima
    Оценок пока нет
  • DocumentEleve2020 Graphe Ordo
    DocumentEleve2020 Graphe Ordo
    Документ6 страниц
    DocumentEleve2020 Graphe Ordo
    Steve FL
    Оценок пока нет
  • Cours Techniques d'ordonnancement-ESPRIT PDF
    Cours Techniques d'ordonnancement-ESPRIT PDF
    Документ54 страницы
    Cours Techniques d'ordonnancement-ESPRIT PDF
    Láñdólsi Móñta
    Оценок пока нет
  • Structures
    Structures
    Документ27 страниц
    Structures
    jean
    Оценок пока нет
  • Heuristique
    Heuristique
    Документ17 страниц
    Heuristique
    Samira cherif
    100% (1)
  • Cours Lycée Pilote - Informatique Les Algorithmes de Tri Et de Recherche - 3ème Informatique (2011-2012) Mme Amira Bouganmi PDF
    Cours Lycée Pilote - Informatique Les Algorithmes de Tri Et de Recherche - 3ème Informatique (2011-2012) Mme Amira Bouganmi PDF
    Документ15 страниц
    Cours Lycée Pilote - Informatique Les Algorithmes de Tri Et de Recherche - 3ème Informatique (2011-2012) Mme Amira Bouganmi PDF
    Rouis Rouis
    Оценок пока нет
  • Chap 10 Heritage Multiple en C++
    Chap 10 Heritage Multiple en C++
    Документ4 страницы
    Chap 10 Heritage Multiple en C++
    fred biggy
    Оценок пока нет
  • TD 2
    TD 2
    Документ2 страницы
    TD 2
    fayçal
    Оценок пока нет
  • Graphe JAN 2020 PDF
    Graphe JAN 2020 PDF
    Документ2 страницы
    Graphe JAN 2020 PDF
    slo
    Оценок пока нет
  • s04 Clustering
    s04 Clustering
    Документ25 страниц
    s04 Clustering
    Ranya Ben Achour
    Оценок пока нет
  • TD2
    TD2
    Документ2 страницы
    TD2
    mohamedsenani5
    Оценок пока нет
  • Exposé Tri
    Exposé Tri
    Документ2 страницы
    Exposé Tri
    ali songui
    Оценок пока нет
  • Mathématiques Appliquées À La Gestion
    Mathématiques Appliquées À La Gestion
    Документ29 страниц
    Mathématiques Appliquées À La Gestion
    rakax789
    Оценок пока нет
  • Momento Agopython
    Momento Agopython
    Документ3 страницы
    Momento Agopython
    samsoum1
    Оценок пока нет
  • Méthode Itératives
    Méthode Itératives
    Документ14 страниц
    Méthode Itératives
    somaya eh
    Оценок пока нет
  • CORRIGE ENSTP 2 Annee ANA NUM 2 Serie 1
    CORRIGE ENSTP 2 Annee ANA NUM 2 Serie 1
    Документ6 страниц
    CORRIGE ENSTP 2 Annee ANA NUM 2 Serie 1
    eviliev
    Оценок пока нет
  • HAMMAR K
    HAMMAR K
    Документ85 страниц
    HAMMAR K
    Nadir Boutasseta
    Оценок пока нет
  • TP 2 Hachage
    TP 2 Hachage
    Документ2 страницы
    TP 2 Hachage
    NaSsimElMaataOui
    Оценок пока нет
  • Pram
    Pram
    Документ15 страниц
    Pram
    Laurent Fabrice Ngako Tchamou
    Оценок пока нет
  • Programmation Dynamique Cours
    Programmation Dynamique Cours
    Документ19 страниц
    Programmation Dynamique Cours
    calabi mozart
    Оценок пока нет
  • Res Gloutons
    Res Gloutons
    Документ8 страниц
    Res Gloutons
    Meriem Hachicha
    Оценок пока нет
  • 2015 01 04-Introduction Complexite Algorithmique
    2015 01 04-Introduction Complexite Algorithmique
    Документ46 страниц
    2015 01 04-Introduction Complexite Algorithmique
    Mnt Bouhoubyni
    Оценок пока нет
  • Thèse Maroua Nouiri Version FInale
    Thèse Maroua Nouiri Version FInale
    Документ145 страниц
    Thèse Maroua Nouiri Version FInale
    DERRAOUI LILIA
    Оценок пока нет
  • Chapitre 2
    Chapitre 2
    Документ64 страницы
    Chapitre 2
    Adam Bihi
    Оценок пока нет
  • Chap 1
    Chap 1
    Документ20 страниц
    Chap 1
    Mohamed Aziz Ghorbel
    Оценок пока нет