Hostname: page-component-8448b6f56d-c47g7 Total loading time: 0 Render date: 2024-04-19T04:22:29.479Z Has data issue: false hasContentIssue false

Randomised algorithms for isomorphisms of simple types

Published online by Cambridge University Press:  01 June 2007

JOSEPH (YOSSI) GIL
Affiliation:
Technion – Israel Institute of Technology, Technion City, Haifa, 32000, Israel Email: yogi@cs.technion.ac.il, zyoav@cs.technion.ac.il
YOAV ZIBIN
Affiliation:
Technion – Israel Institute of Technology, Technion City, Haifa, 32000, Israel Email: yogi@cs.technion.ac.il, zyoav@cs.technion.ac.il

Abstract

We give the first linear time (randomised) algorithm for the first order isomorphism problem, that is, the isomorphism of non-recursive types involving product- and function-type constructors, under the axioms of commutativity and associativity of products, currying and distributivity of functions over products. This problem can also be thought of as the problem of formal equality-testing of multi-variate expressions involving only multiplications and exponentiation. Previous work gave a deterministic O(n log2n) time and O(n) space algorithm for the problem (n being the input size). Our specific contribution includes two randomised algorithms for the problem:

  1. (i) an O(n) time Monte Carlo algorithm (that is, with a small probability it may decide erroneously that the two types are isomorphic), and

  2. (ii) an O(n log n) expected time and O(n) space Las Vegas algorithm (that is, with a small probability it may execute long).

The algorithms rely on a preprocessing stage, which computes the sequence of the first n primes in O(n log n/log log n) time and space.

Type
Paper
Copyright
Copyright © Cambridge University Press 2007

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Agrawal, M., Kayal, N. and Saxena, N. (2002) PRIMES is in p. Technical report, Indian Institute of Technology, Kanpur.Google Scholar
Bruce, K. B., Di Cosmo, R. and Longo, G. (1991) Provable isomorphisms of types. Mathematical Structures in Computer Science 1 120.Google Scholar
Chen, Z.-Z. and Kao, M.-Y. (1997) Reducing randomness via irrational numbers. In: Proceedings of the 29th annual ACM symposium on Theory of computing, ACM Press 200209.Google Scholar
Considine, J. (2000) Deciding isomorphisms of simple types in polynomial time. Technical report, Computer Sciences Department, Boston University.Google Scholar
DiCosmo, R. Cosmo, R. (1995) Isomorphisms of types: from λ-calculus to information retrieval and language design, Birkhauser.Google Scholar
Dietzfelbinger, M., Karlin, A. R., Mehlhorn, K., Meyer auf der Heide, F., Rohnert, H. and Tarjan, R. E. (1994) Dynamic perfect hashing: Upper and lower bounds. SIAM Journal on Computing 23 (4)738761.CrossRefGoogle Scholar
Gurevič, R. (1985) Equational theory of positive numbers with exponentiation. American Mathmatical Society 94 (1)135141.Google Scholar
Pritchard, P. (1981) A sublinear additive sieve for finding prime number. Communications of the ACM 24 (1)1823.CrossRefGoogle Scholar
Rittri, M. (1990) Retrieving library identifiers via equational matching of types. In: Stickel, M. E. (ed.) Proc. of the 10th International Conference on Automated Deduction (CADE'90). Springer-Verlag Lecture Notes in Computer Science 449 603–61.CrossRefGoogle Scholar
Schwartz, J. (1980) Fast probabilistic algorithms for verification of polynomial identities. JACM 27 (4)701717.CrossRefGoogle Scholar
Soloviev, S. V. (1983) The category of finite sets and cartesian closed categories. Journal of Soviet Mathematics 22 (3)13871400.CrossRefGoogle Scholar
Tarski, A. (1951) A Decision Method for Elementary Algebra and Geometry, 2nd edition, University of California Press.CrossRefGoogle Scholar
Zibin, Y., Gil, J. and Considine, J. (2003) Efficient algorithms for isomorphisms of simple types. In: Proc. of the 30th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL'03), ACM Press 160171.CrossRefGoogle Scholar