How to prove that the problem VERTEX-COVER belongs to $NP$?
The problem VC is defined as follow:
INSTANCE: Graph $G = (V,E)$ and an integer $k$
PREDICATE: Is there a subset $V_1 \in V $ s.t $\mid V_1 \mid \leq k $ and $\forall (u,v) \in E $ $u \in V_1 $ or $v \in V_1$ ?
I know that the class $NP$ can be defined as the class of all problems that can be solved using non-deterministic algorithms that runs in polynomial time.
Therefore, i can guess if $\mid V_1 \mid \leq k$ then test for each node in $E$ if $u$ or $v$ belongs to $V_1$. In this case return $TRUE$, otherwise $FALSE$.