English

Distances in and Layering of a DAG

Data Structures and Algorithms 2017-11-13 v2

Abstract

The diameter of an undirected unweighted graph G=(V,E)G=(V,E) is the maximum value of the distance from any vertex uu to another vertex vv for u,vVu,v \in V where distance i.e. d(u,v)d(u,v) is the length of the shortest path from uu to vv in GG. DAG, is a directed graph without a cycle. We denote the diameter of an unweighted DAG G=(V,E)G=(V,E) by δ(G)\delta (G). The stretch of a DAG GG is the length of longest path from uu to vv in GG, for all choices of (u,v)V(u, v) \in V denoted by Δ(G)\Delta (G). The diameter of an undirected graph can be computed in O(V(V+E))O(|V|(|V|+|E|)) time by executing breadth first search V|V| times. We show that stretch and diameter of a DAG can be computed in O(V+E)O(|V|+|E|) time and O(VE)O(|V||E|) time respectively. A DAG is balanced if and only if a consistent assignment of level numbers to all vertices is possible. Layering refers to such an assignment. A balanced DAG is defined. An efficient algorithm that either detects whether a given DAG is unbalanced or layers it otherwise is designed with a running time of O(V+E)O(|V|+|E|). \\ Key words: Diameter, directed acyclic graph, longest directed path, graph algorithms, complexity.

Keywords

Cite

@article{arxiv.1711.03256,
  title  = {Distances in and Layering of a DAG},
  author = {Bhadrachalam Chitturi and Priyanshu Das},
  journal= {arXiv preprint arXiv:1711.03256},
  year   = {2017}
}

Comments

4 Pages. Minor modification in the way affiliation is written. The time complexites of stretch and diameter are reversed. In big O notation V and E are changed to |V| and |E| respectively. The last sentence in the conclusion is rewritten