Dijkstra Graphs

نویسندگان

  • Lucila M. S. Bento
  • Davidson R. Boccardo
  • Raphael Machado
  • Vinícius G. P. de Sá
  • Jayme Luiz Szwarcfiter
چکیده

We revisit a concept that has been central in some early stages of computer science, that of structured programming: a set of rules that an algorithm must follow in order to acquire a structure that is desirable in many aspects. While much has been written about structured programming, an important issue has been left unanswered: given an arbitrary, compiled program, describe an algorithm to decide whether or not it is structured, that is, whether it conforms to the stated principles of structured programming. We refer to the classical concept of structured programming, as described by Dijkstra. By employing a graph model and graph-theoretic techniques, we formulate an efficient algorithm for answering this question. To do so, we first introduce the class of graphs which correspond to structured programs, which we call Dijkstra Graphs. Our problem then becomes the recognition of such graphs, for which we present a greedy O(n)-time algorithm. Furthermore, we describe an isomorphism algorithm for Dijkstra graphs, whose complexity is also linear in the number of vertices of the graph. Both the recognition and isomorphism algorithms have potential important applications, such as in code similarity analysis.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Low-Stretch Spanning Tree on Benchmark Circuits

We show the testing results of Kruskal, Prim-Dijkstra for finding a low-stretch spanning tree for both unweighted graphs and weighted graphs transformed from benchmark circuits [1]. On unweighted graph, our implementation can get an average stretch of about 7 for all benchmark circuits. Kruskal’s algorithm gives good edge selection for finding short stretch edges, but does not work well for oth...

متن کامل

Hybrid Bellman-Ford-Dijkstra algorithm

Consider the single-source cheapest paths problem in a digraph with negative edge costs allowed. A hybrid of Bellman-Ford and Dijkstra algorithms is suggested, improving the running time bound upon Bellman-Ford for graphs with a sparse distribution of negative cost edges. The algorithm iterates Dijkstra several times without reinitializing values d(v) at vertices. At most k+2 executions of Dijk...

متن کامل

Design and analysis of sequential and parallel single-source shortest-paths algorithms

We study the performance of algorithms for the Single-Source Shortest-Paths (SSSP) problem on graphs with nodes and edges with nonnegative random weights. All previously known SSSP algorithms for directed graphs required superlinear time. We give the first SSSP algorithms that provably achieve linear average-case execution time on arbitrary directed graphs with random edge weights. For independ...

متن کامل

Calculating a Relational Program for Transitive Reductions of Strongly Connected Graphs

Based on a generic program for computing minimal sets, we present a simple relational program for computing transitive reductions of strongly connected directed graphs. It uses a precomputation phase and can easily be implemented in quadratic running time. The presentation is done as an exercise in generic programming and for combining the Dijkstra-Gries method and relational algebra to derive ...

متن کامل

Shortest Paths in Euclidean Graphs (Extended Abstract)

We analyze a simple method for finding shortest paths in Euclidean graphs (where vertices are points in a Euclidean space and edge weights are distances between points). For many graph models, the running time of the algorithm to find the shortest path between a specified pair of vertices in a graph with V vertices and E edges is shown to be O ( V ) as compared with O(V1ogV + E ) required by th...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1602.08653  شماره 

صفحات  -

تاریخ انتشار 2016