Welcome to the Chrome Enterprise Technical Community Hour. Today, we'll be talking about progressive web apps, otherwise known as PWAs. My name is Rich, and I'll be your host for today's presentation. Joining me today, I have our speaker, Adriana Hada, who's a developer relations engineer for Chrome OS. For today's agenda, I'll start with a quick introduction of the Chrome Enterprise Recommended Program and the Technical Community Hour. Then, I'll hand it over to Adriana and she'll cover today's topic and the call to action for our Chrome partners. Today's Chrome Technical Community Hour is brought to you by the Chrome Enterprise Recommended Program, which is Google's partner program for third-party solutions that are optimized for Chrome OS or integrated with Chrome Browser. This webinar brings you the opportunity to engage with our team about new features and updates, enterprise development best practices, and our enterprise strategy. Now, without further ado, I'll pass it over to Adriana and she'll kick us off. Adriana? Hi, I'm Adriana Hada. I'm a developer relations engineer for Chrome and the web. Give me just one second to switch to the presentation so that I have the power. OK, hopefully, you are now seeing my speed. Yay. So what are we going to do today?  We're going to talk about some features in a specific. And at the end, we have a form for you to feel with your feedback on the capabilities and maybe you are missing a capability that we should bring to the web for making your web app happen. First of all, I know that the term PWA is not the easiest thing to define. If you search in Google what a PWA is, you get hundreds of definitions. So I encourage you to see for the purpose of this presentation and also for life, see PWA as the toolbox to create these app-like experiences. It is the capabilities that enable businesses to create polished experience, deployed, and build on the web that comply with the mental model that users have on what an app is. I will walk you through the reasons that it is important that we have the ability to create these web apps. And I want to start by talking why it is important that we have web apps. I don't know you, but I want to know why I'm investing my time in checking out these capabilities and adding them to my site. What are the benefits that it brings that we have web apps? And it is important to talk about why, because in terms of the web, they tend to have a little bit of not-so-glamorous reputation. And we hear a lot of why not. Why not have app experience on the web? For example, some of the things that we hear, apps are capable, the web is not. And yes, sometimes it is definitely easier to launch on a single platform when all we have to care is that platform so we have new features there than the web that serves all users, across browsers, across platforms. But yet, even though if it is sometimes slower to come to the web, even before the capabilities that I'm talking about, powerful apps that people access directly on the web have existed. People have built entire businesses around these apps. We have Google Docs. We have banking systems. We have education hubs. We have customer support hubs that people know how to access and how to use just on the web. And even though we tend to say, oh, the web is not as powerful, we also use web features embedded in our platform apps. We, as the web platform, have to give developers the tools so that they can reuse the features that they build in the web because there is interest of using these features that you build on the web once and you can use across platforms. So instead of seeing the web as not as powerful, I say it as powerful because of the usage that it has. Another why not that we often hear is users like apps. Yes, this is true. I've heard them like I like the access on my home screen. I like to have it running on login. But there's also the cost of maintaining multiple apps. It is very costly in terms of resource, knowledge. There is also the issue that I think more than apps, users like a consistent experience. They like to know how to use this technology that they are using. And the web is actually the platform that allows you with a single polished UI, especially with the latest CSS features like scroll driven animations and view transitions to give the users this consistency, this knowing of using your product across multiple devices, which is important because it is a fact that users use apps across multiple devices. We have some tasks that we do on a small screen. Maybe it's a really fast check or maybe it's not all the features, but we use our phone and we like to continue doing the same apps that we use on desktop. So it is important to have availability for users in these platforms and the web seems to be the platform that actually give us less maintenance cost. The last counter argument that I'm gonna talk about today is we often hear users don't understand web apps. Maybe, but even if this is true, users do understand products. We don't hear users saying, look, I use the YouTube app or I use the YouTube website. They say, I use YouTube. So what is important is that relationship with the user that understands their product, your product, and how to access it and also users adapt. The truth is like, if you would have told me a couple of years ago that a simple game for guessing words would have taken the entire world and everybody was gonna be using it and it wasn't even installable. I would not have believed it and I work on the web. But the thing is like people adopt the word without worrying if people were gonna understand how to use a URL or not. People still understand these concepts. So instead of, once I have talked about the why not, we also don't talk often about the superpowers that are unique to web apps, the why, yes, that already exist. And a really big one is the web. It's where users already are. The web is where we go for search. The web is where business show their advertisement because that's how users access them is when we go for entertainment and like you might notice the first thing that you do when you have an idea, when you're launching a product is you reserve the domain name and it's because you know that's where things go viral. That's how you access your users. So why not give your users that app experience just one click away right from the web where they find you. There's also the superpower of the web that the experience that we build on the web are meant to be shared by everyone. And when we talk about a successful product, we talk about a product that is used by a lot of people that is shared by a lot of people. So the web gives us that, gives us that virality by making it easy to share. It is the place to collaborate face to face. We all like having one link at the Google Doc. Everybody jumps in and can see the changes like without worrying if someone hasn't downloaded the app or someone doesn't have the right platform. Accessing meetings. We all like just one click away and we're all talking. Playing games at the same time. These are things that platform apps still have not catch up with the web. So again, why not take advantage of that? So hopefully now that I have given you some incentives of paying attention to how can you serve your users better on the web, I can give you a little bit of the toolbox. The first hurdle that usually developers have to jump for accessing these capabilities is enabling installation for their website. And it is important to consider adding installation for your web app because it unlocks other features that otherwise we don't have like displaying as a standalone app, accessing to home screen, docs, being able to share with other platform apps. And so it's not about just telling the user that you are installable but also about the advantages that it gives you to re-engage your user. And on the screen there is a link that gives you instructions on how to make your web app installable. But it is very likely that you don't want to stay with just making your app installable and figure that users will get to install your app just on their own without any help. Because even though users adapt to the truth is the knowledge about how to install a web app is not as common. So for now we want to help them get there. They know that the install that they are seeing in the browser is not the install that they know because the install that they know is the one on app stores. So how can we help them get to that install and to keep your app? That's the goal. One of the things that we can do is create a custom install flow and I will show you instructions on how to do that or where to get the instructions. The important bit here is that you can show your own controls for installation and at the time that you show those controls you can tell the user what advantages are there for them to keep your app. I have this example through the entire presentation and it's just a little demo app for counting stitches for people that need. So it tells people like if you install me you can have me everywhere and whether you have connection or not you can use it and these kind of things that for every business is going to be specific but it really helps your user understand your product. With a custom install flow some of the benefits that you will see is that you can add the instructions so you're going to increase the chance that a user is going to install your app because maybe they are not familiar with the browser UI but they are familiar with your product and they're going to see those custom controls easier than the generic ones from the browser. You can choose the best time to prompt and again this is based on your business maybe if you are an e-commerce site the best time to prompt is after they created an order and they can track the shipment maybe it's after they added a product to the cart and then you can tell them like we can send you promo codes via notifications things like that and you can also collect metrics to improve the experience and make more accurate these work to prompt and which controls the users prefer to get to keep your app to capture your users to come back to your app and now here are the instructions for creating this custom installed and if you need access to the QR code you can pause and then we'll continue so I'll keep going. Another capability that we have available for creating this more familiar InstaUI it's called the Richard InstaUI and it consists of a larger dialogue that allows developers to add a description and screenshots of their apps as it runs in a standalone mode it helps users because they are more familiar with the install from the app stores that looks a little bit more like this and it gives the developers an opportunity to highlight and tell once again the user why they should keep the app as a standalone app to implement this feature it's a relatively simple change from your web app manifest you add the array of screenshots those are the screenshots that are going to show of the app and the description telling the user what the app does and why they should install it just a note for if your web app runs on different form factors you can indicate which form factor is for which screenshot using the field form factor in the case of desktops is form factor white another feature that we don't talk or we don't talk in so many terms about the web is look it can work without internet and we have talked in the past about websites working without internet to give users maybe a better experience but just letting the user know like hey you cannot do anything because you have no internet or even it used to be a requirement to have some sort of offline experience for being installable that is no longer the case but moreover we don't talk often enough what a differentiator working without internet can be and it's probably impossible that you can offer all of the functionality of your app without internet because it is meant to be shared it is meant to be used with other people but there might be some features some characteristics that your user still can use and it's worth investing for adding that audience for your product so you don't have to implement your entire app but the idea is like you can be the app that users reach when they are in airplane mode or they don't have the right connectivity it depends on how often this is needed depending on the infrastructure where you are used but definitely hands down if I have, I don't know, a to-do task app and I have one version that just tells me you have no internet, you cannot do anything and I have another one that lets me add my tasks and they will be synced afterwards I'm going to go with the second one so this is what you want to bring to your users and look, I know that the demo app is just a small app with limited features but with a couple of lines of code a couple of using caches some local storage these apps functionality it's completely available even when users are offline but don't get the perception that being available for offline is only for small products or small businesses we have the case of YouTube that enable the capabilities of downloading videos and still being able to review the videos when you don't have connection they increase their piece of their audience to those users that go in the subway and want to see you watch YouTube and you can read all about the technical details of what they had to do on the link moreover, as I mentioned before if you want to implement some of this offline capability you will have to use things like background sync to detect when the user come back online and sync the data and you probably will have to save the data locally in the meantime and you need caching so that the resources are available when the person doesn't have a connection and you can reach your servers the good thing is like as you invest in building these features the same technologies that you're going to be using will help you when the users are online because when we use caching for example we are avoiding or delaying a trip to the network and those resources tend to be served faster and makes your app more performant more resilient and gives the user a better user experience overall not only the ones that access it when they are offline but also your regular users that do it when they are online moving on to another characteristic of web apps that it's very popular but it's also very unpopular and I know that it's a hard journey to implement notifications it's hard for users, it's hard for the browser it's hard for developers but the thing is like it's so important for developers to engage their users with notifications and we users do one timely well-designed notifications for example some of the things that come to mind that we do use notifications when there is somewhere that I need to be my calendar notifications are on it's important for me when there is an action I need to take let's say a subscription is expired and I need to renew or cancel I'm going to have those notifications on when there is something fun that I want to do I don't want to have notifications for all the stores in the world but maybe the ones that I buy on frequently I want them to send me these counts I have this app that is for playing board games across the world and it sends notifications when it's my turn I'm going to have them on so we have to have that chance to connect with our users maybe you need chat notifications because it's part of your work we have to offer it but it is definitely good to have certain design patterns to increase the chances that the users are going to keep them on and respect the user also as when and how they want to use our notifications one thing that helps is to guide the users before the browser pop-up we will still have to ask for permissions that is not changing Chrome is working on making it better and more user friendly but they will have to accept the permission but you can tell the users before the pop-ups surprise them you are going to see this pop-up click yes on the notification because I'm going to send you these counts if you do use dialogues and tooltips as required for guiding the user on your own UI you are closer to the user it's better that it comes from you than the generic one from the browser that the user might not be sure why it is showing, where it is coming from use those UI elements that you have available and let them know why your notifications will be useful they might need a little bit convincing if they are going to click yes they need to know what is it that they are getting from this and as I was saying let them know that they have the power to check the configuration whether they want to receive notifications or not that they can turn them on and off whenever they want for example, Google chat on desktop has a page for your notifications you can choose your sound and you can turn them on and off so it also has other features for turning them off and snoozing and all that but it's important that users understand they have the power to interact with your notifications in terms of implementation you usually create your UI elements you schedule your notifications and you receive them via a service worker and you show the notification the user interacts with it awesome if you want the very technical details on how to do it step by step you can follow the link on the description on the screen now I'm going to go a little bit on a rapid fire of some other features that you can explore in PWA it's not an extensive list but it's some of the exciting ones that I and other developers like to start one that goes well with notifications that I was just talking about it's the Badgen API it lets you add a visual indication a little dot or the number of notifications that people have on the app let them know that there is something that is happening in the app and they should check it out we also have shortcuts that help you save users time by adding this little quick actions menu and lets you add help the user go from the screen wherever they are seeing your app icon to directly the action that they want to create making it easier to come back to your app and do their work we also have this opportunity to get creative with Windows Controls Overlay and like make your app really belong in the operating system and Windows Controls Overlay what it allows you is to take charge of the title bar in the window and here you can see I modified the demo app so that it has its own controls in that little toolbar and I've seen it again in media players and you have the controls there you can display information about your notifications any timely thing that a user can take advantage of writing there another feature is that your app can handle files it used to be a pain to do files on the web you had to upload the file modify the file download the file and hope that it was okay otherwise you had to go do the same thing over and over right now you can even configure your app so that it handles files on a double click like any other app it opens in your app you make your notifications you click save goes directly to the file system next we have run and login it is possible to tell your users like look I am a chat app you want to have me when you run and login and they go and configure a click away and the reason that I did the rapid fire it's because in the past couple of years it is a lot of features that have been launched and frankly I don't think you want me talking for days about each of them but I encourage you to go check out which feature will make your users life better you know your users better you know what is it that is going to make them happy and more engaged so you know because of this you know better what is it that your app needs to go to that next level and serve your users across devices across platforms you will have the ideas we do have the documentation if you want to learn more you can go to web.dev slash learn slash pwa or web.dev slash pwa the first one is a curse step by step how to create one of these installable apps and some of these features and the second one is an overview lastly if you want to get your word in with the team that is building these features if you have an idea of how to make any of these features better my team is all ears we're very very interested if you have a blocker that is preventing you from launching your product on the web we would also like to hear from you so please use the link in the screen to communicate with us and let us know what are your thoughts about these capabilities thank you so much it's been a pleasure I am looking forward for your feedback thank you Adriana gonna go ahead and switch really quick so we can wrap up alright please join us in our next webinar on August 23rd that's going to be about storage for progressive web apps registration is now open so please visit the technical community our website to register in closing please visit the chrome enterprise developer website for additional information to supplement your learning that concludes today's presentation we look forward to seeing you at the next webinar thanks for joining and have a great day


