No cache version.

Caching disabled. Default setting for this page:enabled (code LNG204)
If the display is too slow, you can disable the user mode to view the cached version.

Niveaux des graphes

La décomposition en niveaux nous fournit un ordre topologique pour le graphe, puisque nous pouvons considérer les sommets "de haut en bas" (comparer les niveaux des sommets).

La décomposition en niveaux n'est possible que si le graphe ne possède pas de circuit.
Cela peut se démontrer de la manière suivante :

  • soient x et y deux sommets d'un mê;me circuit, avec les arcs (x,y) et  (y,x)
  • Selon l'arc (x,y), nous définissons le niveau de x à 01 et le niveau de y à 1.
  • Ensuite, selon l'arc (y,x), le niveau de y doit être inférieur au niveau de x, mais ces niveaux ont déjà été définis, et 1 < 0 est faux.

Algorithme de décomposition en niveaux

  1. //initialisation
  2. x : level[x] := -1;
  3. x : deg[x] := degré intérieur de x;
  4. := 0;
  5. //décomposition possible
  6. decomp := true;
  7.  
  8. //exécution
  9. tant_que  x : level[x] = -1 decomp faire
  10.  
  11. decomp :=false;
  12.  
  13. // ∀ sommet non traité
  14. x : deg[x] = 0 level[x] = -1 faire
  15.  
  16. // positionner x sur le niveau courant
  17. level[x] := k;
  18.  
  19. // poursuivre la décomposition
  20. decomp := true;
  21.  
  22. fin
  23.  
  24. // ∀ sommet de ce niveau
  25. x : level[x] = k faire
  26.  
  27. // ∀ sommet y incident au sommet x
  28. // rappel : A est l'ensemble des arcs
  29. y : (x,y)  A
  30.  
  31. // retirer le sommet car il est traité
  32. // => diminuer le degré intérieur
  33. deg[y] := deg[y]-1;
  34.  
  35. fin
  36.  
  37. // changer de niveau
  38. := k+1;
  39.  
  40. fin
  41.  

Complexité

La complexité de l'algorithme de décomposition en niveaux est de Ordre de grandeur(n2), bien que les deux imbriqués laissent présumer une complexité de Ordre de grandeur(n3).

English translation

You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.

If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.

Thank you in advance.

Document created the 03/01/2010, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/graphes-decomposition-niveaux.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

Notes

  1.  Numérotation des niveaux : La numérotation des niveaux débute à zéro.

Contents Haut

References

  1. book Language of the document:fr INFOB321 - Théorie des graphes : JP Leclercq, Cours de Théorie des Graphes et réseaux de Petri (September 2008)

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.

Contents Haut