### Abstract

An approximation paradigm is proposed for logic programming as a simple modification to a complete evaluation strategy. The motivational example illustrates how a straightforward transformation of a declarative specification of the distance between two vertices in a directed graph leads to sophisticated algorithms for computing shortest paths. The goal of the work presented in this paper is not to provide a more efficient computation of shortest paths but to investigate how the intermediate tables, known as extension tables, generated by the complete evaluation strategy might be used in approximation algorithms. We present the ET_{distance} algorithm, which computes single-source and all-pairs shortest paths over a declarative logic program. The ET_{distance} algorithm takes advantage of the dynamic programming property of shortest paths and the ability of extension tables to store global information to converge to the optimal solution. To put the ET_{distance} algorithm in perspective, its execution is compared to those of Dijkstra's single-source and Floyd's all-pairs shortest path algorithms.

Original language | English (US) |
---|---|

Pages (from-to) | 119-137 |

Number of pages | 19 |

Journal | ACM letters on programming languages and systems |

Volume | 1 |

Issue number | 2 |

DOIs | |

State | Published - Jun 1992 |

### Fingerprint

### ASJC Scopus subject areas

- Engineering(all)

### Cite this

**Shortest path by approximation in logic programs.** / Dietrich, Suzanne.

Research output: Contribution to journal › Article

*ACM letters on programming languages and systems*, vol. 1, no. 2, pp. 119-137. https://doi.org/10.1145/151333.151377

}

TY - JOUR

T1 - Shortest path by approximation in logic programs

AU - Dietrich, Suzanne

PY - 1992/6

Y1 - 1992/6

N2 - An approximation paradigm is proposed for logic programming as a simple modification to a complete evaluation strategy. The motivational example illustrates how a straightforward transformation of a declarative specification of the distance between two vertices in a directed graph leads to sophisticated algorithms for computing shortest paths. The goal of the work presented in this paper is not to provide a more efficient computation of shortest paths but to investigate how the intermediate tables, known as extension tables, generated by the complete evaluation strategy might be used in approximation algorithms. We present the ETdistance algorithm, which computes single-source and all-pairs shortest paths over a declarative logic program. The ETdistance algorithm takes advantage of the dynamic programming property of shortest paths and the ability of extension tables to store global information to converge to the optimal solution. To put the ETdistance algorithm in perspective, its execution is compared to those of Dijkstra's single-source and Floyd's all-pairs shortest path algorithms.

AB - An approximation paradigm is proposed for logic programming as a simple modification to a complete evaluation strategy. The motivational example illustrates how a straightforward transformation of a declarative specification of the distance between two vertices in a directed graph leads to sophisticated algorithms for computing shortest paths. The goal of the work presented in this paper is not to provide a more efficient computation of shortest paths but to investigate how the intermediate tables, known as extension tables, generated by the complete evaluation strategy might be used in approximation algorithms. We present the ETdistance algorithm, which computes single-source and all-pairs shortest paths over a declarative logic program. The ETdistance algorithm takes advantage of the dynamic programming property of shortest paths and the ability of extension tables to store global information to converge to the optimal solution. To put the ETdistance algorithm in perspective, its execution is compared to those of Dijkstra's single-source and Floyd's all-pairs shortest path algorithms.

UR - http://www.scopus.com/inward/record.url?scp=0026875110&partnerID=8YFLogxK

UR - http://www.scopus.com/inward/citedby.url?scp=0026875110&partnerID=8YFLogxK

U2 - 10.1145/151333.151377

DO - 10.1145/151333.151377

M3 - Article

AN - SCOPUS:0026875110

VL - 1

SP - 119

EP - 137

JO - ACM letters on programming languages and systems

JF - ACM letters on programming languages and systems

SN - 1057-4514

IS - 2

ER -