An efficient randomized algorithm for input-queued switch scheduling