Dining Philosophers

Five philosophers are sitting around a circular table for a meal of spaghetti. For any philosopher to eat spaghetti, they must have two forks: one in the left hand and one in the right hand. However, they have just five forks total on the table.

To coordinate their meal, the philosophers agree to strictly follow these steps:

  1. Think until the left fork is available, and then pick it up.
  2. Think until the right fork is available, and then pick it up.
  3. Eat for 30 seconds.
  4. Put the right fork down.
  5. Put the left fork down.
  6. Repeat these steps.

Can we guarantee that at least one philosopher is eating every 30 seconds?

×

Problem Loading...

Note Loading...

Set Loading...