RFID (Radio-frequency identification) technology using passive tags is gaining a lot of attention now days. One of the main problems with RFID systems is collision among messages from multiple RFID tags. Various anti-collision algorithms have been proposed in order to resolve these issues which have been mainly divided into Tree based and Aloha-based anti-collision algorithms. This paper extends our previous work for an aloha-based anti-collision algorithm which divides the tags and adjusts the frame sizes in such a manner as to always keep the system efficiency optimal. The algorithm is also designed in order to reduce the identification time for identifying the total number of tags. As a result, the proposed algorithm uses an optimal number of slots to read the tags with minimum identification time. Simulation results show that the algorithm gives maximum slot efficiency compared to other anti-collision algorithms.