Hamming codes part 2: The one-line implementation

preview_player
Показать описание
A cleaner perspective on Hamming error correction codes
An equally valuable form of support is to simply share some of the videos.

You can read Hamming's own perspective on his discovery of these codes in chapter 12 of "The Art of Doing Science and Engineering".

Heavily related is the chessboard puzzle I did with Matt Parker:

If you're curious to learn a bit about Shannon, the father of information theory, take a look at this documentary.

Thanks to these viewers for their contributions to translations
Hebrew: Omer Tuchfeld
Hungarian: FaboBence

------------------


If you want to check it out, I feel compelled to warn you that it's not the most well-documented tool, and it has many other quirks you might expect in a library someone wrote with only their own use in mind.

Music by Vincent Rubinetti.
Download the music on Bandcamp:

Stream the music on Spotify:

------------------


Various social media links:
Рекомендации по теме
Комментарии
Автор

14:55
Grant: "Clever ideas often look deceptively simple in hindsight, which makes them easy to under-appreciate."
Me: *still can't fathom how anyone could ever figure out something so clever and elegant*

NoriMori
Автор

When you learn about this kind of clever things, it's genuinely impressive how often it ends up having been invented at Bell Labs ...

arantes
Автор

My mind was absolutely blown when it was shown how turning the results from the parity checks into binary-booleans gave you the exact location of the error and it just clicked for me why you placed the redundancy bits at powers of two! Dear god I love this channel and please please please don't stop producing content.

freeshavaacadooo
Автор

I really love what you said at the end. Too often we learn the end results from textbooks without any indication of how insanely clever their discoverers were. This channel is great at telling the story of that discovery process for us.

johnchessant
Автор

I kid you not. I'm sitting at the airport, I pull out my phone. I think, "It'd be awesome if there were a new 3B1B video"

So yeah, you're the best

nathanaelhahn
Автор

3B1B in a nutshell: Takes "Impossible" topic, blindfolds you for a second, removes the blindfolds, shows beauty.



Btw I love your work.

Sciencedoneright
Автор

"It can be done in python in 1 line of code"

import HammingCode

danielmihalik
Автор

I'm studying Geology. I have NOTHING to do with this sort of things but I'm still here for those beautiful videos and ideas/ concepts :)

sebastianp
Автор

Can we dig into Reed-Solomon error correction next? (Multiple-bit and burst error correction used for CD’s, DVD’s, QR codes, RAID-6, etc.)

trevinbeattie
Автор

The interesting thing about the error correcting idea is that it was used as a card trick people may have seen before (I know I saw it when young). Each card has a list of numbers written on them, and another person is asked to pick a number between 1-60 and pick out each card with that number printed on it. The cards each were a binary class as shown in this video, so all you had to do to guess their number was sum the top left number on each card.

JalebJay
Автор

This feels almost too elegant. I mean that I would never expect it to work out this nicely so I would not even put my effort into it and I would never discover all these last tricks.

mikolajwojnicki
Автор

This reminds me of the following riddle:

The King of a small country invites 1000 senators to his annual party. As a tradition, each senator brings the King a bottle of wine. Soon after, the Queen discovers that one of the senators is trying to assassinate the King by giving him a bottle of poisoned wine. Unfortunately, they do not know which senator, nor which bottle of wine is poisoned, and the poison is completely indiscernible. However, the King has 10 prisoners he plans to execute. He decides to use them as taste testers to determine which bottle of wine contains the poison. The poison when taken has no effect on the prisoner until exactly 24 hours later when the infected prisoner suddenly dies. The King needs to determine which bottle of wine is poisoned by tomorrow so that the festivities can continue as planned. Hence he only has time for one round of testing. How can the King administer the wine to the prisoners to ensure that 24 hours from now he is guaranteed to have found the poisoned wine bottle?

zoltanersek
Автор

I think that the best part about your videos is that you won't understand something completely unless you pause and work on it yourself. I've seen comments asking you to slow down but I think your pace is perfect for telling me that something is going beyond my head. Then, when I pause and figure it out myself, I'm never going to forget it. Keep up the great content :D

nakkstar
Автор

Woah realized 'the why' of the relation between the binary bisection and the fact that it actually spells out the position of the cell in binary just before you explained it, that has never happened to me before in one of these videos.

morkmon
Автор

you have 3.14 million subscribers as of right now, that is milestone goals...

ananintesarbinfaiz
Автор

Grant is amazing. So often watching his videos, he explains something and my mind goes "yeah but what about if this strange edge case thing happens??", then every time, grant addresses that exact edge case thing precisely. In short, he leaves no stone unturned, that is, unless the stone is redundant, and doesn't need turning. Super satisfying.

jewby
Автор

I used to play a game called Mastermind where I had to guess the location and colours of 4 pegs using a series of guesses. My method for winning looks a lot like using parity bits.

millwrightrick
Автор

I love to see how clever people can be. Just imagine you standing in front of such a problem and trying to find such an elegant solution!

think_logic
Автор

The Haskell programmer in me loved the "one line" reduction (though wanted to write it pointfree), but the C++ programmer in me hated it and wanted to write the 32-bit version as a fixed series of operations in the most efficient manner possible.

ReaperUnreal
Автор

I just paused this video at 1:07 because I got literal goosebumps when you said they spell the location. This video is incredible!

lukewilliams