# Minimum number of processes for the deadlock?

A system has 6 identical resources and $$N$$ processes competing for them. Each process can request at most two requests. Which one of the following values of $$N$$ could lead to a deadlock?

1. 1
2. 2
3. 3
4. 4

My attempt:

$$R \geq P(N-1)+1 ,$$

Where R is total number of resources,

P is the number of processes, and

N is the max need of resources by each process.

$$6 \geq P(2-1) + 1$$

$$6 \geq P + 1$$

$$5 \geq P$$

So, the number of processes should be less than $$5$$ for the deadlock free condition.

Hence, all options can not be deadlocked.

In this exercise problem the answer given option (4).

Can you explain it in a formal way, please?