Ok some of you might have done this already but this was a recent assignment and I want to see someone beat my score!
The problem: 3 smokers each have 1 of 3 elements (rolling papers, tabacco, matches) Another person has an infinite amout of all three. He wants to allow all the smokers to roll and smoke their own cigs. The suppiler puts out 2 out of 3 elements on the table and the correct smoker now knows he can proceed.
What is the min amount of semaphores need for this to run idefinately.
(I tried this using 4 processes and the best I could get was 4, 3 for each table setup and one to signal when finished)