Algorithms and Complexity Classes

37 MCQs Covers computational problems, well-defined and ill-defined problems, and Generate and Test. Also covers solvable and unsolvable problems, tractability, and the P, NP, NP-hard and NP-complete classes.

MCQs

37 questions · 30 min · 37 marks

Want to try first? Take the free Computer Science test: SDLC and Waterfall Model

Sample questions

The first 5 of 37. Try each one, then tap to see the answer.

  1. Question 1

    What is a computational problem?

    • AA problem that cannot be solved
    • BA challenge solvable by an algorithm
    • CA mathematical equation
    • DA type of hardware issue
    Show answer

    Answer: B

    A computational problem can be solved by a computer using an algorithm and always has input, process and output.

  2. Question 2

    Which of the following is NOT a component of a computational problem?

    • AInput
    • BOutput
    • CProcess
    • DHardware
    Show answer

    Answer: D

    The three components are input, process and output.

  3. Question 3

    Which of the following is a Decision Problem?

    • AChecking if a number is prime (yes/no)
    • BFinding the shortest path
    • CCounting the number of ways to arrange books
    • DMaximizing profit
    Show answer

    Answer: A

    A decision problem has a Yes or No answer.

  4. Question 4

    What is an example of a well-defined problem?

    • AHow to reduce poverty
    • BDeciding what to eat for lunch
    • CChecking if a number is even
    • DDesigning a new city
    Show answer

    Answer: C

    It has a clear input, steps and output.

  5. Question 5

    Which type of problem asks for the best solution according to some criteria?

    • ASearch Problem
    • BOptimization Problem
    • CDecision Problem
    • DCounting Problem
    Show answer

    Answer: B

    Optimization problems look for the shortest, cheapest, fastest or most efficient solution.

More tests in Algorithms and Problem Solving

Practise with a free account

Save your scores, see which chapters need work, and keep a notebook of every question you got wrong.

Create free account