But what are Hamming codes? The origin of error correction

  Переглядів 2,327,870

3Blue1Brown

3Blue1Brown

3 роки тому

A discovery-oriented introduction to error correction codes.
Part 2: • Hamming codes part 2: ...
Ben Eater:'s take: • What is error correcti...
Help fund future projects: / 3blue1brown
An equally valuable form of support is to simply share some of the videos.
Special thanks to these supporters: 3b1b.co/hamming-thanks
Heavily related is the chessboard puzzle I did with Matt Parker:
• The almost impossible ...
You can read Hamming's own perspective on his discovery of these codes in chapter 12 of "The Art of Doing Science and Engineering".
amzn.to/3lwcnmh
The viewer Harry Li made an interactive on this topic:
harryli0088.github.io/hamming...
Thanks to these viewers for their contributions to translations
Hebrew: Omer Tuchfeld
Hungarian: Fabó Bence
Spanish: agustin-j
------------------
These animations are largely made using manim, a scrappy open-source python library: github.com/3b1b/manim
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:
vincerubinetti.bandcamp.com/a...
Stream the music on Spotify:
open.spotify.com/album/1dVyjw...
------------------
3blue1brown is a channel about animating math, in all senses of the word animate. And you know the drill with UKposts, if you want to stay posted on new videos, subscribe: 3b1b.co/subscribe
Various social media links:
Website: www.3blue1brown.com
Twitter: / 3blue1brown
Reddit: / 3blue1brown
Instagram: / 3blue1brown_animations
Patreon: / 3blue1brown
Facebook: / 3blue1brown

КОМЕНТАРІ: 2 000
@3blue1brown
@3blue1brown 3 роки тому
I notice a few people asking “what happens if a parity bit gets flipped?” If you understand the algorithm, you don’t have to ask, try it yourself! Set up a block, flip a parity bit, say bit 2, then walk through what the receiver does. What happens?
@rejurj
@rejurj 3 роки тому
🤦‍♂️💖
@IStMl
@IStMl 3 роки тому
Plus you literally covered it in the video
@bokwoon
@bokwoon 3 роки тому
Once the parity bits are set, they're no longer special. What is important is that they left the board in a state where asking the parity checks will pinpoint exactly which row and column an error occurred.
@erictheepic5019
@erictheepic5019 3 роки тому
@Philosopher's Dream In the case of two errors, the method that gives you the accuracy to find a single bit breaks down. Imagine that there are two bits flipped in one set. Say, two bits flipped in column two. The row parity can find that there are two errors, but the column parity can't give any information on where the bit is, because as far as it can tell, parity still checks out. For more complicated cases, just get yourself a piece of paper and two coins (or any object, really). Draw out a 4x4 grid, and then place the two coins in two random spaces to represent errors. Try to determine the positions of the errors *purely* through the group-based parity checks. The only case I could find that allows both errors to be solved is when there's one in the top corner in the case that that's a parity bit. In every other case I tried, it's impossible to pin down the location.
@chongchonghe3748
@chongchonghe3748 3 роки тому
The beauty here is that, by constructing the parity bits in this way, there is not a single parity bit that is located in the territory of another parity bit. So, flipping only a parity bit will cause that parity bit to be errored and all other parity bits not errored. By that, you know the errored parity bit is the errored bit.
@Munden
@Munden 3 роки тому
I never thought about it until this video, but Sudoku is just human powered error correction.
@manspaghetti6351
@manspaghetti6351 3 роки тому
great r/showerthoughts material here
@alfiangunawan5946
@alfiangunawan5946 3 роки тому
you are right
@tissuepaper9962
@tissuepaper9962 3 роки тому
About halfway through the video, I made the connection to sudoku. I wonder if Hamming was inspired by sudoku.
@VoidSec3
@VoidSec3 3 роки тому
You’re not ducking wrong m8
@xNothing2Lose
@xNothing2Lose 3 роки тому
I love sudoku and computer sciencs. But i don't see to many similarities there. They are both on grids and got a simple ruleset that uses elimination processes. But that's all it's havin in common as far as i know.
@bluemischief1582
@bluemischief1582 3 роки тому
Electrical engineer here... We literally had a full lecture about this... A full 3 hour lecture and you absolutely made a great, rewatchable and perfectly adequate video on this subject. I applaud you and your educational skills.
@Freakschwimmer
@Freakschwimmer 3 роки тому
3B1B *always* has a great way of explaining things at an appropriate pace.
@DomVesely
@DomVesely 3 роки тому
I studied in same field, my teacher only mentioned it briefly during one lesson, I understood that simple parity check back then, but not the error correction... watching this just once got me perfectly on track and it is insanely simple, I really don't know how I didn't know this already really great video
@FoxSlyme
@FoxSlyme 2 роки тому
And it's only 20 minutes long!
@markhaus
@markhaus 2 роки тому
Yeah I think it took us about 2 hours to cover this subject along with the concept of error correction codes. This is incredibly concise, but I do have the benefit of hindsight. I wonder what newcomers to the field think
@tobyjacobs1310
@tobyjacobs1310 2 роки тому
Newcomer to error correction (other than the "send the message 3 times" scheme). Makes perfect sense and started to be able to get where the topic was going at the point when he mentioned the offset striations of "to what" the parity check refers. I have to say the paranoid person in me if still of the opinion "if you have one error, you probably have 20" so I guess I still find it amazing that scratched disks work. But I imagine that's addressed by some of the later algorithms for the same purpose. Doesn't change that this is an incredibly elegant explanation of an incredibly elegant solution to a common problem.
@moonaddict
@moonaddict 3 роки тому
I promised myself that I would pause the video and return several times until I could understand, and I did, beautiful.
@kalleousvoncheez
@kalleousvoncheez 8 місяців тому
Nice! I'm tryna do the same rn haha
@GTX4747
@GTX4747 3 роки тому
I must tell you, as a fresh cs graduate, I wish I've had teachers like you in the university, you explained something so clearly in 20 min, what would take a whole lecture of a lazy professor, and still wouldn't be clear to understand. I hope people are appreciate the priceless content that you share with us!
@kingmasterlord
@kingmasterlord 2 роки тому
there is something to be said for UKposts University
@gianni50725
@gianni50725 2 роки тому
To be a little fair to professors, he did this all pre recorded with much time to prepare the video since he doesn’t need 2/3 lectures for each week of the semester
@djmips
@djmips 2 роки тому
Don't call the prof lazy, call Grant (3Blue1Brown) gifted.
@michaeletzkorn8594
@michaeletzkorn8594 2 роки тому
Yeah, it’s really difficult to make quality educational material. Grant’s lucky enough to focus on educating in a video format full time. If you have to run a whole course in person, plan problem sets, run a research group, and have office hours, it just becomes a lot harder to focus on making salable content. Grant probably asks for lots of feedback on his videos before posting. I emphasize with the professors, but appreciate Grant filling the gap.
@macchiato_1881
@macchiato_1881 2 роки тому
@@gianni50725 the professors have an entire semester to teach the students. 3b1b can teach you those same concepts within a week give or take. If that isn't incompetence, idk what is.
@lucasuieda8274
@lucasuieda8274 3 роки тому
Man, you got me doing a math exercise at 11 pm on a Friday because I wanted to. If that's not great teaching then I don't know what is.
@baroncandy3939
@baroncandy3939 3 роки тому
I know the moment he said try it out for your self I was on my bed in a super comfortable position but the try it yourself made me get up and do it
@AlexandruJalea
@AlexandruJalea 3 роки тому
@@baroncandy3939 imagine sitting in the office, at your desk, with an endless excel sheet... And then you grab some paper and ... Error check.... Whilst giggling about Tom the cat replacing pi 😁😄 Julia Programming Language - check it out! You PI surprised :)
@baroncandy3939
@baroncandy3939 3 роки тому
@@AlexandruJalea will check it out thanks
@cocolasticot9027
@cocolasticot9027 3 роки тому
Just done it. 11pm, Saturday night. I had to download a paint app on my phone to not get out of bed. This is getting wild.
@yeyez3149
@yeyez3149 3 роки тому
seeing this exactly ona saturday friday at 11 pm
@balajiannamalai5902
@balajiannamalai5902 3 роки тому
5:32 "Storing a data is same as sending a message just from the past to the future"....i never really thought from this perspective...cool
@technowey
@technowey 3 роки тому
Balaji Annamali - That was said about writing a very long time ago. The ability to write down ideas changed the world. Your post is an example of both writing to the future, and possibly what is in this video.
@GibusWearingMann
@GibusWearingMann 3 роки тому
17 minutes in the future has received your message.
@SirReberal
@SirReberal 3 роки тому
@@GibusWearingMann But we can't be 100% certain it's the exact same message.
@GibusWearingMann
@GibusWearingMann 3 роки тому
@@SirReberal I'm seeing an (edited) on my copy, as a matter of fact.
@nortio5
@nortio5 3 роки тому
Tenet
@obi-wankenobi8237
@obi-wankenobi8237 3 роки тому
When he removed the 0th bit, I thought to myself: "Wait why don't we use it to parity check the whole thing?". I was so excited to see that's what happened next lol
@ALIPIANIST
@ALIPIANIST 3 роки тому
The receiver when see the parity equals 1: "That's ODD"
@revenevan11
@revenevan11 3 роки тому
Lol!
@vigilantcosmicpenguin8721
@vigilantcosmicpenguin8721 3 роки тому
I can't even
@unfa00
@unfa00 3 роки тому
My thoughts exactly.
@flyinglack
@flyinglack 3 роки тому
@@vigilantcosmicpenguin8721 Lol
@milanstevic8424
@milanstevic8424 2 роки тому
@@vigilantcosmicpenguin8721 HAHAHAHA
@chrisxd146
@chrisxd146 3 роки тому
The emotions Hamming must have felt at discovering such an elegant solution to data correction are probably similar to the "Aha!" moments physicists feel. Or perhaps it was relief after working with brute force options starting out. Either way, great video!
@i_dont_want_a_handle
@i_dont_want_a_handle 2 роки тому
Naah, I think for Hamming it was a full blown "OH GOD IM COOMING!!!!!!!! AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" moment
@SreenikethanI
@SreenikethanI 2 роки тому
@Sam u good bro?
@Runeite51
@Runeite51 10 місяців тому
@@i_dont_want_a_handle that first moment you learn an inkling of programming for the first time and do something that would have taken hours, in the blink of an eye
@cyangaeming
@cyangaeming 9 місяців тому
​@@i_dont_want_a_handleambatukam 😩
@mitchamaya
@mitchamaya 2 роки тому
I often point to this specific video as a big catalyst that got me to return to school and study computer science. I'm in my second semester and we're writing a hamming code decoder in assembly, so I had a great reason to revisit it. And I gotta say, the elegance of hamming codes is a lot more evident with your visualizations than it is from lecture. Which is understandable! My professor's job is a little different from yours, but it did make me appreciate how useful your videos are in gaining a big picture perspective.
@mitchamaya
@mitchamaya 2 роки тому
For one thing, they didn't think to display the code as a square, so the powers of 2 pattern doesn't emerge visually. We're just looking at it as a string of bits all in a line
@NoriMori1992
@NoriMori1992 9 місяців тому
How's the program going?
@mitchamaya
@mitchamaya 9 місяців тому
@@NoriMori1992 You have great timing - I'm interning at a fortune 100 company and yesterday my manager said they're going to extend a full time offer! Nothing's official until I sign but the future's never looked so bright. I'm graduating this fall since I already had two years of credits. Going back to school was easily the single best decision I ever made. It's a DevOps role if you're curious
@NoriMori1992
@NoriMori1992 9 місяців тому
@@mitchamaya That's awesome! Congratulations! I wish you all the best!
@pwnerzach2pwnu
@pwnerzach2pwnu 3 роки тому
I remember being completely puzzled with this when I was in college. They attempted to teach this during an early class. It went completely over my head then. I’ve appreciated your teaching style for years. I’ve watched most of your videos. This takes the cake. Absolutely stunning what a good approach and visuals can do for learning.
@yumi-zc9bb
@yumi-zc9bb 5 місяців тому
Our college is giving this to us for a project without any prior info so i feel this pain
@babynautilus
@babynautilus 4 місяці тому
ive had a similar sort of feeling with some chem/bio stuff, during school id struggle to make sense of these big systems.. like i could memorize but didn't necessarily understand.. until years later either reading or watching vids something would click and the pattern was clear :o
@J0R1AN
@J0R1AN 3 роки тому
I think I’ve said “oh, that’s so smart” like 10 times to myself in this video
@vigilantcosmicpenguin8721
@vigilantcosmicpenguin8721 3 роки тому
By extension, it made me feel like I'm smart for understanding it.
@svenjaaunes2507
@svenjaaunes2507 3 роки тому
huh i ve said it 11 times loser
@gurekamdhillon6460
@gurekamdhillon6460 3 роки тому
When I started connecting dots man, that's what it's all about.
@dmeemd7787
@dmeemd7787 3 роки тому
😂 same 😊
@camerondrew9402
@camerondrew9402 2 роки тому
That's the sign of a good teacher!
@WillParry00
@WillParry00 3 роки тому
After spending the last 2 days studying shor’s code I’m quite impressed by this timing
@qqq1234x
@qqq1234x 3 роки тому
Woah... shor's code?? Are they anyhow related to quantum??
@WillParry00
@WillParry00 3 роки тому
Nat Nat yes,quite a bit different, but since I haven’t studied the classical one this is really useful to have an idea
@tommihommi1
@tommihommi1 3 роки тому
after the chessboard puzzle video, this video had to happen
@scoutjonas
@scoutjonas 3 роки тому
@@WillParry00 Haaha, "a bit different" . Good reply in a binary code correction film.
@pllagunos
@pllagunos 3 роки тому
This week I have due an assignment of Hamming codes, the timing was perfect...
@inshadowz
@inshadowz 3 роки тому
@5:34 “After all, storing data is the same thing as sending a message, just from the past to the future, instead of from one place to another.” That's … a pretty darn beautiful way of putting it! [steals for future use]
@PokeMaster22222
@PokeMaster22222 3 роки тому
"Why did you send an email stating you hate me?" "I didn't! It was noise distorting bits, creating an incorrect message!"
@evansaschow
@evansaschow 3 роки тому
Watching the “Impossible Chessboard Puzzle” videos was a great episode 0 of this series
@oliviapg
@oliviapg 3 роки тому
Yes, having watched that video made me see where this was going very fast. Still very entertaining and educational to see a more fleshed out explanation though.
@Coyotek4
@Coyotek4 3 роки тому
You beat me to it; I was thinking the same thing.
@sharanphadke4954
@sharanphadke4954 3 роки тому
exactly bro
@runguardian6868
@runguardian6868 3 роки тому
I watched that a few weeks ago too
@IslandRai
@IslandRai 3 роки тому
It's kinda crazy how large the audience for this stuff is. He's talking about Hamming Codes and Binary Data storage and the video already has +20k views just hours from its posting.
@carlacvekla1444
@carlacvekla1444 3 роки тому
It's not that crazy. These are well made videos, and very pretty to watch, they deserve the views.
@crateer
@crateer 3 роки тому
People here watch because they are interested in such stuff, there is no surprise at all that this gets a ton of views
@spawn142001
@spawn142001 3 роки тому
Thats because the audience for 3blue1brown is that large. Because this dude communicates well and knows how to explain an idea. Many people and teachers fail to catch someone's interest or get a good idea across because they fumble with the language, tone, and pacing. They could be very smart people but not great teachers because of a weaker linguistic ability. The ability to do what he's doing, is a sign of serious intelligence. To know how to break something advanced down and communicate to hold interest and convey understanding. Grant has really strong logic and reasoning intelligence, and an incredible linguistic ability. Thus people who might never be into this, because its never been presented in the right way, are all of a sudden learning great new concepts because of Grants work here.
@eyeojo
@eyeojo 3 роки тому
Damn straight
@roncho
@roncho 3 роки тому
is becacuse his explanations are flawless he is the best in youtube using animations for explaning complex concepts
@hgjghjkhify
@hgjghjkhify Рік тому
I'm in my final year of a CS program, and my online program means that I'm teaching myself an Operating Systems course with a mediocre book and no instructor involvement. I'm blessed to have found this video! While the book tells me what the right answer is, it doesn't demonstrate HOW to think about and work through this encoding process. I didn't understand the purpose of where the parity bits were stored until this video. I did exactly what you said; I paused to actually work it out by myself, which gave me such satisfaction when I got the right answer after your 20 mins of instruction. Eternally grateful! ❤
@arthurvictorgama3952
@arthurvictorgama3952 3 роки тому
Every time that I watch some video from 3Blue1Brown, I notice how marvelous this channel is! It isn't about the animations only and how's incredibly well explained, it's about this type of information spread all over the world, free, with such profound analysis. This is easily one of the best channels of UKposts, at least for me.
@RobotProctor
@RobotProctor 3 роки тому
I learned this in college 10 years ago and the teacher had us MEMORIZE specific hamming codes for 5 bits, and explaining it by showing a way to enumerate all 32 possibilities, changing 1 bit at a time, and showing that every 4 in this list were the numbers 0-7. It was a terrible experience.. for thousands of dollars. I don't understand how it wasn't taught like this. Hopefully future professors teach their kids more like you.
@mgostIH
@mgostIH 3 роки тому
Instructions unclear: Scratched CD's of my parents wedding, now searching for a new home
@SC-zq6cu
@SC-zq6cu 3 роки тому
Instructions unclear: Scratched a blank CD. Now after running it on my PC, it has taken over it and is made my PC into part of Illuminati's HQ.
@59vibhusharma31
@59vibhusharma31 3 роки тому
@@SC-zq6cu TELL US THEIR SECRETS BETRAY THEM AND FEEL THE POWER.
@MS-il3ht
@MS-il3ht 3 роки тому
S C call Alex Jones
@inshadowz
@inshadowz 3 роки тому
Instructions unclear: Scratched a blank CD, now contains Beethoven's 10th symphony, complete with subtitles for the hearing impaired.
@MS-il3ht
@MS-il3ht 3 роки тому
@@inshadowz Ah, I see. Maybe we should talk on how you broke the 2nd law of thermodynamics, k? ;-)
@woobilicious.
@woobilicious. 3 роки тому
Needed this about 30 years ago when everyone was saying copying CDs degraded the music quality.
@stalincat2457
@stalincat2457 2 роки тому
Yeah... There's still gold plated HDMI cables though. You know, for that extra crisp binary code :')
@CraigPendlebury
@CraigPendlebury 3 роки тому
Your videos prompt not just rediscovery, but also further research and that's what makes them so enjoyable.
@MatejKostoski123
@MatejKostoski123 3 роки тому
This is something that I studied during my Information theory course ( I study telecommunications) and enjoyed it very. I am very happy to see it presented at such a elegant way and in adequate details, almost rivaling the level of quality at which it wast taught to me (and that is saying a lot).
@christophersmith1424
@christophersmith1424 3 роки тому
When I was taught this i had no idea what was going on for the several weeks it was being covered. This 20 minute video actually clarified what took weeks to try to understand.
@MatejKostoski123
@MatejKostoski123 3 роки тому
@@christophersmith1424 that is very unfortunate. My professor really wanted us to clearly understand. During the introduction of this subject he made a lot of analogies with everyday items and products that have some built in redundancy in order to work, and that sort of thing really helped me. He also gave many examples about where different encoding schemes are implemented.
@MS-il3ht
@MS-il3ht 3 роки тому
May I ask: How much information theory is in your degree? (As I am interested in this discipline too...)
@simonlocke5869
@simonlocke5869 3 роки тому
When I took information theory, we talked a lot about hamming, huffman, arithmetic codes. Hamming codes are so cool and pretty simple to implement. Did you use Cover and Thomas?
@MatejKostoski123
@MatejKostoski123 3 роки тому
@@MS-il3ht Humming, Huffman codes, convolutional codes, trellis coding, statistical coding, and as a very similar discipline, two digital communication courses.
@Christian-nr9wh
@Christian-nr9wh 3 роки тому
As someone who has received intense formal education in physics but felt shorted by the lack of "raw theory" I saw in the few computer science courses I had, I absolutely love how you presented this. "How does error correction actually work?" has been a question that has sat on the back burner in my mind for ~5 years, and now I have a satisfying answer. Would love to see videos on the more modern methods!
@eobardthawne6903
@eobardthawne6903 3 роки тому
The way you explained the Hamming code, guess if my professor would have done that, I wouldn't have to watch UKposts 2 years later. Thank you so much for this.
@Tharmin.124
@Tharmin.124 Рік тому
We don't deserve this knowledge condensed to such a simple form. Thank you so much
@abramthiessen8749
@abramthiessen8749 3 роки тому
Hamming codes and Huffman codes some one of my favorite things. The two simplest ways of adding and reducing redundancy.
@JeffMTX
@JeffMTX 3 роки тому
Yep! You remove the uncontrollable redundancy, and add back in redundancy that works for you :)
@akshitsharma187
@akshitsharma187 3 роки тому
Grant Sir, I got 780 in SAT math exam just because of you. Thanks ! I know you might be wondering that you never taught SAT maths but you developed a craving, an appetite for maths in my heart ❤ Once again thanks sir !
@3blue1brown
@3blue1brown 3 роки тому
Congratulations! I'm quite sure I deserve approximately 0% of the credit, and that it's all in your hard work, but I appreciate the kind words.
@Aman-br1ph
@Aman-br1ph 3 роки тому
What about JEE bro
@qqq1234x
@qqq1234x 3 роки тому
How did you give SAT in India?
@akshitsharma187
@akshitsharma187 3 роки тому
@@qqq1234x college board is conducting sat in India !
@akshitsharma187
@akshitsharma187 3 роки тому
@@3blue1brown Sir it's your nobality you are not taking any credits but as a matter of fact I hated maths 2 years back. However, after seeing the way you approach this subject, just proved to be a turning point in my academic career. And wish you a very happy teachers day !
@benoize
@benoize 3 роки тому
Loved this video! Your educational skills are phenomenal! Usually I just consume youtube vids, but by challenging me to work the examples (and I got them right) created such a buzz! Well done! Looking forward to part 2!
@mosesturner4018
@mosesturner4018 3 роки тому
The first three or so times you told me to try it myself I was like "noo i'm lazy" but the last time, error-checking the message I hadn't memorized, for some reason I did try it, and it was great - somehow I actually did it right. This teaching style is awesome.
@billowen3285
@billowen3285 3 роки тому
Making them grids instead of one long line makes this fsr easier to grasp
@mrpedrobraga
@mrpedrobraga 3 роки тому
Visuals are too useful for maths intuition. I feel kinda bad for blind mathematicians tbh.
@gamingmonts9737
@gamingmonts9737 3 роки тому
the excitement I felt when I paused the video, figured out which bit was wrong and I was right 😄
@derpinator4912
@derpinator4912 3 роки тому
it felt like some sort of find the error soduko, however you spell it i really like sodukos
@MrCheese1745
@MrCheese1745 3 роки тому
I'm taking Probability and Statistics of Random Signals right now. This video is so interesting on it's own, but it's even cooler to see many of these concepts come to life in your videos. Albeit you are a _way_ better teacher than my professor at my university. It's fascinating to see these explained so well.
@MalcolmAkner
@MalcolmAkner 3 роки тому
It's great seeing that you're leaning more heavily into the "pause and _really_ figure out for yourself"-method! I saw your interview with Lex and it looked like you got a bit frustrated at yourself for not emphasizing enough what you think is the most important part of learning math; namely actually doing the work yourself. I really like this, please keep it up! :D
@Karan-um4bw
@Karan-um4bw 3 роки тому
12:24 Grant tells to pause and ponder, *Also Grant: proceeds to slyly animate over each cell and their respective combination of parity cells
@aka5
@aka5 3 роки тому
good catch
@hann992
@hann992 3 роки тому
Wow, how I enjoyed these last two videos on Hamming codes! Just started studying Software Engineering, and I am eating all this stuff right up! Would love to se more on this subject. Your videos on Integrals and vectors also helped me a lot prepping for my math exams! So thanks a lot, and keep it up!
@elderartifactresearchlab
@elderartifactresearchlab 3 роки тому
It really feels at times that the difference between what makes content hard or easy is not the content itself but rather the person teaching. Thank you. You just clearly and elegantly explained what my lecturer could not in 2 hours of verbal diarrhea.
@adityayadav6712
@adityayadav6712 4 місяці тому
Sir, you really are a once in a generation teacher. Hats off to such a beautiful explanation. it can't be any better. Absolutely brilliant.
@canaDavid1
@canaDavid1 3 роки тому
3b1b AND beneater on hamming codes at the same time!?! Is this heaven?
@karlosfy
@karlosfy 3 роки тому
Is insane how good you explain things. This is the ultimate way of explaining things. A piece of art work
@leonardosouzaconradodesant6213
@leonardosouzaconradodesant6213 2 роки тому
Thank you very much! I did the exercise at the end of video, and finally, after more than 20 years as system analyst, I understand Hamming codes. I don't have words to express how thankful I am. Really thanks!
@joshuan.
@joshuan. 2 роки тому
I didn't think this would be fascinating, but it absolutely was! Very well explained, and I appreciated how there were breaks in it to allow me to figure out the material on my own once I had a grasp of it. I nailed that final example!
@RKaidan
@RKaidan 3 роки тому
The collab I never knew I wanted
@That_One_Guy...
@That_One_Guy... 3 роки тому
What collab ? 🤨
@NStripleseven
@NStripleseven 3 роки тому
Excited for part 2! This kind of thing is really fascinating to me.
@andrelin4345
@andrelin4345 3 роки тому
I just want to comment on how intuitive your visuals are. You are a blessing.
@DanielBrownsan
@DanielBrownsan 2 роки тому
Why am I blown away by brilliant solutions to simple challenges more than profound solutions to complex problems?
@Philipp-ym4pc
@Philipp-ym4pc 3 роки тому
I learned about this literally less than 2 years ago and I completely forgot how this works.
@akshayjayakumar7082
@akshayjayakumar7082 3 роки тому
Me too maan... Hope I don't forget it again
@luckylove72
@luckylove72 3 роки тому
Because you didn't do exercise or wrote code to experiment.
@jasonihegworo1370
@jasonihegworo1370 3 роки тому
Story of my life
@HansLemurson
@HansLemurson 3 роки тому
Brains need better error-correction code!
@jpsalis
@jpsalis 3 роки тому
it's really elegant as a coding solution. Once it clicked, I immediately realized how powerful and simple this would be to code. Hint: bitwise comparisons
@skyhoffert
@skyhoffert 3 роки тому
I work in the field of information theory and communication. This is one of the simplest, most easy to follow explanations I have seen! Excellent job, as always. P.S. I did the examples, it felt like a puzzle! How fun!
@skotski
@skotski 7 місяців тому
As thoughtful as these explanations are, the graphics are astonishingly helpful.
@o.r5371
@o.r5371 9 місяців тому
Just had a 2 hours long lecture about this in Computer Networks class, right in the middle I recalled this 3b1b video, and understood the whole subject before the lecturer even finished teaching
@joshtherussian9261
@joshtherussian9261 3 роки тому
Never felt so satisfied over a UKposts video as I was when I solved the problem at 18:48 correctly
@vigilantcosmicpenguin8721
@vigilantcosmicpenguin8721 3 роки тому
It's the best feeling.
@dhess34
@dhess34 3 роки тому
The work that Grant puts into the animations/visuals for these videos is mind-blowing. Having a seemingly-simple style, that flies under the radar, is an art in and of itself!
@PearlKhurana
@PearlKhurana 3 місяці тому
a semester full of this, and I couldn't understand a word of it. All because the basics were not cleared, and here you quenched all of them in such a small video!
@echolee601
@echolee601 3 роки тому
I learned about Hamming Code about 16 years ago in a Data Compression graduate lesson,and this video reminds me of everything!Thanks!
@ethanwest3393
@ethanwest3393 3 роки тому
After I solved the "impossible chess puzzle" from a couple videos ago, I was blown away by how we can extract so much information in just one bit. Super cool to see that exact puzzle being represented in a real-world application!
@AntiCitizenX
@AntiCitizenX 3 роки тому
You can intuitively see how this works when you think about the information required to describe the error. Given a block of 15 bits, there are exactly 16 possible ways to describe a single bit of error (plus no error). That requires 2^4 possible states, which is 4 bits. So it makes perfect sense that 4 bits can account for the error in a block of 15, and this pattern extends to any arbitrary power of 2.
@Agent9
@Agent9 Рік тому
I remember watching this video a year ago and understanding nothing, now I watched it again and actually understood it! Truly amazing.
@kevinmcnamee6006
@kevinmcnamee6006 6 місяців тому
I taught this stuff as part of data communications course in the 80s. Your rows and columns method is an excellent graphical explanation of what's going on and the second video does a great job of explaining how easy it is to figure out which bit is in error. My explanation involved assigning the data bits a sequence number from 0 to 15. Parity bit 1 covered all bits with the 1 bit set in their sequence number (1,3,5,7,9,11,13,15). Parity bit 2 covers all bits with a 2 bit in their sequence number (2,3,6,7,10,11,14,15). Parity bit 4 covered all bits with a 4 bit set in their sequence number (4,5,6,7,12,13,14,15). Parity bit 8 covers all bits with an 8 bit set in their sequence number (8,9,10,11,12,13,14,15). This essentially created a parity check for each column of the bit sequence number and provides an easy way to determine which bit had fipped. If a single bit error occured, to figure out which bit was in error, you simply added up the values of the parity bits that were wrong and it told you exactly which bit needed to be fixed. Lets say bit 12 had flipped. That would mean the parity calculations associated with parity bits 4 and 8 would be wrong... meaning fix bit 12 (4+8). An error in bit 3 would mean that parity bits 1 and 2 would be wrong indicating bit 3 (1+2) should be fixed.
@kairostimeYT
@kairostimeYT 3 роки тому
Two of my favorite UKpostsrs upload at the same time AND they are collaborating. This is phenomenal.
@jpalacios117
@jpalacios117 3 роки тому
I loved the try it yourself part. Please do more of those!
@remivannier9931
@remivannier9931 3 роки тому
me too !
@kiaruna
@kiaruna 2 роки тому
"Frustration being the crucible for invention..." so nicely said !
@RafaelMunizYT
@RafaelMunizYT 3 місяці тому
my love for IT is what keeps me from not giving up on college even though some lectures are confusing as hell and I end up with more questions than answers, if I had teachers like you my understanding would be much better and my motivation much bigger
@lazergurka-smerlin6561
@lazergurka-smerlin6561 3 роки тому
I can definetly see how this relates to the evil chesspuzzle video
@Zeratul1005
@Zeratul1005 3 роки тому
oh my goodness new 3B1b video! I love learning through your incredibly detailed visuals, calm voice and pleasant background music.
@tr1e
@tr1e 4 місяці тому
I found your short on Hamming codings alluring enough to watch through the two parter long form content you had plus some of Bens video.
@NeverDoubtTheWorm
@NeverDoubtTheWorm 3 роки тому
Oh my goodness thank you for posting !! I thought I had imagined your channel and couldn’t find it but remembered subscribing. Can’t wait to catch up on content!
@AntoniGawlikowski
@AntoniGawlikowski 3 роки тому
Great video as always! This whole "parity check" algorithm reminds me of my favourite puzzle about 1000 barrels of wine. I'll write it here if someone wants to try solving it: You are a wealthy king of a prosperous, medieval, absolute monarchy. Your daughter is getting married in 11 days (in the morning on the 12-th day from today). Understandably, to celebrate the occasion you organise a lavish wedding party. The main highlight of the planned event is 1000 kegs of the finest wine from overseas that you ordered. They arrived yesterday and you have been bragging about it to everyone who would listen. Unfortunately, your spies inform you that your enemies secretly added poison to one of the kegs. The poison is so potent, that but a drop can easily kill a man. However, to avoid suspicion, the substance was chosen carefully. It doesn't kill instantly - you die after a week (on the 8-th day), showing no symptoms until then. Obviously you need to find and get rid of the poisoned keg before the wedding. Moreover, you absolutely can't waste more than 1 keg. You are certainly wealthy enough to afford a whole new batch, but it would certainly not arrive on time. Additionally, if more than 1 keg is missing, someone might notice - it would be a major hit to your prestige, position and rule - after all, as a ruller, perception is everything. Fortunately, 10 criminals are being held in your dungeon for different crimes pending trial before you. Being a king you can do whatever you want with them - pardon them, kill them or... make them taste the wine. Your task is simple - you need to find the poisoned keg before the wedding day, but how? =========================================================================================== TL;DR - 1000 kegs, 1 poisoned. The poison kills on the 8-th day after ingestion. You have 10 prisoners you can force the wine upon. You need to find the poisoned keg in 11 days. FAQ: -> A poisoned person dies on the 8-th day but NOT TO THE MINUTE. It could be after 7d + 1h or 7d+14h, you don't know. -> There is no way to distinguish the poisoned wine from the normal wine. They smell, look, behave exactly the same. -> You have only 11 days "to work with" - you can't f.ex. check the state of prisoners on the 12-th day, the mystery must solved by then. -> There is no antidote for the poison. -> The answer is an algorithm to solve the problem. It's not something along the lines of "I ask the mage, and he divines it" or "I cancel the party" -> From what I hear there is more than one way to solve it, however I only arrived at a single solution And I have a small request - if you want to write your solution in the comment, please don't spoil the fun for others, write it on the 5-th line so that it's not visible before one clicks "MORE". Thank you!
@sgbench
@sgbench 3 роки тому
Does "you absolutely can't waste more than 1 keg" include the poisoned keg?
@AntoniGawlikowski
@AntoniGawlikowski 3 роки тому
@@sgbench No, of course not - you HAVE TO get rid of that one, but no more than that.
@sgbench
@sgbench 3 роки тому
@@AntoniGawlikowski So you can't remove even a single mouthful of wine from any of the other kegs?
@AntoniGawlikowski
@AntoniGawlikowski 3 роки тому
@@sgbench No, sorry, maybe I misunderstood your question. You can, and in fact must, take some small amounts from all the kegs and feed it to the criminals. What is forbidden, is to throw away 2 or 100 of them because you can't narrow it down further. In other words you need to narrow it down the precisely to the one keg containing poison. You can't discard more than 1 in its entirety at the end. As an example as a first step you try feeding every prisoner one drop from 100 barrels. One of them will die, so you know that the poisoned barrel was among the ones this guys tasted. But you can't get rid of all of them - you need to somehow narrow it down until you know for sure which one it is and you can discard ONLY that one.
@sgbench
@sgbench 3 роки тому
@@AntoniGawlikowski Okay cool, that's what I thought. I'm pretty sure I know one possible solution then.
@oussamalaouadi8521
@oussamalaouadi8521 3 роки тому
GOD! Always hoped that Grant would someday talk about communication engineering related stuff. Brilliant as usual.
@mosu95
@mosu95 3 роки тому
Finally someone that explains it properly, has an understandable accent and the right tone of voice.
@JannisAdmek
@JannisAdmek 3 роки тому
this is on another level, the effort going into these videos are insane and the result turned out so elegantly!
@brandonbeavisinvestment5294
@brandonbeavisinvestment5294 3 роки тому
FEEL FREE TO MESSAGE ONE OF MY MOST TRUSTED TRADER MARK THOMAS TO MAKE GREAT PROFITS IN CRYPTO +..1...3...0...9.....2.. .4...8....4.....4....7....2... His strategies are top notch 100% risk free...
@kavinbharathi
@kavinbharathi 3 роки тому
' _storing a data is sending a message from the past to the future_ ' Professor hulk : *TiMe TrAvEl*
@kenlogsdon7095
@kenlogsdon7095 3 роки тому
The real trick would be to go the other way.
@thetheoreticalminimum2287
@thetheoreticalminimum2287 3 роки тому
*That is a bloody creative title*
@revenevan11
@revenevan11 Рік тому
The game "Bitburner" had a coding challenge about this built in, and then recommended your video in the explanation! I've been a longtime fan of your channel, but I'm learning javascript through that game and was very happy to see your channel mentioned 😁
@TheGrooseIsLoose
@TheGrooseIsLoose 2 роки тому
For my final capstone course of my undergraduate degree in math, I wrote a paper and did a presentation to the class on basically the contents of this video. It took me a long time to wrap my head around what was meant by a lot of the explanations until I finally had an intuitive understanding of what an error correcting code was, and since I thought I understood it twice before I reached the actual understanding, I wrote and polished the whole paper and presentation 3 times, twice based on a misunderstanding of fundamental concepts. This video would have saved me so much time, since I could have started with an intuition for what it is and how it works and then went into the details and proofs I needed for the assignment.
@jasonavina8135
@jasonavina8135 2 роки тому
Einstein famously said, "Everything should be made as simple as possible, but no simpler." And I think that 3blue1brown's videos embody that better than anyone online.
@ChristieNel
@ChristieNel 3 роки тому
I used Hamming code in a wireless protocol I created for my final year project. It blew my mind.
@IladRodavlas
@IladRodavlas 2 роки тому
this is such an elegant solution to a problem I never even thought about before
@veervishalmishra4526
@veervishalmishra4526 Рік тому
The best thing about this video was that it felt like an interactive session about hamming code.
@MaxxTosh
@MaxxTosh 3 роки тому
What does the near future of this channel look like? I miss the differential equation series but I’m always satisfied by new videos of course! Adore your work
@PianoMastR64
@PianoMastR64 3 роки тому
"After all, storing data is the same thing as sending a message, just from the past to the future instead of from one place to another."
@JeffMTX
@JeffMTX 3 роки тому
I noticed this concept in 1989 when I needed to update a disk driver and read in the disk drive manual how it used FSK (frequency shift keying) to write to the disk. I thought "hey, the disk is just a communication channel!" PHREAKY and I have always used that concept since then
@milanstevic8424
@milanstevic8424 2 роки тому
@@JeffMTX what is really messed up is that the whole physics revolves around a single photon sending a single message. we just happen to live within that singular transmission while also being composed of it.
@userhandle-l
@userhandle-l 4 місяці тому
This video was my first introduction to Information Theory and Error Encoding, and it immediately made it one of my favorite topics of all time! Now I am taking a course on that subject, and I have you to thank for the fact that I am looking forward to the subject so much at a low point in my life.
@yugen3968
@yugen3968 3 роки тому
Here I am, didn't even know what the title meant, not a math-wiz, not a CS student, don't code, yet clicked on the thumbnail cz it looked cool & I'd heard of 3B1B's collab with professors to teach a sem at MIT, & boy did these 20 minutes just made me feel so good! Took it as a logical reasoning thing and the context of information coding & storage just made this a very clever & satisfying watch. And now I appreciate tie-knotting coding pioneers of yore!
@wamsang7818
@wamsang7818 3 роки тому
"You don't know what this message is" *You underestimate me Grant*
@AWESOMEEVERYDAY101
@AWESOMEEVERYDAY101 3 роки тому
You good sir have played an important role for me and my education.
@BroudbrunMusicMerge
@BroudbrunMusicMerge 2 роки тому
This is so cool! I'd always heard of parity checks, but never had an understanding of why they work. Thanks for this video!
@lucass.4365
@lucass.4365 10 місяців тому
Your videos are son intuitive and well thought out 👍 Every time a pleasure to watch them
@spectre1231
@spectre1231 3 роки тому
Same time as Ben Eater. Coincidence I think not. Keep up the great work!
@omniyambot9876
@omniyambot9876 3 роки тому
Ahh also a ben eater fan? I notice they have very similar voice and chill videos.
@edwardboron5776
@edwardboron5776 3 роки тому
This reminds me a lot of the quick sort algorithm. Divide and conquer to subdivide everything into smaller parts.
@youtubersingingmoments4402
@youtubersingingmoments4402 3 роки тому
It also has an element of Sudoku, it seems; the numbers get filled in based on the logic of the others. I could actually see people enjoying figuring out puzzles based on Hamming codes.
@edwardboron5776
@edwardboron5776 3 роки тому
@@youtubersingingmoments4402 that's probably how mathematicians are created...
@3blue1brown
@3blue1brown 3 роки тому
You're completely correct that this divide-and-conquer idea shows up all over the place in computer science. It's a principle worth remembering.
@bananatassium7009
@bananatassium7009 2 роки тому
honestly this video is just so damn cool. It's such an interesting topic and seeing the connections throughout the video and figuring it all out before it was fully explained was a real satisfying feeling. When I realized the combined readout of all 4 bits was the binary version of the error bit's number as well... amazing.
@Lagrange00
@Lagrange00 9 місяців тому
How nice, I kinda wanted a refresher on hamming codes but didn’t want to go back to my numerical analysis text books but I did find your short, which is obviously much more entertaining:)
@PaulSteMarie
@PaulSteMarie 3 роки тому
About 3/4 through, and this is screaming that there's some relation here to discrete Fourier transforms. The sampling of data at frequencies of powers of two just really reminds me of the stages of an FFT.
@joeemenaker
@joeemenaker 3 роки тому
Kudos for mentioning Ben Eater's videos. His series on how to build a computer with a breadboard and the 6502 manual are an absolute gift to humanity.
@backwashjoe7864
@backwashjoe7864 Рік тому
So what I’m hearing @8:00 is that we have no guarantee that we’re watching the video that you meant us to see!
@vishnuvardhan0099
@vishnuvardhan0099 3 роки тому
Really impressed by the way you represent. Keep up the good work
@ZephyrCheez
@ZephyrCheez 3 роки тому
Man you're better than 90% of college professors at teaching things to people.
@brandonbeavisinvestment5294
@brandonbeavisinvestment5294 3 роки тому
FEEL FREE TO MESSAGE ONE OF MY MOST TRUSTED TRADER MARK THOMAS TO MAKE GREAT PROFITS IN CRYPTO +..1...3...0...9.....2.. .4...8....4.....4....7....2... His strategies are top notch 100% risk free...
@foxabilo
@foxabilo 3 роки тому
DAMN!, I finally get it! It clicked in my head like a big key in a lock after 30 years of not getting it. Thank you.
@michaelleeson7072
@michaelleeson7072 Рік тому
Very very nicely done. Smooth, clear, thorough, and with perfect pauses. EECE Sophomore student, here.
@gameplayer3050
@gameplayer3050 Рік тому
I am an avid geocacher and recently, one of my friends (fellow Geocacher) had his birthday. As a present, I placed a geocache for him and made the riddle exactly this. A 16x16 block with the task of spotting the error. He really liked it. And I have to thank you for that. Thank you for such a great and clear video. A video that enabled me to make a cool geocaching mystery cache out of it.
Hamming codes part 2: The one-line implementation
16:50
3Blue1Brown
Переглядів 832 тис.
Researchers thought this was a bug (Borwein integrals)
17:26
3Blue1Brown
Переглядів 3,2 млн
БРАВЛЕРЫ ОТОМСТИЛИ МАТЕРИ😬#shorts
00:26
She couldn't Believe This! (Mind blowing)😱 #shorts
00:24
What is error correction? Hamming codes in hardware
36:46
Ben Eater
Переглядів 237 тис.
Fast Inverse Square Root - A Quake III Algorithm
20:08
Nemean
Переглядів 4,8 млн
How to lie using visual proofs
18:49
3Blue1Brown
Переглядів 3 млн
The almost impossible chessboard puzzle
32:17
Stand-up Maths
Переглядів 984 тис.
Oh, wait, actually the best Wordle opener is not “crane”…
10:53
But what is a convolution?
23:01
3Blue1Brown
Переглядів 2,4 млн
Error Correcting Curves - Numberphile
17:46
Numberphile
Переглядів 228 тис.
Time Stops at the Speed of Light. What Does that Mean?
8:20
Sabine Hossenfelder
Переглядів 227 тис.
But what is the Central Limit Theorem?
31:15
3Blue1Brown
Переглядів 3,2 млн
This equation will change how you see the world (the logistic map)
18:39
БРАВЛЕРЫ ОТОМСТИЛИ МАТЕРИ😬#shorts
00:26