Placeholder Image

字幕表 動画を再生する

  • Hello World Sean rooms here with free code camp, and in this video I will be giving you three tips on how to learn to scream mathematics.

  • The first tip is to stake Hung.

  • People often hear the word mathematics and panic, and when you panic, you stop listening.

  • And if you stop listening, you can't learn the material.

  • So if you simply stay calm, then you will be able to learn the material better.

  • You aren't being graded on the subject, so there's no need to panic.

  • The second is to rewind.

  • Uh, you can rewind the videos at any time.

  • And when I learned discrete mathematics, I didn't have this opportunity.

  • So in theory, you should be able to learn the material much faster than I was ever able to.

  • So I strongly encourage rewinding videos, Finally explained.

  • Once you think you understand the material of videos, you can try to explain the material out loud, either to yourself or to a friend.

  • If no one's around or you feel we're talking himself, then you can try to explain it to a rubber ducky.

  • There's a concept in programming called rubber duck debugging, which is where programmers go through their code line by line, trying to identify bugs in their code by explaining it to rubber ducky.

  • So, similarly, if you go through the material of the videos subject by subject, you will soon be able to identify uh, any gaps in your understanding of the material.

  • In this video, I'll be explaining what discrete mathematics is and why it is important for the field of computer science and programming.

  • The street mathematics is a branch of mathematics that deals with discreet or finite sets of elements rather than continuous or infinite sense of elements.

  • Imagine trying to run a program that requires an infinite number of executions to complete attacks.

  • It's obvious to say that the program was run forever and the task would never be completed because they're an infinite number of executions.

  • In order.

  • Avoid this problem.

  • We approximate to continuous sets with discrete sets.

  • Now you may be thinking, I never used math that involves infinite sets, but I promise that you do.

  • The simplest example is with a circle.

  • A circle.

  • By definition, is an infinite number of points equidistant fixed, and the problem with this is that if we try to write a program that prints out all of these points.

  • It will run forever because they're an infinite number of points and therefore an infinite number of executions.

  • So this is physically impossible.

  • That's why if we zoom in here, you can see that when you come down here, they're all these points.

  • But in reality, we should have even more points between these points.

  • And then if we zoom in on those, we'll have more points between those points and we can never complete.

  • The task now involves seeing circles on computers.

  • So what's going on?

  • How is this possible?

  • We just established that it's impossible.

  • Well, the answer is that they're approximations.

  • For example, consider regular polygons regular polygons, like a triangle or square or a Pentagon.

  • Those don't really look like circles, but if you keep increasing the number of vergis ese, uh, eventually you'll start getting hexagons.

  • Octagon Decade guns, hex a decade guns, I Costa guns.

  • You can see that these regular polygons, the Maur more.

  • You keep increasing the number of urgencies which the verte Cesaire equidistant from a fixed point.

  • They will eventually approximate a certain.

  • Eventually there will be indistinguishable to the naked eye and we'll look identical to a circle.

  • And in this video I'll be explaining what sets are.

  • A set is a collection of distinct objects called elements or members.

  • An element is essentially anything you wanted to be.

  • And for example, elements could be numbers, letters, variables, more sets or nothing at all.

  • Sets are usually denoted by capital letters such as capital, a capital, B, C, E or F, and we say that the set contains elements.

  • For example, we could say that the set A equals the set containing the Element five, or we can say that five is an element of a Now I will be interesting.

  • A lot of symbols like this, this just means is an element of and it'll save us a lot of time in future videos and I don't have to write out is an element of each time, so that'll come in handy.

  • So what does this set actually look like?

  • Well, there are two common types of notation for sets, and the one I'm introducing in this video is roster temptation.

  • But it looks like this is just curly braces with elements inside separated by commas, which is very similar to Java script, The only difference being that in math we use curly braces and JavaScript.

  • We use a square bread bracket.

  • So, uh, now let's just walk through these.

  • So the the set A equals the set containing the album.

  • Five.

  • That's how you would read this.

  • The set B equals the second tainting elements 23 and four.

  • The set C equals the set containing elements D E F G now dfmgi They're not.

  • They don't have to be variables.

  • They're either variables or they could be characters.

  • It just depends on the context.

  • The set e It contains no elements in this case, which has an impact that you'll see in future videos.

  • And finally, the set f equals the second Training elements A, B and C in this case are elements are sets.

  • So we would read this as f equals the set containing the set containing the Element five, the set containing elements 23 and four and the set containing Dfmgi.

  • So in the next video, I'll be going over a different form of sanitation in addition to introducing you to some common sense, and this will set us up eventually.

  • My goal is to bring us up to being able to define and understand algorithms, and this is where we have to begin.

  • In this video, I'll be introducing interval notation and talk about some common sets.

  • This will lay the foundation for the next video on set builder notation.

  • The beauty of interval notation is that allows us to officially describe all numbers between two values.

  • Suppose we want to say that the variable X is between zero and one.

  • Well, we could do just that.

  • We could say that X is an element of zero.

  • The interval 01 or which is really saying X is greater than zero in X is less than one.

  • Likewise, if we wanted to say that X is greater than or equal to zero and X is less than one, then we have to switch this to a square bracket.

  • All we're doing is we're now including the number zero in the interval.

  • Also, we can include zero, and we can also include one in the honorable by using square brackets on both sides.

  • So it's greater than or equal to less than, uh and now talk about some common sets.

  • The 1st 1 being the no set, which is the same thing, is the empty set, which is just There are no elements contained within the set, and this will come in handy in the future.

  • The funny And here is the natural numbers, which is the set containing elements 123 and then these three dots here called an ellipsis, which tells us that the pattern continues.

  • So N is the set containing 1234567 alway off to infinity.

  • This funny end with zero is the natural numbers.

  • However, it includes the value zero within the set.

  • So it 012 and then the ellipsis tells us all the way to infinity and an energy fashion.

  • 0123456 On Finally, we have all of the energy is positive and negative and not which is zero negative one native to although down negative infinity and 01234 all the way up to infinity.

  • In this video, I'll be introducing the rational numbers and settled in rotation.

  • The rational numbers are defined as a ratio of to emitters, and examples include the images themselves terminating decimals and repeating decimals So let's start with repeating decimals.

  • If we let 10 X equal.

  • 9.999 Repeating then If we divide by both sides by 10 then X equals 0.999 Repeating.

  • And if we subtract x from 10 x, we have nine x equals not and then divide both sides.

  • By nine we have X equals one.

  • And then, if we multiply by 10 both sides by Tammy of 10.

  • X equals 10.

  • So now we have 10.

  • X equals 10 but 10.

  • It's also equals 9.99 repeating.

  • So we have now.

  • And these are in fact true.

  • 9.99 Repeating equals 10.

  • So we think we can now express 10 X as an imager, which is a a, um, rational number.

  • We can put 10 divided by one, which is ratio.

  • So another problem we have is terminating decimals.

  • If we have 2.78 equal, why, then we can just easily say 278 divided by 100 equals.

  • Why, as well these air to imagers and it's a another rational number.

  • So a convenient way to define these there is denoted with a Q and This is called set builder notation.

  • We have the Q equals the sack containing elements a divided by be such that A and B are elements of the inner jurors with the only condition that be cannot equal zero.

  • If you divide by zero, it sze undefined.

  • It doesn't mean anything.

  • So if you're interested in that, I recommend Googling and I think it's interesting in this video will be giving an example of a non rational number.

  • If the square to were rational number, then by definition it must be expressed as the ratio of two integers.

  • If we then square both sides, we have two equals, a squared divided by B squared.

  • If we multiply, both sides might be square.

  • We have to be squared, equals a squared.

  • And from this, we know that a square is even a score's, even because we have two times some imager, which is be square.

  • Since a score's even, we know that a is even because a squared equals two times a manager.

  • The energy I chose was to K square.

  • That means that any times they could be expresses to K Times two k, which is to say that a equals two K.

  • I can now substitute two times two K square for a square, and that leaves us with B squared equals two K square.

  • Once these twos cancel out.

  • Now, this also means that B squared is even because B squared equals two times a manager.

  • Which is to say that B is also even following this same logic.

  • Now, if we go back to our original premise, uh, the square to two equals a divided by B, where a divided by B isn't irreducible fraction.

  • But since A is in even number and B is also uneven number, we can express these numbers as to K in Tooele.

  • But these twos here will reduce meaning that we'll have the square to two equals k divided by m.

  • But since this reduced, since this is no longer explicitly represented as a devoted might be and it reduced to Kate about abi l, we know that we do not have a rational number.

  • Now.

  • There's a more specific way to define these numbers or classify these numbers, but we need set operators in the next video.

  • In this video, I'll be defining four binary operators for sex.

  • I've defined two sets A and B teau help give some examples.

  • So the first is a union be, which equals a set containing elements p such that pees an element of A or P is an element of B.

  • The next is the intersection.

  • A intersection B equals the second training elements.

  • P such that pees an element of A and P is not gonna be the next is the set difference of A and B, which equals the set containing P or elements.

  • P such that pees an element of A and P is non development of beat.

  • And finally, we have the symmetric difference, which is I'm gonna be very helpful when you actually complete the symmetric difference algorithm challenge.

  • So the symmetric difference of A and B equals the set difference of a and B union with the set difference of being a and finally I will define the irrational numbers which I hinted to at the end of last video.

  • So you're rational numbers are simply the rial number, real numbers minus the rational numbers, and that equals the irrational numbers.

  • In this video, I will be using Venn diagrams to give a graphical representation of the Sep operators we learned in the previous video.

  • So if you recall the definition of a union, be you know that a union be equals the set containing elements ex such that X is an element of a or X is an element of beat.

  • So if we let this circle represent the set A and we let this circle represent the set B, then that means that X can land anywhere in any of these circles.

  • Which is why this rent the entire region is shaded red were saying that this river region represents all possible values of X.

  • And if we were called a definition bait of a intersection beat that equals the set containing elements ex such that X is an element of A and X is now gonna be.

  • Which is why the overlap where a and B overlap is shaded red were saying all possible values of eggs.

  • This red region Now the set difference of A and B equals the set containing elements ex such that X is an element of A and X is also not an element of be, which is why it's just this region here.

  • None of the elements air within be the set difference of being A is the set containing elements ex such that X is an element of B and X is not an element of a and finally, the symmetric difference of A and B I defined as the union of a Minus B and B minus A.

  • So we take this region in this region and we take the union of it, which is why this is the resulting region.

  • There's no overlap between the two now.

  • This is a really good way to familiarize yourself with the concept of set operators.

  • However, don't rely on you should really focus on the definitions as it will help you out in the long term.

  • In this video, I'll be introducing the concept of subsets in super sense.

  • The dots on the board here represent elements of a set.

  • The lines represent the sets themselves.

  • These lines have been labeled B a u.

  • We can say that B is a subset of a because be contains because all elements of B are elements of A.

  • We can also say that B is a proper subset of a because all elements of B R elements of A and there are elements of a that are not within the set B.

  • We can also say that the set A is a super set of set B because A contains all of the elements of B and being even more specific, we can say that is a proper super set of B because a contains all elements of B and there are elements of a they're not elements of B.

  • What we cannot say is that you is a proper subset of a Although this circle here is bigger than a like it just takes up more space.

  • It doesn't contain any more elements.

  • So all the elements So you contains all the elements of a however you does not contain any extra elements.

  • So you is a subset of a and A is actually a subset of you.

  • You was a super set of a and is also a super set of you.

  • So he sets a and you, in this case, are actually equal.

  • In this video, I'll be introducing the concept of the universal set and compliments.

  • So I want to begin by talking about the universal set, which is commonly referred to as the universe now the reason I use this fancy looking you here is that I was defining the universe, which is to say, the maximum boundaries of my set.

  • My biggest set.

  • Everything outside of this blue circle here doesn't exist.

  • I mean, in terms of the sets, nothing exists.

  • I don't even exist.

  • Computers is this.

  • You don't exist, but everything within it does.

  • So that's a very important key.

  • Now, if I don't define this, if I don't define my universal set, then we just assume it to be the real numbers.

  • So if I just erase this, then you know this will just be the real numbers, which is we've talked about in previous videos.

  • So the other thing I want to talk about his compliments.

  • So if I say if I'm looking for the compliment of B and I'll put a more formal definition of if I'm looking for the compliment of B, then, um, it is everything that is not within.

  • Be so All the elements not within be are gonna be part of the con.

  • The compliment.

  • So in this case, it would look like this.

  • I just highlighted everything.

  • It would be everything within the universe still, and then so that is the compliment of beat is all the elements that are not in B.

  • So that's that's quite a bit of quite a bit.

  • I mean, you go 123 So since this is the real numbers, these little dots here would represent all the numbers all every single value, rational, irrational, that air not within be so.

  • If this is one in two, or better yet, how about this?

  • This is the rational numbers, and these are the inner jurors.

  • So these would be everything outside of this would be the irrational numbers and, uh, the non energy values.

  • In this video, I'll be giving examples for subsets in super sets.

  • So if you look at this blue line here, this represents our universal set.

  • Uh, we've defined it to be the imagers from 1 to 11.

  • That's 1234 to 11.

  • Don't let it concern you that there are elements outside of our universe that just means that they're I mean, that just means they're not in the universe that we have in question right now.

  • So it's no different than having stars outside of your galaxy.

  • You're not concerned by that, it's just a matter of that.

  • So if you look at this green line uh, what what said would that be?

  • Well, it contains elements three beta again.

  • So this B B contains three bait again.

  • So this would be the set b.

  • Likewise, this set here it contains elements 31 and acts while a contains 31 Next.

  • So this is the set A and finally, this said contains Elements one and three.

  • This set contains helmets one and three.

  • So this is the set.

  • See?

  • Now what could be said about these sets?

  • Well, we have We can say that sea is a subset of the universe because all elements of sea are elements of the universe.

  • Furthermore, we can say that to set B is not a subset of the universe because their elements of B they're not within the universe.

  • Also, we can say that the universe is not a subset.

  • Are you super set of a Because there's elements of a that are not within are not contained by the universe.

  • And finally, we can say that the universe is a proper super set of sea because the universe contains all elements of sea except a LL And there are elements within the universe that are not within the sensi.

  • So if we want to be more specific, we could actually say that sea is a proper subset of the universe.

  • In this video, I'll be going over examples of compliments.

  • So in this video, I have defined the universe to be athe imagers one through five.

  • And it's nota graphically by this blue line.

  • And if we recall the definition of the compliments with her with regards to a we have a compliment equals the set containing elements eggs such that X is an element of the universe, and X is not an element of a So in that case, we can look at all the images one through five and if it contains any element from a we throw it out.

  • So in this case, if we look at the image of one, we know that that's not gonna be there because that's a wee look at theater jer to that'll be another set.

  • We look at the energy or three that won't be in our set because that's also an A and then four and five are within the universe, and they're not with an egg.

  • Next, we have be compliment.

  • Well, we know that 124 and five are within the universe, and they're not within be.

  • And lastly, we have C compliment to 45 are within the universe, and they're not within.

  • See because we had to exclude one in three.

  • I want to begin this video by reviewing our definitions of the union and intersection.

  • After that, I'll be introducing to algebraic laws for sets so the definition of a union be equals set containing elements Ex such that X is an element of A or X is an element of B.

  • Also, a intersection B is defined as second taking elements.

  • Ex such that X is an element of A and X is an element of B.

  • So when I introduce the components law, it should be clear that a union A equals A because a U.

  • E.

  • T.

  • A is defined as the set containing elements.

  • Ex Subset X is an element A or X is an element of a which should yield are you should see why that equals the set.

  • A also a intersection, A equals the SEC containing elements acts such that X is an element of A and X is an element of a which it should also be clear why that is the set A.

  • Next we have our identity laws.

  • So identity laws are laws where we have a given set and we're performing an operation on that set with a given element.

  • Thes elements are the identity elements.

  • So for this case, we have the no set and the universal cetera identity illness.

  • So a union no set equals a and by definition, that means that a union no set equals the second Taney Elements ex such that X is an element of A or X is an element of the Nelson.

  • But since we know that the no said is empty, we can't possibly have any elements in there.

  • So it's really saying that a union that Nell said is equal to the set containing elements ex such that X is an element of a or more simply equals a.

  • I want to begin this video by reviewing the definition of compliments.

  • So the definition of a complement of a set for, for instance, the compliment of a equals.

  • The set containing elements ex such that X is not an element of A I will now be going over to new algebraic laws for sets.

  • The first are the law of compliments.

  • A lot of compliments states that if we take the union of a set and its complement, it equals a universe.

  • Or if you take the compliment of the null set equals the universe for the more theater section of a set.

  • And it's compliment is that Nelson?

  • And that should be clear because you have the set A and you are intersecting it with everything that is not inside a There's clearly not gonna be any overlap.

  • So you're gonna have an empty set.

  • The next one is the law of evolution.

  • So evolution states that if we have a, uh, state here, let's cut will call it ST zero, and we feed that state toe a function in this case, we're gonna feed it to the compliment function.

  • Then when it gets to state one, if we again feed it through the exact same function the compliment function, it will result in ST zero again.

  • In this case, if we fed state, eh, If we fed set a through this cyclical function here.

  • Then we would have a feed it to a compliment.

  • To get a compliment.

  • Feedback through the function we get a compliment compliment, which equals a.

  • And then we could have a compliment, compliment, compliment, which would be a compliment.

  • And then you get the idea.

  • It's it's cyclical.

  • In this video, I'm introducing two more algebraic laws for sets, associative ity and community associative ity is essentially just saying that we can regroup the sets that we are talking about.

  • So a intersection be intersection.

  • See that is a intersecting with the set.

  • Be intersection, See is equal to the set a intersection, be intersection, see?

  • And if you look at the definitions of intersection, you can actually go through and figure out why this is, and I'm pretty sure you'll be able to do that based on the videos that you've already watched.

  • And the same is true for the union community.

  • Vitti is essentially just saying that we can switch which side are sets are relative to the the operation.

  • So a intersection B is the same thing is being her section A and the same thing is a union B is equal to be union, eh?

  • So we look at the actual definition.

  • We have a section B is defined as the set containing elements ex such that X is an element of A and X is an element of B, and that's going to equal this second training elements ex such that X is an element of B and ex is an element of.

  • So if you just look at these, the conditions for these for the septal imitation here, it's essentially just a argument of grammar at this point.

  • So basic English will tell you that you can just switch which side that you have in this video, I'll be introducing another algebraic law sets the distributive law.

  • The distributive law is simply saying that the set and operation will be distributed over another set in operation.

  • For instance, a intersection, the union C equals a intersection be union a intersection seat.

  • So I thought it might be helpful to use Venn diagrams for the, uh, conceptual idea of this.

  • And then I'll do a separate video on the actual definition.

  • So if we look at a here and we separate, eh?

  • And then we decide to separate, be union, see then when we actually go to find the union or the intersection of these two regions, it's easy to see that it is this region.

  • So hopefully for the purposes of equality, this region here will match this region here.

  • So let's get right to it.

  • We have a intersection B so we have to set a in the set b.

  • So that means that a intersection B is gonna be this region here and we have to also find a intersection.

  • See, So that's this region.

  • And if we take the union of those two regions and we're left with all this jazz, so it looks like they are in fact equal but to be more rigorous will revisit the actual definition of the intersection in the unions in the next video.

  • In my previous video on subsets of super sets, I stated that to show quality, you have to prove that each side of the equation are are subsets of each other.

  • So to prove the distributive law, we're gonna have this video.

  • We're gonna have the next video in this video showing that a is a a intersection B, you see, is a subset of a intersection be union a intersection seat.

  • So let's start the suppose that X is an element of a intersection.

  • Be union.

  • See, then X is an element of a and exes element of the union, see, by definition of the intersection.

  • So we still know that X is an element of a and by definition, we know that X is element of B or X is an element of seat.

  • From this, we can deduce that excellent X is an element of A and X is an element of B or X is an element of a and exes element of C.

  • Now, by definition, we can put this or rewrite this as X is an element of a inter second B or ex is an element of a intersection.

  • See, And finally we can deduce that exes element of a intersection be union a intersection.

  • See?

  • So there you have it.

  • We've shown that since X is an element of a intersection, be you'd see and X is an element of a intersection.

  • Be union A into second C X is in both of these and therefore a intersection.

  • The union see is in fact, a subset of a intersection B Union a intersection.

  • See, in this video, I have the proof of the second case for the distributive law.

  • In this case, we're showing that a intersection be union A intersection, See, is a subset of a intersection the union seat.

  • So let's start by saying that, uh, suppose that X is an element of a intersection.

  • Be union a intersection seat.

  • Then we know that X is an element of a section B or X is an element of a intersection.

  • See, And we know this because of the definition of the union from here, we can, uh, then state that X is an element of A and X is an element of B or exes.

  • Element A and X is an element of C.

  • From that, we can deduce that X is an element of a and exes, and I'm gonna be or exes element of seat.

  • And here we see some, we sort of factored out the exes element of a and and then regrouped exes element of B or exes, element of C.

  • And from here, weaken by definition, right, Exes.

  • Um, A and X is an element of B unit C, which finally weakened state exes and elements of a interception be union seat, which is what we want to show.

  • So they haven't.

  • We've proved that X is an element of both of these.

  • And therefore, this is a subset of this and we've shown that, uh, both sides of the equation are subsets of each other, and therefore, the distributive law is in fact true.

  • It's proven in this video I'll be going over an example of the distributive law.

  • So if you look at a intersection, be union, See, that is supposed to equal a intersection.

  • Be union intersection, see?

  • So if we can, If we decompose this equation and look at let's start with a intersection be than that equals Singleton three they saw from thes predetermined sets.

  • And then if we look at a T intersection, see, that equals a set 13 So the union of these two is gonna be the set containing elements one in three.

  • Now, if we look at the union, see that tickles the sack containing elements 13 beta gamma.

  • And if we take the intersection of that set with a, we're left with the set containing elements one and three, which is good because now we've shown that this is that.

  • Now, if we look at a union, be intersection, See, that's what equal a B intersection a union.

  • See?

  • So you analyze, be intersection See that equals Singleton three and then a B we're here equals 13 X beta gamma in a union C equals the set contain elements 13 and X.

  • So when we take the intersection of these two sets were left with the set containing moments 13 and X And when we take the union of the intersection, see with a we're left with the second training elements 13 x, which is exactly what we wanted.

  • So, yeah, we've shown that these are in fact true.

  • This video will be introducing the very last algebraic love sets known as dim organs Law.

  • The Morgans law was founded by Augustus to Morgan, and it states that the compliment of a union is the intersection of the compliments.

  • Or it says that the compliment of the intersection is a union of the compliments.

  • So we're gonna prove that the compliment of the Union of A and B is is in fact equal to the A compliment of a intersected with the compliment of Be So To do this, we have to show that the compliment of a U.

  • B is a subset of a compliment.

  • Intersection be compliment and vice versa.

  • So let's get started.

  • Suppose that X is an element of a union.

  • The conflict.

  • If that's the case, then by definition X is not an element of a human.

  • Be.

  • And if X is not an element of a baby, that is, If X is not an element of the region, a Unit B, which is the red here, then surely X is not an element of A and X is not an element of B.

  • And if that's the case, then by definition, X is not an element of a compliment, and X is not an element of be compliment.

  • Therefore, X is not an element of a compliment Intersection be calm.

  • So if we go to the other side here, we start by saying, Let's let's suppose that X is an element of a compliment.

  • Intersected.

  • Be compliment.

  • Then, by definition, X is an element of a compliment and exes element of be compliment.

  • By definition of the compliments, X is not an element of A and X is not an element of B and with the same logic, X is not an element of a you need be because X is not an element of this region, and X is not a moment of this region.

  • So surely it's not an element of the two regions combines and by definition of compliments, X is an element of a union be accomplished in this video.

  • In this video, I'll be giving examples of dim organs law.

  • The Morgans law states that the compliment of the intersection eagles, the union of the compliments and that the compliment of the union equals the intersection of the compliments.

  • So if we check out these new thing this new universal set here it is equal to the second training imagers such that X is greater than equal zero and X is less than I thought.

  • Or more simply, the universe equals the set containing imagers from 0 to 5.

  • So if we decompose our first equation, a Intersection B equals Singleton.

  • Three.

  • The compliment of a intersection B is going to be images from 05 Excluding a intersection beat so 012 foreign fuck now the compliment of a visit to 2 to 0245 because a contains the manager's one and three.

  • So those were excluded and be compliment is going to be equal to 01245 because be contains three.

  • So it's excluded.

  • So the intersection are the union rather of a compliment.

  • And be compliment equals 0124 but which is in fact equal to the compliment of intersection beat, which is what we want.

  • So the next equation we had a union, and that's equal to 13 x beta gamma.

  • Now the compliment of that is equal to 0245 because we've excluded everything from A to B.

  • And now, if we look at a compliment intersection, be compliment.

  • We also have the second training elements 0 to 4, but which is exactly what we wanted.

  • So now we know that these four equal So there you have both of our equations worked out, and we can happily used to Morgan's law.

  • In this video.

  • I'll be explaining what logic is and why we need it.

  • I want to begin within excerpt from The Book of Proof by Richard Hammond.

  • This is a free textbook, and it's excellent.

  • You can find it online, and it covers all foundational mathematics to include discrete mathematics, and I I cannot recommend it enough.

  • So the excerpt is Logic is a systematic way of thinking that allows us to deduce new information from old information and to parse the meaning of sentences.

  • So what this is saying is that essentially with without logic, we wouldn't be able to deduce or move from point A to point B and or make claims from point A to point B and 100% affirmative.

  • No questions asked way and so that that's very important for mathematics.

  • If you couldn't do that in mathematics, then it would all fall apart there.

  • There would be no certainty there would be no foundation, no argument for us to stand on.

  • And we would just be a bunch of people throwing numbers about in making guesses essentially, so it's very, very important.

  • The parsing the other part of quote to parse the meaning of sentences won't make sense it until later videos when we actually do that, So just bear with me on that one, So why should you care about programmers.

  • So while programmers use algorithms are programmers write code first, all code uses algorithms.

  • Algorithms is, uh, essentially just math and mathematics requires logic.

  • So it's that simple.

  • This video will be introduced in the notion of a proposition.

  • A proposition is simply a declared of statement with a verifiable truth value.

  • They're usually denoted by lower case letters.

  • So if we have this lower case, P equals rain falls from the sky.

  • Now that's a true statement.

  • Rain does fall from this guy, but it could have been a false statement like cute.

  • Q equals.

  • God is a country in Asia.

  • Gone is not a country in Asia.

  • Ghana is a country in Africa.

  • So this is a false proposition.

  • Worry, false statement or, uh, what are you doing?

  • There's no truth value that can be assigned to that.

  • It's just it's just a question.

  • It's considered an open statement s equals washed laundry again.

  • This is an open statement.

  • It has no truth value to It is it's a command.

  • Five Eagles four plus 89.

  • That again that that that does actually have a truth value to it.

  • But it's again.

  • It's a false state because five does not equal four plus 89 70 goals.

  • Alfa, I don't know if it does.

  • I mean, I don't know what Alfa is, So this is an open state.

  • We can't verify.

  • The truth of this three equals five divided by zero.

  • This is a proposition Mrs had.

  • This has a truth because three does not equal five divided by zero, that's five divided by zero is under fire and then 99 times 1/3 equals 33.

  • So this does have a verify a verifiable truth value.

  • And it's true.

  • In this video I'll be introducing the concept of composite propositions just like regular propositions.

  • Composite propositions are declared of statements with a verifiable truth value.

  • Uh, composite propositions are made up of sub propositions, and in this video, we're gonna talk about the conjunction and the disjunction.

  • So the 1st 1 I want to introduce is the conjunction that is P and cute.

  • That's how you would read this p and cute.

  • And so this composite proposition here is rain falls from the sky and Ghana is a country in Asia.

  • So the two sub propositions and this would be P p and Q.

  • And this has a verifiable truth.

  • I because rain falls from the sky because that is a true statement.

  • But the statement que Ghana is a country in Asia is false way.

  • Have P and Q.

  • We have true and false, which means that it's false.

  • One of them is false, and we'll talk about this more.

  • We get into truth tables.

  • The next is the destruction P or Q.

  • That's red as or rain falls from the sky, or Ghana is a country in Asia.

  • So again, we have true or false this time.

  • So only one of these need to be true in order for everything to be true and therefore peor que is a true statement.

  • In this video, I'll be introducing truth tables.

  • Truth tables are the easiest way to visualize why something is true or false, and the really convenient when we start getting up into conjunctions and destructions.

  • So if you remember, a P and Q P is defined as rainfall from this guy and Q is Ghana is a country in Asia, then pee or Q are both being too.

  • You have two possible values, true or false, their primitive propositions so We just put it on a table True and falls and then true or false.

  • But I circled these because I know that P is true.

  • And I know that Q was false.

  • But when I analyze a conjunction or disjunction, I have to add two more roads to the true table.

  • And that's because if you like, if you imagine this as starting on a path here, you can choose to go either true or false What it say I took true When I get to the end of that path, I could bend, choose true or false again.

  • So I'm stuck with four different possibilities here, the 1st 1 being true, true true faults and then falls true and in false falls.

  • So when I actually go to my table here, I have true, true true falls in yet And then, uh, when I stick in my conjunction I have true and true equals true, true and false egos false, true and false and true vehicles false and false and false eagle spots Peor que true are true legal is true, true or false equals true false or true eagles true and false false eagle spots and these air by the definitions of the conjunction and the destruction.

  • That's why that's why these values take on true or false.

  • In this video, I'll introduce our 1st 2 algebraic laws of logic, it importance and identities.

  • These are the same laws we saw in set theory.

  • If you recall it, impotence is a when you can take a proposition and apply a binary operator to that proposition over and over and will never change the value of the original proposition.

  • For instance, P is the logical equivalent.

  • That's what these mean the logical equivalent of P, or P, which is theological equivalent of P and P.

  • And if you recall the definition of the disjunction and the conjunction, you should be able to figure out why this occurs now.

  • The identity law states that if we take a proposition and we have a conjunction with true, a truth value a true value, then it will always feel that original proposition.

  • Likewise, if we have a disjunction with a proposition and false, it will always yield the original proposition.

  • That's why we have peas, theological equivalent of pee or false, which is theological equivalent of P and true and finally we have true and false the identities of true and false.

  • So if you have the disjunction of true with any proposition, then you will always yield a true value.

  • And if you have a conjunction with any proposition in false, it will always yield the false.

  • Back in this video I'll be introducing two more algebraic laws of logic the law of compliments in the law of evolution.

  • We start by examining our permanent proposition P.

  • We know that P either is true or false.

  • If we look at the negation of P which is red as not pee, then we know that P is false and true because not p is defined as when p is true, not Pius faults.

  • And when Pius false not he is true.

  • So the law of evolution tells us that if we have a proposition and we feed it through a function twice will end up in the same spot.

  • So if we have a proposition P starting at ST zero, feed it through a function the negation function it over Miss Estate One as not p.

  • If we feed, not pee through the function, it will bring us back to ST zero, which is peak or known as not not P.

  • So he is logically equivalent to not not Pete.

  • That's what evolution tells us.

  • We then analyzed the law of compliments, which tells us that the disjunction of P and its negation, not he will be the logical equivalent of the true value.

  • So it is a it is known as a tautology.

  • It is always true on that's the corresponding treat table here.

  • It also tells us that a proposition and the conjunction of its negation is always false, which is known as a fallacy.

  • So you can go through this truth table and you'll see that we have a tautology.

  • Fallacy, tautology, tautology, fallacy, fallacy.

  • In this video, I'll be introducing another algebraic love logic community of life.

  • So we start by looking at all possible cases of P and Q.

  • We know that based on the path problem that we did when I first introduced truth tables, we know that there's four possible cases for both the disjunction and the conjunction of P and Q.

  • So we analyze this.

  • We know that true and true or the disjunction of being cute was gonna yield true and also this is gonna be true and false seal.

  • It's true, false and true yields true and false.

  • Apostle ST So all we're doing for the community law is switching the order of Q and pee on the operation.

  • So instead of having P or queuing up your peak, So in fact, we do have true, true, true, false.

  • So we've shown that both peor que and cue or p r logically acquittal for the conjunction of P and Q.

  • By definition, we know that true and true is getting yield true, true and false fields false, false and true.

  • You have spots and false impulses yields faults.

  • So when we commute peeing Q and we have Q and P, it's not surprising that we get the exact same answer, which is good, because now we've shown that P and Q is logically equivalent to Q and P.

  • In this video, I'll be introducing the associative law and the distributive law for logic now.

  • Previously, we've only dealt with too primitive proposition.

  • So that's why we've only ever had four possible outcomes in our true or false path.

  • Now we're going to take this a step further, and we're to have eight propositions are eight possible outcomes for our tour false path because we're dealing with three propositions.

  • P.

  • Q and R.

  • So there's not much to be said about the associative law distributive law.

  • And unfortunately, I can't fit the truth table to prove these on my white board, and it gets really messy.

  • So I'm gonna have them at the end of the video and go through them.

  • Make sure you understand them.

  • And if you don't go back and review the concepts of truth tables in this video, I'll be introducing our last algebraic law of logic.

  • The Morgans Law, the mortars Law states that the negation of the Con Junction is the logical equivalent of the disjunction of the negations, and also that the negation of the disjunction is the logical equivalent of the conjunction of the negations.

  • So if we look at our truth table, I've decomposed our propositions here so that we have p not peek.

  • You knock.

  • You and I have it all out on the board so that I could just simply look at not P and Q, which is our first law and see that it is in fact equivalent to not pee or not cute.

  • So these two columns are equal, so weaken definitively say that these are logical equivalence.

  • Also, not pee or Q is the is in fact, not pee and not cute.

  • Based on our two table, it's 100% certain it's This is logic, and there's, uh, no argument against it.

  • In this video of a introducing the notion of conditional statements, a conditional statement contains a hypothesis and a conclusion.

  • These are more formally known as an antecedent in a consequent.

  • So all this is saying is that when we look at these, the actual conditional, this is the hypothesis and this is a conclusion.

  • So P imply this is red is P implies Q and also as if P, then cute soapy implies Q is only false.

  • When a hypothesis leads to a false conclusion or a and decedent leaves two leads to a false consequence.

  • So that's why we have, if we have true implies.

  • True, that leads to a true statement and if we have true implies false that leads to a false name.

  • These other three converse in verse in Contra Contra positive are essentially, they're just common implications that we run into our common conditional statements that we run into.

  • And the converse is simply que implies P in verses, not p implies, not Q and not to you implies not P is lot, which is contra positive is logically equivalent to the original conditional statement.

  • In this video, I'll be introducing the universal and existential quanta fires.

  • But first I have to introduce the proposition function proposition.

  • All function did noted p of X takes on a value of true or false, but it takes on the value of true or false for everything that you feed to it.

  • So in this case, with the universal quantum fire, this is red.

  • As for every, you would say, for every X that is an element of the universe, P of X is either true or false for every X.

  • The shorthand for this is for every X p events.

  • You could also say there exists.

  • That's the existential quantify WR there exists is just stating that there is at least one.

  • So if we say there exists now, there exists an X that is an element of the universe were saying there is at least one ex, at least one X.

  • That is an element the universe such that p of X is true or false, and you can again use the shorthand there exists an X p of X.

  • So we look at these examples For every X that is element of the Naturals.

  • X plus three is greater than four.

  • So that is a, uh that is a false statement, because the first value of the natural numbers is one.

  • So x plus three is four, which is not greater than four.

  • Also, for every X is an element of the real numbers expose three is greater than four.

  • That is also false, I can think of well, they're infinitely many numbers that are not true for this.

  • And then in this case, I said, there does not exist in X that is now under the naturals, such that X Plus three is greater than floor.

  • And that is also a false statement.

  • Because if I let X equal to that, too, is a natural number, and two plus three is greater than floor.

  • So this is a false statement.

  • There exists an element of the real numbers, such that X plus three is greater than four.

  • That is a true statement because any number greater than one is gonna yield a true statement.

  • In this case, In this video, I'm gonna be going over some examples of tautology Sze tautology zehr simply propositions that are always true.

  • The 1st 1 is the law of excluded Middle which is pee or not pee.

  • So for here we have p or not pizza.

  • True or false, True or false, False or true or false True which yields nothing but a true column.

  • Next we have the, uh, law of contradiction.

  • So if you ignore this negation here in this column of truce here we have p and not peek so true and false Sealed Smalls true and false.

  • It's false, false and true, False, untrue.

  • I'll get false now when we actually apply this negation to the, uh, false column here that feels a column of truths.

  • So the law of contradiction is a tautology.

  • Finally, we have motives, Tolins motives.

  • Tolins is p implies Q and knock you implies not Pete.

  • So let's break this down.

  • P implies cute uh P implies Q is only ever negative when the hypothesis predicts true and the conclusion of spokes so if we have a true implies, True here is going to be true.

  • True implies false.

  • That's false.

  • False implies true is going to be true false and vice box.

  • That's also false.

  • I mean, that's also true.

  • We then take this column and, uh, take a conjunction with not cute.

  • So true and not false is going to yield a fault.

  • False and true is going to yield falls again False and true is going to yield falls and true and true is gonna you True So finally we take this column here and that is our We apply, not pee So this column implies not Pete So false.

  • Implying not p is going to be true false Implying false is going to be true False Implying true is also true and true, implying truth is also true.

  • So there you have it.

  • We have this whole calling here for motives Tolins, and that is therefore a tautology.

Hello World Sean rooms here with free code camp, and in this video I will be giving you three tips on how to learn to scream mathematics.

字幕と単語

ワンタップで英和辞典検索 単語をクリックすると、意味が表示されます

B1 中級

プログラマーのための数学チュートリアル - 集合と論理のフルコース (Maths for Programmers Tutorial - Full Course on Sets and Logic)

  • 8 0
    林宜悉 に公開 2021 年 01 月 14 日
動画の中の単語