Structures de données et algorithmes – TP7 Maria-Iuliana Dascalu, PhD

Slides:



Advertisements
Présentations similaires

Advertisements

What does en mean? The object pronoun en usually means some or of them.
Ptit Raphaël est très amusant. Donc, jinvite Ptit Raphaël à ma fête. Je ly invite.
Making expressions negative To make a simple negative, use NE and PAS around the verb. If there is a subject pronoun in the sentence, the verb will be.
Qu’est-ce qui te plaît? Chapitre 2.
Jadore faire du skate !. ALL must be able to talk about sports MOST should be able to talk and write about what you like doing and dislike doing SOME.
When do we use numbers? Why are they important? Why is it important to know numbers in French (or any other language)? Can you think of some REAL WORLD.
Information Theory and Radar Waveform Design Mark R. bell September 1993 Sofia FENNI.
Y Refers to a previously-mentioned (or implied) place. Tu vas à la banque aujourd'hui ? Non, j'y vais demain. Nous allons au magasin. Tu veux y aller ?
Y and en Two little words with a lot of meaning. y.
Possessive Adjectives What is a possessive adjective? – It's a word that tells who things belong to... my cell phone.
Faire maintenant! Do Now!
Unité 1: Faisons Connaissance Leçon 2 Famille et copains
The one exception:  All verbs that end in –er are regular, with one exception.  That is aller which means “to go.”
WALT: UNDERSTAND QUANTITIES AND AMOUNTS IN FRENCH WILF: USING HIGHER NUMBERS AND WORDS FOR DIFFERENT PACKETS AND CONTAINERS FOR LEVEL 3A.
Les verbes qui se terminent en -ER (-ER verbs). French has both regular and irregular verbs. (English does too, for that matter.)
Livre page 48. There are 4 different ways to form questions. Félicitations!! You already know 2 of the ways ☻ We have not “officially” studied this concept.
C’est combien ? Les euros
WALT: To talk about the internet in French.
Les pronoms objets indirects.  Peux-tu identifier les règles des ‘pronoms objets indirects’ en regardant les exemples suivants?
THE ADJECTIVES: BEAU, NOUVEAU AND VIEUX 1.
Negation / Negative Expressions Composition Notebook pp
Les adjectifs possessifs
LA DATE MME YEE L'hôtel Français. Avant de lire 1. Have you ever stayed at a hotel? Where? 2. If not, what do you think it would be like? 3. What do you.
L’ARTICLE INDÉFINI AU PLURIEL et La négation des articles indéfinis.
French 101 Important Verbs. The most important French verbs – avoir (to have), être (to be), and faire (to do/make) They are used in some of the ways.
L’Heure To ask what time it is in French, say: – Quelle heure est-il? To respond, say: – Il est... heure(s). – Ex: 02h00 Il est deux heures. 04h00 Il est.
Ca fait combien? How much is that?.
 I can give someone’s age.  I can write a description of myself and of someone else.
