<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">Did you try a web search for</div><div class="gmail_default" style="font-family:monospace,monospace">Cigarette Smokers problem solved in Erlang</div><div class="gmail_default" style="font-family:monospace,monospace">If not, why not?</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">One fairly obvious approach is for the smokers</div><div class="gmail_default" style="font-family:monospace,monospace">to register themselves, one as 'tobacco', one as</div><div class="gmail_default" style="font-family:monospace,monospace">'paper', and one as 'matches'.</div><div class="gmail_default" style="font-family:monospace,monospace">Then</div><div class="gmail_default" style="font-family:monospace,monospace"> arbiter() -></div><div class="gmail_default" style="font-family:monospace,monospace"> select a random element of [tobacco,paper,matches] as Who,</div><div class="gmail_default" style="font-family:monospace,monospace"> Who!go,</div><div class="gmail_default" style="font-family:monospace,monospace"> arbiter().</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Another approach would be for the smokers to register</div><div class="gmail_default" style="font-family:monospace,monospace">themselves with the arbiter in a startup phase.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Let me put it this way.</div><div>T<span class="gmail_default" style="font-family:monospace,monospace">ry to make your code so simple and obvious that it</span></div><div><span class="gmail_default" style="font-family:monospace,monospace">is hard to get wrong.</span></div><div><span class="gmail_default" style="font-family:monospace,monospace">Then find the mistakes.</span></div><div><span class="gmail_default" style="font-family:monospace,monospace"></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 9 Nov 2020 at 21:16, AshiSh Kulkarni <<a href="mailto:kul2971@gmail.com">kul2971@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello,</div><div>I am new to erlang. And I am trying to implement
the Cigarette Smoker's Problem In Erlang,but i'm having some errors. So
if anybody has already implemented the code in erlang, plz can you mail
me ASAP.</div><div><br></div><div>Thank You.</div></div>
</blockquote></div>