I have in front of me 1 definition of p\poly and one of NP.


Definition of p\poly: 


L E P/poly if there exists a polynomial-time Turing machine M, a polynomial
p() and a function h mapping numbers to strings, where |h(n)| <= p(n), such that for all strings x, x E L <=> < x, h(|x|) > is accepted by M.


Definition of NP:


L E NP if there exists a polynomial-time Turing machine M and a polynomial
p() such that for all strings x
x E L <=> there exists y s.t. |y| <= p(|x|) and < x, y > is accepted by M.


What is the critical difference between the two definitions? For some x1 and x2 with |x1| = |x2| y1 and y2 might be different, but does that mean that p/poly is a subset of NP?



p\poly and NP definitions
There are several "critical differences". The one immediately relevant to your final question is that, in P/poly, $h$ might not even be computable. In the case of NP, the relevant $y$ can be computed, for each $x$ (though it would take exponential time to do so), just by trying each $y$ of the appropriate length for the appropriate number of steps of M. In particular, there are only countably many languages in NP but uncountably many in P/poly. 


