Flajolet-Martin Algorithm | Counting distinct elements in a stream | What makes it efficient?

Поділитися
Вставка
  • Опубліковано 29 жов 2024

КОМЕНТАРІ • 63

  • @mankindsangel1420
    @mankindsangel1420 Рік тому +2

    This saved my life today in exams, thanks a lot man... keeping doing the good work👏👏🔥🔥

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +2

      Woahh glad to know that! Thanks for your appreciating words❤️! 🙌🏻 By the way how was the paper?
      Please Share my videos with your friends and juniors too!💕

  • @tobir693
    @tobir693 7 місяців тому +2

    One of the best to do it. How does this guy only have 2k subs.

    • @ataglanceofficial
      @ataglanceofficial  7 місяців тому +2

      🥹🥹Thanks for your precious comment🙏❤️ Idk why UA-cam doesn't care about my channel😭
      Anyways🙌 Please Share it with your friends 😁

  • @vishal-shinde
    @vishal-shinde 5 місяців тому +1

    You are the only teacher who have the explanation of FM algorithm and it's numerical on YT.
    Thanks for the explanation. This is helping for my exams.
    I have subscribed and will watch other videos on Big Data Analytics

    • @ataglanceofficial
      @ataglanceofficial  5 місяців тому +1

      Thankyou so much for great appreciation 🥰 I am overwhelmed..
      Please share it with your friends too ♥️😄

  • @janani.s3133
    @janani.s3133 14 днів тому +2

    Absolutely wonderful videoo!!!

    • @ataglanceofficial
      @ataglanceofficial  14 днів тому +1

      Thankyou so much 😊🤗 Please Share it with your friends too 💕

  • @bhavishahadiyal7836
    @bhavishahadiyal7836 Рік тому +2

    Your content is the best, it's best than any explanation available, keep it up you will be so successful

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      What a compliment! Thanks a ton💯❤️ Please Share it with your juniors too! 💕

  • @SaloniJoshi2409
    @SaloniJoshi2409 Рік тому +3

    Great explanation! very easy to understand

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +2

      Glad to know that you understood the concept 😊 Please Like, Subscribe and Share it with your friends❤️

  • @kaleemtanveer
    @kaleemtanveer 5 місяців тому +1

    You deserves more subscribers.

    • @ataglanceofficial
      @ataglanceofficial  5 місяців тому +1

      Thankyou for the epic comment💖 I don't know why UA-cam doesn't understand this😂

  • @rehanshaikh2605
    @rehanshaikh2605 Рік тому +4

    Easy and nice explanation

  • @AkashRaj-vj6br
    @AkashRaj-vj6br 9 місяців тому

    Thank you for explaining so well

    • @ataglanceofficial
      @ataglanceofficial  9 місяців тому

      Thanks for appreciation ☺️ Please Share it with your friends ♥️

  • @OUTLETSPACE
    @OUTLETSPACE Місяць тому +1

    very nicely explained thanks

    • @ataglanceofficial
      @ataglanceofficial  Місяць тому +1

      Thank you so much! Please Share it with your friends too 😁

  • @kethsiyajothy7599
    @kethsiyajothy7599 11 місяців тому

    Thank you so much for the clear and detailed explanation :)

    • @ataglanceofficial
      @ataglanceofficial  11 місяців тому

      You are welcome 🤗 Please Share it with your friends ❤️ Best wishes for your exams💕

  • @yonderbobcat211
    @yonderbobcat211 Рік тому +3

    Great content! keep doing the good work Yash.

  • @Moksha53729
    @Moksha53729 Рік тому +2

    Bruhh i love you your a life saver ✌️

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +2

      Thanks for your compliment and appreciation! ❤️😄 Please Share it with your friends and support my channel🙏🏻 Also Like and Subscribe 💕

    • @Moksha53729
      @Moksha53729 Рік тому +1

      @@ataglanceofficial Sure bro

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      Thankyou so much! It means a lot 💕😊

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      @@Moksha53729 by the way when is your exam?

    • @Moksha53729
      @Moksha53729 Рік тому +1

      @@ataglanceofficial tmrw

  • @syedhudaibiyahfatmah9195
    @syedhudaibiyahfatmah9195 Рік тому +3

    X=1,3,2,1,2,3,4,3,1,2,3,1
    H(x) = 6x+1 mod 5
    What should be the ans..coz there are two different answers 8 and 4 which one is the correct?

  • @conradomartinezp
    @conradomartinezp Рік тому +3

    I'm sorry to mention this, but the algorithm you describe is not Flajolet-Martin algorithm (a.k.a. Probabilistic Counting). The algorithm that you explain is the basis of the LogLog and HyperLogLog algorithms, also by Flajolet and coauthors (but not Martin). For example, LogLog was invented by Marianne Durand and Philippe Flajolet around 2003, some 18 years after FM. Moreover, you skip all the part of "stochastic averaging", which is a must to avoid large deviations in the estimations. This idea was already used in FM algorithm and it was also used in their successors. In stochastic averaging, you maintain m variables max_R[i], i=0..m-1; the first log_2 m bits of each h(x) are used to choose one of m counters, and the remaining bits of h(x) to update (or not) the corresponding max_R[i]. Once you have your m max_R variables you combine them to obtain a value avg_max_R to be used in the estimation of the cardinality. Depending on the way you obtain avg_max_R you have LogLog or HyperLogLog. A correction factor is also needed to avoid bias in the estimation. The original Flajolet-Martin algorithm is similar to LogLog and HyperLogLog, but it finds the largest r such that hashes with i trailing zeros have been observed for all i, 0

  • @atharvayerunkar8976
    @atharvayerunkar8976 10 місяців тому

    Great Explaination 🙂✌️

    • @ataglanceofficial
      @ataglanceofficial  10 місяців тому

      Thank you so much for your appreciation ♥️🙏🤗

  • @ANUSHAB-fo6zh
    @ANUSHAB-fo6zh Рік тому +1

    Bro, U r So great...❤

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      What an amazing compliment😊 Thankyouu! Please share it with your friends! Best wishes for your exams💕😇

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      Hii! Can you tell me other subject on which you want UA-cam videos?

    • @ANUSHAB-fo6zh
      @ANUSHAB-fo6zh Рік тому +1

      @@ataglanceofficial I just want more videos on Big Data Analytics and Optimization Techniques for Computing..

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      Great, in big data analytics, specifically what all topics?

  • @prahaladmugi9275
    @prahaladmugi9275 8 місяців тому

    Great Explanation 😀

    • @ataglanceofficial
      @ataglanceofficial  8 місяців тому

      Thankyou so much♥️😁 Please share it with your friends 😉

  • @ajaysoni9538
    @ajaysoni9538 10 місяців тому

    How to solve if we have 2 hash functions given (what if there is no trailing 0 for any element ) (what if there are two elements with same trailing 0’s)

  • @sarthakkhandewal8924
    @sarthakkhandewal8924 5 місяців тому

    bro i have 3 hash function how to conbine to get final answer?

  • @ajaysoni9538
    @ajaysoni9538 10 місяців тому

    What if we have 2 different hash functions ? What if there are 2 numbers with same trailing zero ? What if none of the number gives trailing 0, like count of trail is 0 for all elements?
    What to do for that sum ??

    • @ataglanceofficial
      @ataglanceofficial  10 місяців тому

      If none of them have any trailing zeros, then the max (R value) would be 0, and therefore 2^0 is 1
      So the count of distinct elements will be 1

    • @ajaysoni9538
      @ajaysoni9538 10 місяців тому

      @@ataglanceofficial 2. Numbers with same trailing 0 ?

    • @ataglanceofficial
      @ataglanceofficial  10 місяців тому +1

      @ajaysoni9538 Let's say
      Two numbers have the same trailing zeros say 4 zeros
      So obviously the max 4 will be the max (R value)
      2^4 = 16 will be the answer

    • @ajaysoni9538
      @ajaysoni9538 10 місяців тому

      @@ataglanceofficial thank you so much for replying at 2 am too

    • @ajaysoni9538
      @ajaysoni9538 10 місяців тому

      @@ataglanceofficial what about if we have 2 hash functions ? Last doubt on this topic

  • @simransinha5298
    @simransinha5298 5 місяців тому +1

    are u the brother of that neso academy guy?

  • @bexst24
    @bexst24 Рік тому +1

    Ig video and audio not in sync ;_;

    • @ataglanceofficial
      @ataglanceofficial  Рік тому +1

      Heyy! Yeah it happened in between somewhere a little! But I think it's not that deviated that you won't be able to understand.... Please watch it carefully with all your concentration! Hope it will help you. Please Share it with your friends❤️ Best wishes for your exams💕

  • @sumeettamboli6649
    @sumeettamboli6649 10 місяців тому

    Are bhai aapne galat padhaya hai 10 ka binary 4 digit leya hai baki ka 3 digit why????? 😂😂😂😂😂

    • @ataglanceofficial
      @ataglanceofficial  10 місяців тому

      Aapko 4 digit chahiye baaki sab bhi toh utne zeros lagado piche simple 😉
      Vaise sum right hai haa ap tension mat lo trust me😁
      Please Share with your friends too ♥️😊