Hey Psych2goers, welcome back to our channel. Do you consider your habits to be healthy? You may have some habits you're trying to shake and you're likely experiencing how hard it is. Habits can drastically alter our lifestyle and mood. So while we should always aim to minimize our bad habits, it might be a good idea to focus on developing some healthy ones first. Maybe you felt depressed or lost lately, or maybe this is something you've been struggling with for a while. But by developing some healthy habits, you can alter your mood for the better. In fact, you're already taking a step towards happiness right now by learning which habits to practice with this video. So to help you develop some happy habits, here are nine habits that keep you mentally happy. Number one, practice gratitude. Are you grateful for what you have? How often do you express it? If your answer is not often, then you should reconsider practicing gratitude. Why? One two-part study found that practicing gratitude can have a strong impact on our feelings of hope and happiness. Meaning it's time to act like it's Thanksgiving dinner. Every meal. The researchers from Hope College found that gratitude predicts hope and happiness. So if we express how grateful we are more often, it may lead to feelings of happiness. Number two, give compliments. Did you know that paying someone a compliment can really pay off, in regards to your mood anyway? In one study, participants were randomly assigned to perform acts of kindness, acts of novelty, or no act every day for 10 days. Researchers measured their satisfaction with life before the experiment was conducted and then after. Performing acts of kindness or novelty resulted in an increase in overall life satisfaction. So go ahead and pay it forward. A compliment never hurt anyone. In fact, it'll likely make you both happy. Number three, experience and go with the flow. Have you ever heard the expression go with the flow? Well, we may just have to take that advice just in a different way than intended. Happy people often experience what is referred to as flow. Flow is a state where one is fully involved and absorbed in the present moment. In this state, one possesses intense concentration, a loss of self-consciousness, and a sense of timelessness. Sounds pretty happy, right? It may not be so easy to go with the flow if you don't know what drives you to that emotional state. So one step towards experiencing the flow more often, find out what it is that gets you there. Is it your passion that gets you there? Hanging out with your best friend? Playing your favorite sport? Whatever it is, it's not a bad idea to do it more often. Number four, savor the little moments.  Savoring the little moments in your life. The practice of savoring has been viewed by many to be a way to increase happiness. We can use our thoughts and actions to increase our appreciation of positive experiences and emotions and the duration of them. When we do so, this is known as savoring. To practice savoring, the next time you appreciate something small, take an extra minute to consciously acknowledge it and bask in it. Don't let these moments pass you by. Be aware of them. Number five, exercise. Exercise plays a factor in improving our self-esteem and happiness. Continuous exercise has been shown to reduce stress, anxiety and symptoms of depression. So it's a good habit to practice. Start with just five minutes a day when you wake up, then when that becomes a habit, add an extra five minutes. Continue doing so until you feel comfortable. The point being, it's easier to start with a goal of five minutes a day than expect yourself to suddenly exercise an hour a day. Number six, get enough sleep. Remember those seven to eight hours of sleep you should be getting? Where'd they go? Why are you abandoning them?  Did you know that sleep deprivation kills brain cells and not getting enough seeds can impair our memory, judgment and reaction time? So how on earth are we supposed to feel happy if we're so tired all the time? That's why it's best to opt into getting an adequate amount of rest each night. Try scheduling when it's time for bed and be sure to remove any distractions such as phones, tablets or video games an hour before bed. This will give your mind a chance to wind down. Number seven, choose foods that boost your mood. Another habit to implement? Eat healthy foods that will make you happy in the long run. Happy food to add to your diet? Carbohydrates. Carbohydrates release serotonin, which is the key hormone responsible for stabilizing our mood and feelings of happiness. Ditch deep fried foods as those have been known to make you feel down. Instead opt in for high protein foods such as lean meat, poultry and dairy. High protein foods release norepinephrine and dopamine, which improves our energy and focus. Number eight, work towards meaningful goals. Do you often find it hard to get up in the morning? Are you unmotivated due to a lack of goals? One way to improve happiness is to set meaningful goals. If we feel our life lacks a purpose, we may fall into a depressive state. Create motivation to keep going by pursuing something that you're passionate about. Then set several small goals as starts to getting there. It's something to look forward to, focused on something we love. And number nine, experience nature. According to one study, spending just 30 minutes or more per week outside in nature can help lower your blood pressure and depression. Another study found, taking a walk outside in a green environment increases our mood and decreases how many negative thoughts we have. Make sure to take your walks outside in nature, though. As those in the study who walked down city streets didn't show any benefits as compared to those who walked in a natural environment. Looks like you'll be adding a nature walk to your habits list. Ooh, and you'll get in your five minutes of exercise too. So, do you have any of these habits? Which ones do you want to have? Let us know in the comments down below. If you found this video helpful, don't forget to click the like button and share this video with someone who may need it. Subscribe to Psych2Go and hit the notification bell icon for more content like this. And as always, thanks for watching.


