Since ,all semaphores are binary.
And we have to check possiblity of deadlock.
Deadlock will occur when we have some resource and waiting for other resource held by other process and that too is waiting for our resource.
In above example,finding crossing means there is cycle and if there is cycle there will be deadlock because all resources have only one instance (here resource means binary semaphores).
In fig.for example in 1. option, a acquire lock X ,and c Acquire lock z,now c is waiting for x and a is waiting for z.
so ,there is deadlock.similarly in other examples except 2.