03:37 And so it's pretty light around my place, but bigger place. Yeah. 04:14 You guys receive your almost back, just 04:49 Nice as you crashes out mass. 04:56 Yeah, it's pretty different. Yeah this is a small class but in I think I mentioned in software engineering class or 40 people you meet them just after a class you know outside and statement is this in my class or not. 05:32 And just checking the anybody's having trouble. 05:59 Singers coming. 06:09 So I'm just making one more. 06:28 I'm here. Other than so looking now the sign of it. Okay, so we're 07:09 Because I simply missing Jose. 07:16 Okay. Well let's get somebody started. Well okay, so I hope I made that eye decision. I can I mean it just I spent spend a lot of time grading. As you notice. I you got the greatest, I mean, the assignments return just at the very end and and kept on looking at the weather. 07:38 So, and okay, so what we want to do today, so I want you to do this, most assist to make sure that we home our skin skills in terms of writing and they're so practically. Basically, we all gonna do exercises today, I'm gonna talk about the homework and, you know, two partial solution to it. 08:03 So it and then you can rework the solution and get it done on the for next week. And next week, it's graded and recorded. So what you've done today it was quite a bit of variability from people that got hundred percent to people that got maybe 20%. So, you know, it's just, you know, was a lot of very. 08:26 And so this is so couple of observations. Number one is that you have not used to a class where the focus is absolutely. Only learning. You're tend to be used to classes where you have tests and being evaluated how much you study. So, one of the things that happens is you do not get enough help preparing the home. 08:52 So you need to use me as a resource the same way that you use a friend. You know when you when you have some difficulties you have to use me as a technical resource in working on the on the homeworks. So do not hesitate. Some of you who have been my classes before they knew this so they send me drafts and then I commented on drafts and then you know, you know, sweeter action iterations. 09:21 We improved. Some of you really has a couple of questions here and there I didn't get enough help. So you need more help. Okay, so do not hesitate to contact me to and get all the help. You need advice, couple of things about help one. Is it start early because if I 09:49 Turn the water another Tuesday night. You're not gonna get any help that's in Monday. I'm really, very busy doing the day. I want to different projects, and sometimes I don't even have access to email. So, you know, Send me questions on Monday, but we understand the thing. You may not get the answer till the evening. 10:10 So again, plan accordingly, if you send me small bits, I can respond very fast and I can help you more. So you probably have three problems on this one. Sending the solution for the first problem until we get it right. Is better than sending me the whole homework with also problems and then we got one solution, right? 10:37 Then we moved to the next and then we started working short questions shorter. A short pieces of solution at much more helpful. Interacting rapid response. The problem was difficult, not because it's difficult. If I ask you to write this thing and see you have no problem in 20 minutes. 11:01 The problem is difficult because you have new notation and new way of thinking. And we have to make the transition to this new way of thinking, in order to be able to start wondering about formal specifications for, you know, concurrent programs and starting thinking about how you verify, concurrent how you think about the correctness of the problem of our concurrent programs. 11:24 So it's a difference in notation which obviously just have to master it. And there is an issue by the more difficult thing, you have to think the problem different. And so that's why you had you run into this problem. So this is not the, you know, first group to have this kind of difficulty everybody. 11:44 That's seen the notation for the first time and that technical errors people are making that I for instance of time and remember people use if in the whole station and reception, you can only use in the assignment statement is that God as in eaves and else. If this is true, then do that except thing it's gonna difference from as a languages, but you can only use it there. 12:14 You can't use it in always section and always section. You have definitions, you cannot have statement in all stations. 12:27 That, you know, they have very transgenders could be bullied functions or could be other kind of pharmacists, but like some, it turns a number, an integer but they're only functions in the in the auto section. So you cannot use, if there are not assignments, you cannot use colonic on there because they're not assignments that definitions like say no, factorial of x is equal and you give the definition okay? 12:55 Doesn't seem that you don't have any cursor. So we have to be careful about that. The remember that your last user box to separate things. So I've seen a lot of people for getting to put the box between statements and then we don't, you know, you don't get the identity, you don't get the separation that we have to. 13:15 I mean, we have the size of the array, which is that one of 0 to 100 plus 1, okay? And you know, based on the examples in class you declare and it's integer and greater than one in in reality really. Any is a constant for the program? Just like number 23, you don't declare. 13:35 Number 23. So you really should have that an explanation. What n is in front of the, I mean before you start a program and not not declaring, not initialize it in the program and let me backtrack on something about come back to the to the product to the product. 13:58 The assignments. Have to look professional and they have to be complete self-contained. So if I send this assignment your solution to colleague and Singapore, should know what you're talking about. If you just give the code the person doesn't know what what they're doing trying to solve. So one make sure you put your pins on the next to the name in the assignment so that it helps me immediately, you know, connect to the great shape and the in the files and so on. 14:30 So always put your pin there if that two people working in a team, only one person sense, the you can copy that person, of course, but only one person sends assignment and you can use only one pin on the file. The person that sends a sign when I reply and apply to both people and can both state. 14:52 Now, both of pins are inside the the name. So I know how to update a great sheet, but only send one because I, you know, true for me, right for me and Jose sent to, you know, too, and then I got confused. I don't, I did not know which one is a more stop today than things like that. 15:15 So, I want to agree with everyone. Okay, so now doesn't have to be professional. So, you start with a problem definition, which mostly you copy from my, from my assignment. Then you say problem, one, explain, what problem one is. And then you give an overview of your solution. So Nick has been very creative. 15:38 It came up with very, very interesting solutions, but the things that, you know, we don't need to problems, we even had a zoom together because I can't really follow the solutions because I was just looking at the code, I did not have his mind on the page. So by giving an overview of what the solution is, then that prepares me to kind of figure out which directionally you're using. 16:04 Now another thing is that there many solutions but we're looking for elegance solutions that are highly concurrent take advantage of the language that we have and are simple so you might have a solution, which is absolutely correct but if I can't figure it out, quickly means that it's not simple and if it's not simple means that we're not going to be able to prove it correct and argue with somebody that this is the correct solution. 16:35 So we need to have elegance, not just a solution if we have an elegant solution. So always section or it helps a lot with making clear solutions. Okay. Now, going back to kind of technical issues. One was, you know, you have the constant and don't put in the program, keep it outside explaining, the overview that we have an array of sites zero to have plus one, okay. 17:02 And, and that we excel. Now, those things that, you know, we have the, let's say the race and okay, if you, I mean, I want to reiterate that, if you, if you don't put in any constraints, onitialization, the it's assumed that the initial value is an arbitrary and just what happened happens to be there. 17:27 The reason we we had to put in neutralization that the border is zero because otherwise the border would not be zero and we've got to have a toxicity is that you declare the array and you everybody 17:47 From 0 to n plus 1 of integer in the range, 0 1. And then in the initialization, you force, the rows going, the border to be 0. The way force the order to 0 is by basically saying that, you know, if the row is 0, then everybody on the, on the row is 0, if the roads, you know. 18:09 So that's fairly fairly very easy. Okay. Now, if instead of that you, you had in the preview to the program, you say, okay? I have a, an initials configuration F, which already has a border zero and you describe all of that in English. Then when you go into the program, you can say m equals f and that's the initialization because it's external if it's just a constant line number 23, okay, but don't do that because we don't, we're not using you are not using effort at all. 18:45 So later on in other programs what are you going to have to refer to the original? The initial conditions in order to prove the program starts in the rights state and entering the right state. Then we then we're going to do that. Okay. So does it the only section? 19:05 You know, it's really helpful in simplifying. The code. I mean just makes a code much much easier. So what I'm going to do. So we're going to focus for a little while on the assignment and you're going to, we're going to look at the first problem and actually going to write it down to, okay? 19:27 And then I'm gonna look at the third problem and the third problem. I'm not going to write the code for it because you still have to, to solve that problem. Only two people got it, you know, really working well, but and even they had some other some mistakes. But but I will talk about the way to think about the problem. 19:47 Okay. So what I'm going to try to do now, I'm going to try to share my share my iPad, 20:25 Is not working at this point. 20:39 On the right network. 20:45 Let me stop sharing. 20:59 Okay. Try to minimize chat because I cannot read the chat. My screen is so, so small. So Danielle and John. And a question about the receiving feedback, and I did just send it about 15 minutes ago. So everybody should have actually there again. Let's try again. 21:41 Remember this problem before I 21:59 Okay. 22:27 Sorry, not correct. You have the computer. 22:33 That I one more time. 23:05 Let me. 23:47 That one. 25:39 I'm asking for a while they're story. 25:45 Spark all good. 26:21 I know it's frustrating. If you joined zoom on your iPad, you can share directly from like, you can have two account logs into the same zoom meeting at the same time because I don't have loaded on the 26:41 Some professors have used something like Google jamboard, and if you're having a shoe sharing then one of us could share it instead. 26:51 Right. I can go to I don't know what's going on. I would, I mean, yesterday, I never had this problem because I took the whole semester, I mean, couples semester is not collecting to my computer for somebody on the same network. 27:25 Verifying that. 27:40 And I just losing the connection, all right. 27:46 But I don't understand. 27:53 I'm gonna open a wood file. 28:21 Okay, at least I don't know what file. Okay. So, it's on the first on the first program, okay? 28:35 Okay, so well. What what has to what has to happen? We have, we have to to declare. So let's say, M. 28:56 This is your kid as well. 29:24 Okay, so we declared our array. Now to initial then I have to to initialize it, right? 29:42 And so, we just want to the borders to be zero, right? So the basically and the box, I kind of J and that different ways to writing that and so one one way to do it is we have 30:21 All right. So we we have and we basically have this covers entire array and then we want only the borders so that means that I equal to zero. I don't I don't have an order on my keyboard here, so I'm going to say order. 30:47 Jacob zero or I equal and plus 1 power. I equals as IJ they equals and last one. Okay, so we basically distribute the range and for those values. 31:30 So, this is a kind of the most compact way to specify basically NJ to the, on the roads and columns, that's on. Okay, I don't know. Please help me out. This is really terribly tedious away. We have to do it now but I'll try. I'll try again. I've got later. 31:53 Okay, so that that's sets up there. The board now always 32:02 So what do we want in the always section? I mean that the computer when first of all, we need to be able to sum to some the number of neighbors, right? So basically if again we have to have rocks, the only use box in the in the declared initial and always the less use only boxes. 32:30 And again. 32:38 Okay, so now 32:46 We can do the summation. 32:54 So notice what we are defining here, we're defining information, some, which given to the two parameters, it comes in neighbors. And the, you know, one way to do it is basically to again you know, he can cure. So now we then will use the impure to be between minus 1 and plus 1. 33:33 Option. 33:45 Okay. And now what we do we sum and I plus t comma j plus Q. 34:03 Okay, so a couple of things here, I noticed detail but notice that see, I, we have they have here after the colon and it's a it's declared as an integer. So since it's declared the need to, it can be sound with a plus. If we declare it is a boolean we have to model move this inside here and say and MIJ is true colon one you appreciate the difference. 34:42 Okay. So, we have to make sure that this is comparable that. Now, the other thing is the common mistake here is that it in opinion. Q are taking values between minus plus one and including zero. So if P and Q are zero zero, we're actually counting MIJ as part of it. 35:05 So amazing way to get rid of that itself, minus and parentheses. I comma J. And now we have the, we have the correct, some around the around the perimeter. Okay. Now, so we have the sum that I'm going to skip here and I'm going to go to a sign. 35:32 Again, we're going to have to. So this is not finished. Okay? So now we have another 12 assign, and we're assigning to each to each cell, are there, okay? So so I'm going to says I comma J colon equal. This is not an assignment, so we can assign our two things, one. 36:01 If it's a birth. 36:16 0 if it's a death. So this is if so you can see that I need to put the condition under which a birthday place. And you remember the condition is that, you it's an empty cell and this is a neighbors. I can write it here. What I could define the condition in the always section and then use it here. 36:37 So I can basically say birth. 36:45 And now that forces me to go in the always section. And define growth. 37:02 She's under the same quantification here. It's the same quantifications. So so I'm defining it for all. I am J equal. We need M. I cannot J to be equal to 0 and some I comma J to be equal to 3, right? So now you can see that here themselves. 37:39 If that. Hi. Come on, J. 37:51 And now I need to go here and declare what death is. 38:08 Now, so the condition for death is obviously the you have to be alive and you have and you have fewer density and more than four. So we can, you know, we could write it there. A couple of things to notice here that see, this is a, it's a function, right? 38:29 But this function requires a boolean note, is that the expression here is a boolean, it's a practical. So this is true or false. Some of you basically said births, IJ equal, true. If something you cannot use if inside or reception it's only you know, the condition on the on guards. 38:54 But you see how simp x if we if we come up with a the right definitions. Also some of you use very long names then make the program actually not easier to read, you know, some of whatever. Okay? Any questions kind of think about what you have done in kind of relate to. 39:24 Yes, because my question is that the way you define some? It looks like you are minus the IJ multiple times. 39:46 Why doing wires saying that for? So, for so much, I choose all the combinations of P and Q that are in this range. So I have zero one 0 minus 1. So for each one single combination I have one number here. Correct answer is that i plus p and j plus Q. 40:11 Oh sorry. Yes yeah that was a point. Thank you. But that, that looks like for every possible combination, you are minusing a IJ. 40:31 I have high NJI fixed, like three and four years and then P&Q. Take a range. Yes, yeah. Nick, you can see that. There's the little, I don't know. Let's integrator then, around that whole, tear some statement. And then afterwards there is a minus. Oh sorry. And again, this is just, this is a that's one for each every area, all nine elements, and then afterwards, it's the minus. 41:10 No, I see actually. Thanks Another question. 41:21 I had a question about the preference for brackets over parentheses. When you're declaring an array, is there a preference or a right way? I, the right ways to his brackets but I'm too lazy to do it. So you can do it is a way. I'm not gonna I'm not gonna make a fast. 41:43 That I will not equation. So, would you chat? The cope will copy the input into the array control. And but m is declared as an array. Yeah, you don't initialize it. If you don't initialize, this initialize arbitrary value. That is compatible, is a declaration. Mmm, so glad things like you did get any input inside of the cardio. 42:22 And not following. So this is M. Yeah, was declared an already correct? Yes, if we don't initialize forget about line here, you got initialized editor. He's just the number of ones and zeros to our basic saying, we don't care, no matter what combination of ones and zeros. You use. 42:45 Our program is going to run properly. Oh, so you said that. The capital M is random. Not as the at that time. Except the borders excite correctly. Well, I've got it. Yeah, I didn't get it because I we think we need to get the input. The phone. Another array to unit in nationalize the capital M, you can do that, okay? 43:16 So you could basically say M equals F and then we describe f in English before the program, okay? But you don't need it for this problem because you're never going to use that. Don't be the only place you're gonna use. F is in prose. Okay. We're not doing any proof in this point, so we don't need to worry about that. 43:44 Okay? I got it. Okay, and let me just finish this. 43:58 Okay. So for any other questions. So you want to keep the program very clean by coming up with your right with the right abstractions and clean rotation using temptation to make it easier for for someone to read you. See if you look at this a science section I I can see what you're trying to do and some of you actually you know, created the third case, when he does, when the M doesn't change, we don't care. 44:33 It's then doesn't change. We only care. The two cases, what? Any changes? Hello. Professor. It seems like a first and test, they can be. So you don't need the test. So you just assign if a lot of tests, if lot of boss IGA then and idea, why would you zero slow? 44:57 Slow down. I'm not following. I'm not talking about the science section. Yeah, for the idea, you know, if not worse idea. Well, there are two separate cases, birth, and death. She doesn't this requires you to be alive and I have two fewer, too many neighbors. To separate cases now. 45:28 Yes. Yeah, I got it, but it seems like if MIG before you assign zero to it, it is the whatever it wants and if not worse than we just set it to zero, but I don't think so. I think that, you know, I don't, I think there are two separate cases. 45:52 It's not worth means, that's 46:00 Okay, let me so the first things place you need a zero, an empty cell to be able to have a birth with three neighbors. So different. You can actually neighbors and not die. My my opinion, is that? Yeah, what I ever MIG is before we can. Just, if it is just zero, we can set it to zero. 46:29 Again, that's fine. If it is normal. 46:36 And sorry, I do not follow this and maybe we'll take it over of line later on. So a lot of us will give you the zero. So MIG will be. I don't, I don't think so. So but we can, we can find a, we can follow this conversation later separately, but I do not think it's true. 47:03 Let me just write another way that you could, we could have read on this, which is 47:19 Um, sorry. 47:27 You could have read any this way, but would do the same thing. So I'll be two two options. But if you take, so, everybody up there, notice this. Okay? So basically says, if this condition is true, you're gonna want it. This condition is true. You get a zero. This conditions at the bit is joined. 47:49 You cannot take these one out and say, well, if it's not adverse to you you get a zero. You're gonna that is illegal, you have to have, if you have pill down like that, you have to have this joint. This joint conditions, okay? It's another technical, you know, little technical thing. 48:14 Okay. So yeah, it's just a since m is matrix, when you define, when you define the function death. So the first condition of m that should be equals to 1 right or you're right. Yeah, thank you. Pay attention to this is details. Yes, thank you. Because emits is a, it's a number and it's not a. 48:38 I mean it's an integer. It's not a bully. Be careful about that. Thank you very much and answer issues. So, obviously problem two basically. It takes this and replace it with other bar. Everybody's ever seen synchronously. That's, I mean, this happens one at a time. So the operating system is going to choose an eye energy and it's gonna run this, I'm going to run either this or that, not bus. 49:09 And in this case it runs in both, it doesn't matter. So, another point sample point, you see this is a box here that could be a parallel bar, it doesn't really matter because it's still updating only. I mean, once a time. So in this case, either way, but but it happens differently. 49:29 So in one case, in this code, in this quadification, the open system choose an energy and then it chooses, one of these two and executes, only one of them. So I have question if you use, if we use parallel instead of the box, that means both are executed. Yes. 49:50 Okay, but why why? Why is that possible? Is because the two values that the, the two conditions are destroyed, right? Right? If there is a possibility that an overlap in values contradiction in values, one statement is signing a three. And the other one is 74, that's illegal. So you can use this power bar here. 50:18 Only these are disjoint like this thing, you know, like here. So this is one statement here. It's really, this is a same as having parallel bar and he has a questions. Okay, let me stop sharing this for a second, and I'm going to try my iPad again. Hopefully you know still trying as a child on this. 50:46 There's a fifth time. 51:04 Keep telling me it's unable to connect. 51:21 Why would we be unable to connect? 51:27 All right. Okay, so I'm going to part, I never had this problem. I'm gonna do something different. I'm gonna go to the white port. 51:42 I probably if I if I reverse things to something. Okay. So now let's talk about the colony and he has a more questions about the first part of the whole movie. I'm really basically resolving. I'm I gave it you the full solution but most of you already got. It is just, you know, you had small mistakes here and there in terms of, okay? 52:09 So we can move to the final solution. Okay. So, I haven't used this in a while, so I'm gonna try 52:23 Meshes out. 52:29 This crazy. 52:36 So, this is a great. 52:41 Right. So now we have cells. So let's say we have life cells here and here, okay? Like the only two cells there. And this is another colony here or three cells, okay? So let's think about the way to think about the problems. So I'm not going to give you the code. 53:05 I just want to think about the, you know, there the problem itself, what has to happen is that we need to find the colony. So let me see. Can change colors. All right. So we need to find a colony. So I see the colony is somewhere like this and be the colony. 53:36 So there's a couple of problems. Problem. Number one is find the colony problem. Number two, make sure that you have the older cells of the column problem. Number three, update the colony and reset the system. So let's think about the first problem, how do we find the column, how do it? 54:05 So help me out. I don't want to call you by name. 54:15 Yeah, I think it's just but you'll read the first search, or just the steps first search to get the labels of the hold on a second. So you see. You are thinking sequentially. Yeah, okay. So number first, first thing is that we need to. We need to choose a colony. 54:37 The way you say it is a random where randomness is very loaded terms. So really, I'm gonna let you use random, whenever you say the word, random whenever you want, but it's really not a chemistic selection, another terminus of. That's what we deal with. We don't need to rather listen properties. 54:53 Some is just, you know, selection of according to some scheduler. We don't know. So we have to be monetary choosing a colony. What is a mechanism in our language? That allows for non-determinism. One of you actually headed heaven in the homework solution and something like x color. Y equals random, we don't have such a constant. 55:28 We can't just pick up random numbers. So, what is the only source of non-determinism in our model? Is it the box? Yes, exactly. Vertical box because. Okay. So the box basically says, shoes one of these statements. So if we associate the statement with the different cells, the opponents, you know, the schedule and chooses one statement, but that statement corresponds to that cell. 56:01 So you can see how we can basically choose a point on this, on this grid, you know, and, and, and then so if we create the statement for every cell, We basically can live 56:37 With this actually part of a colony because it's it's an empty cell. So there's no that was not a good advantageous but it's gonna continue doing that. So the next thing, maybe it chooses this one. Okay. Now chose one cell inside of a colony and we know that it shows 17 agony because that's cell is alive. 57:02 So then we can stop phase one. We're done is phase one. Okay, we basically now got the seed for a colony. The problem is that now we so and we know that we have done with this phase because we're already got to see. Okay, then the next thing we need to do is to find out the entire colony, okay, profession. 57:30 But he that's my opinion here. So we needed to figure out the harmony colonies in the in the board. No, we don't care, they still count. So we just a speaker random position and the funded the 58:10 To pick a sale which is the line. Yeah. So, you know, eventually since every statement has to be eventually picked up, this one of the statements that have a have a live cell, will be picked up because it the opening system cannot schedule cannot deny service to their statement. 58:32 That's why we put a statement for every cell. So we basically have gotten key that the cell the, every eventually a cell weighs, his life. Eventually a lifestyle would be selected. That's a trick. So you still use a non-deterministic in the scheduling and to use the fact, the fairness, the fact that cannot be nice service forever, because you see, if we didn't have the weak fairness in the language, the opening system would look at the board and say, okay? 59:09 You got cell life cells here and there, okay, I'm never going to choose those. Those statements and whatever would run in choose every singles and then we'll never be able to make any progress. But we have this condition that it has 59:45 We should still make more selves. We should stop that process and they can see on the board. There's one color cells. We know don't have to look for another one. And then the next thing is that we need to go to determine the rest of the car. So the, you know, one way to think about it is, first of all we want to think of it to be concorded again many statements. 1:00:10 So, one way to do it is to push the girls out. So the physician is smart, could push to the neighbors that is not a good idea because it really decreases parallelism and complicates a lot. It is much easier if the cells are poorly. So this cell says, oh I have a neighbor who is marked as part of the smart and there's been selected being part of the colony. 1:00:44 Am I the same colony? Yes. Okay, then I want to to to to color myself. So you see it's portion, it's pushing and pulling values. 1:01:00 So then, everybody else is gonna do that. So eventually we are going to have this on mark, you're gonna have this one marked now that this one, this one, this one, these one, this one, this one, this one, this one, this one, this one. I think that that's, those are all. 1:01:24 All the all the colonies. Now to there could be a mouse, another colony here, one in, it also into those three down there, which one that's the second of the, the first two colony when would include the three below, the three life's below it. Although so this, this is this analyze cell. 1:01:54 Yeah, no down this neighbors, this a lifestyle, and all its neighbors. So what am I missing that? I I believe that those three things below. It are part of this colony because they have whole over those this. Yes, empty. You are not because the economy is really these two, and then when extending it to the border by, not extending beyond the board. 1:02:26 So this are empty cells, are surrounding the colony. So you see this guy is not part of the colony. It's a difference. It's a separate colony. You see, there's a gap between them and here too. There's a gap between this two, colonists. 1:02:46 Clear. So again, you can, you can basically write a statement where each cell says, should I be become part of the colony and when it's when it finds our condition that is part, should be part of the colon, it colors itself and we can keep all these coloring into a parallel, blue and array. 1:03:09 So now we have two arrays and that's all we need the bullet array to keep track of the, of who's colored was been selected. And then the original rated is not touched at this point. Any questions? So do we have to declare those two arrays additional arrays? You just gonna be clear one additional array. 1:03:34 So if we have, if this is M, the color part, we're going to make it kind of color be and it's going to be bullied. 1:03:48 And it's kind of initially deformed. And when you pick up the first thing, you make that still true. So the color red here, corresponds to be being having a value of true. High professor. I have not questioned when you update the burning array. So we need to randomly update the uploading array. 1:04:20 Yes, I mean with them, but in our charity, what's I mean, correct? So we're gonna have many statements, which are going to work on updating the whole innovation. Correct, it's okay. I got it. So, for each cell is each cell is going to look at, you know, separately, it's neighbors. 1:04:38 I mean, that's better. I mean, you could say this cell is looking at all neighbors and finds out if you need to mark itself, but as much easier, if this cell is looking at one neighbor at the time. So you create for every cell you create, essentially nine statements and which one is checking in one direction? 1:05:03 So the next big question is that? Are we done? No, why not? So we just mark the, the colony, which belongs to that selected us now there. So we need to update in order based on the bony array. Correct. And that's very easy to do. Yes. However, you need to check that you finished marking the colony. 1:05:37 Yes, yes. So the history and we go yeah, we use the fixed point to condition now. No, no, no. Fix point means that the program is never going to change again. So there's no, there's no fixed point in this. In this program, this program is going to run forever. 1:05:59 And unless we understand no colonies this program continuously is going, it's not going to reach fixed point and if you can't we can't really we cannot release think about this problem. In terms of things point, I know that you guys did but that's not the cause not correct approach of thinking you actually have to do expressive test, okay? 1:06:21 So you basically know this section you can create a test. Are we done and then based on that test, then you, then you update the update, the colony only people in the colony and the same. You have other things that when you update the people, all the colonies that you have to update them all simultaneously, and in the same step, you need to reset. 1:06:45 Be yes. Yes, he said, it's separately the schedule and he said P at any time. So, no, they have to be done. Exactly simultaneously was parallel box. 1:07:01 Okay. I have a question so so we must pick only one colony and how do we do that? Because if you are running simultaneously every position, then that that means there are multiple colonies. You running simultaneously are not using the and using a box. So one statement is going to be selected before the others, but they text multiple steps for the, for the mask to be completed. 1:07:44 So I mean, there is mother poor mask building process. Now my mass being processed all. But, but it on here, we started with this. And then this guy asked, should I be part of your colony Charlie and says, yes. Okay, I'm marked myself. This guy asked, should I be part of your colony? 1:08:09 Charlie? And then it masks itself. This guy asked this guy here. Should I be part of your colony? The answer is. No, I'm not. I'm not involved. Then it has this guy. Should I be part of the corny? No, I'm not involved. Then this guy has here and says, should I be part of your corny? 1:08:25 Yes. Okay then eat marks and then when this is Mark, then, you know, this still doesn't do anything. But then when he has this neighbor says, oh, I have to join too, So it's one at a time and it's just grows out. Also the marking the marking is is not synchronous. 1:08:52 So no, you do not. You don't know what it's synchronous and you could impressible, you could mark synchronously. But the problem is that it is possible that you will be assigning to these things values. Martin are marked in the same statement and that becomes dangerous. I mean, they're obviously becomes illegal. 1:09:13 Oh, I see that's why. That's why I'm saying pool to that, pull it from you check all your neighbors and and pull the value. Put them marking if you need it. Oh, that's that's a way to do it or I see things, okay? Any other questions? 1:09:39 Everybody is clear on this. And yeah, a lot of questions about data. How do we know that the label of the economy is inflammation? We are all there. While there is a condition, there is a condition around, which a label is being picked, right? Is a finisher the process of, let me finish it. 1:10:04 So there's so when there's no element that can be reliable, that can be labeled, you know, that you're done. So you use a universal quantifier for all neighbors P&Q. Oh, I got it. Yeah, that's it. So there's very easy. So, you see what I'm trying to teach you? Is that on one hand, where? 1:10:31 When doing highly parallel things, very concurrent and separate. So the different way of thinking those things that when we need to look at the global state, we can use a universal user universal, identifier and computer whole global state which is it might be expensive but we can do it. 1:10:56 So as a questions on this, so the fixed point refers to the whole program. Correct. But the universal quantifier, you just mentioned sounds like some kind of fixed point for substrate. So, let's, let's assume that this array contains all zeros initially and on every statement, we updated or to increase by one. 1:11:29 Yes. So old he is about to learn will not change temporarily because we're going to resend it. Oh, so oh. But other than this result does this similar to fixed points, being colonical false and I don't know. Then diabetes gets good said to false or okay, I see. Okay. 1:12:26 And as a questions, 1:12:32 Why can't we not? Why can't we not pick a blank spot and assume that it's a part of a coning say we picked the spot in between. Okay. So let's say, pick up this on. No, let's go this one here. Yeah, that one. So that'll be part of two colonies and combine the two colonies but to certain I'm not allowed to the problem. 1:12:58 That's not allow you to become by the colonies. Now a burst can take place here and in the next generation they will two colonies. Get merged. That's fine or two colonies in order one colony. Gets split. That's fine. But you can't in the same step. You cannot do two colonies. 1:13:15 They're supposed to have one company, that's the definition of the problem. 1:13:27 And as a questions here, 1:13:32 Okay, so work on the problem, incrementally, if you, if you're running, I mean, you know, check with me where you make progress, you know, you can start is by first to the selecting a seed, then you know, marking it and whatever, whatever you feel. Good good steps. Okay? Just do that and make sure you get help from me. 1:13:52 So you don't you don't make mistakes and then, you know would affect the that is out and slow you down. Okay. All right. So I'm gonna do now, I'm gonna clear this board and so now you need to start working on a problem because I'm going to give you a problem for kind of think of it. 1:14:19 As a homeward, we can do it, a couple of ways. So, let me ask you. So one way to do it is for for the basically I give you the problem and then you take 10 minutes and sketch it on your on your on your inward or something and some file. 1:14:40 And then you can you can volunteer to share the file. Like I did or I can make put you in breakout rooms, kind of see people together and work together and then share but they prefer the individually or in a breakup room. What would you prefer? 1:15:03 Either one's good for me. I don't know if I have a huge preference. Okay. Well, if nobody has any preference, let's it. So open yourself out award file so you can share, I'm going to turn on after I finish my explain the problem, I'm going to turn on the. 1:15:20 We have two problems to work on today and hopefully we get them all done but so I will explain the problem. Then I'm going to turn off sharing and I might play with my kid, but I'm going to turn off sharing and you write your code on, on the piece on a in a word file and I'm going to turn on sharing so you can share your file and I volunteer when you're ready to share it and in while you're writing your code, if you have some questions, just ask them and as if we were in the classroom, okay? 1:16:00 So, the problem with the following, we have a graph 1:16:19 Okay, this is a graph. It's a connected graph. So, there are nodes. You start vertices and their edges. So what you are asked to do is build a spanning tree for this graph, especially is a tree that includes all the vertices in the ground graph and only uses edges, which already exists as a graph. 1:16:54 So that so, everybody understand how the spanning tree is. Okay, I'm going to show an example of a spanning tree. So I'm going to use blue here, okay? So let's say, let's say that this is in the spanning tree and this as she's in a spanning tree, in this edge is in a spanning tree and then this edge is very this edge, his age. 1:17:28 And then this edge is edge, his age in this edge. So you notice that there's a different color here. Design is some age lead here. What's up some age? Radius will be deleted then we will give us not. This is not in. This is not in the tree but you notice all the edges in the tree are pages and original graph. 1:18:06 So yeah, that's the lineage fee. So, it's not have a soccer cycle. A tree. By definition has no cycles. Okay? So we just immediately some pages to make. It has no seconds. So so so the like I said that no cycles in the Spanish tree but you have to cover, all the vertices. 1:18:34 Yes. And you have to only use edges that are already in the ground. Okay? Yeah, new address. 1:18:46 Okay. Okay. Yes. All right. So come. Okay. I'll give you. I mean, you have 15 minutes, write the code for this, I'm dropped it out and while you're doing this, write it out. Like I said, write it on a word file like I did and then us ask questions along the way if you need help with particular particular constructs or whatever. 1:19:19 Now, here are the issues that you have to remember. First thing you're gonna have to think about is, how do you represent the graph? Second, you have to think about how you're gonna represent the tree. Then third is, how do you build the spanning tree? 1:19:39 Okay. 1:19:45 Any questions? 1:19:53 I'm going to stop sharing and I'm going to turn on sharing for everybody. It's something in the chat. 1:20:03 Okay, holding down. So that question, okay, I asked showing options all participants can share, so let me know what you need when you need to share. So just go your own way and write code and ask questions. So, you don't 1:21:00 Hello, professional. How to all, what kind of data are being purple being the input? Well, I mean, first of all the the graph is an arbitrary graph, so you just have to have a graph. The so the question is so you know as on as long as you declare the graph you're fine you think of how the graph is represented so you can and then then you can declare the property that run, okay? 1:21:47 So we just needed to being initialized correct on sale and then do a transfer into the sanitary, remember that? You don't need to initialize things. If the he declares something you don't have initialize it unless you have to if you want to have constraints on that on the object. 1:22:16 So if you declare an integer and you don't care what the value is, and you don't initialize, but if you really care for entropy between one and five, then you have to visualize it and say it's between one and five. So you only need to like things where you have the specific requirement, okay? 1:22:58 Are you guys right in code? Thinking about it. 1:23:32 You know, four minutes, I will ask you. How do you represent the tree? The graph. So we prepare to answer that question. 1:24:35 Anybody knows how to turn off the iPad. 1:24:41 Down the power button. Around the power button is giving me Siri. 1:24:51 There should be go ahead, doesn't say magic volume up down. Then hold down the power button. That's all around the internet. I was a button on the top of the iPads. Yeah, but that's getting me serious. Not giving me okay. Yeah, establish the button. There is not, I can show you like this. 1:25:20 That'll be terrible. I think it should be sound down and the power button at the same time, but that's how my newer iPad kind of works. And then, you just hold that down until the power bar comes on. 1:25:45 Okay, then 1:26:08 So, it's a palette contributing to the conversation. 1:26:40 Okay, that means I'm I need to somebody has to tell me how to represent in the ground. I am using an adjacency matrix. Okay. So basically you have an end by end matrix and is bullion right? Yep. It could be an inch. It's kind of the same thing as game of life. 1:27:03 It doesn't make any difference. Okay, good. And how are you gonna represent three as also going to use an adjacent to mainstream experience of the tree. Okay, so that's good. All right. 1:28:09 I mean questions. 1:28:41 It's not like that. It's a problem only into a system. 1:29:30 Six minutes to go. 1:30:37 Again, can somebody just share something? Just raise your hand? Who wants to share something God? 1:30:58 Okay, so 1:31:03 All right, so I have G and I have bullion. Yes, what is start? That's the starting location of them. Okay. So that's a root. Yeah. Okay. So, so you need boxes box before it starts and passed the before visited. Yeah, because you have to suffer and also, initially, you need boxes. 1:31:37 So why the graph 0? 1:31:45 So because it's an arbitrary graph that is given to them. Yeah. Or so. I have an input graph, which is what I was working on doing. So, I'm assuming we have an input graph and then G is our spanning tree. So, there's also another array, which is our input graph. 1:32:12 Okay. So that is your graph. Yeah. I'm to change put make one G for graph and one. That's on our teeth work trees. So we don't, we don't get confused. Okay, that makes sense. Okay. And then now here initially the girl, any properties of the graph that you are concerned about 1:32:41 Will not. Yeah I'm waiting to find errors because I've just been a trying to get this work in. Okay, so I want to make initially equal to 0 and is equal to false. Actually no, no. And initially the first thing go to zero. But we change it to T. 1:33:02 Yeah. Yeah. Why do we have? Why do we have visited? So my thought process was in an attempt to kind of recreate a depth of research in this language and so we'd be starting at some place called start, right? And we have an array of visited indexes and our goal would be to travel through the and so visited would be our way of doing whether we've been to a note or not and they're thereby not travel to it again. 1:33:50 That being said, I haven't been able to go backwards yet. So okay, so okay, let's talk about start for a second. You just start equal to zero but actually you just want start to be any number between. Yeah. It could you don't care what? Which one of the noses? 1:34:14 Yeah, so I could say something on lines of just smaller than smaller than greater than or equal to zero for the okay. Yeah, I don't have greater than equal to. So we're just going to pretend use option optional option that gives you greater than or equal it looks no whatever. 1:34:43 Okay, well I don't have word on this computer, I have a different program so it's fine. Okay, listen there. Okay, so let's stop sharing here, continue working. I would suggest that you really don't need a okay. I mean, let let's sing some work again. Work in a, the 1:35:15 Okay, anybody else wants to share. 1:35:27 You want to build on your what math had done in terms of declaration and think of what do you need in the always section and in the cyber search of the same first? What will be helpful to you since the well, and we started as a silent section. See what you need. 1:35:50 How you grow, how you do, how you build the tree, and then see what you need to put in all recession. 1:36:57 So let me kind of reemphasize. What man have done, basically is a graph is an empty tree and has another edge that he's selected underneath. It's a little randomly to be the root. Now, his task is to build the tree from that, think of how, what will be the logic to use. 1:37:29 Forget about at this moment, you unity. But whatever the logic that you're going to use to build the trade. I mean, just look at the picture of the graph. How would you do it? 1:37:45 Again in my distributed manner and I think you have some ideas. Can you share? So I'm I'm thinking that you need to make sure there aren't any cycles in the spanning tree that you currently have which might need to be a check. And then you also need to make sure that all of the vertices in G or also in T, which would be another check, very important observations, most of them, but I would counter with the following argument. 1:38:19 I don't want to do all that checking, just about short for me, want to make sure by construction the tax. Exactly. That happens. So if I crossed, by the way, around your program, it's never possible for an end for the edge. That is not in the graph to show up in the tree and there's never possible for the tree to become to have a loop. 1:38:54 So then would you maybe pick your root node, add an edge from G and then delete that edge in G. Don't have to because if it's empty you know you're already used it 1:39:14 So, let me share the white one again. 1:39:24 So, a strategy. So, I'm going to use a different color here. Okay, let's and yellow. Okay. So the system chose around the node as being the root. Okay. How to expand. So, that's how they get now, it's part of the tree, right? It's, how do we expand from this? 1:39:53 Just forget about unity. I mean, how would you expand from this? If you look at this picture, what what would you do? 1:40:10 Looking at the neighbors and keep haven't want to stream neighbors. Okay. And and keep us aside of vertex that's already in a tree. So sorry, you have this? Yes. Okay. And you got seen neighbors. Yes. So just pick one arbitrary and pick up this one. Yes. And I think we also need to maintain a set of a set of voters vertices. 1:40:56 I don't think so. Because so you picked up this, what we do next I add the H to my spending tree, okay? So that's exactly the procedure, right? Mmm. But you see what you did. And that's what you need to think differently in immunity. But you did you study this mode? 1:41:25 And look at this neighbors and pick up a name. How about you think about differently every now? And then in the system, looks for him for a neighbor. And so this guy says, am I supposed to join this? Funny tree. These guy says, hey am I supposed to join the fun entry am I am I? 1:41:50 Am I so you see instead of going power? It again. Pushing yours full this way. You can have a statement for every from every mill. So what would be the statement for this note? 1:42:10 We see what you did. This node connected itself got connected here. What will be the statement that the accomplishes this and is associated with mmm update? The the three matrix. What conditions if on the quest. So you you have to look look at the graph matrix and see if you are connected to to the node. 1:42:50 So what could really happening here, is that this node the code. For this note, there's code here statement associated with this node What this code does. Basically says, am I in the tree or not? I'm not in the tree. Therefore, I could be in the tree. How do I get myself into the tree? 1:43:14 I have a neighbor which is in the tree, right? 1:43:23 So all it's so all it has to do is says I'm not in the tree but I have a neighbor in the tree. Then I add this edge to the tree, instead of the way you have to think about in in unity. And but by doing this you we can avoid forming cycles. 1:43:54 Correct. Oh I see because you're not always added somebody who's not in the tree. Oh yes. Yes, that's why that's why I was thinking about maintaining a set whether one vertex is in a tree or not or so I see, but you see, so notice that this guy basically has to ask two questions in mind the tree if I'm in the trade, there's not good, I'm God. 1:44:26 So basically the question is it am I not in the tree? And I have a neighboris in the, those are the two questions that the God. 1:44:40 So if I can tell if I'm in the tree or not then then I can I can add myself. So, I'm going to stop sharing this. 1:45:03 Okay. So so this is my spanning three solution, so the program. So it's the program in Spanish. Okay. I have the tree in the graph in. Those are all, you know, the density matrix, right? Well then, and I have this integer I, which was in it in max code that is one of the one of the values in the tree. 1:45:36 So initially are some some node in the tree. I'm not choosing the initial node in the trees. I said zero should be false here of I mean I've been using zeros and months for transforms. So the trays, I think I initially, and then I have this additional condition, which has mad. 1:46:06 That's, that's one to impose any registrations on the, on the graph. And I'm asking for the, I mean, I'm assuming the graph is, by the directional or in this undirected graph. So I'm saying that if the gravity and Q is in the graph in Qing Q&P and is a graph as well. 1:46:26 So this basically says, this is not directed wrong, I have another graph, I have a empty tree and I have a node. I don't really selected node in this graph. That's why the initial results. Any questions on this? 1:46:48 Okay. Now look what I'm doing. The always section. I'm defining something called MI in the tree. 1:47:00 Because remember, if I am not in the tree, then I can attach myself to the tree. I mean, already in the tree, I don't want to attach because then I create loops. So that too consideration that maybe in the tree one is that I am this selected root are and obviously something the tree by definition or there is somebody else which points to me and the tree. 1:47:28 So from J to, I said the trees directed graph. The graphics under the graph originally is underneath by the trees directly, is from the root going out. So these someone who points to me then I'm in the tree. So initially only I on your heart is in the tree, so now you go to the assignment statement. 1:47:56 Because, very simple basically says, you know, I have, I have this, this two notes and they are, there's an age between them. If there is no ways between them, I don't, I don't care. These image between them this edge become part of the part of the tree. 1:48:24 Peers in the tree and q is not. So, that's exactly the picture that we have before then now to the right was not in the tree and the note of the left was in the tree and there was an edge between 1:48:44 Questions. Hello professor, do we need to assign TQ and also the TQP equal to 1 Now? Because I want to make a directive graph. I'll kind of the way that treat you like that as a root and goes down, okay, I got it. If you want, if you don't want directed then yes you could. 1:49:11 You could do that as well. Haha, I just got the message from you and ever effective at 6pm. UNM is closed for tomorrow. Not 6pm out today. No. Today like in 15 minutes including online and remote delivery classes. So we are actually officially in 15 minutes. We are becoming illegal class anyway, so that's t. 1:49:45 In the assigned lies TPQ set your assigned to one instead of drew. If it's, I'm sorry, I apologize. I mean, have sometimes lazy and while I grade you and complain of using zero and one foot twelve and I sometimes do it myself. So yeah, should be. I mean, really, this should be false and this should be true. 1:50:22 And now that I should also point out that you see a disconnect I have this connected graph here, somebody by direction up. So the links are by direction, right? But I really really should have also the constraint that the graph is fully connected and the way to do that. 1:50:43 I would have the problem with that is that I I can't write it here because it's a recursive function. So I have to define a function outside of the outside of the program and say path. Be comma Q and then that would be outside of the program defined as mathematical function, that then I could use the in the program. 1:51:13 But I could not write that path. I mean, I could not easily write that path. People come acute because that would be a recursive definition, a high profession. So for the assignment, here is a PQ randomly, take the phone, the range of the one to end. Correct. So I see PMQ, this is the sub quantified under the dummy variables, under the bar. 1:51:43 So a pair is chosen a dragon and then you do the test is they're not connected. Nothing happens. If they happen to be neighbors and connected and one is in the tree and the other then something happens. Okay. I got so you can, but you have here, if you look at the P&Q, you have n square statements. 1:52:12 So could set up impossible. You take the pair of PQ more than one hand. Yes and nothing, there's no no negative effect in doing that, okay? Yeah, so each pair of PQB selected, not more than once. But it's selected an infinite number of times. 1:52:39 Now, later on, we're going to come back to this program and we're going to prove it correct and show that program is it's corrected after it does. What we're claiming to do at this point today, we're just waiting our hand which is arguing informally that you know, the program works. 1:52:59 But we are going to actually prove it. So the issue that Daniel raised was, you know, being a no cycles and and everybody being in the tree, eventually, it's on, whoops, that we were gonna address that and also the issue that here raised about six points. This program does have a fixed point when he finished building the tree. 1:53:26 There's no more activity taking place. Yes, this statements are gonna be selected forever, but nothing happens. 1:53:40 I've been finding this and you're finding this helpful. I think it obviously, you know, in the class would have been easier, but, you know, I hope we find it helpful to fix things. And there's a question about this problem. See, we tried to make it very elegant, you know, I really think that by having this one definition here, this is key. 1:54:05 And by, you know, by having, you know this root, I mean being a giving us it that's, you know, I mean, telling us that this is part of initially, part of the tree. I mean again simplifies a problem because then all you have to do is just look for pairs. 1:54:27 Are you in the tree? And I'm not. And there is an age between us. So this thing is that elegant programs are important because we are trying to design them also, so we can prove them, correct, easy, a professor. I have another question. What is the integer? Ah, here it is, your r. 1:54:56 It's between 1 and n. Yeah. It's none of the vertices in the graph, but we are not specifying which she not selected, zero is being the, the root vertex, but it's not necessary. The program could work if you just any arbitrary vertices. So basically we're saying R is just between one and n, but we don't care which one which one of the vertices is a seed of the tree, the root of the tree. 1:55:24 So the r could be any number between one and n, correct? Okay, yeah, I got it. Still work. Yeah, okay. I'm going to stock sharing this and I'm gonna go back to the board. Should we stressify that n is the number of vertices like before the program if that was normal solution. 1:55:55 Yeah, and always just specify the that the issues you could specify. The graph is, it's a bidirectional. So I directed graph and that is the, it's a complete graph. I mean, not a complete graph. It's a connection you could say all that in English. So then you wouldn't have to deal with with the initial section. 1:56:23 Like I just wanted to give you one example of something that is durable in the immigration section. And also an example of something wasn't doable because I didn't have recursion with a male, which would make my life, terribly complicated, okay. All right, let me share the while order again. 1:56:52 Okay. So now we have it, we're gonna choose a different problem and that'll be the last thing we can do. So, we're gonna choose a something called. I mean, I'm just gonna call it strategy, go. 1:57:07 And what happens? We have we have a board this before, okay? And we have colonies before. So here's I'm not gonna draw rectangular things. I'm gonna make them just kind of random, I'm sorry. 1:57:39 So, this are our corners that the same way that we have in the game of life. Okay. Now there is a difference here is that the cells are actually colored. So this colony is colored red, everybody's red, everybody's green, everybody's blue and everybody that is not colored. It's outside in between. 1:58:03 So and we're making assumptions that every colony is basically, it's, it's the same color and then not to colonies with the same color. So, in this case, we have three colonies and also different colors. So, the game is called strategic. It's like, it's like, it's a board with radiation on the board game. 1:58:26 Okay. So what what are the rules on this? So they a node, I mean each cell represents. Now a sort and each colony represents the country. And we are on a board, you know, square board that we have fighting on playing this game. So, 1:58:52 Soldier is selected. So let's say this solution. Sorry Franklin. So this soldier is selected. Sure, part of the, that's part of the green colony. And this soldier is allowed to attack enabling a neighbor, so it, you know, so if there's a, so let's say, let's do like this. 1:59:28 So this is our soldier, this one here and it can attack whatever cell it wants next to it. 1:59:39 Okay, so far so good. So we just select one and we select a direction of attack. So we selected two cents. Now, the rules are as follows if the cell that is attacking. It's empty. The color of this soldier extends, so that self. So that cell becomes part of this country. 2:00:02 Now it's a cell, it's over different color then. So you have read and green next to each other and the rare and the green attacks a cell which is red. Then we have to determine who wins and the country that has the largest number largest population. Not just number a lot just army. 2:00:28 Which so it's a red, it's more as more than the green, everything that's really becomes. It in the two countries. Have exactly the same number of soldiers. Nothing happened. So the way the team make progress is by basically talking and enabled himself. If it's empty you take it and becomes your color. 2:00:52 And if you're attacking another country, it depending on the sun, identity sizes would one other two countries wings and the two countries become one. 2:01:07 Questions. 2:01:12 To the colonies, know the size of themselves and others or no nobody knows it. That independent soldiers are just blind in their spot and they make random decisions. So you can't place them. You can't play any strategy. Please stop their random processes. The same. 2:01:43 And the initial board is given with the colors on top of them, the initial voice, basically, and end by and matrix wherever we assume that economies and the colonies have separate colors and they're not two colonists, the same color, we assume that by definition in the English text in front of the program and any cell that is not colored. 2:02:09 I mean, so you can think of the cells that are not colored as being 0 and the color is being once through whatever. 2:02:21 The fact that the color is one in the color is two, the dot doesn't really matter, it's only good size or colonies, it's gonna matter. 2:02:34 Another question. 2:02:42 Okay, so let's have a discussion. What are the things that? I mean, what are the components of this skiing? They're gonna be important. 2:03:08 We need to count how many cells are in a colony, right? So that's easy, right? 2:03:24 So you could give me a color, I can very quickly give you give you a summation. So, yes, you need an in order section, you're gonna have to, to be able to do account. 2:03:41 Okay. What else do you think you might need? 2:03:55 You to have something that flips the colors. If it first signs out, if you attack someone and then flips the colors, if it's greater than if I did, you have to do all of that atomically, right? So it's all one. How many statements would be there and try to little that make finish statements whether these three here? 2:04:27 Yeah, exactly. That's the three cases but then maybe they're not so distinct. 2:04:38 Because you make an attack of course statement because you could have a blank spot there too. So you have so you have one statement so you make an attack. Hey attacks B. Right. So you gotta have the situation where B is empty or being it's another different color and then it is a different color. 2:05:05 You got two cases whatever. Yeah. I see what you're saying. Sleep a wins. Be wins. Or at the time. Yeah. So you got four cases, but there I think they're all part of the same statement. So, how many statements are they gonna have? 2:05:31 Would it be Tuesday? Statements you'd have one statement checking for if it's empty and one statement for checking what color it is. And why with I simply agree that all of that happens in a single statement because has to happen economically. So, it's gonna be part of the bar with different pieces. 2:05:53 Okay, so it's one statement. But how many statement do you think we should have in the program itself? Hello professor. If you two colonies, they have the same number of the sales which you are willing. No nothing happens. Okay, that's happened. So, you each move, you need to take a randomly from the board. 2:06:17 If any colony and then children randomly from that economy to a one sale to attack randomly the direction? Well, I mean, you don't choose. I mean, you can think of it choosing a colony but I think that could be better to sync or choosing a soldier. Okay. And then the other thing that you have to choose after, you know, if you have a soldier, you need to choose who more who you're gonna attend, right? 2:06:47 Yeah. So, so that those are the two parameters, if you think of it as an action that two parameters, the attacker in the attack to that research. 2:07:11 Correct. So if you choosing one pump there to attack another steel you you can only attack is the label. If it's the level is the the same color we don't need to do anything. Yeah. Okay, so so basically, what's going to happen is that we're going to have to have 2:07:39 And then I have to have a box. 2:07:45 I'm gonna have a soldier of P with toxic soldier Q and they are good. There's a conditions here, but the condition here. 2:08:09 So this is, this is P and this is cute. What the condition here? You can be empty, the tiger. You can be a blank cell and you can be a soldier from different color country. Well, that's kind of have to that will be turning what happens in terms of the the changes. 2:08:38 But how do we restrict P&Q? It's an adjacent cell, right? So PLQ they basically have to be on the grid. So, basically between one and 2:08:59 So those are the conditions there and then I have to deal with all the kids and those are all eaves. 2:09:13 If if the if the cell is empty, then Q gets a new color. If this, if a Q is over different color then but Q has more soldiers than all the P. Neighbor soldiers have to be changed and so on. So you got all the cases here and this are all respiratory bars because these are all just cases that you have to do the statement, you know, and understanding. 2:09:54 So they have to do that in one one, single one single statement. And obviously since you're gonna have all this cases, it's a good idea. He is the always. 2:10:19 Waste structure to come up with the right definitions for the different cases. So think of it you know the case where except you sell there's no matter not much of a case. But the case where, you know, wings and requires a comparison of summations, the kids would be losers again so you can have and all this station it can have people with you know, pee pee wins over cute pee loses over the cue loses to kill. 2:11:01 And those are the two big things that have to be to be handled. And then when you have that, then you also have to apply them in parallel bar. Probably the entire columns. Take out the juice today. One, quick question, do we allow tax along? The diagnosis are just horizontal for the exercise. 2:11:30 Okay good and it's that all of them and that's all combined, you think, absolutely. In the definition of layer of labor. So we go, we can if we write it here or no directions, then you can attach more direction. You can't have it. If statements and always no, you cannot have each statement in always. 2:11:58 So how do you say if index? See if index ij equals C, count it not count. It is that? Well, I'm not sure you're saying to drive, but for let's think the case where P wins over 2. So that's a that's a definition right? P wings over Q. So payments of accused. 2:12:28 It's true. So basically being wins over cute equals a condition. And now I have to put the condition there. The condition is that? PMQ are different colors. Yes. So as a pee, his greater than size of Q. So it's all logic. It was true or false. Yes, but I'm trying to make a function a macro, I think that's what you would call it in. 2:12:58 Always, thats just counts. 2:13:05 Like say there's Connie Juan in colony too. Yeah, I want to count only colony one how without the if without the same statement. I find that fee, really? Okay. Let me, let me stop sharing this. And you got to the what? 2:13:34 And then you get the new plan. So, 2:13:48 So what so what we want to write is a few weeks over q. 2:13:56 Okay, so can conquer comma Q? You're not serious, sorry. 2:14:18 Okay. Can you see now? Okay, so that's what they want to define. So this is, this is going to be the true or false, right? So now I have to put a condition here. The so the basically, so let's say that our grade is G, okay? So J's a great. 2:14:46 So, basically GOP. It's a color of the must be different from G of Q. Correct. The first condition they have to be a different colors. Okay. And we run now to to compare the sizes. Okay. So basically, I would say, Size. But emphasis Jeep parentheses greater than size, parentheses G, parentheses Q. 2:15:40 So basically size counts a number of cells in the grid that I have discolored. And you can see the that I cannot define size. 2:15:56 Of C, which is a color is not the cell size of C as being equal to plus are 2:16:13 But eyes be it's it's in the one kind of one smaller than equal to half, more than equal to and come on there. 2:16:35 And, 2:16:40 And G of are going to add. He calls C on forget about colon one. So, for every, for every element that there are in the world, it has the same color I called it as one. So that gives me the size of the number of nodes that are of color C and then I can use it here to compare to determine that T1 over. 2:17:19 G. You want to look it? That answer the question, okay. Any other questions? 2:17:35 So I'm good. We can do conquer. We can and we don't have to do lose because it's symmetric. So it says we can just pee into any order. You know, we only need winning the cover hunger. 2:18:06 You have questions and following Earth. Can you spell the name of this game? For me, put that the the can the name of this cans. 2:18:30 Oh, but this is not the real onion. There is a, there's a game with his name but this is not what we're really or it is a board game that you can buy this name. You just, you know, I just using that name. Oh, all I see. So the science section basically like I said before you basically going to have you know box he camera killed and they have to be in within the range and they have to be neighbors. 2:19:11 And then we have all the cases in which parallel bars. 2:19:20 And has a questions. 2:19:28 And here is an example of the code. 2:19:37 We have he's an array will be introduced from 0 to k than k colors. We have a question, think, no. Just subscribe to my arm. Okay. So so the basically the science section, basically says we take pairs of PQ what we assume that P is attacking Q, okay? And they have to be within the, within the matrix and 2:20:11 I'm not checking that their neighbors because I'm folding it in something else. So, basically, we're we're saying that to get the color of gets a color of pee. If he captures you to make you look at what means capture means means that their neighbors and he has a color and G, it's zero. 2:20:46 So has no color this. Take care of the case where P basically captures a cell which is empty because zero is is a zero and the empty color and power of that. Now, we have to deal with the situation where people winds over Q. So now you can see that we have to have this eye and GI gets the color of GP and repeat if P winds over Q and the the Color. 2:21:31 Why is the same discarded of Q? So this basically says I is just the same country as Q and he has won over Q. So, therefore, I because part of the country of P, you know, if you look at winner has to be neighbors in the count of P, is greater than count of Q, which is greater than 0. 2:21:57 And so that's deals users, entire and are saying count is trivial using it before. 2:22:09 So I think the product the part conceptually what you need to get, get your yourself around. Is it just, you know, this part is basically, it says, create as many statements, as you need, and then the other part is it. If you have to happen in parallel, I mean in a single atomic step that we have to use a part of bond, but that's what you're not used to. 2:22:39 You're used to, basically, going through a group to get the to get something accomplished or do the depths first on breakfast, but it's also conscious equation. One in concurrent systems. We really want to learn how to to write programs where and I think your penalism, if you hide through your powerism and then the number is increase, the number of processes. 2:23:06 No, for the CPU units. We can do more in the same time so they can order. But then they have to make sure that you know you know now we don't have confidence about seeing by that and we do that by writing the code problem. 2:23:27 Any questions? 2:23:39 Okay. 2:23:53 So everybody knows what we need to do. You need to redo the already, do the assignment the first to problems, you know, we I mean that use now for you to learn, you know, proper notation and keep it and keep things clean. The you have to solve the third problem and if it's all the third problem, you get a hundred points and make sure you ask questions, don't get into the rubbing hole and it's stuck there for days and then come to the surface of the last minute. 2:24:27 Okay. So some of you had named the classes before. So, you know that, you know, I was available and I'm trying to be helpful any last question. Let's question do next one. Our next third will be next Tuesday, midnight. And then the next week we're I think we made a good decision now and it suspect to go to because it did not lose a week progress here Also. 2:25:01 So yeah. So next time the next week we're going to look at the proof logic. So there's going to be a little bit more, sophisticated complicated. So that's one thing. Those things that was music. I need you guys to participate more with asking more questions. Not just in terms of preparing the homework but also, you know, advise me how to apply engages you to get to more to talk more. 2:25:29 I mean, you know, I can, I can, you can see the half of the class talk and there's a laughing art. But I mean, I need you to because you're learning by we're working together is like, you know, I doing practice on, from the soccer field. I mean, I have to, you know, take the ball to each other so you can learn from it. 2:25:47 So okay. All right. And so do your best and now we're working together. All right, take care. All right. Thank you. Thank you. 2:26:12 And so, 2:28:53 Exercise. 2:29:03 Yes.