MIT Tuition is $49,892/yr $24,946 /per semester which is about $4,989.20 per course. Semester runs 15 weeks. So that equals to about $332.61 per week.. I'd say this course runs twice a week, so this day of class cost $166.30, and you got it for free. Now that's what it cost.. what it's worth is much more. Moral of the story. Be thankful to have such information at our fingertips. FREE MIT courses on Algorithms?!? How awesome is that!?
True, but just to point out, that $166 also includes the ability to talk with peers, professors, teaching assistants etc. It might also include the usage a cluster or supercomputer that MIT runs. And such free education is only good for some courses like Computer Science or theory knowledge in most of the other disciplines. For example, if you are learning electronics, you can get free theory knowledge from such videos, but you wont get any practical knowledge about soldering or circuit design etc coz you would need real hardware. Same applies with biology etc. However, we should indeed be grateful for such videos.
@@blasttrash It's worth noting that students are also paying this money for a qualification and proof for potential employers that they possess all of this knowledge.
@@blasttrash EE student here, bought components, soldering iron, and multimeter on Amazon Saw free lectures on RU-vid and instructables Knowing what the knobs on a osciliscope do before touching it is great, most in my class had no clue(Myself included) But ultimatly expirience of any kind is king, especially self taught You may not have a supercomputer, but you defenitly got the knoledge and will to learn Some in those classes don't even have that
@@slackerengi2401 True its all about will. I am from ECE too, although I graduated long back and I dont even know how to solder stuff. I can barely remember the difference between series and parallel connections on a bread board. I work in CS field now, so all is good I guess. :)
It's so cool that these top schools release courses like this one online free of charge. I may not get a chance to go to MIT or Stanford, but I'm sure as heck going to learn as much as I can from them. Thanks!
I failed math in high school and over 20 years later actually enjoyed watching and learning from this. I’ve been interested in algorithms and appreciate MIT sharing this class session.
girl you are not alone. but i am thinking its because its now that you can understand what you can do with mathematics. in our days we were taught math and physics like robots. We had to shove everything inside that head or get whippings.
Math is something one can learn at any age , yes it can be difficult but with propper material this challenge we call education can become simple when all the steps are clear and at any given time the next step is obvious . Join a community online , that is much better than self learning by its self
@@juanmoscoso0 I doubt that. She did Andrew Ng's deeplearning specialization, was familiar was supervised, unsupervised and semi-supervised learning from work.
I actually passed the equivalent course to my university by watching these videos. I also scored an almost perfect score! These videos are a goldmine! Thanks a lot for providing these courses to the general public.
Thanks MIT for the course. I can now understand things very easily as a correspondence student, it's very hard to understand things, but MIT open course-ware has made life and learning very easy.
This is still the best on-line introductory course for algorithms I am aware of. Coupled with programming exercises, it would make legendary content for MITx and edX.
Don't worry about peak finding algo. If u r confused about binary vs random for 1d peak finding or global peak vs relative one, just learn that this video is for introduction and give students with non programming background a feel of algorithms and a little of divide & conquer. Hope u watch the whole playlist and i can assure you there are no such confusions in later videos! Thanks MIT for the amazing playlist
I feel really dumb about this problem. I don't understand how it's log(n). I figure you need to check around you on both sides to know if you're a peak. But also you can't eliminate more elements than the ones directly around you as potential peaks because the array is unsorted. How are we cutting potential solutions in half on every check? I've understood some DSA concepts, but even this first class just left me confused lol. Edit: Ah I misunderstood the problem. We're looking for any peak not the highest number. We know that if a number is higher we can jump into the middle of that side of the array and if the number to our left is higher than there must be a peak between the one we started with and the one we just chose. If the number on the right is higher instead we just keep cutting through. Worst case scenario the numbers just increase constantly in one direction and we eventually find the only peak on the extreme right of or left of the array.
@@das6109 That was exactly my concern lol, from first go it looks like we may skip a peak on the side we're skipping, but seems like if A >= B, then there is a guaranteed peak on side which includes A :)
Just finished 6.0001 and 6.042J, now starting 6.006, just as a head start before I join university next year. Really grateful to MIT to provide these lectures for free.
you will have a great understanding already going into uni. Good luck on your studies. I wish I had dived into these courses when I started my programming journey.
I remember taking an intro to Algos class as an undergraduate way back when. And I remember not having the slightest idea how to get O(logN) for the peak finding problem. And then just being in total shock when some student from the back answered it the first day, like at @24:52, thinking that kid was the next Dijkstra or Primm lol. I'm now in my 30's grinding away at leetcode and reading CLRS for interviews. And now that I think about it, that kid at @24:52, was already doing what I'm doing now well before he even took the class. Start while you're really young!
@@utkarsh_108 software engineering as in dumb code, probably not. But there will always be a need for people that can solve problems and put that into code as a tool or final product
@@ViktorKishankov All you need to do is find ANY peak in the array. The search starts in the middle, if the value is rising to the left, there must a peak somewhere on the left, same for the right. Otherwise, you must already be on a peak. Imagine you were on a mountain looking for a peak, you would head in the direction where you have to walk uphill. Binary search works because it is any peak, not the greatest peak.
I cried. Just visit the link in description and see how wonderfully everything is arranged for us to learn. Thank you team MIT. I cannot explain what this means to a student like me from small indian village. It's a dream come true. Best gift for life.
hey bro i have just learned all the basic and important things on java..can you suggest me from where i can study and concepts of dsa..plz help me i am about to sit on my college placements
I seriously envy the professors at MIT. The profs at my university can't hold a candle to their organization and ability to simplify difficult concepts.
I just wish i had find this earlier in my career, but back then I was not ready to understand how blessed I am to access this. MIT is dream but I can access such courses at my fingertips now!!
Prerequisites A firm grasp of Python and a solid background in discrete mathematics are necessary prerequisites to this course. You are expected to have mastered the material presented in 6.01 Introduction to EECS I and 6.042J Mathematics for Computer Science. If you have not taken and been successful in each of these subjects, please speak with a TA or professor before enrolling. We do allow students who have equivalent, other experience with the material described above to enroll, but with the firm understanding that mastery of this material is assumed and that course staff will not feel obligated to cover it or to help students who are struggling with it. 6.006 is a 12-unit (4-0-8) subject and serves as a Foundational Computer Science subject under the new curriculum. It is a direct prerequisite for 6.046 Design and Analysis of Algorithms, the theory header.
Bored Chinese Even though this class uses Python you could still learn something. Really depends on your ability to grasp and apply the lessons to the C language.
Hi Could you please provide the link or direct to proper links for the prerequisite courses. I searched in ocw.mit site but there are 4 courses(Spring 2005/2010 and Fall 2005/2010) with 6.042J as title.
Hello, I wanted to ask If I focus on Java programming and I would like to have a better grasp of algorithms and data structures, in order to help me in Programming, is this course appropriate for that or should I look for something different ? Thank you.
this is wonderful. Not having to depend on incomplete resources across the internet and then coming across the complete course taught by the BEST is wonderful. Please do put more such courses and help those students who can't afford to have a quality education for one or the other reason, thank you
@@mohammedjassim9250 Yes you can...I recently watched this lecture __ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-JPyuH4qXLZ0.html This lecture is about algorithm analysis. Our professors also used this technique. You understand what i'm taking about. If you complete algorithm and data structure from here & understand concept fully. I'm sure you'll find it very helpful no doubt. They also provided textbook that is available for free(.pdf)
I think the professor have not explained the implication of the 1D and also 2D algorithm. The key is that for any 1D or 2D array there is a largest element(>= any other) and thus must have a peak. (Theory 1) However, in an array the sub-array's peak may not always its parent's peak if the largest element is on the edge and has a bigger element next to it. (Case 1) To find a peak in a sub and at the same time avoid Case 1, we must choose a larger side to ensure that even if the largest value is on edge, it is still larger than its boundary in the parent array. This is also why in 2D search we want a global maximum. We want to ensure that even if the max is at the boundary, it is still larger than the any element in the boundary column containing the global max we found. And thus the global max in the larger side must contain a peak.
What a time to be alive for having such high quality course for free, free education is the best thing that can happen to humans, learn from each other for free, i understand it's difficult to have free education or anything really, because those people need to be payed to live also, but if we can find a way to have as much free education as possible it's just incredible and highly valuable for humanity, and MIT are doing a great job by contributing to this project/idea, thank you
I needed this. My current algorithms class is a joke. For the 1st 6 weeks professor, on average, cancelled class once a week (we have classes 2x a week). Half of the 1 class we meet up, is him telling stories/making jokes. Then the whole corona virus thing hit, and we are now doing lectures online, where the first week he cancelled a class again. His current online lectures all choppy because I think he is using a laptop webcam to record him writing on a whiteboard. The quality of the videos are 240p at best, and can drop even worse at times. Looking at the syllabus, we are 4 weeks behind schedule.
Took some time to realize why he found the global max. Try for A = [ [12, 15, 16, 27], [10, 8, 3, 28], [9, 7, 25, 26], [8, 6, 2, 3] ]. In first iteration j will be 2nd column of A, in next iteration j will be 3rd column of A, and in final iteration j will be 4th column of A. Answer = 28. Realize, as we move from 2 --> 3 column, the condition checked was 15(max of 2nd)
this lecturer is excellent and having had at least 20 different uni lecturers over the decades i should know; there are some shocking ones which oddly are the nicest characters ...
I wish my University lecturers were so well spoken and were more interested in getting me interested in conveying excitement about the topic instead of just getting through the lecture...
I really appreciate this free of cost content, because people who were not much concerning about their academics during their college days also get a chance to revisit(of course I am not speaking about MIT alumni)
One of those best initiatives I have ever come across. It would create monopoly in the Indian market over all ed-tech platforms and offline coaching tuitions. Only a matter of awareness. Never heard a negative review about this.
0:22: 🎓 Professors introduce the course 6.006 - Introduction to Algorithms and encourage students to visit the website for more information. 6:14: ⚙ The video discusses the use and augmentation of classic data structures and algorithms for efficiency in problem-solving. 12:26: 🎲 The video discusses a module on numerics, including graph problems and shortest paths, with a focus on Rubik's cube assignment and finding the shortest path from Caltech to MIT. 18:39: 📚 The video discusses building a sophisticated algorithm and characterizing its complexity in relation to the number of inputs. 24:24: ⏰ The video discusses improving the asymptotic complexity of a one dimensional peak finder algorithm through a binary search subset approach. 29:08: ⬆ The video explains a step-by-step process for identifying peaks in a problem. 35:27: ⬆ The video discusses the difference between theta n and theta logn in terms of complexity, and introduces the 2D version of peak finding. 41:47: ⚙ The video discusses implementing divide and conquer strategy for finding a 2D peak using binary search algorithm. 47:49: 📈 The video discusses finding the global maximum in a 2D array and determining 2D peaks. Recapped using Tammy AI
My master said : " GREAT TEACHER WILL ALWAYS MAKE GREAT STUDENT " So , i'm not great student , and i blame to my teacher for this .. but this is outstanding knowledge for free , wow .... Peace from Surabaya , Indonesian ..
When I read the comments I saw there were some people with a confusion about peak finding.I think It's better to know that he was not finding the "Highest Peak". He was just finding "A Peak". correct me if I am wrong.
Those of you interested in algorithmic puzzles, check out my new book "Programming for the Puzzled" mitpress.mit.edu/books/programming-puzzled www.amazon.com/dp/0262534304/
computer science undergrad major core courses: calculus, linear algebra, discrete mathematics, data structure, assembly language, operating systems, and algorithm,...etc.
Finally I figured out why he searches for a global maximum in the column instead of a local peak. It is because the peak will be guaranteed in case of a row with a number which is already a max number in a column. In all other cases, it will not be guaranteed. I think he left this part so that the students may think about it. In the lecture notes, he has asked this question: "What if we replaced global maximum with 1D-peak in Attempt #2? Would that work?" The answer is that it won`t, because the peak won`t be guaranteed. The explanation of this is that a largest element in a 1D array is definitely a peak.
+Rohit Jain Can you pelase explain step-by-step what's happening? So 1. We pick a middle column and find the global max( this guarentees that there is a peak in that specific column?) 2. Then what? You comepare the values to the right/left of that specific peak?
+Toiletwifi 1. We pick the middle column and find the global max in that column. Lets call it x 2. We compare x to its left cell and right cell. 3. If both left and right are smaller than or equal to x, then x is the peak, otherwise we proceed to step 4 4. if left cell > =x, then we now perform the same operation on the grid on left portion of column containing x otherwise the right portion. 5. We peform this operation recursively, at some point, either we will find a peak in the process on a x or we will be left with only one column. 6. If we are left with only a single column, then the global max of that column will be a peak. Essentially what we are doing is: 1. We are ensuring that we are always narrowing our scanning area by half in each iteration, always moving towards the side containing a number greater than the max of middle column. 2. This ensures that either we get a peak in the process or we are left with a single column which has atleast one value that is >=its adjacent values (because it is greater than the global max of the adjacent columns.) 3. Now before we were left with a single column in the end, we now know that this column has a value (say y) larger than the global max of the adjacent columns . So even if there is a value greater than y in our single column, it would surely be greater than its adjacent values and is therefore a peak. This last point is most crucial to understand, and can be understood more clearly with help of self designed examples and following this algo.
Rohit Jain Thanks for the explanation bro! Sorry I just started coding/algos, things come slow to me. I understand everything up to step 3. So I'm still a bit confused. For step 4. let's assume x =10 and left cell=20 (assuming left cell > =x), we are now in that coloumn containing 20. Now what's the next step. We check that WHOLE coloumn ( the one with the 20) and find a global max. And then look to left and right cell. THen repeat until we find a peak? So we have to find a global max in every coloumn ( assuming step 3 doesn't work out). Please explain in baby words/example, how this will guarentee a peak. Sorry once again for my dumb understanding question
I wish the colleges and universities here had teachers like this man. They all have thick accents and do not explain in detail like this instructor. No wonder MIT has the rep it has. wow.
I'm not understanding the complexity of the 2D peak algorithm (@52:41). Shouldn't I have: log2(m)+1 terms "O(n)" ? For example with m=2: T(n,2) = T (n,1) + O(n) = O(n) + O(n). Here I have 2 O(n) that is log2(2)+1. Thanks in advance if you can help me to figure this out.
"Peak finding" is just a fancy name for finding the max value of an ANALOG continuous function. It won't work for a DIGITAL or discrete function. Only useful for processing some things.
A whole course focused solely on algorithmic analysis?! With two amazing professors co-lecturing?! This is why MIT reached is the global leader in post-secondary STEM education.
It might seem counter-intuitive.. but it works.. Using approach similar to binary-search, only gives an indication of which direction to proceed in... You, eventually, might not end up at the peak your previous binary-search comparison was indicating to... Its like saying that, 'if at i, the array is sloping up towards left, then there must 'definitely' a peak somewhere towards the left.. whereas its 'possible' that I might not find one if I go towards right.. So, now lets look at [left/2] ...' ...and so on.
As 25:30 the professor states that he is not looking for THE peak, he only wants to find A peak. It does not matter which peak he finds, just find one. It should be understood that the algorithm he is discussing is not intended to search through a sorted list. It's intended to search through an unsorted list of "real-world" values. The lists this algorithm is for will have one or more peaks of which he is only concerned with finding one arbitrary peak.
binary search itself is not being used but the technique of splitting array into halves on every next step is being used (which is the same technique that binary search uses) + the problem is to find 'any' arbitrary peak
Murali Mohan You either did not watch the video or did not understand what was explained in the video. That IS what the professor is telling the students to do. The algorithm he is describing is NOT looking for the highest number in the set. He is only looking for a peak relative to a random starting position. As the professor states early in the video, this class is an introductory course in programming and algorithm design. It is not intended for students who already have experience with programming. It is intended for students who have no experience. The example he provided is intended to give students new to programming a fundamental idea of how an algorithm works.
Well, knowledge of basic algorithms and data structures is definitely a must for every programmer, but its just a small part of "a bigger picture". You should also be familiar with Web technologies, programming languages, frameworks etc. Also remember that "technology aspect" wont make your website successful if you do not have a GOOD IDEA (which targets people's needs), marketing and promotional side etc. Good luck :)
To anyone struggling to understand why he chose to find global max instead of local 1D peek of a column: Because there maybe more than 1 peek in a 2D array. Maybe that global max of a col is not a peek we are finding, but the left/right haft of it surely has one. Maybe another local 1D peek is a 2D peek, but here I think the algorithm is just trying to find the easiest one. Traversing a whole 1D array to concern every peek is way more expensive since we just have to look for ONE peek in a 2D array only.
If the peak that particular peak dataset is always a pyramid shape then its constant time. Check 2 points on either end of the array and then find the intercept of the two resultant lines, that is x intercept of the two lines is the index that the peak is in the array. The limits of this approach are the precision of the numerical calculations.
34:34 Why are we gonna do O(1) log2n times and not n times? Where does log2n come from? I'm sorry if this is a silly question, I just don't get it no matter how much I think about it.
When you go through confusion and feeling that, it can't be log n and prof is wrong, then, watch again, edge cases 17:37 of video. It will clarify the problem statement.
You may feel divide and conquer will not work because the array is not sorted. but you only need to look at the question, the definition of a peak and an example to convince yourself that it actually works
Watching this in quarantine... so much better than Waterloo’s voice-over slides approach for giving lectures during corona. Kinda salty that I’m paying Waterloo just to get better content for free online
The prerequisites for this course are: 6.01 Introduction to EECS I and 6.042J Mathematics for Computer Science. However I checked MIT's site and the 6.01 Introduction to EECS I shows two different courses: 6.00.1x Introduction to Computer Science and Programming Using Python and 6.00.2x Introduction to Computational Thinking and Data Science as MITx versions which are also available separately on RU-vid. So which ones am I supposed to do? Please give me links for RU-vid playlists
The links to the other courses: 6.0001 Introduction to Computer Science and Programming in Python. Fall 2016 ru-vid.com/group/PLUl4u3cNGP63WbdFxL8giv4yhgdMGaZNA MIT 6.042J Mathematics for Computer Science, Fall 2010 ru-vid.com/group/PLB7540DEDD482705B MIT 6.0002 Introduction to Computational Thinking and Data Science, Fall 2016 ru-vid.com/group/PLUl4u3cNGP619EG1wp0kT-7rDE_Az5TNd MIT 6.006 Introduction to Algorithms, Spring 2020 ru-vid.com/group/PLUl4u3cNGP63EdVPNLG3ToM6LaEUuStEY
The psets for the 2011 version look so much more interesting than the 2020 version. So I'm doing this course first, converting the Python2 files to Python3 as I go.
I love these videos because it shows you that your local land grant university has the same quality of education. It's the choices you make as an individual that define your career :)
Holy shit at 19:50 and Greater that guy's question of why "if it exists" was amazing the Prof had to manage something to make up for it.. Think about this >= is there then it means there DEFINITELY exists a peak. Then why "find a peak if it exists" beautiful man beautiful!
I didn't understand why this has to be the case. If I have an array like [6,5,4,3,4,5,6] does this mean we have peeks at the ends? because technically we can not really compare the 6s to anything...
41:05 - The answer to the student's question is technically "no". You would never touch all n*m elements or addresses. The reason we still get Theta(n*m) is because the worst case will still force us to travel over a fraction of each dimension and that would still mean a linear complexity in each direction, Theta(n) and Theta(m) which is simplified to Theta(n*m). - An example of a "worst case" matrix: 2 1 8 9 10 1 16 17 18 3 1 7 1 11 1 15 1 19 4 5 6 1 12 13 14 1 20