Randomised algorithms for isomorphisms of simple types

  • Authors:
  • Joseph (Yossi) Gil;Yoav Zibin

  • Affiliations:
  • Technion - Israel Institute of Technology, Technion City, Haifa, 32000, Israel;Technion - Israel Institute of Technology, Technion City, Haifa, 32000, Israel

  • Venue:
  • Mathematical Structures in Computer Science
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

We give the first linear time (randomised) algorithm for thefirst order isomorphism problem, that is, the isomorphism ofnon-recursive types involving product-and function-typeconstructors, under the axioms of commutativity and associativityof products, currying and distributivity of functions overproducts. This problem can also be thought of as the problem offormal equality-testing of multi-variate expressions involving onlymultiplications and exponentiation. Previous work gave adeterministic O(n log2n) time andO(n) space algorithm for the problem (n beingthe input size). Our specific contribution includes two randomisedalgorithms for the problem:(i) an O(n) time Monte Carlo algorithm(that is, with a small probability it may decide erroneously thatthe two types are isomorphic), and(ii)an O(n log n) expected time andO(n) space Las Vegas algorithm (that is, witha small probability it may execute long).The algorithms rely on a preprocessing stage, which computes thesequence of the first n primes in O(n logn/log log n) time and space.