Abstract
We discuss how much space is sufficient to decide whether a unary number n is a prime. We show that O(log log n) space is sufficient for a deterministic Turing machine, if it is equipped with an additional pebble movable along the input tape, and also for an alternating machine, if the space restriction applies only to its accepting computation subtrees. That is, un-Primes is in pebble-DSPACE(log log n) and also in accept-ASPACE(log log n), where un-primes={1n:n is a prime}. Moreover, if the given n is composite, such machines are able to find a divisor of n. Since O(log log n) space is too small to write down a divisor which might require Ω(log n) bits, the witness divisor is indicated by the input head position at the moment when the machine halts.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Agrawal, M., Kayal, N., Saxena, N.: Primes is in P. Ann. of Math. 160, 781–793 (2004)
Allender, E.: The division breakthroughs. Bull. Eur. Assoc. Theoret. Comput. Sci. 74, 61–77 (2001)
Allender, E., Mix Barrington, D.A., Hesse, W.: Uniform circuits for division: Consequences and problems. In: Proc. IEEE Conf. Comput. Complexity, pp. 150–159 (2001)
Bertoni, A., Mereghetti, C., Pighizzini, G.: Strong optimal lower bounds for Turing machines that accept nonregular languages. In: Hájek, P., Wiedermann, J. (eds.) MFCS 1995. LNCS, vol. 969, pp. 309–318. Springer, Heidelberg (1995)
Chandra, A.K., Kozen, D.C., Stockmeyer, L.J.: Alternation. J. Assoc. Comput. Mach. 28, 114–133 (1981)
Chang, J.H., Ibarra, O.H., Palis, M.A., Ravikumar, B.: On pebble automata. Theoret. Comput. Sci. 44, 111–121 (1986)
Chang, R., Hartmanis, J., Ranjan, D.: Space bounded computations: Review and new separation results. Theoret. Comput. Sci. 80, 289–302 (1991)
Chiu, A.: Complexity of Parallel Arithmetic Using The Chinese Remainder Representation. Master’s thesis, Univ. Wisconsin-Milwaukee (G. Davida, supervisor) (1995)
Chiu, A., Davida, G., Litow, B.: Division in logspace-uniform NC 1. RAIRO Inform. Théor. Appl. 35, 259–275 (2001)
Davida, G.I., Litow, B.: Fast parallel arithmetic via modular representation. SIAM J. Comput. 20, 756–765 (1991)
Dietz, P.F., Macarie, I.I., Seiferas, J.I.: Bits and relative order from residues, space efficiently. Inform. Process. Lett. 50, 123–127 (1994)
Ellison, W., Ellison, F.: Prime Numbers. John Wiley & Sons, Chichester (1985)
Geffert, V.: Nondeterministic computations in sublogarithmic space and space constructibility. SIAM J. Comput. 20, 484–498 (1991)
Iwama, K.: ASPACE(o(loglogn)) is regular. SIAM J. Comput. 22, 136–146 (1993)
Koblitz, N.: A Course in Number Theory and Cryptography. Graduate Texts in Mathematics, vol. 114. Springer, Heidelberg (1994)
Macarie, I.I.: Space-efficient deterministic simulation of probabilistic automata. In: Enjalbert, P., Mayr, E.W., Wagner, K.W. (eds.) STACS 1994. LNCS, vol. 775. Springer, Heidelberg (1994)
Mereghetti, C.: The descriptional power of sublogarithmic resource bounded Turing machines. In: Proc. Descr. Compl. Formal Syst., pp. 12–26. IFIP (2007) (to appear in J. Automat. Lang. Combin.)
Szepietowski, A.: Turing Machines with Sublogarithmic Space. LNCS, vol. 843. Springer, Heidelberg (1994)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2009 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Geffert, V., Pardubská, D. (2009). Factoring and Testing Primes in Small Space. In: Nielsen, M., Kučera, A., Miltersen, P.B., Palamidessi, C., Tůma, P., Valencia, F. (eds) SOFSEM 2009: Theory and Practice of Computer Science. SOFSEM 2009. Lecture Notes in Computer Science, vol 5404. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-95891-8_28
Download citation
DOI: https://doi.org/10.1007/978-3-540-95891-8_28
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-95890-1
Online ISBN: 978-3-540-95891-8
eBook Packages: Computer ScienceComputer Science (R0)