In radio frequency identifications (RFIDs), an idle slot can be interrupted by the reader and takes less time than the other slots. In this case, the widely used binary splitting (BS) protocol is not optimal. M-ary splitting (M >; 2) with a carefully selected M outperforms BS, because it can take into account smaller duration of the idle slots. In this paper, we provide optimal value of M (Mopt) for varying slot sizes that yields minimum identification time. The proposed scheme is called optimal splitting (OS). We also revise OS to deal with mobile tags and propose the optimal splitting with arrival tags blocking (OS-ATB) protocol. Extensive simulations show that OS and OS-ATB consistently yield better performance than the other splitting and tree-based schemes.