• Cite Icon13
  • https://doi.org/10.1016/j.scico.2021.102727Copy DOI Icon

Fast rule-based graph programs

Show More
  • Abstract
  • Highlights & Summary
  • PDF
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

• Rooted rules are essential for fast rule-based graph algorithms. • Cycle graphs, trees, binary DAGs can be recognised by graph reduction in linear time. • Topological sorting has a linear-time implementation in the rule-based language GP 2. • Depth-first search and 2-colouring have linear-time implementations in GP 2. Implementing graph algorithms efficiently in a rule-based language is challenging because graph pattern matching is expensive. In this paper, we present a number of linear-time implementations of graph algorithms in GP 2, an experimental programming language based on graph transformation rules which aims to facilitate program analysis and verification. We focus on two classes of rule-based graph programs: graph reduction programs which check some graph property, and programs using a depth-first search to test some property or perform an operation such as producing a 2-colouring or a topological sorting. Programs of the first type run in linear time without any constraints on input graphs while programs of the second type require input graphs of bounded degree to run in linear time. Essential for achieving the linear time complexity are so-called rooted rules in GP 2, which, in many situations, can be matched in constant time. For each of our programs, we prove both correctness and complexity, and also give empirical evidence for their runtime.

Loading PDF

Similar Papers
  • Conference Article
  • Citations21

I/O efficient

  • Jun 22, 2013
  • Zhiwei Zhang +4
  • Research Article
  • Citations29

Space Efficient Linear Time Algorithms for BFS, DFS and Applications

  • Jan 22, 2018
  • Theory of Computing Systems
  • Niranka Banerjee +3
  • Research Article
  • Citations25

Rooted Graph Programs

  • Nov 22, 2012
  • Technische Universität Berlin – Universitätsbibliothek
  • Detlef Plump +1
  • Single Book
  • Citations4

Combinatorial Optimization and Applications

  • Jan 01, 2013
  • Peter Widmayer +2
  • Research Article
  • Citations19

Finding multi-constrained feasible paths by using depth-first search

  • Jul 03, 2006
  • Wireless Networks
  • Zhenjiang Li +1
  • Research Article
  • Citations5

Algorithms for graphs with small octopus

  • Jul 24, 2003
  • Discrete Applied Mathematics
  • Fedor V Fomin +2
  • Research Article
  • Citations31

2-Edge Connectivity in Directed Graphs

  • Oct 10, 2016
  • ACM Transactions on Algorithms
  • Loukas Georgiadis +3
  • Research Article

Quantum walks reveal topological flat bands, robust edge states, and topological phase transitions in cyclic graphs

  • Mar 12, 2026
  • Physical review. B./Physical review. B
  • Dinesh Kumar Panda
  • Conference Article
  • Citations34

Towards overcoming the transitive-closure bottleneck: efficient parallel algorithms for planar digraphs

  • Jan 01, 1990
  • M.-Y Kao +1
  • PDF
  • Research Article
  • Citations13

Recursive State Machine Guided Graph Folding for Context-Free Language Reachability

  • Jun 06, 2023
  • Proceedings of the ACM on Programming Languages
  • Yuxiang Lei +3
  • Book Chapter
  • Citations11

Graph Transformation in Constant Time

  • Jan 01, 2006
  • Mike Dodds +1
  • Research Article
  • Citations108

Approximation Algorithms for Treewidth

  • Apr 02, 2008
  • Algorithmica
  • Eyal Amir
  • Book Chapter
  • Citations10

An Efficient Method for Indexing All Topological Orders of a Directed Graph

  • Jan 01, 2014
  • Yuma Inoue +1
  • Conference Article
  • Citations2

Flow network reduction for unique topological ordering

  • Jan 01, 1989
  • H Koh
  • Book Chapter
  • Citations9

On External-Memory Planar Depth-First Search

  • May 01, 2006
  • Lars Arge +3
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.