Greedy Algorithms in Datalog
Sergio Greco, Carlo Zaniolo
Abstract
In the design of algorithms, the greedy paradigm provides a powerful tool for solving efficiently classical computational problems, within the framework of procedural languages. However, expressing these algorithms within the declarative framework of logic-based languages has proven a difficult research challenge. In this paper, we extend the framework of Datalog-like languages to obtain simple declarative formulations for such problems, and propose effective implementation techniques to ensure computational complexities comparable to those of procedural formulations. These advances are achieved through the use of the "choice" construct, extended with preference annotations to effect the selection of alternative stable-models and nondeterministic fixpoints. We show that, with suitable storage structures, the differential fixpoint computation of our programs matches the complexity of procedural algorithms in classical search and optimization problems.
Create a lesson
Related papers
Resolution limits for process comparison from event data
Antony R. Lee, Peter Tiňo, Iain B. Styles
A Functional Pilot for Certified Freshness-Aware Semantic--Spatial Range Retrieval
Taimoor Ahmad
Efficiently Linking Unstructured Data for Multi-step Reasoning
Jiaming Liang, Haydn Jones, Jacob R. Gardner et al.
Distribution-Aware Distributed Database Testing (Extended Version)
Zhou Zhou, Si Liu, Hengfeng Wei et al.
Linking Speakers of the German Parliament to Wikidata: Scope and Coverage of Metadata
Thomas Haider, Arne Cypionka, Maximilian Teich
How Can We Shrink the Family of Test Databases? Query Containment with Nulls and Comparisons
Helen Sternbach, Sara Cohen