So, today I will talk about axioms of probability. So, I start talking to you about developing the theory of probability. And here to begin with this, I will first it is very necessary to discuss basic concepts and notations of set theory. So, I will begin with the concepts of set theory and give you some notations. And then after that it will be possible to define the axioms and then build the probability theory based on these axioms. Now, of course, a set you have already been using this word. And so, I will just formally write down that a set is a collection of objects, points, whatever you may consider, whatever the collection. And this can be finite or infinite. The number of elements of the set may be finite or infinite. So, innumerable examples. Now, if you consider a town with its population, then obviously the people living in the town would be a finite number. So, that will be a finite set. And if you consider a set in R 2, which is bounded by a closed curve. And then if you consider all the points in this set, then they will infinite. In fact, they are not even countable. So, a set in R 2 bounded by it. So, this will be an infinite set and so on. Now, we will always refer to, when I develop the concepts of set theory, there will be a universal set which I will refer to as omega. And then we will take subsets of omega and define all the possible, whatever the operations we can do on this set of subsets of omega. Now, definition 2.1. For two sets A and B, subsets of omega, that means contained in omega, we define some joint or union referred to by different names. So, basically the union of two subsets A B, then we define it as A union B. And this is equal to all elements of omega, such that omega belongs to A or omega belongs to B. And if you look at it, diagram was wise. So, if I have this bigger set as my sort of omega, this is A, this is B. Then you see, if you consider all this portion, this will be A union B, because an element which is either in A or in B can be or which is in both A or B, then that constitutes your union of the two subsets A B. Then similarly, intersection or product, these are the two names given to of A B and the notation is A intersection B. And this is here, for all omega in capital omega, such that omega belongs to A and omega belongs to B. So, the common this. And here in this diagram, you see that the intersection would be this portion, which I have shaded differently. So, this portion will denote the intersection of the two sets. Then similarly, we define complement of a set A, which means and we denoted by A C or A bar. So, complement means that, I did not write down, that means this is A complement is all omega belonging to this, such that omega does not belong to A. This is the idea. So, if this is your A and this whole is omega, then all elements which are not in A form the set A complement. Definition 2.4 is difference of two sets. Two sets, difference of two sets A B is the set A minus B, we refer to it as A minus B or A intersection B complement. So, that is all omega in the universal set, such that omega belongs to A, but omega does not belong to B, because it is intersection B complement. So, if you use the definition of the product, then the elements here must belong to both A and B complement. That means the elements which are belonging to A, but not belonging to B. So, in that case, I have drawn the figure 3 should be. So, A and this is B. So, I have to say B complement. This is not shaded correctly. So, if I am saying that this is whole of A and this whole is B, I am referring to, because the elements here are in A and not in B. So, this is the right diagram for A intersection B complement, which is A minus B. So, all components, all elements which are in A, but not in B will be referred to by this one here.  So, this was the figure for this. So, I will do it here. So, now it says that question is draw the Venn diagram for A intersection, A complement intersection B. So, here if you have this and this is A and this is B, then if I want A complement intersection B, then an element which is in B, but not in A. So, then it will be this. This is what I had drawn. So, the elements here, they are not in A, but in B. That is A bar intersection B. Again, I will take some more examples. Omega, let us say the universal set contains the numbers 1 to 10. And then if I define A as set of all odd numbers and B contains 2, 3, 4, 5, 6, then A union B would contain elements which are here as well as in B. And so, the union would be 1, 2, 3 is here, 4, 5, 4 is here. So, it will get added here, 5 is here, then 6 is in B. So, that gets added and then 7 and 9. So, this is your A union B. And A intersection B, you have to look for the common numbers in A and B. So, 3 and 5. 3 and 5 are the common numbers. So, that forms your set A intersection B. And similarly, you can write down all the others. For example, A complement would be all even numbers, because this is all odd. So, A complement would be all even numbers. And similarly, B complement, you can write down the numbers which are not present in B. And then whatever other operations we have defined, you can work out the examples. Now, I will take a case of the infinite set. So, here if you take omega to be all collection of x, y, that means points in R 2. So, these are the points in R 2. So, that x is non-negative, y is less than or equal to 0. So, if you consider this as the whole plane R 2, then your omega is all this. That means here, your y is less than 0 and x is positive. So, whole of this quadrant, the last quadrant. In R 2, this is the first, second, third and fourth quadrant. So, we are in the fourth coordinate, omega obviously, then is a infinite set. Now, if I take A to be the set consisting of all points for which the x coordinate is greater than 0 less than 12 and y of course, is less than or equal to 0. Then of course, the picture is not, this is my number 12 on the x axis. Then you can see that the whole of this, you can say set, again it is a infinite set, where y is less than 0 and x coordinates are between 0 and 12 that forms your A. And B is all x between 0 and 15 and then y is minus 10 and 0. So, minus 10 and 0. So, this is minus 10 and 0. So, that means if I draw a line here, then my B extends like this and x is up to 15. So, now in this case, your B is this set. So, B is this portion. The x is extending up to 15 and y is from 0 to minus 10. So, that is your B. Now, you see that if you want to write A intersection B, then this will be all points x y. So, that x, because you see in A x is between 0 and 12. In B it is between 0 and 15. So, when you want to take all common points in A and B, then it will be x between 0 and 12 and here your y is less than or equal to 0. So, y in A was extending up to minus infinity. So, in this case the common thing would be that y is between minus 10 and 0. So, that will give you the intersection. And of course, I have already used the concept that A is a subset of B or that means here A and B are subsets of omega. So, here you can see that B is not a proper subset of A, because you can find points which are in B, but which are not in A. So, this is the other concept that you use. So, here I have said that B is not a proper subset of A. That is I showed you that there are points in B which are not in A. And that you can see because the set of elements, this we have already seen that when you take points for which the x coordinate is between 12 and 15 and the y coordinate is between minus 10 and less than 0, here of course, x is greater than 12, because A contains x less than or equal to 12. So, if the point is not in A then the corresponding x coordinate should be greater than 12 and this is less than or equal to 15. So, these are the points which are in B, but not in A. So, A is B is not a proper subset of A. So, now let me just also give you formal definition of a proper subset. What do we mean by a proper subset? That is if B is a subset of A, but B is not equal to A. Then we say that B is said to be a proper subset. That means when B is a subset of A and B is not equal to A, it means that there are points in A which are not in B. Whereas, because B is a subset of A, so all points of B are all elements of B are also elements of A, but since B is not equal to A, that means there is at least one element of A which is not an element of B. And so then in that case we say that B is a proper subset of A and we write it as B without the equality sign here. So, B is a proper subset of A, this is the notation for. So, therefore, now at least whatever I mean the words that either I use the word proper not a proper subset. So, now you know what is a proper subset. So, now let me continue with the definitions and the basic concepts of set theory. A and B are said to be mutually exclusive or disjoint if A intersection B is empty. That means there are no common elements in A and B. So, for example, in the example 2.2 that we just considered you know the coordinate in the subset of R 2 you see A intersection B is actually this set which has so many points and so it is not empty. Therefore, A and B are not disjoint or they are not mutually exclusive. And so as we go along you will see so many examples when A and B have some points in common and they will not be considered disjoint. If they do not have any points in common they will be considered as disjoint or mutually exclusive. Now some more concepts dealing with laws and this thing dealing with union intersection and complements of sets. So, here if now I am talking of A, B and C there are 3 subsets of your universal set omega.  So, that means the union and intersection are item these the concept that we are the operations we have defined for the sets these 2 are item potent. Then commutative law says that it does not matter whether you add A to B or you add B to A. So, therefore, A union B is equal to B union A. Similarly, A intersection B is B intersection A. So, the order is not important which set you write first. Associative laws here if you are saying you taking intersection of A with intersection of B intersection C then it is you can also write this as you first take the intersection of A and B and then take the intersection with C. So, it does not matter. So, the associative law holds here. Similarly, with union also with respect to union also the associative law holds that is whether you add A to the union of B and C or you add first take the union of A and B and then union with C does not matter they are the same. Now, the distributive law is with respect to both the operations intersection and union. So, when you take A intersection B union C you can write this as A intersection B and then union with A intersection C. So, A gets distributed and similarly A union B intersection C will give you A union B then intersection A union C. So, these laws hold and just for completeness sake I have written them down here. Then D Morgan's laws are also important and we use them will be using them throughout and therefore, better to talk about them right now. So, the first law says that A intersection B compliment is equal to A compliment union B compliment and if you see diagrammatically this set is omega and if this is A and this is B then A intersection B is this right the darkly shaded portion. So, it is compliment will be the portion which is shaded by the lines and you can see that the portion shaded with the lines is nothing but the union of A compliment and B compliment right.  So, the union of both the two. So, the two are equal, but you can also prove it otherwise see what we are saying is that if omega belongs to A intersection B compliment this implies that omega does not belong to A intersection B right which means that omega should not belong to at least one of them because if omega belongs to both A and B then omega will belong to A intersection B. So, since we are saying omega does not belong to A intersection B this implies that omega does not belong to A compliment or omega that means omega belongs to A compliment or omega belongs to B compliment right. If you do not want omega to belong to both A and B then it must not belong to it must belong to either A compliment or B compliment which implies by our definition of union that omega must belong to A compliment union B compliment. Now, remember in two I did not say this out in the beginning, but I should have said that whenever you are wanting to say the two sets are equal then what does it mean? Maybe I should spell it out A equal to B implies yes component wise that if omega belongs to A this implies omega belongs to B and if omega belongs to B it should imply that omega belongs to A right. This is the way of saying that the two sets are the same. So, here I am when I want to show that these two sets are the same right now I have shown you that if omega belongs to A intersection B compliment then it must belong here, but I must show the other way also that is if omega belongs here then it should belong to this and which I am showing. Similarly, if omega belongs to A compliment union B compliment that means if it is here then this implies that omega either belongs to A compliment or omega belongs to B compliment which implies that omega does not belong to A intersection B right because either A belongs to omega belongs to A compliment which means that it does not belong to A or it does not belong to B which means that omega does not belong to A intersection B and so it belongs to A intersection B compliment. So, I have shown you both ways and therefore, the two sets are equivalent. So, similarly I am writing out all the other laws here De Morgan's laws which you can sit down and work out yourself. So, there you will have to show that you first start with an element here and show that it belongs here then you will have to pick up any element from here and show that it belongs to the set on the left. So, that exercise we should now sit down and do for the remaining De Morgan's laws, but we can just look at them. So, this is in a way a compliment of this says that A union B compliment is equal to A compliment intersection B compliment then if you take the compliment of the compliment you cut back to the set A right that of course, in words you can immediately say it out and one way to classify characterize that one set is a subset of another. So, B is a subset of A if and only if when you take the intersection you will get the set B right. If B is a subset of a set A then when you take the intersection the only element all the common elements must belong to B. Similarly, you can also through union you can characterize that if B is a subset of A then A union B is equal to A, because B is not adding any new elements to the set A union B and therefore, A union B remains equal to A right. Now, so far I have defined union intersection compliments for 2 or 3 sets, but now we can extend this notion to any number of sets and here I am just taking I to be the index set where the index set can be the I can be having finite elements of finite indices or infinite indices. So, this holds for whatever the status of I is. So, now if all these are subsets of omega where I is in the index set I then you can say that the intersection of all the subsets. So, that I belongs to I is omega belonging to the universal set such that omega belongs to A I for all I right. So, if an element is present in all the A I's then it will be in the present in the intersection and union of course, would imply that all omega belonging to A I for at least 1 I right. So, an omega belongs to the union if omega belongs to at least one of the A I's. It can belong to more than 1, but it must belong to at least one of the A I's right and then similarly you know using the concepts here the definitions here you can define now that the this is not very nicely. So, I belongs to I in if you are taking the intersection of all the A I's that I belongs to I and then you take the complement. So, then by this law you immediately write it down as union A I complement and again in words you can say it out the same thing and similarly here this is the equivalent of this when you are taking more than 3 sets or 2 sets this is union A I I belonging to I the complement of this will be the intersection of the complements of all the A I's right. So, given this now let us get started with talking about how we go about defining probability of an event and so on. So, before that I will simply first spell out what we mean by sample space and then events and then we talk of how we go about estimating the probability of events. So, again I will begin with examples to give you an idea what we mean by sample spaces. So, for example if you consider the experiment of tossing a coin. So, a single coin is tossed and so what are the possible outcomes either I will get a head or a tail these are the 2 possible outcomes. So, you just collect all possible outcomes of an experiment and that is the our that will be our concept of a sample space and again I will refer to it as the for the that particular experiment this is my universal set. Similarly, if I toss 2 coins together now the thing is that you are tossing the 2 coins and so let us just name 1 coin as 1 number 1 and the other as number 2 in that case you see when both of them show head then this will be H H. Now, here if the first coin show the head and the second coin show the tail then it will be H T and if the first coin shows the tail and the second coin shows the head then the outcome would be T H and in case both of them show T T tails then this will be T T. So, this will be the set of all possible outcomes when you are tossing 2 coins together and so this will be your sample space this will be the sample space. If you are now tossing 2 you are tossing 2 6 phase die. So, here again we will what we will do is we will say that we will number 1 die as number 1 and the other die will be number 2 and so therefore, the outcomes will be recorded as whatever the number shows for the first die and whatever the number shows for the second die and in that case it will be a pair of numbers.  So, therefore, it is important when you are throwing the throwing 2 die then you have to number them as 1 and 2. So, that because what show the arrangement because here this is an ordered arrangement and therefore, there is a difference between 1 2 and 2 1 and so we have to record all possible outcomes and therefore, here this will be the collection of all 36 outcomes and that will constitute your sigma space sorry the sample space. So, therefore, just trying to show you that when you consider an experiment then you have to be very careful in recording the outcomes and so here for the when you are tossing 2 coins then we have to number we will have to number 1 as first coin and this other one as second coin and then we can record the outcomes. Similarly, when you are tossing 2 die then you have to you know allocate 1 die as number 1 and the other one as number 2 to be able to record all possible outcomes in a proper way. And the possible outcomes I have not listed but this table shows that you know it can be the first one is the first die is showing 1 and then the second die is also showing 1 then it could be 2 up to 6. Similarly, it could 2 1 2 2 2 6 and 3 1 3 2 3 6 and so on up to this. So, here the total number of possible outcomes you see will be 36 and again I will refer to this as a sample space. So, now formal definition of a sample space can be immediately said and that is the set containing all possible outcomes of an experiment is the sample space corresponding to that experiment. It is not very clearly written but you can just read it that means the set containing all possible outcomes of an experiment is the sample space corresponding to that experiment. So, this will be our concept and here you see that in this case of course when you do any experiment the you expect the outcomes to be finite and so my sample space in this case would be the number of I will just list the number of possible outcomes and that collection of possible outcomes. So, you can see that the sample space can have any kind of structure. So, here in this case for example, it was h and t these are the possible outcomes in this case it was h h h t t h t t and now in this case it is pair of numbers where the numbers can differ from 1 to 6 for the either this thing and so collection of those 36 pairs of numbers is your set of are the elements of your sample space omega and that will be. So, now I will go on to defining the concept of events and then we will try to estimate the probability of events. Now, I will define what we mean by an event. So, any subset E of the sample space. So, first idea of a sample space is clear that means all collection of all possible outcomes. Now, any subset of the sample space is known as an event you will define this way and we have seen that if for example, two subsets are there E and F are subsets of omega they are both are events then whatever operations we have done. So, far we have discussed on the subsets then E union F E intersection F E complement and whatever no we discuss all those various operations on the subsets then all those will again be subsets of omega and therefore, by our definition they will again be events. So, in fact when I told you the extended concept of union and intersection where you took number of subsets where the finite or infinite and again if you take their intersection and union and complements and so on they will again all be subsets of omega. So, therefore, you can see that the collection of events becomes very very large and in fact, it is formalized which I am not actually talking to you about I will just mention the name that it is known as the sigma algebra of events. So, essentially the what we have to remember is that the however way we can generate subsets of omega then those which can be obtained as through union intersection and complement through these three operations whatever subsets of omega we can obtain they will all be considered as events for the corresponding experiment. Now, examples are there when you toss a single coin we saw that the space omega the sample space omega just contained these two possible outcomes and now the subsets can be the singletons h t and of course, we always include consider pi also as a subset. So, therefore, these will be the possible subsets or the events in this case when you are tossing two coins then you see your possible outcomes were four in fact, h h h t t h and t t. Now, you can start forming subsets I have just written down a few you can take this each outcome of each element of the sample space omega as a subset and so it is an event where you can put two together that means, either head or tail or tail or head and this will again also form an event and you can then form in an in fact, in the last lecture I had shown you that if a set has whatever the number of elements then the possible number of total number of subsets of that set would be 2 raise to 4 remember it was an application of your binomial theorem and so on. So, the number of subsets here in fact, would be 2 raise to 4 which will be 16. So, you can list out all the possible events that can be formed from this particular for this particular experiment of tossing two coins. Now, again as an example if when you are tossing two six faced die then consider the subset which has both the numbers showing that means, both the faces show the same number. So, both the numbers are the same and so here the components in A would be 1 1 2 2 pairs 3 3 4 4 5 5 and 6 6. So, this will be one event that means, you can also describe it in words that both the faces both the numbers are the same and B for example, I have listed pairs which where the two numbers add up to 7. So, the sum of the two numbers add up to 7 and this way you can go on. In fact, here the number of subsets will be very large because omega itself contains 36 pairs and so the number of subsets would become this thing. So, but now one word of caution and that is we when we are defining the sample space we have to be careful as to what our experiment is and here for example, you have to so in fact, I have to say that the two possible cases one is with replacement wherever this is relevant and the other possibility can be without replacement. So, we have to be careful how the experiment is being conducted and then you can define your sample space that means, the possible outcomes that can be there of the experiment. So, now consider the case that two cards are to be drawn from a pack of 52 cards and if you are doing this replace this drawing of the card that means, you draw a card you look at it note it down somewhere and then put it back in the pack and then again you draw the second card. If this is your experiment then let us say that i comma j stands for so you note down when you take out a card you look at the number you look at the card. So, then the first index here they tells you what card it is what type that means, whether it is a club spade diamond or a heart. So, the i will refer to C S D or H that means, four possibilities and j will stand for the number from 1 to 13 that means, whether it is an A s it is a number 2, number 3 or number 13 right. So, then this pair will donate I mean denote the type of the card that you got and so your omega will be collection of all such pair two pairs i comma j and k comma l where again k indicates the type of the card and l indicates the number. So, therefore, an i and k can be anything from C S D H because you are doing it with replacement and then j and l are the numbers 1 to 13. So, essentially the way you can describe the experiment is that the first in the first draw of the card you it can be any 52 cards and since you have replaced it in the pack again your choice of drawing a card is from among the 52 cards in the pack. So, therefore, the total number of outcomes that are there is 52 into 52 and so this actually by the way denotes the cardinality of a set. So, which means that this is the what is the total number of elements in the set. So, here the sample space will consist of 52 into 52 such collection of pairs. So, to indicate to what the cards you got, but now if you are doing it without replacement then you do not want i and k to be the same and j and l to be the same that means once you have drawn a card it is not there in the pack. So, it will not appear again in that case your choice will become that means the first draw you have choice from among the 52 cards, but in the second draw it will be only out of 51 because one card has been replaced is not there it is kept aside. And therefore, in this case your you will have to be careful because your choice of the sample space will not will contain such pairs, but where i will not be k and j will not be l. So, the whole idea is to say that you just do not write out you have to be careful when you spell out all the possible points that can be there in the sample space. Now, let us begin talking about the axioms of probability that means how do we characterize a function to or whatever we mean by probability what type of what should I mean the characteristics it should have. So, here again I am now referring to the sample space omega and then e is some subset of omega which again is an event. So, then we say that the function p which will assign. So, essentially what we are saying is that p assigns writing capital P. So, p is assigning e to a real number that is it takes it to p e which belongs to the real number r. So, you can say that this is a mapping or an assignment. So, here for every event e for every subset of omega I am assigning a real number and so p e is a real number here and p e must be between 0 and 1 that is the first requirement. Then for the whole space for the whole sample space p omega should be 1 and x m 3 says that for any sequence of mutually exclusive events that means you just take any collection of events e i that means subsets of omega such that they are mutually exclusive. So, which means that e i intersection e j is empty for all i j in i. So, this is the collection which can be a finite in finite does not matter, but we are referring it to as the index set i and then probability of union e i i belonging to i should be equal to the sum of the probabilities. So, because the events are mutually exclusive they are disjoint. So, therefore, when I add up the compute the probability of the union of these e i's then they should it should be equal to the sum of the probabilities. So, these are the three characteristics that we associate with the probability function and using this you will see that any function f p which satisfies these three x m's will define the probability and this is actually what we say is that p e is the probability of occurrence of e. So, remember in the beginning I started saying that we would be trying to develop the theory of estimating the occurrence of an event. So, here we have now defined something which we refer to as the probability of occurrence of e. So, this is the and we will now see that what things you can derive. So, basically using these three x m's we will be able to build up the probability theory and the first simple observation that we can make is that in this case for maximum 3. If you choose your e i to be the whole set omega that is your sample space and all other e i's you choose as empty sets for i greater than or equal to 2 then because this x m must hold. So, here the union will become your set omega because all other e i's are empty e 1 is omega.  So, you get this p omega I have to write that is the second also that is not a big deal. I mean what I am saying is that this validates the axiom because we have already assumed that p omega is 1 and so here also if you put e 1 as omega and all other e i's as empty sets then you get that p omega is 1. Now, here in this case if you look at this you want to compute the probability of let us say h and t. So, here if I take my what will be my subsets here this would be in the first example my e 1 would be h e 2 will be t. So, in that case from this axiom what I will get is that p e 1 plus p e 2 is equal to 1 because e 1 union e 2 is my whole space omega p omega is 1. So, therefore, I get that p e 1 plus p e 2 is this, but then I should be able to compute. So, then what I am trying to say is that from here I should be able to show that p e 2 is of course, from here it follows that p e 2 is 1 minus p e 1. So, we got that using axiom 3 in the case when a single die is rolled to us then we got that p e 1 if e 1 is the event that it is showing ahead and e 2 is the event that it is showing a t then we got that p e 1 plus p e 2 is 1 which is equal to probability of h plus probability of t. Now, we understand the concept of unbiased coin that means it is equally likely whether a head shows or a tail shows. In that case the two probabilities are equal that is what we mean by an unbiased coin and. So, therefore, it will immediately follow from here that p h and equal to p t is equal to half because they both must add up to 1. So, therefore, this is now that is what I am showing how you apply the axioms to arrive at the probabilities of the events. So, here of course, we assume that it is unbiased coin. Similarly, when a die is rolled and so you have the six numbers showing up either of any of the six numbers can show up. So, here again applying axiom 3 you will see that the probabilities of all numbers show that means p 1 plus p 2 probability of p 2 plus up to probability p 6 that should be equal to 1. And since we are again saying that all sides are equally likely which means that probability of p 1 is equal to probability of p 2 I mean is equal to the probability of 2 then it is equal to probability 3 and so on. So, all six together so that means essentially what we are saying is that six any of them this is equal to 1 which implies that p 1 is 1 by 6 which is equal to all other this thing for I varying from 2 to 6. So, we immediately conclude that probability of each phase showing up is the same which is 1 by 6. Now, what happens is that most of the time in many many situations we know already by because of the nature of the experiment and so on that the elements of the sample space have equally likely outcomes. Just as a because I that is how I showed you these two examples that when you are throwing up unbiased coin then you know that whatever the outcome has the same probability a head showing up or the tail showing up they are the same.  So, we will see that and of course we have to be I am what I am trying to say that I am giving you an alternate way of defining the probability of an event, but the basic assumption for this definition is that your sample space has this property that all the outcomes in the sample space have the same probability equal likely chance of occurring. If that is there this is satisfied then let us just start with this definition that suppose omega has n number of points that means the cardinality of omega is n and the number of points in a where a is in event a is a subset of omega and then we are saying that the number of points in a is m. Then we define the probability of a as m divided by n that means the number of points available in a or you can also there is another way of saying it that the number of favorable cases that means the number of points which actually are in a that means for occurring of a those are the two points which will occur. So, then the definition of the event a is number of favorable cases for a divided by the total number of cases that means total possible outcomes and the outcomes which are part of your event a. So, then this is the definition and now you can very quickly verify that the three axioms because remember I said that any definition of probability must satisfy the three axioms. So, since a is a subset of omega this means cardinality of a is less than or equal to cardinality of omega which implies that m is less than or equal to n therefore, probability a is less than or equal to 1 and also by definition probability a is greater than or equal to 0 because m is either 0 or it is a positive number. So, therefore, this satisfies the first axiom then similarly if you want to n probability omega would be n by n which is 1 because omega has n points. So, therefore, n upon n the verifying the definition. So, this probability is 1. So, this axiom is also satisfied. Now, if I take a set of events a i's i index at i capital i and here since we are taking the omega as the finite space. So, i is also a finite index set and then cardinality of each a i's m i that means the number of points of the sample space in a i is m i right. Then we want to look at the probability of union a i and here the a i's are disjoint because remember I am verifying the axiom 3 of probability. So, here a i's are disjoint that means the elements of the sample space which are in one a i are not in any other. So, all these a i's are disjoint meaning that the points in one a i the elements of sigma in one a i are not in any other a i right. So, in that case now if you want to compute probability of union a i i belonging to i then this will simply be because the number of elements of sigma of omega in union a i will be sigma m i since the elements in each a i are different from all others. So, therefore, we will just add up the total number of points which are in the union here will be sigma m i and. So, by our definition this will again be when you are computing the probability for this union it will be sigma m i i belonging to capital I divided by n and now here this sigma I can write as individual sigma that means I can write this as summation of m i by n i varying from 1 to n and each m i by n. So, for a particular i the m i by n is the probability of a i and so this is the sum of the probabilities. So, axiom 3 is also satisfied here. So, that means this particular definition when you assume that the outcomes the occurrences or the elements of a sample space have equally likely chance of being of occurring then and I take the definition of the probability of an event as the number of elements in that event number of elements of the sample space in that event divided by the total number of elements in the sample space. So, m by n if I take that as the probability here then this is it satisfies all the 3 axioms. So, this is a very convenient way of computing the probability provided of course, you can assure that the outcomes in the sample space are all equally likely and so if you can assume that if you can assure that then we can use this way of computing the probability of any event where we can just look at the number of favorable cases for a particular event and then count them up and then divide by the total number of outcomes in the sample space and you get this right. Now, I just want to make another comment here note here and this is you know we sometimes refer to the probability in terms of percentage. So, for example, if you make a statement that in a group of 20 people 10 percent are smokers sometimes you also refer to the probability in this way. So, this would be interpreted as probability of a member of the group being a smoker is 0.1. So, 10 percent so 10 upon 100 and here if you want to interpret it in terms of your m by n then you see your n is 20 and the 10 percent of 20 is 2. So, m is 2. So, therefore, 2 by 20 which is 1 by 10 which again is equal to 0.1. So, please remember that in problem I mean as the course develops we will often be referring to the probabilities in terms of percentages and so the interpretation is simple right. You just take the fraction which is so 10 percent means 10 upon 100 and that gives you 0.1. So, that will be your probability. So, exactly the same way you are counting as the doing here m by n. So, therefore, all the conditions all the axioms are satisfied. So, this is also a proper definition, but of course, this is valid when you can assure that the all outcomes in the sample space are equally likely right. So, I will quickly take up this example. Now, here a committee of 5 is to be selected from a group of 6 men and 9 women right. Now, if the selection is made randomly. So, this is important since the selection is made randomly that means that the choice of any of the men or any of the women is equally likely. Under this assumption we say that what is the probability that the committee consists of 3 men and 2 women. So, if you want to compute this I will apply this definition because the example here the experiment here satisfies this condition and therefore, you see now here I will apply the or this thing multinomial thing. So, you want to select 3 men out of 6 and 2 women out of 9 women. So, this gives you the total number of points in your set A right or the event E if you define the event E as 3 men and 2 women are selected then this cardinality is given by 6 3 9 2 right. And the total number of ways in which you can select 5 people from the set of 15 is 15 choose 5 and therefore, the number of favorable cases is this total number of cases is this. So, the probability of selecting a committee of 3 men and 2 women is given by this ratio.  So, here again the same thing is stated. So, if each selection is being equally likely that means whatever the balls are left choosing a ball from there is equally likely then what is the probability that the special ball is chosen. So, here again probability the special ball is chosen. So, here you see you have to choose these special balls. So, 1 upon 1 the probability of choosing that is 1 upon 1 then from the remaining n minus 1 you want to choose k minus 1. So, this gives you the number of favorable cases the number of cases in which the special ball will get selected.  So, that number when you compute comes out to be k by n. So, the whole idea is that things become much easier if you have this condition being satisfied then this is a very convenient way of determining the probability of an event.


