Template:PTIME equals

This problem is polynomial-time equivalent to the following basic problem: