The Hair Algorithm - Computerphile
Key Takeaways
The video explains the concept of algorithms in computer science, using examples such as washing hair and traveling from Nottingham to London, and discusses the importance of analyzing cost and performance in algorithm design.
Full Transcript
we use algorithms all the time algorithms are sets of instructions to do something okay so they're just like the recipes in a cookbook they're interested for computers and two ways cuz computers actually aren't very good at making sense of things okay so they do exactly what the instruction says let's think of a really simple one washing your hair shampoo so and normally it'll say wet hair that's an algorithm you wet your hair you apply the shampoo you wash and then you rinse and each of these are instructions and each of these instructions are chained together in order to give you essentially a little bit of what we'd call a program so that makes sense you know what that means so some shampoo bottles have that so you also know what that means it means you do it twice computer wouldn't know that and would perpetually wash your hair so you'd never have dry hair so designing those algorithms and understanding them is core to how we think as computer scientists how then do you understand if things will stop what's called terminate how long will they take to do things understanding how costly those algorithms are and whether they have certain properties like they work is important okay so the algorithm for the Assembly of furniture at Ikea you may argue and many people do rather violently argue that they don't work they've missed something out they've forgotten to tell you something understanding the equivalent in a computer system is what algorithm design and algorithm analysis is about so to give you another example of that an algorithm to get from here to London so Nottingham to London I would say um noam's in the Midlands so you need to head south that's one style it's not exactly a great set of instructions so this again is the next thing that happens you have to figure out what the appropriate levels of instruction is to do that okay so that it's more of an instruction rather than a a vague suggestion right um so let's try again so going to London okay um bus to the train station get on train get the train to S pankas get off so that's closer to algorithm but you could also say get a taxi get in your car drive to London get out you could say fly private helicopter picks you up outside this building flies you directly to S London and drops you off now all of those algorithms all achieve the same end they get you from here to London but they're all different aren't they all a bit and some of them sound a bit Preposterous as I've said them as well but they all have two properties that I think are important to think think about okay how much do they cost cuz obviously renting a helicopter going to be pricier even today still pricier than getting a ticket on the train um driving with fuel prices um will have another cost and and so that cost is important and they'll also have different speeds one would envisage the helicopter getting there faster um than the train and the train probably being a bit bit slower than the car so each of those kind of costs and performances are important okay and so a lot of what we do is analyzing cost and performance how much resource do we have to use to do the algorithm and then how fast will it be or what will it achieve or how will it do that a lots of what we do in Computing is to actually figure out the best algorithm the best set of instructions and the best tactic for those sets of instructions to do that so things like sorting a set of numbers becomes important not that you eventually get a sorted set of numbers but that they're done fast enough and that the cost of doing it is low enough
Original Description
Just what is an algorithm? - Before Computerphile delves into complex computer theory, we define algorithms and how they are used in Computer Science.
http://www.facebook.com/computerphile
https://twitter.com/computer_phile
This video was filmed and edited by Sean Riley.
Computer Science at the University of Nottingham: http://bit.ly/nottscomputer
Computerphile is a sister project to Brady Haran's Numberphile. See the full list of Brady's video projects at:http://periodicvideos.blogspot.co.uk/...
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Computerphile · Computerphile · 4 of 60
1
2
3
▶
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
Follow the Cookie Trail - Computerphile
Computerphile
EXTRA BITS - Follow the Cookie Trail - Computerphile
Computerphile
Musical Floppy Drives - Computerphile
Computerphile
The Hair Algorithm - Computerphile
Computerphile
Getting Sorted & Big O Notation - Computerphile
Computerphile
Quick Sort - Computerphile
Computerphile
Hyper History and Cyber War - Computerphile
Computerphile
Entropy in Compression - Computerphile
Computerphile
Original Elite on the BBC B - Computerphile
Computerphile
IP Addresses and the Internet - Computerphile
Computerphile
A Career in Video Games - Computerphile
Computerphile
Error Detection and Flipping the Bits - Computerphile
Computerphile
Programming BASIC and Sorting - Computerphile
Computerphile
Birthplace of the World Wide Web - Computerphile
Computerphile
Punch Card Programming - Computerphile
Computerphile
Programming Paradigms - Computerphile
Computerphile
CERN Computing Centre (and mouse farm) - Computerphile
Computerphile
Error Correction - Computerphile
Computerphile
Home-Made Code - Computerphile
Computerphile
Security of Data on Disk - Computerphile
Computerphile
Gesture Controls - Computerphile
Computerphile
How Intelligent is Artificial Intelligence? - Computerphile
Computerphile
Encryption and Security Agencies - Computerphile
Computerphile
Virtual Machines Power the Cloud - Computerphile
Computerphile
Hacking Websites with SQL Injection - Computerphile
Computerphile
How Huffman Trees Work - Computerphile
Computerphile
Cracking Websites with Cross Site Scripting - Computerphile
Computerphile
Cloud Computing (Cloudy with a Chance of Pizza) - Computerphile
Computerphile
Texting Cabbage with a Recorder - Computerphile
Computerphile
Hashing Algorithms and Security - Computerphile
Computerphile
How YouTube Works - Computerphile
Computerphile
How NOT to Store Passwords! - Computerphile
Computerphile
A New Golden Age of Video Games - Computerphile
Computerphile
A Universe of Triangles - Computerphile
Computerphile
Cross Site Request Forgery - Computerphile
Computerphile
The True Power of the Matrix (Transformations in Graphics) - Computerphile
Computerphile
The Great 202 Jailbreak - Computerphile
Computerphile
EXTRA BITS - Printing and Typesetting History - Computerphile
Computerphile
Triangles to Pixels - Computerphile
Computerphile
The Problem with Time & Timezones - Computerphile
Computerphile
The Visibility Problem - Computerphile
Computerphile
Lights and Shadows in Graphics - Computerphile
Computerphile
The Penguin Barcode - Computerphile
Computerphile
Typesetters in the '80s - Computerphile
Computerphile
The Font Magicians - Computerphile
Computerphile
The Little Mac with the Big Bite - Computerphile
Computerphile
EXTRA BITS - More on the Original Mac at 30 - Computerphile
Computerphile
XP to Ubuntu with an 8yr old Hacktop - Computerphile
Computerphile
EXTRA BITS - Hacktop Real-Time Boot Comparison - Computerphile
Computerphile
EXTRA BITS - Making a Bootable USB in Linux - Computerphile
Computerphile
EXTRA BITS - Installing Ubuntu Permanently - Computerphile
Computerphile
The Dawn of Desktop Publishing - Computerphile
Computerphile
What is Bootstrapping? - Computerphile
Computerphile
Reverse Polish Notation and The Stack - Computerphile
Computerphile
Home-Made Z80 Retro Computer - Computerphile
Computerphile
Should Everybody Learn to Code? - Computerphile
Computerphile
Programming in PostScript - Computerphile
Computerphile
Heartbleed, Running the Code - Computerphile
Computerphile
YouTube's Secret Algorithm - Computerphile
Computerphile
YouTube Search & Discovery - Computerphile
Computerphile
More on: Algorithm Basics
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
Bloom Filters, Explained Properly
Dev.to · Daksh Gargas
Prefix Sums: The Preprocessing Trick That Makes Range Queries Instant
Medium · Programming
I Thought I Was Ready for the Interview — Then One Simple Math Question Destroyed Me
Medium · Programming
Week 2(Day 10): LeetCode Two Pointers(slow & fast): Remove Duplicates from Sorted Array (Brute…
Medium · Python
🎓
Tutor Explanation
DeepCamp AI