Radio Frequency Identification (RFID) is entirely based on tag identification. Reader identifies a tag by its ID. Collisions occur frequently while reading the passive tags and reader fails to identify the tags sometimes. This will lead to tag-starvation problem. Therefore, an algorithm is developed to address both collisions and tag-starvation problem. This paper uses Query Tree protocol and ALOHA to develop the algorithm. Query Tree protocol is used to address tag-starvation problem and ALOHA to reduce the collisions of passive tags.