Skip to main content

Randomised algorithms for isomorphisms of simple types

  • JOSEPH (YOSSI) GIL (a1) and YOAV ZIBIN (a1)

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: (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


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.

Hide All
Agrawal, M., Kayal, N. and Saxena, N. (2002) PRIMES is in p. Technical report, Indian Institute of Technology, Kanpur.
Bruce, K. B., Di Cosmo, R. and Longo, G. (1991) Provable isomorphisms of types. Mathematical Structures in Computer Science 1 120.
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.
Considine, J. (2000) Deciding isomorphisms of simple types in polynomial time. Technical report, Computer Sciences Department, Boston University.
DiCosmo, R. Cosmo, R. (1995) Isomorphisms of types: from λ-calculus to information retrieval and language design, Birkhauser.
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.
Gurevič, R. (1985) Equational theory of positive numbers with exponentiation. American Mathmatical Society 94 (1)135141.
Pritchard, P. (1981) A sublinear additive sieve for finding prime number. Communications of the ACM 24 (1)1823.
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.
Schwartz, J. (1980) Fast probabilistic algorithms for verification of polynomial identities. JACM 27 (4)701717.
Soloviev, S. V. (1983) The category of finite sets and cartesian closed categories. Journal of Soviet Mathematics 22 (3)13871400.
Tarski, A. (1951) A Decision Method for Elementary Algebra and Geometry, 2nd edition, University of California Press.
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.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Mathematical Structures in Computer Science
  • ISSN: 0960-1295
  • EISSN: 1469-8072
  • URL: /core/journals/mathematical-structures-in-computer-science
Please enter your name
Please enter a valid email address
Who would you like to send this to? *


Full text views

Total number of HTML views: 0
Total number of PDF views: 9 *
Loading metrics...

Abstract views

Total abstract views: 62 *
Loading metrics...

* Views captured on Cambridge Core between September 2016 - 17th July 2018. This data will be updated every 24 hours.