What's going on everybody? John Hammond Pico CTF 2019 and this challenge is called open to admins for 200 points in the web Exploitation category it says this secure website allows users to access the flag only if they are admin and the time is exactly 1400 so we have a few links here We could try again one hosted on port 80 or I guess 443 of HTTPS in that case and on a specific port if we need there Or we can just go to that link so I'm gonna navigate to that page. It says my new website We have some buttons to sign in and sign out But they are apparently not implemented yet and there's a giant green button for flag So we can go ahead and click that try that it says I'm sorry It doesn't look like you are the admin or it is the incorrect time So if you were kind of at a loss if you did enough digging between robots that text and viewing the source and etc etc, maybe run derbuster, I don't know You could take a look back at the hints and the hints could say Ken cookies help you to get the flag so Maybe reorient you if you didn't think to check there But this is a bit of a bummer and maybe kind of frustrating for some individuals because if you were to take a look at the cookies Let's fire up the developer tools and I'll just hit flag one more time so that we'll see that network connection come across I'll copy this as the curl command and we can go ahead and paste that in here You can see that there are cookies that are kind of being set or ones that we might be able to view There might have been a session thing that comes along, but it's not a JWT or a JSON web token. So This is a redirect. Let's use tech capital L. So we follow redirects now. We get the full page back But still nothing particularly useful and there weren't cookies that we could work with really so What you end up needing to do is actually supply your own cookies So the node here with this cookie header that you can see curl is providing and we'll have to add in Just with a semi-colon to note Let me put a new cookie in that raw HTTP header and we can say admin is true There's nothing particularly there again because we just specify the time but maybe that was a guess or a leap of faith to specify admin equals true and One more where we say time is equal to 1400 run that and now we have our flag right there on the page so I Don't know. Maybe that is a leap of faith. Maybe that's a little bit more intuitive I'm just not seeing it but adding your own cookies that didn't exist previously always seemed like a peculiar bag for me So we could carve this out if we want to do greptack. Oh, E Capital E there and let's grab our Pico CTF file format flag format and let's make that silent from curl and Let's say color equals none. So that's getting our flag we can save that and we can verify we have our flag dot text and our get flag script and Now we can finish that so that's that challenge. That's all that's really there Let's go ahead and submit that before I forget But maybe maybe not your favorite challenge. I guess it wasn't particularly mine So that is all that we needed for that and I removed my cookies for this So let me log back in and see if I can climb through it Whatever open to admins. No, go away last pass. You're fine admins good Paste that and we'll call that a day. So thank you guys for watching. I hope you enjoyed this I don't know if that's a rage quit for you or not But adding the cookies manually maybe a leap of faith who knows that's the solution So thank you guys for watching. Hope you enjoyed this. Please do like comment and subscribe all those YouTube algorithm things I'd love to see you on discord. I'd love to see on patreon paypal other P words All right, I'm ending the video. Bye


