{"title":"The complexity of revising logic programs","authors":"Russell Greiner","doi":"10.1016/S0743-1066(99)00021-7","DOIUrl":null,"url":null,"abstract":"<div><p>A rule-based program will return a set of answers to each query. An <em>impure</em> program, which includes the Prolog <span>cut</span> “!” and “<span>not(</span>·<span>)</span>” operators, can return different answers if its rules are re-ordered. There are also many reasoning systems that return only the <em>first</em> answer found for each query; these first answers, too, depend on the rule order, even in pure rule-based systems. A theory revision algorithm, seeking a revised rule-base whose <em>expected accuracy</em>, over the distribution of queries, is optimal, should therefore consider modifying the order of the rules. This paper first shows that a polynomial number of training “labeled queries” (each a query paired with its correct answer) provides the distribution information necessary to identify the optimal ordering. It then proves, however, that the task of determining which ordering is optimal, once given this distributional information, is intractable even in trivial situations; e.g., even if each query is an atomic literal, we are seeking only a “perfect” theory, and the rule base is propositional. We also prove that this task is not even approximable: Unless P=NP, no polynomial time algorithm can produce an ordering of an <em>n</em>-rule theory whose accuracy is within <em>n</em><sup><em>γ</em></sup> of optimal, for some <em>γ</em>>0. We next prove similar hardness and non-approximatability, results for the related tasks of determining, in these impure contexts, (1) the optimal <em>ordering of the antecedents</em>; (2) the optimal set of <em>new rules to add</em> and (3) the optimal set of <em>existing rules to delete</em>.</p></div>","PeriodicalId":101236,"journal":{"name":"The Journal of Logic Programming","volume":"40 2","pages":"Pages 273-298"},"PeriodicalIF":0.0000,"publicationDate":"1999-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1016/S0743-1066(99)00021-7","citationCount":"6","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"The Journal of Logic Programming","FirstCategoryId":"1085","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0743106699000217","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 6
Abstract
A rule-based program will return a set of answers to each query. An impure program, which includes the Prolog cut “!” and “not(·)” operators, can return different answers if its rules are re-ordered. There are also many reasoning systems that return only the first answer found for each query; these first answers, too, depend on the rule order, even in pure rule-based systems. A theory revision algorithm, seeking a revised rule-base whose expected accuracy, over the distribution of queries, is optimal, should therefore consider modifying the order of the rules. This paper first shows that a polynomial number of training “labeled queries” (each a query paired with its correct answer) provides the distribution information necessary to identify the optimal ordering. It then proves, however, that the task of determining which ordering is optimal, once given this distributional information, is intractable even in trivial situations; e.g., even if each query is an atomic literal, we are seeking only a “perfect” theory, and the rule base is propositional. We also prove that this task is not even approximable: Unless P=NP, no polynomial time algorithm can produce an ordering of an n-rule theory whose accuracy is within nγ of optimal, for some γ>0. We next prove similar hardness and non-approximatability, results for the related tasks of determining, in these impure contexts, (1) the optimal ordering of the antecedents; (2) the optimal set of new rules to add and (3) the optimal set of existing rules to delete.