Transforming logical expressions. The lady or the Tiger? It is time for look at a real world application. So, Imagine there's a prisoner and he's facing two doors. And on the left door and there's a sign which says at least one of the rooms contains a lady. And on the other door that's also signed, which says a tiger is in the other room. Now, there are some things the prisoner should know. First, each room contains either a lady or a tiger And, we'll just assume for the moment, that the prisoner isn't all too keen to open the door with the tiger behind it. And then when he opens the door with the lady, then presumably he's allowed to marry her and live happily ever after. But we can have that depending on the way you will. Now, the information the prisoner gets is the following, either both sides, Are true, or both are false. And the question is of course, which door should the prisoner open? It would be good to stop the video for a moment and try to work out the problem for yourself. So in order to solve the problem in a logical way, of course you can't solve in a puzzle way. Let's introduce some notation. Let's call the statement L1, room one contains a lady. L2 would then be room two contains a lady. T1 would be room one contains a tiger. And T2 would be room two contains a tiger. And we've been given the information that if there's not lady in room one, then there's a tiger in room one, and if there's not lady in room two, and there's a tiger in room two. Right, so, we now can write the signs on the doors quite simply. The first dual set at least one of the rooms contains a lady, so that is the statement L1 pol L2. And the second sign said tiger is in the other room, so a tiger is in room one. These are the signs of two and the information prisoner gotten either two are true or both statements are false. So the prisoners know that one is true and two is true, all one is false and two is false as well. Now we've laid the logical structure, the problem bare. So if we right down the full information and we had, well I have the sign one is true and sign two is true, or one is false and two is false as well. Well one said that either there's a lady in room one or there's a lady in room two. Sign two said there's a tiger in room one. So either both pair are true. Oops that should have been an o. Or well, it is not true that there's a lady in room one or a lady in room two, and it is not true that there's a tiger in room one. Now we can start using our logical laws. For the first bracket is quite straight forward that we need to distributive law, so L1 and T1 or L2 and T1. And then we got second and we needs Morgans law, not a lady in one and not a lady in two and not a tiger in one. So actually, let's get rid of all the tigers. So here we have, there is a lady in one and not a lady in one, because if there's a tiger in one there's not a lady in one. Or there's a lady in two and not a lady in one. Or there's not a lady in one and not a lady in two, and not a tiger in one means there's a lady in one. Right, so now it is time to simplify it a lot. Lady in one and not a lady in one, that's always false. Here we've got an awe statement. There we've got an awe statement, and there we have brackets which we can remove with the associative law. So we have false or lady and two and not lady in one or the last statement. Well, there has been a lady in one and not a lady in one, so that one is false as well. So we see that is not equivalent to not a lady in one and a lady in two. So we see that the sign on the firs door was true. At least one of the rooms contains lady and a tiger is in room one. So, if I were the prisoner I'd probably would open the door of room number two