Built something? We create video reels & spotlights for GitHub projects.Promote your project →
Catalog / venkatesh5789 / cigarettesmokersproblem
Public GitHub Catalog Discovered Sep 26, 2026

venkatesh5789 / cigarettesmokersproblem

Suppose a cigarette requires three ingredients, tobacco, paper and match. There are three chain smokers. Each of them has only one ingredient with infinite supply. There is an agent who has infinite supply of all three ingredients. To make a cigarette, the smoker has tobacco (resp., paper and match) must have the other two ingredients paper and match (resp., tobacco and match, and tobacco and paper). The agent and smokers share a table. The agent randomly generates two ingredients and notifies the smoker who needs these two ingredients. Once the ingredients are taken from the table, the agent supplies another two. On the other hand, each smoker waits for the agent's notification. Once it is notified, the smoker picks up the ingredients, makes a cigarette, smokes for a while, and goes back to the table waiting for his next ingredients.

View repository on GitHub ↗ View creator profile Browse directory

About this discovery

Public repository record indexed from GitHub. Explore verified star velocity metrics, source code repositories, and curated developer tool directories across the GitHubRepo ecosystem.

#7720603GitHub System ID
venkatesh5789Organization / User
PublicVisibility
ActiveCatalog Status

More from venkatesh5789

↗

venkatesh5789/VanetPrivacy

Simulation of transition and timing attacks and a study of their effectiveness on Vehicular Ad-Hoc networks (VANETs).

Discovered
FOR MAINTAINERS

Built something? Put it in front of millions of developers.

We make a short reel about your project and post it across YouTube, Instagram, Threads, and X. Send a link, we do the rest.