Listing triangles is a fundamental graph problem with many applications, and large graphs require fast algorithms. Vertex ordering allows the orientation of edges from lower to higher vertex indices, and state-of-the-art triangle listing algorithms use this to accelerate their execution and to bound their time complexity. Yet, only basic orderings have been tested. In this paper, we show that studying the precise cost of algorithms instead of their bounded complexity leads to faster solutions. We introduce cost functions that link ordering properties with the running time of a given algorithm. We prove that their minimization is NP-hard and propose heuristics to obtain new orderings with different trade-offs between cost reduction and ordering time. Using datasets with up to two billion edges, we show that our heuristics accelerate the listing of triangles by an average of 38% when the ordering is already given as an input, and 16% when the ordering time is included.
翻译:列出三角形是许多应用程序的基本图表问题, 大图需要快速算法 。 Vertex 排序允许从低到高的顶端指数定向, 以及最先进的三角列表算法使用它来加速执行并约束时间复杂性 。 然而, 仅测试了基本排序 。 在本文中, 我们显示, 研究算法的精确成本而不是其交错复杂度会导致更快的解决方案 。 我们引入了将属性排序与特定算法运行时间联系起来的成本函数 。 我们证明它们最小化是硬化的, 并提出了在降低成本和订购时间之间进行不同权衡的新排序。 我们使用高达20亿个边缘的数据集, 我们显示, 当订单已经作为输入时, 我们的偏差加速三角形排列平均为38%, 在包括定序时间时为16% 。