[R] OT - Banker's Algorithum

Steve Lianoglou
2009-09-08T01:36:29Z

Hi,

On Mon, Sep 7, 2009 at 5:41 AM, Stephen Liu<satimis at yahoo.com>
wrote:
> Hi folks,
>
>
> Can R-Project be used to perform Banker's Algorithum?

Yes.

> http://en.wikipedia.org/wiki/Banker%27s_algorithm

You can pretty easily directly transalte the pseudocde listed in the
section below to R:

http://en.wikipedia.org/wiki/Banker%27s_algorithm#Pseudo-Code.5B3.5D

Not really sure what else to say ... for instance, the line:

P = P - {p}

Might be:

P <- setdiff(P, p)

Maybe use lists to hold the stuff in P? Don't know what else you're
looking for ...

-steve

--
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact