▁represent ▁IP ▁addresses ▁of ▁packets ▁passing ▁through ▁a ▁router , ▁unique ▁visitors ▁to ▁a ▁web ▁site , ▁elements ▁in ▁a ▁large ▁database , ▁mot ifs ▁in ▁a ▁DNA ▁sequence , ▁or ▁elements ▁of ▁R F ID / s ensor ▁networks . ▁ ▁F ormal ▁definition ▁ ▁Inst ance : ▁A ▁stream ▁of ▁elements ▁ ▁with ▁repet itions , ▁and ▁an ▁integer ▁. ▁Let ▁ ▁be ▁the ▁number ▁of ▁distinct ▁elements , ▁namely ▁, ▁and ▁let ▁these ▁elements ▁be ▁. ▁ ▁Object ive : ▁Find ▁an ▁estimate ▁ ▁of ▁ ▁using ▁only ▁ ▁storage ▁units , ▁where ▁. ▁ ▁An ▁example ▁of ▁an ▁instance ▁for ▁the ▁cardinal ity ▁estimation ▁problem ▁is ▁the ▁stream : ▁. ▁For ▁this ▁instance , ▁. ▁ ▁Na ive ▁solution ▁The ▁na ive ▁solution ▁to ▁the ▁problem ▁is ▁as ▁follows : ▁▁▁ ▁Initialize ▁a ▁counter , ▁, ▁to ▁zero , ▁▁▁ ▁Initialize ▁an ▁efficient ▁dictionary ▁data ▁structure , ▁, ▁such ▁as ▁hash ▁table ▁or ▁search ▁tree ▁in ▁which ▁insert ion ▁and ▁membership ▁can ▁be ▁performed ▁quickly . ▁▁▁▁ ▁, ▁a ▁membership ▁query ▁is ▁issued . ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▁▁▁▁▁▁▁▁▁▁▁▁▁▁ ▁In cre ase ▁ ▁by ▁one , ▁▁▁▁▁▁▁ ▁Otherwise ▁ ▁do ▁nothing . ▁▁▁▁ ▁As ▁long ▁as ▁the ▁number ▁of ▁distinct ▁elements ▁is ▁not ▁too ▁big , ▁ ▁fits ▁in ▁main ▁memory ▁and ▁an ▁exact ▁answer ▁can ▁be ▁retrieved . ▁However , ▁this ▁approach ▁does ▁not ▁scale ▁for ▁bounded ▁storage , ▁or ▁if ▁the ▁computation ▁performed ▁for ▁each ▁element ▁ ▁should ▁be ▁minim ized . ▁In ▁such ▁a ▁case , ▁several ▁streaming ▁algorithms