# Can 2-philosophers problem be analogous to dining philosophers problem?

Two philosophers A and B, two forks numbered "1", "2"; A needs both "1" and "2" for eating, so does B.

Is this theoretical a dining philosopher problem? I'm questioning about the forks philosopher A needs all come from B. However, the DP problem usually gives an example of 5 philosophers, in which case, for example, philosophers A requests 2 forks from two different neighbors.

Long answer: the Dining Philosophers problem is really about having $$n$$ philosophers, and coming up with an algorithm that works for any $$n$$. A good algorithm should work for even "degenerate cases" like zero philosophers or one philosopher—by hard-coding them if necessary ("if there's only one philosopher, eat whenever you feel like"). So $$n=2$$ is a perfectly valid Dining Philosophers problem.
• @asapdiablo That's why it's considered a degenerate case. It's not as interesting as with higher $n$, but it's still a dining philosopher problem. It's like how sorting two elements is still a list-sorting problem, it's just a trivially easy one. – Draconis Jan 3 at 17:05