Hey folks, welcome to yet another session on problem solving in this problem, in this problem solving session, we have taken another word problem. And again the underlying concept here is finding out highest common factor or greatest common divisor. We'll see how to, you know, break down these questions into relevant information and what should be the approach of solving this problem. So start with let us first understand what the problem is asking for and then try and see what method and approach we should adopt. So the question says that there are 105 goats, 140 donkeys and 175 cows. Okay, and they have to be taken across a river. There is one boat which will have to make many trips in order to do so. So what are there? So 105 goats, 140 donkeys and 175 cows. Okay, now the boatman has a problem. He can take the same number of animal in every trip and they have to be same kind as well. That means you cannot take five goats and 10 donkeys or five cows in one trip. If you're taking someone, it has to be only goats or only donkeys or only cows. That's what they're saying. Okay, how many animals went in each trip if the largest possible number went in each trip? Meaning, so now let's say if I have to take only goats in one trip. So I can start with one goat at a time. So let's say if I take one goat in every trip, so I'll take 105 trips to take all the goats across the river. If I take one donkey each, then again I'll have to take 140 trips for all donkeys to cross the river and 175 cows. If let's say if I am making one one each in each trip, taking one each in each trip. So now what is the condition? Condition is one trip size. Let us consider this as trip size. So trip size is number of number of animals. Number of animals, number of animals per trip must be same is same. So if you are taking two goats, then you have to take two donkeys and two cows every trip. So you can't take two goats and three donkeys and four cows. This is not allowed. So you have to pick one, one number so that every trip the same number will go. Now it can be anything but anything like three or four or five, whichever number you pick up, every trip you'll have to make same number of, you'll have to take same number of animals now. And the other criteria is this number which you are picking up. Let's say the trip size has to be as maximum as possible. So if possible, you take 105 goats together in one trip. But is that possible? You can take 105 goats together in one trip. The next trip of donkeys, you'll have to take 105 donkeys together. If you take 105 donkeys together, there will be 35 left over from 140. Now you cannot mix 35 donkeys with other cows to make them cross the river. Why? Because the boatman has put a condition and only one type of animals will go. That means the choice of 105 was not correct. So we'll have to take some number, some number such that that number must be a factor of 105, 140 as well as 175 and it has to be the highest such factor. So let's say 105, 140 and 175 will be having some common factors. Now if you pick up any common factor, then you can take one type of animals in every trip. But if you take the highest of those common factors, then you are reducing the number of trips and hence maximum number of animals could be taken. So both the criteria will be fulfilled. What are the criteria? One is same number of animals per trip and second is that number should be maximum. The number, the trip size, trip size or the number of people, number of animals going should be maximum. Should be maximum. So hence if you break down this question further, so that means the trip size or the number of animals per trip, number of animals per trip must be, must be, must be a factor or divisor, factor or divisor of 105, 140 and 175. That means the number of animals per trip must divide 105, 140, 175. Only then you can have trip of similar type of animals. In any other case, if you are not taking the, you know, the trip size has to be factor, then all, there will be few remainder in each of these cases and then you cannot club them together. So the first condition that same type of animals going there is violated. Okay, so hence we are clear that we have to have factors. Now to maximize the number of animals going in a trip, you have to have GCD of 105, 140 and 175. So if you have the highest factor, then maximum number of, highest common factor, sorry, then maximum number of animals can go per trip and without violating the condition that in one trip, only one type of animals can go. I hope it is the explanation to the problem is clear. Now comes the stage where we need to solve it. If the question is understood, now we need to just find out GCD of 104, 105, sorry, 140, 175. Now what are the methods we have learned to find out GCD? Okay, now the question boils down to find out, find out, find out the, find out the GCD of 105, 140 and 175. So either you can, so what all methods do we know? One first method is long division method, long division, long division method, long division method. Where what do you do? You first find out the GCD of, first find out GCD of, first find out the GCD of 105 and 140 and let it lead with D. And then in the second step, find out the GCD of D and 175. Okay, this will be, let's say, the required result, E. Let's say, so you have to find out like this. This is one method. Second method is our Euclids, which is similar to long division only, but you know, expressed in a different format, Euclids, division, division algorithm where again you follow the same process. First find out GCD of 105 and 140 and then find out GCD of D and 175. That will be the result. Third is the prime factorization method. Prime factorization, prime factorization method. Now in this session, let us try and understand what prime factorization method. In this case, we will be able to solve the problem also and we'll also learn another method of finding out HCF, which in most of you would be knowing already. So what is prime factorization method? This is the method and I'm describing it now. So let's say, you do what you represent first step. Let me also write stepwise. So step one, step one. So you'll be sooner studying or probably you'd have already studied fundamental theorem of arithmetic, where we express, express, express all the positive, positive integers, integers in terms of, in terms of their prime factors, prime factor. So what is the prime factor now? So prime factor is any factor which is prime, right? Now step two is step two. Step two. Step two will be GCD. GCD will be equal to, equal to all prime factors, all prime factors or you say all unique prime factors, all unique prime factors raised to, raised to power, power, which is, power, which is, which is minimum, which is minimum of all, minimum of all the, minimum of all. So all, all prime factors, unique prime factor raised to power, which is raised to power, which is minimum of, minimum of all the representations, representations, representations. And hence you have to find out the product of this. So you can write product of, sorry, here it should be product of, product of all prime factors raised to powers, raised to powers, which is minimum of all the representations. So let me give you an example, then it will be very clear to you. So in this case, what all numbers did we have? So one was 105. So let us write the prime factorization of 105. So if you know the tables, it is 105 is in 15 stable. So 15 times 7 is 105. So you can always write 3 into 5, 15 into 7 is 105. All are having power 111. Okay, then second is 140. Very easy. So again, it is 2 times 7 times 10. That is 2 square, 2 square into 5. That is 20 and 20 into 7 is 140. This is the second one. And then 140 and then third is 175. 175 is how much? 25 into 7. So again, I can write as 5 square into 7. Now what you need to do is you express how many unique factors now enumerate. I have 2, 3, 5 and 7. So the GCD will be multiplication of, as you say, product of all prime factors, unique prime factors. First of all, write all of them, 2 into 3 into 5 into 7, write all of them. But one another step is missing and what is that? Raise to powers which is minimum of all the representation. Okay, so I'll have to raise 2 to some power. What power? Which has to be minimum of the power of 2 here, here and here. So if you see what is the power of 2 here? 0. Here 2 and here again 0. Isn't it? I can write like that. So minimum of 0, 2 and 0. What is it? 0. So write 0. Power of 3. Here it is 1. Here it is 0. And here it is 0 again. Isn't it? So what should be the power of 0 again? So power of 3 should be minimum of 1, 0, 0, which is 0. So write 0. Now minimum of power of 5. Here it is 1. Here it is 1. Here it is 2. So minimum of 1, 1, 2 is 1. So write 1. And then 7 is minimum of 7 is 1. Here power is 1. Again 1. Here is 1. So minimum of 1, 1, 1 is 1. So now you multiply, complete the multiplication. It is nothing but 35. So hence what do I get? I get GCD of 1, 0, 5, 1, 4, 0 and 1, 7, 5 which is equal to now 35. That means you have to take 35 animals in every trip. So if you now see for what? 1, 0, 5 goats were there. So goats can be transferred in lots of 35. And how many trips will be required? 3. Then it becomes 1, 0, 5. Now you have to transfer donkeys. So donkeys if you see. So 1, 4, 0. Lots of 35 only I'll have to take. And then it is 4 is 1, 4, 0. So I have to take 4 trips. So this is 3 trips of 35 each. This is 4 trips of 35 each.  So cows is 35 into 5. So for transporting, this will be 175. Now for transporting cows, you have to make 5 trips of 35 each. And if you see, if you do that, you will be basically transporting same type of animals in every trip. You would not have to mix 2 different varieties of animals. So this is how you should be solving the question. So just to summarize, you break down the question into parts, highlight the relevant data. If possible, make a representative diagrams and then try to solve the problem as per the demand of the question. In this question, we also learned or just revisited what is the prime factorization method of finding GCB. Hope you like this video. For more problem sessions, please subscribe to our channel and keep availing all these problems solving sessions. Thanks a lot.


Welcome back everyone. The committee is now back in public session. The committee had a full discussion and considered the letters that had come from the First Minister and the permanent secretary of the Scottish Government. The committee has agreed that we will write back to the First Minister and to the permanent secretary, both for clarification and further information from the permanent secretary with regard to the retrieval of information. The committee will meet again on the evening of 20 June. The meeting is now closed.


If I had to guess at a number, I would say probably more than 90% of desktop Linux users run a Debian-based or an Ubuntu-based Linux distribution. That family of distributions includes things like Debian and Ubuntu and Linux Mint and Elementary and MX Linux and, you know, many of the very popular desktop Linux distributions are based on Debian. Debian is a fantastic Linux distribution and that's why it makes such a good base to base other distributions off of it. It has a ton of packages in its repositories, so you can find most of the software you're looking for. You can probably find it in the Debian repositories, but one of the things I have a problem with with most of these Debian-based Linux distributions is the graphical package managers that they're shipping with these days. None of them are very good, in my opinion, and today I wanted to share with you guys is a much better graphical package manager for your Debian-based or your Ubuntu-based Linux distributions, and that program is called the Synaptic Package Manager. Let me switch over to my desktop and I'm going to fire up a virtual machine of Ubuntu here, so I've got a VM of Ubuntu 2104 and let's show the differences of some of these modern GUI software centers compared to the one I'm going to show you as a better alternative. Let me fire up Ubuntu Software Center. This is a graphical software center. It has a lot of bells and whistles to it, and this is, even though I'm showing you Ubuntu Software Center, GNOME Software is the same. It's essentially what Ubuntu is using, the GNOME Software Center, Kubuntu, and a lot of the KDE distros are going to use KDE's Discover Software Center. Linux Mint, of course, has its software manager. Everybody's got something different, but at the same time they're all kind of trying to mimic these mobile app stores, and that's the new modern interface they're all trying to be. They're trying to be Apple's app store, so you get logos for the programs, you get screenshots of the programs, you get user reviews, you get user ratings, you know, one star through five stars, and it slows these package managers. Now, sometimes the pages take forever to load, especially if there's a lot of images on the page, and it's all, for the most part, useless information that most of the time you don't need. For example, what do you typically open up a package manager for desktop Linux? You know, why do you do that? Typically, people are doing that most of the time to update the system. And to update the system, I don't want all these graphics to load and everything. I just want to click, hey, update my system, and boom, it starts updating the system. This is pointless, you know, information for stuff like that. Also, installing and removing software. I don't need screenshots of programs while I'm removing programs, right? I don't need user reviews of a program I'm removing, either ratings. And most of the time, I don't need that information for installing software either because 99% of the time when you're installing a program, you know exactly what you're going to install, right? You know the name of the program, you're just going to go ahead and fire up your software center and do a search for that program and click install. You don't need a screenshot. You don't need user reviews. You don't need any of this stuff. And I know we're all trying to be slick and modern and, you know, we're trying to, we're trying to mimic other operating systems. But before everybody started trying to mimic these mobile app stores, Linux actually had a very nice GUI package manager for Debian and Debian based systems. And that was the Synaptic package manager because it was very, very powerful. Let me fire up Synaptic so you guys can see it. Of course, you have to give it a root or sudo password. You do need sudo privileges to use Synaptic because you have to have sudo privileges to install or remove software on a Linux system. One of the things I love about the Synaptic package manager is just how clean it looks because it's all text and everything is fast and peppy. When you do a search for something, you get it instantly. It's almost like doing these things in a terminal, you know, at the command line, the difference is you have a GUI interface. You have different panes of windows here. So you get a little bit more information put in front of you at one time than what you would do doing a lot of this stuff at the command line. So let's talk about some of the columns of information you have here. So this on the far left, these are sections. And you see sections down here is highlighted. That is what this is. It's basically your categories of software. Right now, the default is clicked on all that's showing all the packages available in the Ubuntu repositories. And of course, it's going to be a massively long list of thousands and thousands of packages, but you can narrow down this search. Basically, if I wanted to click on amateur radio, that particular category, I get amateur radio related packages or cross platform. Or if I wanted to, I could scroll down and look for fonts that are available here in Ubuntu, or there's a Haskell programming language categories of various Haskell related programs and libraries. Now, if you didn't want to have these sections, the categories basically here, what you could do is you could click on status and you could also do some filtering by the status of the packages, whether they the packages that are being displayed here are packages currently installed. So if I click installed, these are showing all the packages currently installed on the system or packages that are not installed or all the packages, whether they're installed or not. You can also filter by origin. This is not something most people are going to want to do. This is mainly different repositories. You also have custom filters here, whether the package is marked as broken. Doesn't look like there's any broken packages right now, at least none that are marked here in Ubuntu. You also have search results. And we'll get to search here in a second. We also have architecture, whether you want 64-bit applications or 32-bit applications or all. Already in just the couple of minutes that I've shown you this one pane of information here, this set of filters in Synaptic, it already blows away whatever graphical package manager came installed by default on your Debian or Ubuntu-based system, right? Let me go back to the Ubuntu software center. You know, it didn't have any of that information, right? It's a very simple interface. There's only three buttons at the top. Explore, which is your search button, basically installed. List the installed packages. Updates, list the updates available. You do have a menu system here, but for a sign-in, you actually have to have an account to do anything there. Yeah, so I mean, there's not much you can do here compared to the possibilities are endless, what you can do with Synaptic. Synaptic basically tries to be everything that you can possibly do with the apt package manager, as far as the command line, apt package manager, synaptic package manager is trying to do all of those things in a GUI, a graphical way. For example, if you wanted to search for a program at the command line using the apt package manager, you would do apt search name of program. Well, Synaptic does the same thing. It's just, it saves you the trouble of having to go to a terminal and type apt search name of program. You just click the search button and then type the name of program you wanna search for. I'll search for Firefox. And basically that is just a graphical front end of doing apt search Firefox. You get the same information, it's just presented to you in a slightly different format than the way it would be in the terminal. And you see, I get all the packages that were either Firefox was part of the name or Firefox was part of the description. Also, you will notice that you have this column here where the boxes are either white or green. Green means that package is currently installed. So this package here named Firefox, Firefox of course is installed by default on Ubuntu and that's why that box is green. Now let me search for something that I know is not installed out of the box on Ubuntu. So I'm gonna search for Emacs. And here in a second, we're gonna get a list of all the packages that either have Emacs as part of the name or as part of their description. I'm gonna use the scroll bar and go down until I find Emacs, the one I want. It's just the standard Emacs package right there. And then once I have that, what you could do is you could right click and then you could mark the package for installation and it tells me exactly what's gonna be installed because Emacs has some dependencies. So it's gonna tell me it's gonna install Emacs plus these other packages. And then click mark and it marks Emacs and all those dependencies that it needs to install. And we're gonna install all of these once you click apply. But maybe I'm not done yet. So maybe I wanna go search for something else. Maybe I wanna remove a piece of software while I'm at it. I know Htop was installed. So let's do a quick search for that. And then you see Htop, the box is green meaning it's installed. I'm gonna right click on it and I'm gonna mark for removal. Now you have two options for removal. Mark for removal and mark for complete removal. What this does is if you mark something for removal it just removes the program. It doesn't remove any configuration files that may still be laying around on the system that that program uses. Why does it not delete the configuration file? Because maybe you did a custom configuration file for Htop and maybe later you'll install it again. It's nice to still have your custom configuration still on the system. But a lot of people don't want those config files hanging out on the system for a program you removed. So you might wanna mark it for complete removal. That deletes Htop and any configuration files that were also on the system for Htop. And now that I've done that all I need to do is click apply and all the changes we've made are gonna be put into effect. So it's gonna tell me, hey, it's gonna completely remove this. It's going to install all of these. And then unchanged is all the packages that are on the system that have an update available but for whatever reason I haven't marked them to be updated. So I'm just gonna go ahead and click apply. It's gonna install Emacs and all its dependencies. It's gonna remove Htop, including the configuration files for Htop. And you see changes were applied and automatically closed after the changes have been applied. I'm just gonna click okay on that. And then this left-hand pane, we are on the search results. And you can see we've searched for Emacs, Firefox and Htop. Gonna go ahead and go back to the default look which is the sections, the categories look. Now there were a few packages that needed upgrading that we didn't upgrade the first time. So this time I'm gonna click mark all upgrades. And yeah, these are the packages that need to be upgraded. So those were in the list before it was warning me, hey, these could be upgraded but you haven't marked them yet. So now I've marked them. Well, I click mark. Now I hit apply and apply again and it's gonna upgrade those packages. And the upgrading has completed. Now one of the reasons Synaptic has so much to it, you know, has so many options available to it.  It's been around forever on Debian and Ubuntu-based systems. Matter of fact, Synaptic package manager used to be the default package manager, the graphical package manager that was installed on Debian and Ubuntu and systems like that. But for whatever reason, these distributions kinda got away from Synaptic. And I know why these days, people want to present especially new users with less options. They want something that just has a handful of options. You know, you can't really get confused by it. I guess Synaptic could be confusing to the new user but really honestly, it's very intuitive because all of the common operations such as installing and removing software are very straightforward, right? You don't have to look around for them searching for software, you gotta search button here, right? It's all right there for you. So the really confusing stuff, you would actually have to go out of your way to search for it. If you go into the settings menu here and you go into preferences, I mean, you can really configure the graphical settings and everything. I mean, you can adjust the fonts. You can adjust some of the information that is displayed in the columns. You go to columns and fonts. You can tick on and off certain things here. You can play with the colors. You can also set settings as far as the cache. You know, when does it need to delete the cache? You also have a distribution tab here although it warns you that you really shouldn't play with this. So don't, you know, be careful in the advanced settings. Typically, you don't wanna play with stuff unless you have a reason to and you really know what you're doing. For example, there's also the repositories settings here and this is all the repositories. Where is it pulling packages down from? Well, it's pulling it from the canonical, supported, free and open source software, the main repository for Ubuntu and the universe repository for Ubuntu. It's also pulling down stuff from the restricted repository for Ubuntu. Now the restricted repository is important to have turned on because especially if you need proprietary drivers, proprietary Wi-Fi drivers, especially on your laptops or proprietary graphics drivers for those of you that are using NVIDIA graphics cards, especially, you know, make sure that you have that ticked on. Typically you tick that on during the install process for Ubuntu. Also you have other software, this tab here's where you can tick on some extra repositories. You also have updates. These are settings for setting things like how often do you want Ubuntu to check for updates? You can automatically check for updates daily, every two days, weekly, whatever it is you wanna set it to. One of the most important tabs is this additional drivers tab and it's gonna search for proprietary drivers if they're needed for your hardware, on my hardware it's not needed because I'm in a virtual machine and the drivers, the graphics drivers for the virtual machine are open sourced. So let me close all of that out. So that's just a little bit of what you can do with the Synaptic Package Manager. Again, I think by far the best GUI Package Manager available on any Debian based system and it's not even close. I've never liked any of the new app stores. You know, the software centers that a lot of the Linux distributions these days are shipping with but Synaptic, I actually quite like Synaptic because it's very similar to the look and feel and the power and flexibility of using apt at the command line. It's just in a graphical form but it doesn't hide all the functionality of the apt package manager. Everything you can do with apt, you can do in Synaptic and that's not the case in the standard software centers. Now, before I go, I need to thank a few special people. I need to thank the producers of this episode. Apsi gave James Mitchell, Paul West, Olaf, Akami, Alan, Chuck, Kurt, David, Dillon, Gregory, Heiko, Erjan, Alexander, Peace, Arch, Infador, Polytech, Raver, Scott, Steven, Willie. These guys, they're my highest tiered patrons over on Patreon without these guys. This episode that you had just watched, it wouldn't have been possible. The show is also brought to you by each and every one of these ladies and gentlemen. All these names you're seeing on the screen, these are all my supporters over on Patreon because it's just me and you guys, the community, right? If you guys like what I do, wanna support my work, please consider subscribing to DistroTube over on Patreon. All right guys, peace.