Rethinking Binary Search: Improving on a Classic with AI Assistance - Andrei Alexandrescu

Поделиться
HTML-код
  • Опубликовано: 3 окт 2024
  • This talk was recorded at NDC Techtown in Kongsberg, Norway. #ndctechtown #ndcconferences #cplusplus #ai #softwaredeveloper
    Attend the next NDC conference near you:
    ndcconferences...
    ndctechtown.com/
    Subscribe to our RUclips channel and learn every day:
    /‪@NDC‬
    Binary search, with its roots extending back millennia to the method of dichotomy and bisection, is a cornerstone of algorithmic logic. Its elegant and straightforward nature, taught during our formative years in computer science, has long been considered optimal. But is it?
    In this talk, we will embark on a journey that challenges conventional wisdom. By leveraging mathematical analysis, statistics, and empirical measurements-with the aid of ChatGPT as our trusty digital companion-we will discuss a modified binary search algorithm that performs fewer comparisons on average and offers greater room for optimization..
    If you're drawn to the beauty of algorithms, the craft of code optimization, and the underlying mathematics that weave the fabric of our digital universe, this talk is an invitation to see an old problem with new eyes and to embrace AI as a new ally. Come prepared to deepen your understanding and sharpen your skills with a fresh perspective on a classic algorithm, and learn how the fusion of human intuition and artificial intelligence can unlock uncharted territories in problem-solving.

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

  • @LogicEu
    @LogicEu 9 месяцев назад +6

    This guy is not only genius, but also very funny, his talks are the best!

  • @allanwind295
    @allanwind295 9 месяцев назад +1

    The claim, and I don't think it's substantiated, is that in the real world searches will often be values outside the extremes. Similar but perhaps less offensive is the tradeoff between two extremes (40:45) which assumes both equally likely. If we search for integers maybe negative extreme is way less likely than positive ones in the real world? Anyways, you should believe Andrei not a random stranger. I enjoyed the presentation.

  • @AndrewARitz
    @AndrewARitz 9 месяцев назад +8

    clickbait title

    • @allanwind295
      @allanwind295 9 месяцев назад +1

      AI is the new crypto!

    • @JohnDlugosz
      @JohnDlugosz 9 месяцев назад +1

      I'm 46 minutes in and no mention of AI yet.

  • @fburton8
    @fburton8 9 месяцев назад +1

    ll = communist, rl = ? centrist? => sliding overton window algorithm

  • @BongoFerno
    @BongoFerno 9 месяцев назад +2

    Awful. No drawings of what he was talking about, and the tiny, unreadable letters are useless.

  • @G11713
    @G11713 9 месяцев назад +4

    The structure of this talk is actually pretty bad. You need to deliver the solution up front since that's what you title or re-title the talk to be a history binary sort or a review of binary sort. (Of course, I could be wrong)

  • @JamesSjaalman
    @JamesSjaalman 9 месяцев назад +1

    Why use C++ There is assembler and C...

    • @VFPn96kQT
      @VFPn96kQT 9 месяцев назад +2

      There are other languages as well, why mention only these too?
      Why shouldn't the guy who is a legend in a C++ community use C++?

    • @JohnDlugosz
      @JohnDlugosz 9 месяцев назад

      If you search the back catalog of presentations, you will find a few that answer this. I suggest the Keynotes by Stroustrup for an overview of the language's audience and strengths.
      A short answer (relative to C and ASM): higher level abstractions allow writing and maintaining larger bodies of code with less effort and far fewer errors. And compared to ASM, there is portability of course!

    • @JamesSjaalman
      @JamesSjaalman 9 месяцев назад

      Why do you think Knuth presents his algorithms in (self-invented) ASM, and pseudocode? Should he do have done it in Basic? @@VFPn96kQT

    • @vitalyl1327
      @vitalyl1327 9 месяцев назад

      For RAII and templates.