A VLSI friendly algorithm for support vector machines