Leçon 10 What are the definite articles in French?
Les Pronoms Direct & Indirect.
Pile-Face 1. Parlez en français! (Full sentences) 2. One person should not dominate the conversation 3. Speak the entire time The goal: Practice! Get better.
2 Le verbe « être » au pluriel Les normes: Communication 1.2 Comparisons 4.1 Les questions essentielles: - What are the plural subject pronouns in French?
WALT: GIVE OPINIONS ABOUT MY TOWN
WALT: Recognise and use phrases in the past tense with opinions of leisure activities. WILF: To be able to use opinions in the past tense. You must be.
Year 10. Bon appetit unit. Introducing ‘en’. ‘en’ – ‘some of it’ or ‘some of them’ ‘En’ is a small but important word in French that is commonly used.
Les pronoms objets Mme Zakus. Les pronoms objets When dealing with sentences, subjects are part of the action of the verb. In other words, they “ do ”
Notes le octobre ÊTRE (to be) je suis (I am)nous sommes (we are) tu es(you are)vous êtes (you (plural) are) il/elle est (he/she is)ils/elles sont.
Les verbes réfléchis.
Warm up Write about each chore you do and say how often you have to do them, using French expression such deux fois par semaine, chaque Lundi, souvent,
Let’s enjoy making Session 2. Let’s enjoy making: Session 2 Les déménageurs sont arrivés !
Object pronouns How to say “him”, “her”, “it”, “them”
1. Est-ce que Est-ce que, literally translated "is it that," can be placed at the beginning of any affirmative sentence to turn it into a question: Je.
WE’RE ALMOST DONE – CONGRATULATIONS! LE PRONOM « Y »
Activité de Commencement Qu’est que tu as fait pendent le weekend? Please have a response ready! Je suis allé(e) chez mon ami…. (I went to my friend ________’s)
Verb  a word that show action or a state of being.  Examples: run, jump, play, talk, listen  In English, we just the verb “to be” to describe how people.
Par Mme. Cook. Aller means « to go. » Je vais Nous allons Tu vas Vous allez Il Elle va Ils, Elles vont on.
Le monde des. Pierre va au cinéma. Ses amis sont là aussi. Sa mère reste à la maison. These words are nouns or proper nouns that are also s ss subjects.
Unité 2 Leçon 1 I can describe myself and others Day 3 I can describe an ideal friend.
What’s the weather like?. Look at the verb phrase fait-il above Turn it around and you have il fait The phrase Il fait can be used to describe lots of.
© and ® 2011 Vista Higher Learning, Inc.2B.1-1 Point de départ The verb avoir (to have) is used frequently. You will have to memorize each of its present.
Verb Conjugation Learning to conjugate your first verb in French.
Clique Percolation Method (CPM)
It’s.  Both C’est and Il est/Elle est can mean it’s.  There are specific times to use each.
Negative sentences Questions
TITLE Business PowerPoint Templates PowerPoint note pad template.
The imparfait can be translated several ways into English.
Utilisez la liste d’hier, mettez les verbes correctes dans les blancs 1.J’ai _____ une bouteille de limonade 2.Tu as ______ “The Hunger Games”? 3.On a.
Indefinite articles & plural of nouns
Leçon 6 I am what I am or to be or not to be
l y a which we have already learned means “there is/are l y a which we have already learned means “there is/are.” When we put a measure of time.
Notes le 28 octobre ÊTRE (to be) je suis (I am) nous sommes (we are)
ÊTRE To be (ou: n’être pas!).
Bienvenue Au monde des Pronoms.
Bienvenue Au monde des Pronoms.
Question formation In English, you can change a statement into a question by adding a helping verb (auxiliary): does he sing? do we sing? did they sing.
What’s the weather like?
Vouloir, Pouvoir, Être.
Transcription de la présentation:

Structures de données et algorithmes – TP7 Maria-Iuliana Dascalu, PhD

Ex. 1 Prenons un graphe non orienté, représentant un réseau social. Compte tenu d'un utilisateur, affichez tous ses amis (ou des informations sur ceux-ci) ayant le degré <= N (N est donnée). A est ami avec B s'il existe une arête entre A et B, nous disons que le degré de l'amitié est de 1. Amis de mes amis ont le degré d'amitié 2. En anglais: Let’s consider un undirected graph, representing a social network. Given an user, display all his friends (or information about them) having the degree <=N (N is given). A is friend with B if there is an edge between A and B; we say that the degree of friendship is 1. Friends of friends have the degree of friendship 2.

Ex. 2 Graphe est bipartite ou non? Vérifier si un graphe est bipartite et, si oui, afficher les éléments de ces deux ensembles A et B. Vérifiez votre code pour les graphes suivants: – G1=({ 1,2,3,4,5,6,7,8,9},{ 12, 13, 45, 56, 75, 24, 58, 79, 43, 89}) – G2=({ 1,2,3,4,5,6,7,8,9},{ 12, 13, 45, 56, 75, 24, 58, 79, 43, 89,47})

Tips In the mathematical field of graph theory, a bipartite graph (or bigraph) is a graph whose vertices can be divided into two disjoint sets and such that every edge connects a vertex in to one in ; that is, and are each independent sets. Equivalently, a bipartite graph is a graph that does not contain any odd- length cycles.(Wikipedia) Use BFS: ma/Algorithms/MyAlgorithms/Graph Algor/breadthSearch.htm Tous les exercices non résolus seront présentés lors de la prochaine fois.