Distributed Wireless Algorithms for RFID Systems: Grouping Proofs and Cardinality Estimation