The following example illustrates the concept of reducibility. Consider three problems, A, B, and C:

- A=Prime(
*n*): The problem of determining whether or not*n*is a prime number. - B=Numberfactor(
*n*): The problem of counting the number of distinct primes that divide*n*. - C=Smallestfactor(
*n*): The problem of finding the smallest integer such that*x*divides*n*.

In this example A C, and B C. Why?

To find if *n* is a prime, we attempt to divide it by 2, 3, 5, etc.
The smallest integer that divides n also answers A.

Thus the solution of Smallestfactor(*n*) tells us that *n* is not a prime.

To see how B C we need a simple algorithm that counts
the number of distinct divisors of *n* using C.