# Banker's algorithm

I have a question regarding the banker's algorithm step 2. When it says the Need[i] <= work. Need is an n * m matrix and work is a vector of length m. I want to know what Need[i] <= Work means. Does it mean that I have to find the vector magnitudes of Need[i] and work and compare them?

• Banker's algorithm can be written in many ways. What is step 2 in one pseudocode may be some other step in another, and Need and work could have different names. Please include the version of the algorithm that you're using. – Yuval Filmus Apr 12 '18 at 19:47
• From what I understand, $Need$ can be seen as a collection of $n$,$m$ length vectors. Thus when I say $Need[i]$, I'm talking about the $i$th vector, amongst the $n$ vectors. Since each vector is of length $m$, they're comparable to $Work$. – Mooncrater Jun 27 '18 at 5:48
• Remember that by comparison, here I mean that if $Need[i]>Work$, then all corresponding values of $Need[i]$ are greater than all the corresponding values of $Work$. Or. for $0 \leq j<n$, $Need[i][j]>Work[j]$. – Mooncrater Jun 27 '18 at 5:50