[MUSIC] Well, welcome to week 3, in this week, we're going to study Combinatorics. Combinatorics is a discipline where we take a collection of discrete shapes and we combine them together to form a large number of interesting forms. Specifically we're going to talk about things like enumerations, permutations and combinations in this week. So I've got my two assistants here and they're, got some physical demos of how Combinatorics works. So Lou, you want to tell us what you're doing? >> Sure. I mean, calling this physical demos is definitely not very good because this is, we are playing games here. So when I have these simple objects here, and I'm trying to make some shapes from them, and so far I have failed miserably. [LAUGH] And, let me see now, okay. Okay, here you go, here's your car Joe here. >> I've got a question, do you have kids Louie? >> Yes I do, I have two of them and we do math at home, we don't play games. >> I feel sorry for your kids [LAUGH]. >> Alright, but seriously, you want to tell us about the importance of combinatorics. >> Sure, so in computer science we deal with these kinds of objects, discrete objects, not necessarily this one here, but for example the number of pairs between two cities. Again you are driving a car and you are interested in finding the path between two cities, A and B, and the question of interest is, give me a shortest path or the, the most economic path between two cities? And usually if you look at any map or connecting cities there are multiple paths connecting these two cities. And the questions is for the algorithm that is going to be solving that problem, is it going to be counting it or enumerating each one of these paths and finding the most economic of them? Or do we have something more sophisticated than that so that we can find it much more quicker? And the answer here is with the Combinatorics, which is a branch of mathematics, we can do analysis of this kind of objects and the number of this object, so we can understand how hard the problem is, and design more efficient algorithms. >> Alright, sounds good, Scott, you want to show him what you're working on? >> Well, I have a problem here, because I think I'm missing some states, I can't put this together. >> I'm really proud you're learning your states here Scott. [LAUGH]. I guess at home, my kids, we put together maps, so. >> We have Texas that's all there, so. >> Alright, Yeah, the question here is, how do you actually put together a puzzle like this. Do you actually know where Colorado goes or am I going to just sit here and try to place everything everywhere that it goes? >> That's Lou Eyes algorithm by the way. >> [LAUGH] Yeah, he doesn't know anything about how masks work, right. So the question is, you know, can I enumerate all the possible ways of putting these pieces together and figure out which one I actually want to use by trying them all. That's basically the brute force approach to putting together a puzzle. >> How many ways do those go together, by the way. What do you think? >> I think there's only one way. >> Very good Lou [LAUGH]. >> That's good because I can only count to four, so I got there, right? I think, you know, so the question is, how to I enumerate all the possible ways and then, you know, how do I do a good job of figuring out which one I actually want to use here? >> Okay. >> All right, so Scott actually, when he ran the, one of the sessions, surprised me with a questions, so I'm going to go off topic here and ask Scott a question now. So, my question to you is, this is all about math. We're clearly going to do a lot of math this week. So what's more important, math or coding? >> [LAUGH] >> You're a computer scientist. Which, which, which, which is more important? >> I think that they're equally important. I think understanding the mathematics behind what you're doing is critical because otherwise you can't actually solve the problem. But, if I can only solve the problem mathematically and I can't actually write a program to do anything, well, then I've only won half the battle and so I've still lost. So, I think that, you can't say that math is more important or programming is more important, rather you need to think about their relative importance to each other in any particular problem you are trying to solve. So sometimes the mathematics, your given a mathematics heavy problem and you need to focus really hard on the mathematics. Sometimes you have complex programming challenge where I need to figure out how to structure large pieces of code together to make them work optimally. So I don't think there's any one answer to that question, I don't know. You okay? You all right with that? >> I think, I think your answers, your answers pretty good, actually. I think they're both very very important. So anyways, this week we will do some math, do some coding, and have some fun with combinatorics.