Accessibility query based on the number of two-dimensional Topologies

Source: Internet
Author: User
1. in a directed acyclic graph, the Accessibility query r (u, v) indicates whether there is a path between u and v. When there is a path between u and v, r (u, v) returns true, that is, u to v is reachable; otherwise, false is returned, that is, not reachable. Any directed graph can be converted to a directed acyclic graph. For details about the conversion method, see blog. csdn. netwoniu317art.

1. in a directed acyclic graph, the Accessibility query r (u, v) indicates whether there is a path between u and v. When there is a path between u and v, r (u, v) returns true, that is, u to v is reachable; otherwise, false is returned, that is, not reachable. Any directed graph can be converted to a directed graph without loops. For detailed conversion method, see

1. Basic Concepts

In a directed acyclic graph, r (u, v) indicates whether there is a path between u and v. When there is a path between u and v, r (u, v) returns true, that is, u to v is reachable; otherwise, false is returned, that is, not reachable.

Any directed graph can be converted to a directed acyclic graph. For detailed conversion methods, see (http://blog.csdn.net/woniu317/article/details/23658301 ). After the nodes in the same strongly connected component are converted, the nodes become a node. When querying the accessibility, You can first convert them to nodes in the acyclic graph and then query them. Therefore, you only need to study Directed Acyclic graphs for all accessible queries.

2. Basic Ideas

To analyze any topology sequence of an image, you can obtain the following information:

If the node u reaches the node v, the topological sequence number of the u must be smaller than that of the v. That is to say, when the topological sequence number of the node u is greater than that of the v, then u cannot reach v.

As shown in Table 2-1, T1 is a topological sequence of the graph. For example, a to h can be reached, a's serial number is less than h's serial number; g's serial number is greater than h's serial number, so g cannot be h, which can be verified from-1. It is worth noting that even if the serial number of u is smaller than the serial number of v, u may not necessarily reach v, such as node a and B.

It is not difficult to find that there are many node pairs that cannot be trimmed using the topological order in table 2-1, such as (a, B), (a, g), (a, f ). The same situation occurs even if you change the topological order. Therefore, it is better to use both topological order for trimming. But how to obtain the two topological orders so that the pruning effect is better than the NPC problem, so we use an approximate method to obtain the second topological sequence.

-1 Figure G

Table 2-1-1 topological Sequence

Examples/examples/templates/JtO/Q1LLp0a88L2gzPgo8cD6/ybtv0nsy6dgvssntw8nusjtxc/IsenA + templates/templates = "center">

-1 accessibility query Flowchart

References

ReachabilityQueries in Very Large Graphs A Fast Refined Online Search Approach

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.