The dot product of two vectors is equal to the product of their magnitude multiplied by the angle between them.

a.b=|a|*|b|*cos(?)

Also, the signal is apparently within the pattern signal, So I think you are meant to find values that match according to Cauchy-Schwarz Inequality within the array you were given.

Sorry I couldn't be of more help code-wise...

Ala00003 the right idea. A dot product is really a projection of one vector on to another but can be thought of as a sort of correlation. Look into the other formula for the dot product (they are in fact equivalent but with n years of brain rust I can't run through it) which for vectors of points [x0,x1,x2,x3] and [y0,y1,y2,y3] is x0y0+x1y1+x2y2 + ... (you're essentially multiplying XY' where Y' is Y transpose).

As far as the energy goes, I don't want to have all the fun. Take a look at this http://en.wikipedia.org/wiki/Energy_%28signal_processing%29 or a related article. Just remember these equations are for continuous time system and you need to convert them to discrete.

Anyway, try it out in the code. Post back if you have any problems.