1. Algorithms and Computation

  Рет қаралды 1,313,719

MIT OpenCourseWare

MIT OpenCourseWare

Күн бұрын

MIT 6.006 Introduction to Algorithms, Spring 2020
Instructor: Jason Ku
View the complete course: ocw.mit.edu/6-006S20
KZbin Playlist: • MIT 6.006 Introduction...
The goal of this introductions to algorithms class is to teach you to solve computation problems and communication that your solutions are correct and efficient. Models of computation, data structures, and algorithms are introduced.
License: Creative Commons BY-NC-SA
More information at ocw.mit.edu/terms
More courses at ocw.mit.edu
Support OCW at ow.ly/a1If50zVRlQ
We encourage constructive comments and discussion on OCW’s KZbin and other social media channels. Personal attacks, hate speech, trolling, and inappropriate comments are not allowed and may be removed. More details at ocw.mit.edu/comments.

Пікірлер: 553
@Antagon666
@Antagon666 2 жыл бұрын
My semester on university: *Starts. Me: *Watches completely unrelated lectures from MIT.
@randyt700
@randyt700 2 жыл бұрын
Sounds like youre thinking of changing majors 😆
@codedecode1498
@codedecode1498 2 жыл бұрын
@@randyt700 lol
@onesecond2471
@onesecond2471 2 жыл бұрын
+1bro , this hits me deep 😂😂
@businessleadershipandmanag522
@businessleadershipandmanag522 2 жыл бұрын
Thanks to Technology. Im in Africa Uganda but I feel like as if Im at MIT. Thank you very much for the lecture.
@elhermeneutico
@elhermeneutico 2 жыл бұрын
Are you acquainted with Pasta Sempai?
@fragileomniscience7647
@fragileomniscience7647 2 жыл бұрын
@@elhermeneutico "But before you leave, do you recognize these things?" Jk, that's a beautiful comment and is amazing that this knowledge can reach the whole world.
@haryowicaksono5397
@haryowicaksono5397 2 жыл бұрын
THIS!! im from indonesia we dont exactly have the best education in the world so this channel has been a blessing for me
@therealb888
@therealb888 2 жыл бұрын
@UCTPCE7ckUioWlMK1nBThsfg lol that joke you're an a hole but funny af.
@gigahertz_1911
@gigahertz_1911 2 жыл бұрын
love to see this
@allandogreat
@allandogreat 2 жыл бұрын
I took Linear algebra, Algorithms, probability, and signal and systems at MIT. Thanks.
@niceperson6412
@niceperson6412 2 жыл бұрын
You must be a genius then :-)
@moazhendy9394
@moazhendy9394 2 жыл бұрын
I'm not gonna say how lucky you are cuz i can realize how much worked was required to achieve such a thing!
@armorkinggaming1933
@armorkinggaming1933 Жыл бұрын
Chop andu
@expertjung
@expertjung 4 ай бұрын
How did you like signal and systems course?
@aftabbyofficial
@aftabbyofficial 2 ай бұрын
Via Online?
@user-gn2ev1nu1p
@user-gn2ev1nu1p 8 ай бұрын
There is a big difference between learning what's going on under the hoods of algorithms, instead of just jumping directly to learn a programming language, it's a really explained architecture course, thanks MIT
@dn7us
@dn7us 7 ай бұрын
I highly admire American intellectuals. Putting out free high quality contents for the rest of the world to learn. Thank you!
@ParthPatel-vj2zv
@ParthPatel-vj2zv 2 жыл бұрын
0:00 intro, goals of the course 2:59 what is an algorithm 11:10 birthday problem 15:15 correctness of an algorithm 25:35 efficiency of an algorithm 36:50 model of computation 42:35 why use data-structures
@nikhilprem7998
@nikhilprem7998 2 жыл бұрын
great
@LuizHenrique-vc4gm
@LuizHenrique-vc4gm 2 жыл бұрын
Thanks
@queenmanu9690
@queenmanu9690 2 жыл бұрын
Thank u mate
@gp10020
@gp10020 2 жыл бұрын
I find this guy hard to follow?
@scotturista2386
@scotturista2386 2 жыл бұрын
@@gp10020 agree
@codeschool3964
@codeschool3964 2 жыл бұрын
Thanks a lot MIT. What you have done by sharing these resources for free to the whole world is beyond my skill of appreciation. May your institute and its glory grow and prosper!
@michaelldesanta822
@michaelldesanta822 2 жыл бұрын
There is no way anyone can get bored in lectures like these, such a great professor
@jackmiller9829
@jackmiller9829 2 жыл бұрын
but u of t courses easy to get bored
@atlantic_love
@atlantic_love Жыл бұрын
@@jackmiller9829 See dat dare cumpooter? Sheez go'n to uhlauh uss to proagram. At least that's how my family from down there sounds.
@CP-jk3tc
@CP-jk3tc Жыл бұрын
lmao he's so unprepared he couldn't express the concept or answer the questions clearly enough. And what is this 1980 style presentation 1/10 precious time wasted on writing and deleting the blackboard.
@NostraDavid2
@NostraDavid2 Жыл бұрын
@@CP-jk3tc Much more engaging than what Princeton provides for free, which was made by the writers of the Algorithms book, so... MIT is doing it better, IMO.
@wentworthmiller1890
@wentworthmiller1890 10 ай бұрын
@@CP-jk3tc Beg to differ mate - a bit of a rant, pardon! This method actually results in better processing and retention of the content being taught, by the human brain. Maybe a waste of 1/10 precious time, but those paying top dollar to actually learn there are getting their time and money's worth! For us online ones - it's actually free! Watch at 1.5 the speed and save all you want! 🙂But do not underestimate the power of 1980 method, and dismiss it in favor of modern, but lesser lasting ones! The prof also drew the learners logically into the inductive reasoning and WORD-RAM model, instead of just throwing it out there. Engaging IMO. Must laud the prof. Am already liking these lectures over the 2011 class. However Erik Demaine remains that one constant that defines passion, and is always a treat to watch. What a humble guy, to have earned PhD at just 20 years old, but being so accessible! MIT FTW!
@AmiraMahmoud7
@AmiraMahmoud7 2 жыл бұрын
The professor simplifies everything, Thank you so much for sharing this informative content
@yuluqin6463
@yuluqin6463 Жыл бұрын
The professor is full of passion! Very clear structure, thank you!
@supriyosarkar5132
@supriyosarkar5132 2 жыл бұрын
Always wanted to go to MIT, unfortunately I couldn't. Thank you so much MIT for giving us the opportunity to learn from the best from these videos.
@therealb888
@therealb888 2 жыл бұрын
I think I am walking in your footsteps too. My chances are slim but I'd still give it a shot.
@Sanyu-Tumusiime
@Sanyu-Tumusiime 2 жыл бұрын
@@therealb888 definately try. if you can do some olympiads and win a good medal then you have a good chance of joining MIT.
@Sanyu-Tumusiime
@Sanyu-Tumusiime 2 жыл бұрын
@@therealb888 unfortunately i know one guy who got rejected by MIT accepted to Harvard so it's not the end of the world
@NazriB
@NazriB 2 жыл бұрын
Lies again? Serie A Leader
@cantcommute
@cantcommute 2 жыл бұрын
Bro just grab a book and read why do you think being in a different building will change anything
@sumitbali9194
@sumitbali9194 2 жыл бұрын
Thank you MIT for these uploads. Love the way Ku teaches
@unorandom3009
@unorandom3009 2 жыл бұрын
After 10 years of open course finally video quality went from 360p to super high res in 1080p
@covidhoax7646
@covidhoax7646 2 жыл бұрын
The quality of the instruction decreased with time, unlike the video quality.
@1wb7kj
@1wb7kj 2 жыл бұрын
We need 4k
@pasxizeis
@pasxizeis 2 жыл бұрын
I think the teacher has set a goal on daily steps and tries to accomplish it while teaching. Which is a nice life hack.
@2fty
@2fty 2 жыл бұрын
I can't believe I'm watching these type of videos for entertainment.
@jianxinhuang2465
@jianxinhuang2465 2 жыл бұрын
Me too, I don't want to read code so I am watching the course for relaxation!
@fb079
@fb079 2 жыл бұрын
This is fantastic I love their energy and enthusiasm which make the lecture fun and interesting
@therealb888
@therealb888 2 жыл бұрын
Finally!! I've been asking for this ever since I took course 6. Thank you.
@rushingyew
@rushingyew 2 жыл бұрын
Thanks for bringing an updated version of this class back.
@arsh99119
@arsh99119 Жыл бұрын
thearshblog.blogspot.com/2022/09/beating-youtube-algorithm.html how to beat KZbin Algorithm 👆
@SamuelTttghk..
@SamuelTttghk.. Жыл бұрын
This prof.'s energy when he teaches is on another level.
@camilohurtado3543
@camilohurtado3543 2 жыл бұрын
This only video has much more valuable content than any entire Colombian computer science program. Thanks, MIT.
@nqobilesibisi3544
@nqobilesibisi3544 8 ай бұрын
high quality knowledge at the palm of our hands , what a time to be alive. thank you MIT.
@mayankjangid1543
@mayankjangid1543 2 жыл бұрын
Thank you MIT for these fabulous lectures!
@ousmanecisse9448
@ousmanecisse9448 2 жыл бұрын
It is very knowledgeable thanks. I need the way to make a dashboard for a mining activity (trucks, scoop, jumbo, solo, Excavator, Loader....)
@dheerajrao3776
@dheerajrao3776 2 жыл бұрын
Sooo good.
@jackmiller9829
@jackmiller9829 2 жыл бұрын
self learning algorism
@julian_handpan
@julian_handpan 7 ай бұрын
until you spot that the teacher doesn't know induction xD
@_boris
@_boris 2 жыл бұрын
Finally a refresher to a legendary course God bless
@quasa0
@quasa0 2 жыл бұрын
Is there anywhere this course completely uploaded somewhere already? Like from past years, but not too old?
@chilly111
@chilly111 2 жыл бұрын
@@quasa0 There is both 2011 and 2008, you can find them linked at this courses page (description)
@mickeymacke1780
@mickeymacke1780 2 жыл бұрын
which one do you think is the best, in terms of quality of instruction? 2008, 2011 or 2020?
@ehza
@ehza 2 жыл бұрын
@@mickeymacke1780 I would say 2020, but if you want to improve on Algorithms, then problem solving is vital, and also don't forget to checkout problem sets
@kartiksangwan3302
@kartiksangwan3302 2 жыл бұрын
@@ehza Do we get solutions to the problem sets?
@frankchen9264
@frankchen9264 2 жыл бұрын
This is an amazing lecture! Thanks for let me revise my algorithm and data structure knowledge after I become an engineer.
@chiefsittingstill6061
@chiefsittingstill6061 Жыл бұрын
The explanation on words (in the models of computation section, towards the end of the lecture) was excellent and has enabled me to understand the concept better than any previous explanations I've encountered - thanks! Jason did admit he couldn't spell; I'd suggest it's "arbitrarily-sized" (inputs), not what he wrote on the board 😉
@SirAlph4
@SirAlph4 2 жыл бұрын
MIT is sick. Its way better then my university course and I m not even a native speaker. Kudos to Jason Ku
@sbstorage95
@sbstorage95 2 жыл бұрын
thank you for these videos, ilook forward to the rest of the videos in this course
@thelawgameplaywithcommenta2654
@thelawgameplaywithcommenta2654 2 жыл бұрын
I define a problem as a question pertaining to an unknown variable or function, in the programing sense, but more abstract. I define a computation as a calculation. Therefore, I define a computational problem as a question pertaining to a calculation, or, in other words, a question about what algorithm is necessary to find a desired output.
@UmarFarooq-tw7vh
@UmarFarooq-tw7vh 2 жыл бұрын
Thank you MIT for these amazing lectures.
@jujijiju6929
@jujijiju6929 2 жыл бұрын
I love the sound those massive chalks make on those blackboards. Very pleasant.
@staleciabatta1
@staleciabatta1 Жыл бұрын
Thank you MIT! Here we go let's learn! I'm a self-taught Developer hoping to improve my algorithm skills.
@danielhaga9327
@danielhaga9327 Жыл бұрын
I look forward to hearing more
@jimson7070
@jimson7070 6 ай бұрын
I found happiness cause you see people like you who code and the talk about ideas.
@vedangsharma1000pixels
@vedangsharma1000pixels Жыл бұрын
Thank you MIT for publishing such video lectures
@HerbeyStudies
@HerbeyStudies 27 күн бұрын
2 years back I had the privilege to do an interview with Dr Ku for a high school project. He was wonderful, very warm and down-to-earth. I was honestly shitting bricks cos I was so nervous but his friendliness helped me ease into the whole thing. All around great guy.
@benjaminli21
@benjaminli21 2 жыл бұрын
Thank you MIT for sharing this to the public
@daydreamed
@daydreamed 2 жыл бұрын
Timely upload, thank you, MIT
@infor_digital
@infor_digital Жыл бұрын
this's an amazing lecture. love it professor.
@sagarjoshi3481
@sagarjoshi3481 Жыл бұрын
thankyou MIT OCW, for these lectures.
@michaelempeigne3519
@michaelempeigne3519 2 жыл бұрын
I like to say that an algorithm is a set of instructions that will take you from the beginning to the end in a particular order so long as there are no errors.
@andrewzhang5345
@andrewzhang5345 2 жыл бұрын
It’s a good definition if the algorithm is deterministic.
@JUST_C0DE
@JUST_C0DE Жыл бұрын
@@andrewzhang5345 who cares about the defination
@nihalbhandary162
@nihalbhandary162 6 ай бұрын
@@JUST_C0DE In practice you wont find that many deterministic algorithms.
@ChrisTian-ox5nr
@ChrisTian-ox5nr 2 жыл бұрын
Literally best instructor ever!!
@OliviaLearns
@OliviaLearns 2 жыл бұрын
these lecture series are so amazing! I am so thankful they're available to the public
@arsh99119
@arsh99119 Жыл бұрын
thearshblog.blogspot.com/2022/09/beating-youtube-algorithm.html how to beat KZbin Algorithm 👆
@azizulhoq7402
@azizulhoq7402 2 жыл бұрын
I am Form Bangladesh I liked the lecture very much, Especially Sir's Explanation was very nice
@hardeepsinghpuri7250
@hardeepsinghpuri7250 2 жыл бұрын
Love the enthusiasm, thanks mit
@noodlebowls8896
@noodlebowls8896 Ай бұрын
MIT, the one school where I can somewhat understand the expensive tuition of private universities. You get the professor like these to teach the students. Luckily for a broke student like me, I can partake in these amazing lectures.
@johnmahugu
@johnmahugu 25 күн бұрын
Awesome, we have been waiting for this, thank you. Nairobi Kenya.
@isalutfi
@isalutfi 2 жыл бұрын
Thank you MIT!
@coffecoding
@coffecoding Жыл бұрын
I am fortunate enough to live in an era which I can live in Sri Lanka 🇱🇰 and watch these valuable lessons from MIT
@user-re1qy6kd6p
@user-re1qy6kd6p 2 ай бұрын
⏱Timestamps for this video! 0:00 - Introduction to the Algorithms Course 1:00 - Goals of the Course 3:24 - Understanding Computational Problems 9:38 - Definition of Algorithms 15:41 - Understanding algorithm correctness 26:18 - Measuring algorithm efficiency 33:00 - Understanding Running Time 36:31 - Model of Computation 43:18 - Data Structures 🧙‍♂✨ Generated with Houdini Chrome extension.
@user-vv4ex8wk2u
@user-vv4ex8wk2u Ай бұрын
The teacher is the reason we love the subject. As a teacher I ve learned to be energetic
@krishanranaweera2961
@krishanranaweera2961 2 жыл бұрын
Thanks MIT, watching from Sri Lanka.
@MrStarchild3001
@MrStarchild3001 Ай бұрын
Introduction and Goals of the Course: - The goal of this Introduction to Algorithms course is to teach students how to solve computational problems and communicate that their solutions are correct and efficient. - Beyond just solving problems, the course emphasizes proving correctness, arguing efficiency, and communicating these ideas clearly. Students will do more writing than coding. - An algorithm is a fixed-size procedure that takes an arbitrary-sized input and produces a correct output. What is a Problem?: - A computational problem consists of a set of possible inputs and outputs. The problem specifies a binary relation mapping each input to a set of correct outputs. - Problems are usually defined using a predicate to check if an output is correct for a given input, not by explicitly listing all input-output pairs. - The course focuses on general problems that can take arbitrarily large inputs, requiring the algorithm to loop or recurse to process the entire input. What is an Algorithm?: - An algorithm is a fixed-size procedure that takes an input of arbitrary size and generates one of the correct outputs specified by the problem. - If the algorithm generates an output for an input, it must be a correct output according to the problem specification. - Algorithms are like recipes - a sequence of steps that will return an output for any valid input. Birthday Problem Algorithm: - As an example, consider the problem of determining if any pair in a group of people share the same birthday, generalizing to any "birth time" to make matches less likely. - A proposed algorithm is: Maintain a record of birth times. Interview each person in order. Check if their birth time is already in the record. If so, return the match. If not, add it to the record and continue. If no matches after checking everyone, return no match. Proving Algorithm Correctness: - With large inputs, we can't just test an algorithm on all possibilities to argue its correctness. Instead, we use induction. - The key is finding an inductive hypothesis that can be proven true for a base case and all larger instances. - For the birthday problem, the inductive hypothesis is: If the first K people contained a match, the algorithm would return a match before interviewing person K+1. - Base case: Trivially true for K=0. - Inductive step: Assume true for K. If first K+1 contain a match, either: 1) the match was in the first K and algorithm already returned it, or 2) the match includes person K+1, which the algorithm will find and return when checking against the first K people's records. - By induction, if a match exists, the algorithm returns it before running out of people to interview. If it interviews everyone without returning a match, then no match exists. Arguing Algorithm Efficiency: - An important aspect of an algorithm beyond correctness is its efficiency - how fast does it run and how does that compare to other possible algorithms? - Measuring actual running time is problematic as it depends on the particular input, the speed of the machine, and other implementation details. - Instead, we count the number of fundamental operations executed by the algorithm to get an input-size-dependent measure irrespective of machine or implementation. - The number of operations an algorithm requires as a function of input size n is used to classify it using asymptotic notation: - Constant time: O(1), runs in bounded time irrespective of n - Logarithmic time: O(log n) - Linear: O(n) - Log-linear: O(n log n) - Polynomial: O(n^c) for constant c > 1 (e.g. quadratic is c=2) - Exponential Time: O(2^n), considered "intractable" - In this class, "efficient" generally means polynomial time, with linear or near-linear time being even better. Exponential is considered inefficient. Models of Computation: - To measure efficiency abstractly in terms of fundamental operation counts, we need a model specifying what operations a computer can do in constant time. - The model used in this class is the Word RAM: - Assumes a CPU connected to a large random access memory (RAM) consisting of a sequence of bits - The CPU can read/write a word-sized block of memory in constant time (modern word size is 64 bits) - The CPU can do integer arithmetic, comparisons, and logical bit operations on a constant number of words in constant time - The word RAM allows any individual word in memory to be accessed in constant time. However, accessing all n words of an arbitrary-size input requires O(n) operations.
@MrStarchild3001
@MrStarchild3001 Ай бұрын
Data Structures: - If the CPU fundamentally takes constant time to operate on a constant amount of data, how can we efficiently process inputs of arbitrary size that don't fit in a constant number of words? - Data structures provide efficient ways to store and access large amounts of data to enable certain operations on that data to be performed quickly. - Different data structures optimize different operations. Choosing the right data structure is key to designing an efficient algorithm. - The first part of the course focuses on data structures like arrays, lists, stacks, queues, dictionaries, sets, and various tree structures. Overview of Topics in Rest of Course: - The first part of the course focuses on data structures and sorting algorithms - The second part covers graph algorithms and shortest path problems - The last part delves into dynamic programming, a powerful general design technique for optimization problems - Most computational problems are solved by either: 1) Reducing them to a problem with a known solution (often involving sorting or searching data structures) 2) Designing a custom recursive divide-and-conquer algorithm - The course teaches different algorithm design paradigms to attack different classes of problems Diving Deeper Into Key Topics Covered: Asymptotic Notation: - Used to classify algorithms based on how their running time or space requirements grow as the input size n grows - Big-O notation gives an upper bound, big-Omega a lower bound, and big-Theta a tight bound on the growth rate - Exponential growth O(2^n) quickly becomes intractable while polynomial growth O(n^c) for constant c is generally considered "efficient" - Logarithmic growth O(log n) is even better than polynomial - nearly as good as constant time for large n - Big-O ignores constant factors and lower order terms, only focusing on the growth rate of the dominant term as n gets large - Allows comparing algorithms in a implementation and machine independent way to see how they scale Induction and Recursion: - Induction is used to prove propositions that assert something is true for all natural numbers n - Proves a base case, then the inductive step which shows if the proposition holds for some number k, it must also hold for k+1 - This allows conclusions to be made about arbitrary sized sets, key for analyzing general purpose algorithms - Recursion solves a problem by solving smaller subproblems of the same type and combining their results - Recursive algorithms are often simple and elegant, leveraging induction to prove their correctness - However, naive recursive solutions can often be inefficient, requiring optimization techniques like dynamic programming Word RAM model: - Assumes modern random access memory (RAM) hardware where any memory word can be accessed in constant time - Memory is byte-addressable, with 64-bit words being the atomic unit the CPU can operate on - Abstracts away low-level details of a specific computer architecture while still being realistic - Allows analysing algorithms in a implementation independent way by counting fundamental word operations - Enables use of data structures beyond just arrays by assuming any word can be efficiently retrieved - However, still requires accessing n words to fully process an input of size n Arrays: - Contiguous area of memory storing a fixed number of equal-sized data elements indexed by contiguous integers - Constant time access to any element by index using simple address arithmetic - Constant time to add/remove elements from the end, but linear time to insert/delete from middle as shifting is required - Inflexible since size cannot change, but space efficient with minimal overhead Linked Lists: - Stores elements non-contiguously in nodes containing the element and a reference to the next node - Access to an element requires traversing the references, taking linear time - But constant time insert/delete just by updating references, and flexible since grows/shrinks easily - Tradeoff of greater overhead and poor locality compared to arrays, but gains flexibility Stacks and Queues: - Restrict access to elements for certain patterns. - A stack is LIFO - last-in-first-out. Can only add/remove from one end called the top. - A queue is FIFO - first-in-first-out. Add to the back and remove from the front. - Both support operations in constant time using either an array or linked list as underlying structure. Dictionaries and Sets: - A dictionary stores a collection of key-value pairs and provides fast operations to insert, delete, modify, or lookup a value by key - A set is a collection of distinct elements that provides fast operations to insert, delete, and test membership of an element - Arrays provide O(n) implementation, but searching takes linear time. Sorted arrays enable binary search for O(log n) lookups. - Hash tables use a hash function to map keys to array buckets, providing amortized constant time average case for all operations. - Balanced binary search trees like AVL trees also support all dictionary/set operations in O(log n) time worst case. Priority Queue: - Stores a set of elements, each with an associated priority value - Core operations: Insert an element, and delete and return the element with the highest priority - Can be used for task scheduling, event simulation, graph algorithms like Prim's and Dijkstra's - Often implemented as a heap - a complete binary tree structure providing O(log n) insert and delete-max Graphs: - Graph G=(V,E) consists of a set of vertices V and set of edges E connecting pairs of vertices - Edges can be undirected or directed, unweighted or weighted with a cost to traverse - Can represent many real-world problems like maps, networks, dependencies, transition systems - Key representations are adjacency matrix and adjacency list, allowing tradeoff between simplicity and scalability - Two core graph search algorithms are Breadth-First Search and Depth-First Search, used as building blocks for many graph problems Shortest Path Algorithms: - Given a weighted graph and a starting vertex s, find shortest paths from s to all vertices - Key algorithms are Dijkstra's for graphs with non-negative edge weights, and Bellman-Ford for graphs that may have negative weights - Dijkstra's iteratively grows a set of vertices for which it has found the shortest path, using a priority queue to select the next closest vertex to add - Bellman-Ford iteratively relaxes all edges, propagating shortest path estimates until they converge - Both have many applications like navigation systems, network routing, AI pathfinding Dynamic Programming: - A powerful algorithmic technique for optimization problems, especially where naive solutions have exponential runtime due to repeatedly solving the same subproblems - Works by building up solutions to larger problems from solutions to smaller subproblems, filling in a table to efficiently look up and reuse common subproblem solutions - Makes problems tractable by turning exponential brute-force searches into efficient polynomial time solutions - Can solve a broad range of problems like combinatorial optimization, graph algorithms, string algorithms, and resource allocation Algorithm Design Techniques: - Brute Force: Try all possibilities (e.g. combinatorial search). Simple but inefficient, usually takes exponential time. - Divide and Conquer: Recursively break down problem into smaller subproblems of the same type, solve them, then combine results to solve overall problem. - Greedy: Make a locally optimal choice at each stage, hoping this leads to a globally optimal solution. Often efficient but doesn't always produce the optimal result. - Dynamic Programming: Fill in a table of solutions to subproblems and use them to build up an optimal solution to the overall problem bottom-up. Efficient for optimization problems with optimal substructure and overlapping subproblems. Computational Complexity: - P is the class of problems that can be solved in polynomial time O(n^c) for some constant c. Most "easy" problems are in P. - NP is the class of problems whose solutions can be verified in polynomial time. All P problems are NP but some NP problems are likely harder than P. - NP-Complete problems are a set of "hardest" problems in NP. If any of them can be solved in polynomial time, they all can, and P=NP. - Many important real-world optimization problems are NP-Complete, so study of approximation algorithms that efficiently compute near-optimal solutions is a major research area. Conclusion: This introductory algorithms course focuses on teaching how to solve computational problems and rigorously argue the correctness and efficiency of the solutions. It starts with fundamental data structures and builds up to powerful techniques like dynamic programming that can tackle seemingly intractable problems. Along the way it dives into key areas like sorting, graphs, and shortest paths that have many practical applications. It provides the conceptual tools and analytical frameworks to approach the design and analysis of algorithms for a wide range of computational problems. Mastering these techniques opens up a powerful toolkit for developing efficient, elegant, and provably correct solutions to real-world computational challenges.
@narenm.s8923
@narenm.s8923 Жыл бұрын
I always wanted to study in mit but i don't have money Now mit is uploading classes that's awesome
@leprotto89
@leprotto89 2 жыл бұрын
Nice to see that Michael Reeves is uploading again. Also I knew he was gonna go some places, but MIT... Congrats
@yuvaraninandagopal1115
@yuvaraninandagopal1115 2 жыл бұрын
Perfect start!!!
@dreamxml
@dreamxml 2 жыл бұрын
Absolutely spot on.
@pbice
@pbice 2 жыл бұрын
Because the speaker is always walking around, I think we have to thanks the cameraman, he's really doing well.
@AlpGuneysel
@AlpGuneysel 2 жыл бұрын
You can do that with algorithms. :)
@pbice
@pbice 2 жыл бұрын
​@@AlpGuneysel Oh, I forgot, this is MIT
@user-tl8gq3gl2n
@user-tl8gq3gl2n 7 ай бұрын
Thanks for MIT, I am Iran and it is tough to come there for studying .it is pleasure to be able to learn via internet.
@rishiravi7312
@rishiravi7312 2 жыл бұрын
thanks to the mit for giving us oppurnity to learn interesting topics thank you
@Eltopshottah
@Eltopshottah Жыл бұрын
What a time to be alive thanks MIT 🎉
@sebastiangrajales1493
@sebastiangrajales1493 2 жыл бұрын
Ily Jason Ku and MIT
@SPaICTHub
@SPaICTHub 2 жыл бұрын
Thanks for the explicit explanation. From Nigeria.
@euniversitybangladesh710
@euniversitybangladesh710 2 жыл бұрын
Thank you very much for the lecture.
@MrDivyanshu33
@MrDivyanshu33 2 жыл бұрын
The materials on the website makes me feel like I am actually taking this class.
@HomeboyWild
@HomeboyWild 2 жыл бұрын
the fact that we are able to attend lectures online at one of the most prestigious schools in the country is amazing!
@convex2172
@convex2172 2 жыл бұрын
Absolutely, people today are so lucky.
@rifathossain328
@rifathossain328 2 жыл бұрын
these teachers are amazing ..
@ShawCreations
@ShawCreations 5 ай бұрын
You guys have helped me so much ! I can’t believe this is free! God bless😊 subscribed
@guliyevshahriyar
@guliyevshahriyar Жыл бұрын
Very good teacher, thank you Jason.
@vishal.choudhury
@vishal.choudhury 2 жыл бұрын
If MIT uploads all the lectures on youtube nobody will be deprived of eduction in this world.
@Tony-tu8uz
@Tony-tu8uz 2 жыл бұрын
thank you for this lecture!
@MarkoVasev
@MarkoVasev Ай бұрын
Thanks to these lectures uploaded from 2020 I can watch these from 1994. Thank you so much.
@govikris748
@govikris748 2 жыл бұрын
I believe an algorithm is not a function as functions have predefined output based on a set of sequential operations. It may be made up of multiple functions but Algorithm is more closely related to the technique to derive a function or procedure to find a solution to the problem.
@therealb888
@therealb888 2 жыл бұрын
The definition of the problem is also the definition for a mathematical function. Highly recommend taking a course of sets, relations and functions, proofs n induction in maths, along with an introductory programming course in C/ C++/Python to learn about arrays, strings, etc
@iheartalgebra
@iheartalgebra 2 жыл бұрын
The definition of the problem is a mathematical relation, but it is not necessarily a function since the problem may have many correct outputs for a given input
@AmiraMahmoud7
@AmiraMahmoud7 2 жыл бұрын
Thank you so much for sharing
@Asus76060
@Asus76060 5 ай бұрын
Information for free! Brilliant:) god bless you educators for such amazing knowledge you’re will to hand out to the world 😊 subscribed
@beingsurfers
@beingsurfers 2 жыл бұрын
Thanks Sir And MIT Watching From Varanasi INDIA 🇮🇳🇮🇳🙏🙏🙏
@MdAsif-ue7ru
@MdAsif-ue7ru 2 жыл бұрын
Thank you very much for making this fabulous course not only for Harvard students but also for other students.
@enisten
@enisten 2 жыл бұрын
Do you mean MIT is doing this primarily for Harvard students to catch up with them?! LOL
@MdAsif-ue7ru
@MdAsif-ue7ru 2 жыл бұрын
@@enisten No brother, but I think so sometimes.
@davyroger3773
@davyroger3773 2 жыл бұрын
The Harvard CS courses seem more concerned with the grandeur of their lecture halls than the depth of the content it self
@poojabennabhaktula4883
@poojabennabhaktula4883 2 жыл бұрын
Beautiful lecture
@mudgal2137
@mudgal2137 2 жыл бұрын
Wating for the next video.. tq MIT
2 жыл бұрын
What a blackboard. I love it.
@therealb888
@therealb888 2 жыл бұрын
@Barry Allen lol
@aishwaryadharmadhikari7165
@aishwaryadharmadhikari7165 2 жыл бұрын
People don't use blackboards anymore and thus the students knowledge doesn't last forever, the tike of writing taken by teacher and given time to take down the content make student grasp things better rather than using PowerPoint presentation with endless slides and meaningless content🤣
@therealb888
@therealb888 2 жыл бұрын
@@aishwaryadharmadhikari7165 Can't tell if you're being sarcastic 😂. Anyway there are probably more objective points that support a white board & power point presentation with an e pen. Blackboards do have their own charm and feeling in addition to giving more time to the student to digest the information. Not to mention the classic classroom environment. The best parallel for this is EVs vs ICE vehicles. Gas does have some advantages like range & refill time but they can be achieved in the future by EVs with advancements. Similarly, we should be able to transfer the black board advantages to newer learning technologies through advancements. I know I over analyse stuff, I'm self aware 😂.
@aishwaryadharmadhikari7165
@aishwaryadharmadhikari7165 2 жыл бұрын
@@therealb888 I totally agree with you, but, I won't change my opinion though 🤣 . It's been 2 years since the online education program has started in India where students are learning on mobiles and I dont think this has been any benefitable to anyone. Not students nor teachers not the institutions! Show me results😆😂
@therealb888
@therealb888 2 жыл бұрын
@@aishwaryadharmadhikari7165 I totally agree with you as well 😂. Where has been the results right?!. But the answer lies in your comment!. Watching on mobiles with distraction on the same device not to mention the small screen & eye strain. I think the results lack because of improper usage. If you look at IITs/MIT/ any top university, there are slides & these videos in addition to problem sets & notes/study materials that are available online. These online resources are absent in most small colleges in India. Online education is also the preferred way for all working professionals. The nice thing about this is that you get a backup of the resources & can pace yourself. Online resources like this should be a supplement to classroom learning in more Indian colleges. Out of curiosity what are you studying? It's cool to see more Indians here. Do you have plans for any form of higher education in USA?
@toxdes1
@toxdes1 Жыл бұрын
I love this lecture. The teacher is excellent. Claps
@sallaklamhayyen9876
@sallaklamhayyen9876 2 жыл бұрын
Thank you so much MIT
@theWrongCode
@theWrongCode 2 жыл бұрын
Thank u MIT ❣️
@edbertkwesi4931
@edbertkwesi4931 2 жыл бұрын
ooo! yes my dream is to meet the mit chancellor some day really radical revolutionary institution. i love MIT
@archibaldgoldking
@archibaldgoldking Жыл бұрын
nice work im happy to see it
@agungpurnomo3430
@agungpurnomo3430 Жыл бұрын
Thanks to technology, i can attand mit class from another side of the world😊❤
@SalesforceUSA
@SalesforceUSA 2 жыл бұрын
I don't know why KZbin recommended this to me, but I stayed for the whole lecture.
@RupertReynolds1962
@RupertReynolds1962 2 жыл бұрын
Clear and informative. Just one small thing: it seems misleading to link 32 bit addressing with disk space limits, because disk space is addressable in sectors (generally of size 512 bytes), not in bytes as with RAM. HDD limits of 8GB, 128GB, 2TB etc. are due to limitations of CHS or LBA addressing modes for disks, and not word size (16, 32 or 64) used by the CPU. Keep up the good work! Many people are benefitting :-)
@TheZwirek
@TheZwirek 2 жыл бұрын
I`m sorry yeah that was completely wrong. With 32 bit computers you can still address even 2TB hard drives (with 512 bytes clusters). The problem with hard drive 4gb limit was if you were using FAT32 disk file system. In windows 32bit architecture posed a limitation with the address space of the memory, but even on 32bit cpus we sitll could see 36 bits and even more later on being used for addressing the memory even before the 64 bit processors, e.g. pentium PRO (1995, PAE, AWE and so on) and built in solutions allowing to address a 64bit memory address space from a 32 bit processor. So 4GB was a typical ram limitation of a 32 bit windows computer using virtual address space and later on became a limit for a 32 bit process, but that was also a limit of the operating system. Anyway Thank you for the free access to your courses and loving the content despite the comment.
@navaneethshivananjappa1858
@navaneethshivananjappa1858 2 жыл бұрын
I swear my disk was spinning hard listening to that.
@mytech6779
@mytech6779 2 жыл бұрын
Not even a sector size vs byte issue. Partition size and count is limited by the partition table design and file systems are totally independent of CPU width, partition size and disk size. There are Unix and Linux file systems that can handle hundreds of petabytes and one or twoeven have limits of zettabytes and they can span multiple drives.This comes with some overhead, so common desktop systems tend to use filesystems with lower maximum sizes, but the point is that this has nothing to do with the CPU width. I've noticed that even within the computer science crowd Windows users seem very poorly informed on quite a few computing fundamentals.
@RupertReynolds1962
@RupertReynolds1962 2 жыл бұрын
@@mytech6779 Yes, there are also file system limits, but they can depend on which operating system you install. You you have to stay within all of them, of course.
@brianx2405
@brianx2405 2 жыл бұрын
@@RupertReynolds1962 mytech is the most right, but not quite and you other two idiots are literally talking in circles - the fs depends on the os or vice versa... just wow...
@kittyhelleo9221
@kittyhelleo9221 Жыл бұрын
nice course, helped me lot. thanks
@IndianboySaif7
@IndianboySaif7 Жыл бұрын
Respect to mit thanks 👍🔥🙏
@AntonRasmussen
@AntonRasmussen Жыл бұрын
While I find the word-RAM discussion interesting, I believe RAM in the context of analysis of algorithms doesn't refer to Random Access *Memory* but the Random Access *Machine*, which is a theoretical construct that helps model how an algorithm works without taking into consideration the constant factor of computing power or architecture. This is an unfortunate (historical) overloaded acronym but it seems important to note for the very fact that even this brilliant professor appears to be falling victim to a simple mistake in defining the acronym.
@classicalfandom8219
@classicalfandom8219 2 жыл бұрын
Thank you!
@JersonRealtorWebdeveloper
@JersonRealtorWebdeveloper Жыл бұрын
am in Cyprus but i fell like am at MIT, that's great... by the way, this instructor is amazed !
@joserezende102
@joserezende102 2 жыл бұрын
Thank you from Brazil.
@ShubhamSinghYoutube
@ShubhamSinghYoutube 2 жыл бұрын
Bring Video lectures of 6.045 Automata and Computation course to OCW pls.
@kahhwatan5566
@kahhwatan5566 2 жыл бұрын
Thank you MIT
@user-fd7du7cw9o
@user-fd7du7cw9o 2 ай бұрын
thank you so much for this lecture
@liveinfra6820
@liveinfra6820 2 жыл бұрын
It's 1 am and I just clicked and now I m Loving it 🤣🤣
@aleksamarkovic1074
@aleksamarkovic1074 2 жыл бұрын
thanks MIT 🙏
@TTminh-wh8me
@TTminh-wh8me 2 жыл бұрын
right when i need it
2. Data Structures and Dynamic Arrays
50:18
MIT OpenCourseWare
Рет қаралды 480 М.
How I Got Good at Coding Interviews
6:29
NeetCode
Рет қаралды 1,6 МЛН
Introduction to Poker Theory
30:49
MIT OpenCourseWare
Рет қаралды 1,3 МЛН
Gil Strang's Final 18.06 Linear Algebra Lecture
1:05:09
MIT OpenCourseWare
Рет қаралды 2,2 МЛН
4. Hashing
52:55
MIT OpenCourseWare
Рет қаралды 314 М.
Algorithms Explained for Beginners - How I Wish I Was Taught
17:38
Internet Made Coder
Рет қаралды 317 М.