## Notre Dame Journal of Formal Logic

### NP-Completeness of a Combinator Optimization Problem

#### Abstract

We consider a deterministic rewrite system for combinatory logic over combinators $S,K,I,B,C,S',B'$, and $C'$. Terms will be represented by graphs so that reduction of a duplicator will cause the duplicated expression to be "shared" rather than copied. To each normalizing term we assign a weighting which is the number of reduction steps necessary to reduce the expression to normal form. A lambda-expression may be represented by several distinct expressions in combinatory logic, and two combinatory logic expressions are considered equivalent if they represent the same lambda-expression (up to $\beta$-$\eta$-equivalence). The problem of minimizing the number of reduction steps over equivalent combinator expressions (i.e., the problem of finding the "fastest running" combinator representation for a specific lambda-expression) is proved to be NP-complete by reduction from the "Hitting Set" problem.

#### Article information

Source
Notre Dame J. Formal Logic, Volume 36, Number 2 (1995), 319-335.

Dates
First available in Project Euclid: 18 December 2002

https://projecteuclid.org/euclid.ndjfl/1040248462

Digital Object Identifier
doi:10.1305/ndjfl/1040248462

Mathematical Reviews number (MathSciNet)
MR1345752

Zentralblatt MATH identifier
0837.03015

#### Citation

Joy, M. S.; Rayward-Smith, V. J. NP-Completeness of a Combinator Optimization Problem. Notre Dame J. Formal Logic 36 (1995), no. 2, 319--335. doi:10.1305/ndjfl/1040248462. https://projecteuclid.org/euclid.ndjfl/1040248462

#### References

• Barendregt, H. P., The Lambda Calculus, its Syntax and Semantics, North-Holland, Amsterdam, 1981. Zbl 0467.03010 MR 83b:03016
• Batini, C., and A. Pettorossi, Some Properties of Subbases in Weak Combinatory Logic, Report 75–04, Istituto di Automatica, Roma, 1975.
• Clarke, T. J. W., P. J. S. Gladstone, C. D. MacLean and A. C. Norman, “SKIM–-The S,K,I Reduction Machine” in Conference Record of the 1980 LISP Conference, Stanford University, 1980.
• Curry, H. B., W. Craig and R. C. Feys, Combinatory Logic, vol. 1, North-Holland, Amsterdam, 1958. Zbl 0081.24104 MR 20:817
• Curry, H. B., J. R. Hindley and J. P. Seldin, Combinatory Logic, vol. 2, North-Holland, Amsterdam, 1972. Zbl 0242.02029
• Garey, M. R., and D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, W. H. Freeman, San Francisco, 1979. Zbl 0411.68039 MR 80g:68056
• Glaser, H., C. Hankin and D. Till, Principles of Functional Programming, Prentice-Hall, Englewood Cliffs, 1984. Zbl 0649.68002 MR 88i:68007
• Hindley, J. R., and J. P. Seldin, Introduction to Combinators and $\lambda$-Calculus, Cambridge University Press, Cambridge, 1986. Zbl 0614.03014 MR 88j:03009
• Joy, M. S., On the Efficient Implementation of Combinators as an Object Code for Functional Programs, PhD Thesis, University of East Anglia, Norwich, 1985.
• Joy, M. S., V. J. Rayward-Smith and F. W. Burton, “Efficient combinator code,” Computer Languages, vol. 10 (1985), pp. 221–224.
• Kennaway, J. R., “The complexity of a translation of $\lambda$-calculus to combinators,” Internal Report CS/82/023/E, University of East Anglia, Norwich, 1982.
• Klop, J. W., Combinatory Reduction Systems, Mathematisch Centrum, Amsterdam, 1980. Zbl 0466.03006 MR 83e:03026
• Stoye, W. R., “The implementation of functional languages using custom hardware,” Technical Report 81, University of Cambridge Computer Laboratory, Cambridge, 1985.
• Turner, D. A., “Another algorithm for bracket abstraction,” The Journal of Symbolic Logic, vol. 44, (1979), pp. 67–70. Zbl 0408.03013 MR 80f:03021
• Turner, D. A., “A new implementation technique for applicative languages,” Software–-Practice and Experience, vol. 9 (1979), pp. 31–49. Zbl 0386.68009
• Turner, D. A., “Combinator reduction machines,” in Proceedings of the International Workshop on High Level Computer Architecture, Los Angeles, 1984.