Complexity of recursive production rules execution

  • Luc Albert
  • Mireille Régnier
Deductive Database
Part of the Lecture Notes in Computer Science book series (LNCS, volume 495)


This paper addresses the problem of evaluating recursive production rules, and deriving the size of created relations and the execution time. We present an approach based on graph modelling. We show on some elementary recursive rules the power of this method. We assume a realistic probabilistic model, i.e. the data distributions of the relations involved may be dependent and non-uniform. Under smooth hypotheses, we introduce a notion of “maximum state” quickly attained for each rule. This study allows for algorithmic optimizations for Data Bases or Knowledge Base Systems implementations.


Recursive production rules Datalog programs data bases knowledge base systems RETE algorithm performances graphs 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [Alb89]
    L. Albert. Average case complexity analysis of rete pattern match algorithm and average size of join in databases. In FST & TCS, volume 405, pages 223–241. Springer Verlag, 1989. In Proceedings of the 9th conference on Foundations of Software Technology and Theoretical Computer Science, Bangalore, India.Google Scholar
  2. [Alb90]
    L. Albert. Quelques analyses de complexité en moyenne sur les algorithmes de multifiltrage, d'unification et de requêtes multiples. Doctorat en sciences, Université de Paris-Sud, Orsay, 1990.Google Scholar
  3. [AS90]
    S. Abiteboul and E. Simon. Fundamental properties of deterministic and non deterministic extensions of Datalog, 1990. to appear in Theoretical Computer Science.Google Scholar
  4. [AV88]
    S. Abiteboul and V. Vianu. Datalog extensions for database queries and updates., 1988. to appear Journal of Computer and Systems Science.Google Scholar
  5. [Ban85]
    F. Bancilhon. Naive evaluation of recursively defined relations. In M. Brodie and J. Mylopoulos, editors, On Knowledge Base Management Systems. Springer Verlag, 1985.Google Scholar
  6. [Bol85]
    B. Bollobas. Random Graphs. Academic Press, 1985.Google Scholar
  7. [For82]
    C. Forgy. Rete, a fast algorithm for the many patterns many objects match problem. J. Artificial Intelligence, 19:17–37, 1982.Google Scholar
  8. [Gar89]
    D. Gardy. Bases de Données, allocations aléatoires: quelques analyses de performances. Doctorat ès sciences, Université de Paris-Sud, Orsay, 1989.Google Scholar
  9. [GP90]
    D. Gardy and C. Puech. On the effect of join operations on relation sizes, 1990. to appear in ACM Transactions On Database Systems.Google Scholar
  10. [KA89]
    P. Kanellakis and S. Abiteboul. Deciding bounded recursion in database logic programs. Sigact News, 20(4), 1989.Google Scholar
  11. [Kan88]
    P. Kanellakis. Elements of a relational database theory. technical report, Brown Univ., 1988. to appear as a chapter in Handbook of Theoretical Computer Science.Google Scholar
  12. [Mir87]
    P. Miranker. Treat: A better match algorithm for AI production systems. 1987. In Proceedings of the 1987 National Conference on Artificial Intelligence. Seattle, Washington, 1987.Google Scholar
  13. [RS89]
    M. Régnier and E. Simon. Efficient evaluation of rules in a DBMS. In BD3 89, pages 131–154. INRIA, 1989. Proc. 6-emes Journées Bases de Données Avancées, Geneve.Google Scholar
  14. [Sed88]
    R. Sedgewick. Algorithms. 2-nd Edition, Addison-Wesley, Reading, Mass., 1988.Google Scholar
  15. [Ull88]
    J. Ullman. Principles of Database and Knowledge Systems, volume 1. Computer Science Press, 1988.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1991

Authors and Affiliations

  • Luc Albert
    • 1
  • Mireille Régnier
    • 1
  1. 1.INRIA-78 153Le ChesnayFrance

Personalised recommendations