Given a vector V of size N, Find if there exists another vector A (of size N) such that A.V = 0 where . represents the Dot product or Inner Product ie a1*v1 + a2*v2 + a3 * v3 + … an*vn = 0, and A >0 ie all ai are non-negative integers and all ais cannot be 0 at the same time(trivial case).
Suggest an algorithm to generate a YES of NO.
Given a vector V of size N, Find if there exists another vector A
Share
Consider first the case when at least one of vi = 0. Then it is easy for you to show that the answer is YES. Now move on to the cases where all the vi ≠ 0. Now break this into two more subcases.
You should be able to complete the assignment from this breakdown.