Examples for Topological Sorting on Large DAGs

前端 未结 4 924

I am looking for real world applications where topological sorting is performed on large graph sizes.

Some fields where I image you cou

4条回答
  •  醉话见心
    2021-02-08 00:58

    The company where I work manages a (proprietary) database of software vulnerabilities and patches. Patches are typically issued by a software vendor (like Microsoft, Adobe, etc.) at regular intervals, and "new and improved" patches "supercede" older ones, in the sense that if you apply the newer patch to a host then the old patch is no longer needed.

    This gives rise to a DAG where each software patch is a node with arcs pointing to a node for each "superceding" patch. There are currently close to 10K nodes in the graph, and new patches are added every week.

    Topological sorting is useful in this context to verify that the graph contains no cycles - if they do arise then it means that there was either an error in the addition of a new DB record, or corruption was introduced by botched data replication between DB instances.

提交回复
热议问题