Counting, selecting, and sorting by query-bounded machines

  • Albrecht Hoene
  • Arfst Nickelsen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 665)


We study the query-complexity of counting, selecting, and sorting functions. That is, for a given set A and a positive integer k, we ask, how many queries to an arbitrary oracle does a polynomial-time machine on input (x1, x2,..., x k ) need to determine how many strings of the input are in A. We also ask how many queries are necessary to select a string in A from the input (x1, x2,..., x k ) if such a string exists and to sort the input (x1, x2,..., x k ) with respect to the ordering xy if and only if x ∈ Ay ∈ A. We obtain optimal query-bounds for these problems, and show that sets for which these functions have a low query-complexity must be easy in some sense. For such sets we obtain optimal placements in the extended low hierarchy. We also show that in the case of NP-complete sets the lower bounds for counting and selecting hold unless P=NP. Finally, we relate these notions to cheatability and p-superterseness. Our results yield as corollaries extensions of previously know results.


Selector Function Query Tree Pruning Step Sorting Function SlAM Journal 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [ABG90]
    A. Amir, R. Beigel, and W. Gasarch. Some connections between bounded query classes and non-uniform complexity. In Proceedings 5th Structure in Complexity Theory Conference, pages 232–243. IEEE Computer Society Press, 1990.Google Scholar
  2. [AG88]
    A. Amir and W. Gasarch. Polynomial terse sets. Information and Computation, 77:37–55, 1988.Google Scholar
  3. [BBS86]
    J. Balcázar, R. Book, and U. Schöning. Sparse sets, lowness, and highness. SIAM Journal on Computing, 15:739–747, 1986.Google Scholar
  4. [BDG88]
    J. Balcázar, J. Díaz, and J. Gabarró. Structural Complexity I. Springer Verlag, 1988.Google Scholar
  5. [Bei87]
    R. Beigel. A structural theorem that depends quantitavely on the complexity of SAT. In Proceedings 2nd Structure in Complexity Theory Conference, pages 28–32. IEEE Computer Society Press, 1987.Google Scholar
  6. [Bei88]
    R. Beigel. NP-hard sets are p-superterse unless R=NP. Technical Report 88-04, Johns Hopkins University, Baltimore, MD, USA, 1988.Google Scholar
  7. [Bei91]
    R. Beigel. Bounded queries to SAT and the boolean hierachy. Theoretical Computer Science, 84(2):199–224, 1991.Google Scholar
  8. [CGH+88]
    J. Cai, T. Gundermann, J. Hartmanis, L. Hemachandra, V. Sewelson, K. Wagner, and G. Wechsung. The boolean hierarchy I: Structural properties. SIAM Journal on Computing, 17(6):1232–1252, 1988.Google Scholar
  9. [Cha89]
    R. Chang. On the structure of bounded queries to arbitrary NP sets. In Proceedings 4th Structure in Complexity Theory Conference, pages 250–258. IEEE Computer Society Press, 1989.Google Scholar
  10. [Dil50]
    R. P. Dilworth. A decomposition theorem for partially ordered sets. Ann. of Math., 51:161–166, 1950.Google Scholar
  11. [Gas91]
    W. Gasarch. Bounded queries in recursion theory: A survey. In Proceedings 6th Structure in Complexity Theory Conference, pages 62–78. IEEE Computer Society Press, 1991.Google Scholar
  12. [GHH]
    W. Gasarch, L. Hemachandra, and A. Hoene. On checking versus evaluating multiple queries. Information and Computation. To appear.Google Scholar
  13. [Hem89]
    L. Hemachandra. The strong exponential hierarchy collapses. Journal of Computer and System Sciences, 39(3):299–322, 1989.Google Scholar
  14. [Imm88]
    N. Immerman. Nondeterministic space is closed under complementation. SIAM Journal on Computing, 17:935–938, 1988.Google Scholar
  15. [Kad89]
    J. Kadin. PNP[log n] and sparse Turing complete sets for NP. Journal of Computer and System Sciences, 39:282–298, 1989.Google Scholar
  16. [Knu73]
    D. Knuth. The Art of Computer Programming III. Addison Wesley, second edition, 1973.Google Scholar
  17. [Kre88]
    M. Krentel. The complexity of optimization problems. Journal of Computer and System Sciences, 36:490–509, 1988.Google Scholar
  18. [Mah82]
    S. Mahaney. Sparse complete sets for NP: solution to a conjecture of Berman and Hartmanis. Journal of Computer and System Sciences, 25:130–143, 1982.Google Scholar
  19. [PZ83]
    C. Papadimitriou and S. Zachos. Two remarks on the power of counting. In Proceedings 6th GI Conference on Theoretical Computer Science, pages 269–276. Springer-Verlag Lecture Notes in Computer Science #145, 1983.Google Scholar
  20. [Sch83]
    U. Schöning. A low and a high hierarchy in NP. Journal of Computer and system sciences, 27:14–28, 1983.Google Scholar
  21. [Sel81]
    A. Selman. Some observations on NP real numbers and P-selective sets. Journal of Computer and System Sciences, 23:326–332, 1981.Google Scholar
  22. [Sel82]
    A. Selman. Analogues of semirecursive sets and effective reducibilities to the study of NP complexity. Information and Control, 1:36–51, 1982.Google Scholar
  23. [Sze88]
    R. Szelepcsényi. The method of forced enumeration for nondeterministic automata. Acta Informatica, 26:279–284, 1988.Google Scholar
  24. [Wag90]
    K. Wagner. Bounded query classes. SIAM Journal on Computing, 19(5):833–846, 1990.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1993

Authors and Affiliations

  • Albrecht Hoene
    • 1
  • Arfst Nickelsen
    • 1
  1. 1.Fachbereich InformatikTechnische Universität BerlinBerlin 10Germany

Personalised recommendations