binary and K>2 class perceptrons