P1 --> 1
P2 --> 1
P3 --> 1
P4 --> 1
Even 4 processes can be in safe with 5 resources. So upto 5 processes there will be no deadlock.