Article de reference

Reachability

In graph theory , reachability refers to the ability to get from one vertex to another within a graph. A vertex s {\displaystyle s} can reach a vertex t {\displaystyle t} (and t...

In graph theory, reachability refers to the ability to get from one vertex to another within a graph. A vertex

In an undirected graph, reachability between all pairs of vertices can be determined by identifying the connected components of the graph. Any pair of vertices in such a graph can reach each other if and only if they belong to the same connected component; therefore, in such a graph, reachability is symmetric (

Definition

For a directed graph

If cannot reach not acyclic (i.e. it contains at least one cycle), then its reachability relation will correspond to a preorder instead of a partial order.

Algorithms

Algorithms for determining reachability fall into two classes: those that require preprocessing and those that do not.

If you have only one (or a few) queries to make, it may be more efficient to forgo the use of more complex data structures and compute the reachability of the desired pair directly. This can be accomplished in linear time using algorithms such as breadth first search or iterative deepening depth-first search.

If you will be making many queries, then a more sophisticated method may be used; the exact choice of method depends on the nature of the graph being analysed. In exchange for preprocessing time and some extra storage space, we can create a data structure which can then answer reachability queries on any pair of vertices in as low as

Floyd–Warshall Algorithm

The Floyd–Warshall algorithm can be used to compute the transitive closure of any directed graph, which gives rise to the reachability relation as in the definition, above.

The algorithm requires

Thorup's Algorithm

For planardigraphs, a much faster method is available, as described by Mikkel Thorup in 2004. This method can answer reachability queries on a planar graph in

The overall approach is to associate with each vertex a relatively small set of so-called separator paths such that any path from a vertex

Given a graph from the previous step (starting with just to the previous step until all vertices have been assigned to a layer. By construction of the layers, every vertex appears at most two layers, and every directed path, or dipath, in

The graph is then re-expressed as a series of digraphs

For each

For each via

Every vertex is labelled as above for each step of the recursion which builds

In summarizing the analysis of this method, first consider that the layering approach partitions the vertices so that each vertex is considered only

Kameda's Algorithm

A suitable digraph for Kameda's method with
The same graph as above after Kameda's algorithm has run, showing the DFS labels for each vertex

An even faster method for pre-processing, due to T. Kameda in 1975, can be used if the graph is planar, acyclic, and also exhibits the following additional properties: all 0-indegree and all 0-outdegree vertices appear on the same face (often assumed to be the outer face), and it is possible to partition the boundary of that face into two parts such that all 0-indegree vertices appear on one part, and all 0-outdegree vertices appear on the other (i.e. the two types of vertices do not alternate).

If

Le prétraitement effectue les étapes suivantes. Nous ajoutons un nouveau sommet.

Une fois terminé,

Le principal résultat de cette méthode est donc que

Problèmes connexes

Un problème connexe consiste à résoudre les requêtes d'accessibilité avec un certain nombre

Un autre problème lié aux requêtes d'accessibilité concerne le recalcul rapide des relations d'accessibilité lorsqu'une partie du graphe est modifiée. Par exemple, cela pose un problème important pour le ramasse-miettes , qui doit trouver un équilibre entre la récupération de la mémoire (afin qu'elle puisse être réallouée) et les impératifs de performance de l'application en cours d'exécution.

Plus d articles de Worldlex Wiki

Revenez a l index pour explorer davantage de pages sur l histoire, la science, la culture, la geographie et la societe en francais.

Explorer l index