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

Поделиться
HTML-код
  • Опубликовано: 21 дек 2024

Комментарии • 61

  • @mankindsangel1420
    @mankindsangel1420 Год назад +5

    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 9 месяцев назад +3

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

    • @ataglanceofficial
      @ataglanceofficial  9 месяцев назад +3

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

  • @vishal-shinde
    @vishal-shinde 7 месяцев назад +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  7 месяцев назад +1

      Thankyou so much for great appreciation 🥰 I am overwhelmed..
      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! 💕

  • @kaleemtanveer
    @kaleemtanveer 6 месяцев назад +1

    You deserves more subscribers.

    • @ataglanceofficial
      @ataglanceofficial  6 месяцев назад +1

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

  • @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❤️

  • @yonderbobcat211
    @yonderbobcat211 Год назад +3

    Great content! keep doing the good work Yash.

  • @rehanshaikh2605
    @rehanshaikh2605 Год назад +4

    Easy and nice explanation

  • @kethsiyajothy7599
    @kethsiyajothy7599 Год назад

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

    • @ataglanceofficial
      @ataglanceofficial  Год назад

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

  • @janani.s3133
    @janani.s3133 2 месяца назад +2

    Absolutely wonderful videoo!!!

    • @ataglanceofficial
      @ataglanceofficial  2 месяца назад +1

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

  • @AkashRaj-vj6br
    @AkashRaj-vj6br 11 месяцев назад

    Thank you for explaining so well

    • @ataglanceofficial
      @ataglanceofficial  11 месяцев назад

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

  • @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

  • @sarthakkhandewal8924
    @sarthakkhandewal8924 7 месяцев назад

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

  • @prahaladmugi9275
    @prahaladmugi9275 10 месяцев назад

    Great Explanation 😀

    • @ataglanceofficial
      @ataglanceofficial  10 месяцев назад

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

  • @atharvayerunkar8976
    @atharvayerunkar8976 Год назад

    Great Explaination 🙂✌️

  • @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?

  • @ajaysoni9538
    @ajaysoni9538 Год назад

    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)

  • @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 RUclips 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?

  • @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

  • @ajaysoni9538
    @ajaysoni9538 Год назад

    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  Год назад

      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 Год назад

      @@ataglanceofficial 2. Numbers with same trailing 0 ?

    • @ataglanceofficial
      @ataglanceofficial  Год назад +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 Год назад

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

    • @ajaysoni9538
      @ajaysoni9538 Год назад

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

  • @simransinha5298
    @simransinha5298 6 месяцев назад +2

    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 Год назад

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

    • @ataglanceofficial
      @ataglanceofficial  Год назад

      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 ♥️😊