Hello and welcome. My name is Shannon Kemp and I'm the Chief Digital Manager of DataVersity. We'd like to thank you for joining this DataVersity webinar improving transactional applications with analytics sponsored by MariaDB. Just a couple of points to get us started. Do the large number of people that attend these sessions. You will be muted during the webinar. For questions, we will be collecting them via the Q&A in the bottom right hand corner of your screen. Or if you liked to tweet, we encourage you to share highlights or questions via Twitter using hashtag DataVersity. And if you'd like to chat with us or with each other, we certainly encourage you to do so. Just click the chat icon in the bottom middle of your screen for that feature. And as always, we will send a follow-up email within two business days containing links to the slides, the recording of the session, and additional information requested throughout the webinar. Then let me introduce to you our speaker for today, Shane Johnson. Shane is the Senior Director of Product Marketing at MariaDB. And prior to MariaDB, Shane led product and technical marketing at CouchBase. Before that, he performed technical roles in development, architecture, and evangelism at Red Hat, specializing in Java and distributed systems. And with that, let me turn it over to Shane to get the webinar started. Hello and welcome. Thank you, Shannon. Can everybody hear me and see the presentation? You sound good. Yeah, we'll see it. Looks good. All right, perfect. We'll go ahead and get started here then. Thank you everyone for joining us today. We have a fair amount of material to cover. Talk a little bit about what it means to have a hybrid workload. We'll walk through the architecture of MariaDB platform, highlight the importance of scalability, especially with respect to analytics. We'll talk a little bit about how MariaDB customers are taking advantage of hybrid workloads today, what it means for hybrid cloud, opportunities for database consolidation, and for all of those of you who are eager to get started, we make that really easy with Docker, and we'll talk about that. And if we have some time, we'll talk about the manager service we announced as well. However, I do want to try and leave at least 10 minutes for Q&A at the end. Hybrid workloads. You know, traditionally, we segregate our database workloads. On one side, we have transactional. The focus is typically current data. You'll see lots of range queries. And for all intents and purposes, the queries are known. They may be dynamic, but an application has been built. That application knows what queries it's building and setting to the database. On the other side, we have analytical workloads. We're focused on historical data, a lot of aggregate queries, and quite frankly, unknown queries. Particularly in the concept of analytics, we never really know how someone is going to analyze the data. They're exploring it. They're trying to discover something meaningful or something useful. It could be very iterative. So they do different workloads. They do have different aspects to them. If you have a small database, a little bit of data, a little bit of users, you can do full analytics and full transactions and perform really well. The challenge is that as your database grows, you start to face some limitations. That performance range isn't getting any bigger. So either you're going to have some performance issues on more complex analytical queries or those analytical queries are going to impact the performance of your ongoing transactions. So what we end up with is two different databases. We end up with a transactional database, which is really optimized for that transactional performance. And then you end up with a data warehouse, which is optimized for analytical performance. And we've been that way for many, many years. And it's no surprise the database technology starts to diverge as well. Transactional databases tend to use row-based storage, make heavy use of indexes, and more often than not will be either clustered or replicated. On the other hand, analytical databases tend to use clumber storage and for very good reason, especially if you have wide rows with potentially hundreds of columns, but you have aggregate queries that are only concerned with two or three of those columns, clumber storage has a big benefit. That is relying on indexes and sometimes don't use indexes. No surprise there. If you don't know how the database is going to be queried, relying on indexes isn't going to help you. So they have other mechanisms or ways to support low latency analytics. And finally, they're often distributed from a pure scalability point of view. If you're going to gather many years of data, hundreds of terabytes of data, you're going to need some scale-out capabilities. There is a problem with that though. We've essentially built a brick wall between the application development side of the house and the BI reporting or data science side of the house. Two different databases, two different underlying database technology, two different database vendors. Eventually, that transactional data will make its way into the data warehouse. Eventually, someone will analyze that data and extract some sort of meaningful or actionable insight. And eventually, that insight may make its way back into the transactional database to help improve that application. All of those eventually is add up to time. There's not only the complexity and the time associated with these ETL processes, but there's a time of analyzing it and the time involved in getting it back into the transactional database. When we talk about data-driven applications, actionable insight, we need to close that loop. It's no good to our customers if product recommendations are based off of analysis from a week ago or a month ago. It's much better if we can recommend a product based on all the data we have as of a few seconds ago. So we have to break down that wall. And the other problem is that even transactional applications make use of analytics, whether we realize it or not. Or maybe we would like them to use more analytics, but we can. And so I have a handful of simple examples here. E-commerce. It's certainly a transactional application. Show me all the products in a specific category. Add a product to my shopping cart. Make a purchase. Update the inventory. These are all transactional. But in a very competitive environment, all of us, as consumers and customers, are expecting more intelligence, a personalized experience. How many of you have been looking at a website? There's a product you want. It's on sale. You're really thinking maybe you should buy it, but you hesitate. You sleep on it. Wake up the next day. Make a decision. Yes, I'm going to take advantage of this opportunity. I'm going to buy this product. But when you go back in, you find out it's sold out. Wouldn't it have been nice if the day before when you went to that website, it was able to look and say, hey, based on the products that are in all of our active shopping carts based on the purchase activity today and on our current inventory, which for some of these products is fairly low, we recommend you take advantage of this opportunity to buy this product because we expect it to sell out within hours. That's actionable insight. That's something I can take advantage of to have a better experience. But it's also analytical. We can look at banking. Certainly all of us have logged into our bank before and we can see pending transactions, our current balance, our available balance. We can transfer some money, all transactions. But what if instead of simply showing me what my available balance is, it could look at historical transactions, identify recurring deposits, recurring transactions, regular spending, and then also look at my current spending rates, how fast am I spending my money, and then maybe make a recommendation that says, Shane, you should transfer some money from savings within the next few days because we expect your available balance to reach zero in less than a week. That's actionable insight. And that requires more analytics. And finally, PPC ads.  Of course, by profession, that means that I'm often creating campaigns and creating ads. On the flip side, Google is showing those ads and gathering impressions and clicks and ultimately charging me for those clicks, all transactional in nature. But you better believe I have a very deep need to go in and analyze the performance of those ads. If Google could tell me based on changes in keyword costs, or in search behavior, or trends, we recommend that you lower your budget or pause some of these ads and reinvest the money in these other ads. That's actual insight that I can take advantage of. I'm going to have a better experience. I'm going to be more productive and get more for my money because they gave me those analytical capabilities or at least able to give me recommendations based on analytics underneath. So the problem, we have this brick wall, we have these two separate databases, two different users, two different applications. The solution is to bring analytics into that database that you use for your applications. And the importance of this slide is that when we talk about hybrid, I'm not suggesting that the data warehouse go away. That's never going to happen, nor should it. That data warehouse will still aggregate data from different applications, different business units, different teams, different sources. It's a great repository for all of your company's data. But the same analytical capabilities that are present in that data warehouse, we need to put in our transactional database, if you will, because these new applications we're building, they need it. And so it's not an either or situation, but an and situation. We're simply extending the operational database, if you will, so that it can handle transactions as well as analytics. So that was a little brief overview of how we're getting to hybrid and why it's becoming a little bit more important. I'm going to spend the next few minutes walking through the architecture of RedDB platform and how it approaches this problem. If you're familiar with RedDB, in the past, we had two products, TX, RedDB, AX. They're both built on RedDB server, that popular open source database that we all know and love, as well as RedDB MaxGal, which is a database proxy that provides additional enterprise features. One leveraged InnoDB and MyRox. These are transactional storage engines. The other leveraged column store, which, as the name implies, is columnar storage. And they were meant for two different scenarios. One was meant for the active team. One was meant for your BR data science team. One was a database. One was a data warehouse. What we've done with RedDB platform is we've brought these together so that we can have one single database platform that does analytics and transactions together. And there's a couple key points to highlight here. The first is the role of RedDB MaxGal. The database proxy will inspect queries as they're coming in and make a determination as to whether it should route them to a database instance with transactional storage or a database instance with analytical storage. There are different ways of accomplishing this. One example might be the query syntax. If the query is an aggregate on this table, let's send that to a database instance with columnar storage because that's an analytical query. If it is an insert, an update, a delete, regardless of the table, send that to a database instance with transactional storage because that is obviously a transaction. The second component is the change data capture stream. So as I mentioned, all those rights, the inserts, updates, and deletes that are going to transactional storage will automatically be replicated to columnar storage. So that same data that's available in one place for transactions is immediately available in another place for analytics. And a few additional pieces when we talk about RedDB platform. Certainly that core of RedDB server and RedDB backscalers of foundation, but there are a few other things included. There is native support for Kubernetes and Docker. That's through Helm charts and Docker images, Docker Compose images. There are a number of adapters for pulling in external data. So you might pull data from Spark. You're doing some machine learning, generating product recommendations and pull those into RedDB server with column store. You might pull quickstream data from Apache Kafka queue as well into column store. And then there are APIs for C, Java, and Python if you want to write your own services and scripts for capturing external data. There are a number of clients, C, JDC, Odyssey, those have been the big three for a long time. A few months ago we also announced support for Node.js as well. And then administration tools. SQL diagnostic manager and SQL Yogg for monitoring and management. RedDB backup as well as RedDB flashback. A little note there. RedDB backup is used to restore data. It doesn't even apply as from a backup. RedDB flashback allows you to actually roll back transactions to a specific point in time. So in many cases instead of restoring a backup from an hour ago or a day ago and then replaying a number of transactions it can be faster to start with what you have now and simply roll back a few transactions. Especially if you discovered a mistake that happened a few minutes ago. So that's a little bit around the architecture of RedDB platform and how it helps support hybrid workloads. I did want to talk a little bit about scalability. So what we see from our customers is they usually fall into three buckets. Some people are simply outgrowing their OLTP database. So if you think about that earlier slide I had when you have a small database with a small amount of data and a small number of users you can get away with all the transactions and analytics that you want. But as you grow you start to hit those boundaries. So one group is simply in that boundary. They can't move forward with limited or lightweight analytics. They need more. Another group of people simply needs to store more historical data in that database. More often than that people will find that three to six months is kind of the upper bounds when it comes to maintaining that performance. You might be able to store more data but if you're doing anything that requires analytics the performance is going to start going down. But today they want to store years and years and years worth of Dora because you can extract a lot of actual insight from that data. The third group is around self-service analytics particularly with B2B or SAS. SAS customers are data-driven organizations too. The problem is they don't have access to their own data that belongs or is managed by the SAS provider. So now there's a rising expectation that if I'm using a SAS provider I expect them to provide me with self-service analytics because I need to analyze that data in all the same ways I would if I had it on-premises and if I was building applications myself. So they want self-service analytics not you know can reports but to be able to do interactive ad hoc analysis of the data. So there are a few options for hybrid workloads and certainly when we look at you know Oracle, Microsoft and IBM they all have columnar storage as well. You don't really see it in the MySQL or Postgres world as of yet. But if we start to look at some of the differences there we all do a row storage. Certainly Oracle, IBM and MariaDB have built-in sharding which will let us scale that out and scale our transactional workload. Microsoft, Oracle, IBM, MariaDB all have columnar storage but there are some differences in how we approach that. You know Microsoft, IBM and MariaDB disk-based so it's optimized to do columnar storage and analytics when stored on disk whereas Oracle will keep the row-based data on disk and is optimized to work with columnar data in memory. On the other hand Microsoft and IBM don't scale out that columnar storage. You can get some degree of scalability with Oracle RAC but there are some kind of practical considerations and limitations particularly with respect to cost when you're doing that. But the message here around MariaDB is what we're building is something that will let you scale transactions or analytics as much or as little as you need in both directions. So typically what happens is you might have a database with row and columnar storage. You can have a primary, you can have a secondary and then you can have two different connections. One goes into the database with row storage, the other goes to the database with columnar storage and then it's kind of up to your application to understand which database is to send a query to whether it's transactional or analytical. Same concept with MariaDB server on a small scale. We have one instance with row storage, we have one instance with columnar storage. The difference is that MariaDB max scale component sitting in the middle. Your application now only has one connection. All it needs to know about is the IP address of that database proxy. The database proxy can then take advantage of various features and rules and capabilities to route those queries to the right database so that your transactional query database queries they go to the left side there in your diagram and any analytical queries will go to the right side in your diagram. If you find over time that you need to scale out your transactional workload you can. You know spider is a storage engine that provides built-in transparent sharding so you can start scaling out across multiple database servers if you need to. On the other hand if transactional workload was fine but over time you know your story more historical data your analytics are getting more complex you need to scale out the analytics side you can do that with column store as well it is built on distributed storage and MPP so there's assumption there that you might start out with one node but certainly you can add as many as you need depending on your requirements and if you hit to that point you could very well scale out the transactional side and the analytical side if necessary and the great thing again is that with reDB max scale sitting in the upper middle there everything underneath is abstracted away from the application they don't have to know that you're scaling transactions or analytics or that the servers are different all that is hidden so it's a little bit about the architecture of reDB platform let's talk about how people are using it right now so we have one customer who's in the market research space they are capturing pricing data every day hundreds of thousands of products in stores I think they pull down a million pricing updates per day from the web and then they're also scanning flyers and other print materials as well they do that so that their retail customers can come in and they can do research they can say you know what is the current price of this product or maybe internally from a transactional standpoint they did update the price or update the description but these things are all transactional in nature at the same token the customers also wanted to be able to say how has the price changed over the past year the past two years and how they started analyzing this data was growing right they was getting more ad hoc it was getting more iterative and so they had a little bit of a challenge there because they couldn't store more than a few months of data without query performance suffering so they were starting to see analytical queries take minutes to complete and that just wasn't acceptable to their customers not to mention the complexity of the backend system generating data marks every night depending on the region and how much historical data they're going to make available so customers were having experience issues and they were certainly having complexity issues in the backend by moving to bdb platform they were able to handle all those transactions and transactional storage replicate all that data to columnar storage and then when a customer came in and said what's the current price it hits the transactional storage on the left when they came in and said what's the price changes over the past year hit the analytical storage on the right because the left side is really optimized for current data the right side is optimized for historical data those analytical queries went from minutes to seconds and everyone was much happier and they were able to extend their capacity to store many more years of historical data the second one is a task provider which is one of those examples I mentioned a little bit ago and this is for ip telephony so phone calls text messages on one hand it's transactional right call detail records or cdr's they're capturing these every time their customers use their platform to make a phone call or to send a text message this data is used to generate bills to you know find out usage on the other hand those customers being data driven organizations wanted to be able to analyze that data to monitor usage identify peak periods instead of seeing their bill better understand what their bill is going to look like or estimate what the costs are going to be as well as a lot of self-service analytics how many calls per hour are happening right now how many texts per minute are happening right now similar situation that core business is certainly transactional it's the ability to provide a service for phone calls and text messages but it now has secondary requirements around analytics so on the left side they store those cdr's you know as people are making phone calls and sending text messages and other communications at the same time that same data is placed into the analytics storage on the right and so now when customers want to do all that analytic to hit the analytical storage so in one sense it's the same data it's this call detail record but one side is optimized for what's happening right now the other side is optimized for longer term analytics and finally finance trading this is a particularly good one certainly transactional right you're capturing trades every time someone makes a bid or a quote or purchase but all those people that are making the trades have secondary requirements to do analytics they want to actually begin analyzing those trades particularly over time at the same token they also have to make this data available to regulators so they need to store seven years of trades and so much like the SaaS provider they're doing transactional work which is trading but they're also providing those traders with self-service analytics to actually analyze that transactional data where I think it starts to get a little bit interesting is hybrid cloud and we're starting to see this happen as well reading the platform does separate and isolate different workloads so some database instances are running transactions some database instances are running analytics you don't have as some people refer to the noisy neighbor issue transactions won't impact analytical performance analytics won't impact transaction performance if that's the case that must mean you can run different workloads on different infrastructure you could place different workloads closer to different users and you could scale different workloads on different hardware for example you might have transactional instances with really fast SSDs but probably a little small it may be fairly modest CPUs those workloads typically aren't CPU bound if anything they're IO bound on the other hand your database instances is running analytics may be running on servers with really big CPUs and maybe really big but very economical spinning disks because they're a little bit different in that regard so you can start to optimize the hardware for the workload if we take that to its conclusion what we've seen in the beginning is customers running on premises for transactions I think trading is a particularly good example if you're in that space you probably want to be into York for example close to the exchanges where you're processing those transactions but if you're also providing your customers with the ability to analyze trade data you can move that analytics to the cloud so it's kind of two things one it's an easy way to get started with the cloud because you don't have to migrate you can simply extend into the cloud and two you could move your closer data to different users and use different hardware so all these things really start to come together when you pair hybrid workloads with hybrid cloud inversely we might also begin to see a little bit of let's put transactions in the cloud closer to users e-commerce might be a good example of this we're doing business all over the world so let's put our transaction processing in the cloud but then maybe let's aggregate all of that data into analytical database instances on premises where we can start to do more maybe internal analytics or analysis of what's going on so both directions but both enabled because of this workload separation and the change data capture and smart query routing that lets us take advantage of hybrid cloud another one that's really helpful is database consolidation so certainly we can begin to take more analytics and pull them into our operational database so you have some degree of consolidation just at that high level of transactions and analytics being paired together you can take it a little bit farther for example we're building microservices and I use a retail e-commerce application here again we might have one service for purchases um transactions are critical durability is critical so you might want to go with a relational database we might have a service to manage our shopping carts scalability is paramount we might have thousands of purchases a day but depending on the popularity and the traffic of your e-commerce website you might have hundreds of thousands if not millions of shopping carts so you might look at a no-SQL database to give you that scalability and then finally I added a clickstream service this might be used for things like product recommendations it's going to make sense to use a clumber database for that type of data so more often than not when I talk to folks we tend to joke a little bit because we might ask what databases are using their answer is often we're using all of them there's a great deal of database spraw in some sense for good reason you know especially in this microservices world we want to have databases that are optimized for that service but with redb platform and this notion of pluggable storage we can do away with that so we might have a database running with Myrocks it is a right optimized storage engine so for something that purchases where the most important thing is being able to insert it and write it to disk as fast as possible to make that customer happy Myrocks is ideal with something like shopping carts we might use spider as I mentioned before that is a sharded storage engine so that'll allow you to add a whole bunch of database instances underneath it and scale out as much as necessary the more shopping carts you have the more of those shards you provide and then that clickstream service still a MariaDB server but now we'll use column store to store that data because it's going to be clumner it's also going to be scalable because it's distributed and let me do analytics on it so now you have these three different workloads three different data but one single database platform to manage them now in this example I depicted three separate database instances which you could do you could also have two database instances because the storage engines aren't applied to the database instance that are applied to the table so I might have one instance of MariaDB server that has a purchases table backed by Myrocks and a shopping carts table backed by spider and then those different shards might be using InnoDB for a nice mix of read and write performance and then I might have a separate analytical instance that's using column store so the great deal of flexibility here but taking advantage of those different storage engines will let you consolidate what might typically require a lot of different databases so a little note on getting started with Docker especially for those of you that already be using it or at least are familiar with it MariaDB platform has a handful of pieces you know as we've seen in some of these slides there's a database proxy there's instances with transactional storage instances with columnar storage there's the change data capture process the fastest way to get started is with this container so we created an all in one or out of the box you know platform in a box container it's one single image one single container when it starts up you'll get a fully configured MariaDB platform deployment similar to what you might see in a staging or small production environment this is really intended for getting started it's a quick start you know as it says here for development you can launch it with a simple Docker command you can run it on your laptop warning for everyone it is not intended to run in production this way we do have separate containers for running in production but this one is really just a getting started container that simplifies things and makes it easy and fast once it's started within that running container you'll have three instances of MariaDB server for transactions those are using InnoDB storage engine you'll also have a couple of instances of MariaDB with Klumner storage for analytics at the top there that instance of max scale is going to handle the query routing and then at the bottom there's a second instance of MariaDB max scale as well as an adapter that sets up change data capture so that everything that you write to the left side and orange is automatically replicated to the right side in purple so a handful of moving parts here but it's all going to be pre-wired and pre-configured and you can get that running in minutes so we do have a little bit more time here so I will touch the MariaDB platform managed service and then I'm happy to jump into Q&A and answer as many questions as I can so the way we're approaching MariaDB platform managed service is on one side when you have things like Amazon your RDS or Aurora you have provisioning installation and configuration typically you know I say cookie cutter but it's really least common to not or everybody gets the same database topology and configuration more or less you also have limited features so everything that's available on MariaDB platform isn't actually available by some of the cloud databases little to no database support if you find a bug or a security issue it's not Amazon who's going to be able to fix that for you it's eventually going to come from MariaDB and they have to wait until MariaDB does that you know delayed upgrades and also you know you have to incur downtime whether it's due to an upgrade or failover or scaling up any of those things MariaDB platform managed service is a little bit different provisioning you know it's still the flexibility of the customer so you can choose what cloud you want to use whether that's Amazon Microsoft Azure or Google and then using you know our enterprise architecture team we will develop a weapons architecture we will let you know what hardware needs to be provision and from that point we can take care of the remainder of that lifecycle from installation configuration recovery if it's needed ongoing continuous optimization regular maintenance and of course that full technical and consultative support so this is really in a sense it's a white club service if you want to take advantage of cloud whether it's purely public or hybrid and some of our customers are doing now you can offload management of that database to MariaDB and our team of enterprise architects remote DBAs and cloud architects will make sure that you get the best possible experience of MariaDB and the best value out of it and basically able to utilize all the features that I've discussed in this webinar as well as a lot of others that I haven't been able to get to so if you look a little bit of those differences certainly you have a preview of hybrid cloud you have limited you know hybrid workloads available and something like Aurora but really where you get stuck on your own is when you need that proactive care if you want to run on the latest version not something that's six months old if you need technical support or even consultative support or security fixes in a timely fashion as well as some functional difference so there's still a little bit of split there between RDS and Aurora but the database firewall dynamic data masking change data capture the Kafka connector all those things are available on MariaDB platform and otherwise unavailable in cloud databases that are built solely on MariaDB server so I know that was a lot of information as we walk through these topics of hybrid workloads and MariaDB platform and hybrid cloud and different types of use cases but I hope that was all helpful to everyone and you found something informative and something you could take away from that but with that said I think now is probably a good time to pause and take a look at any questions we might have Hey Shane thanks for that great presentation we do have a couple of questions coming in and if you have questions for Shane just submit them in the bottom right hand corner of your screen and just a reminder to answer the most commonly asked questions just I will be sending a follow-up email by end of day Thursday for this presentation with links to the slides and links to the recording so Shane diving right in here are there any use cases of MariaDB in an academic environment that you can point me to? I would like to know more about the ease of learning and use by students most academic programs usually point students towards my sequel or MongoDB if you offer academic support then I'll be interested to see how we can integrate it that's a great question we might have to follow up offline I think to provide you more details but yes it is widely used in academia MariaDB some people may realize that some may not has become the default database in almost every Linux distribution having replaced my sequel so yes there are places they're using it in academia it is really easy to get started with but as far as the type of academic support you're looking for I might have to get a little bit more deeper than that to figure out the details there but yes very widely used in academia I love it and I'll get you that question and question or Shane so we can get the for that so we can follow up where would you start when determining what to pull from a data warehouse to create a columnar database for analytics? well I think the best way to edge that is really be platform can be deployed in different ways so the focus of this presentation is certainly hybrid workloads but you can deploy really be platform purely for transactions right just deploy the raw storage or you can deploy it purely for analytics and only have columnar storage so to relate to the question in the context of what would I use in ready to be platform as opposed to the data warehouse when used for purely analytics it is extremely well suited to interactive ad hoc queries so I wouldn't recommend it to be this type of data house that facilitates scheduled reports or something with extremely complex schemas but really think if you have a table that maybe has hundreds of columns and maybe hundreds of billions of rows really be platform with its columnar storage will let you analyze those hundred billion rows in seconds on demand without indexes iteratively so that's really where it shines so I would keep your data warehouse if you're using it something as something akin to a data lake or simply a means to to have a larger repository of diverse data but use ready to be platform if there's a particular subset of it especially a very large subset that you just want to explore and analyze in your own way without having to wait it's going to give everyone a quick moment here to it looks like that was the last question for right now but chain you've mentioned there was something else that you wanted to review if we had time oh that was the better service I wasn't sure if we would have a enough time to touch on it but I think we we talked about a little bit and certainly if anyone has any questions whether it's related to reDB platform or the mattered service or MariaDB in general outside the topic of hybrid I'm happy to answer those questions too I love it thank you so it uh everyone's quiet today cold the storm coming through it's taking it all in it's got to sink in yeah indeed I love it well Shane this has been fantastic as always I really I really love this presentation and and really appreciate MariaDB sponsoring again this just again just to remind everybody I will send a follow-up email to all registrants by end of day Thursday with links to the slides and links to the recording if you think of any additional questions feel free to send them to me and I will make sure to get them to Shane well Shane thank you so much and have a great day everyone


Hello friends, I am Naval Yamal working as the Assistant Professor in Mechanical Engineering Department, Walshchon Institute of Technology, Singapore. In this video, we are going to see the programs on C++ Part 4. Learning outcome, at the end of this session students will be able to understand basic programs of C++. The result of this video is programs on C++. First program, a simple program to check whether a number is even or odd using if-else statement. So looking at the four videos of basic four videos, we will come to know that the header files and the simple programs, so we will directly continue with the program. C++ include iostream int main, here I have taken one variable that is number and after that cout enter an integer whatever the user enters as an integer that is stored in number. If number percent is also called as module is divided by 2 that is equal to equal to 0 means whatever the user enters if it is divisible by 2 and if the remainder is 0 we get the number is even else the number which is entered by the user is odd. So there is a simple program to check whether the given number is even or odd. So the output enter an integer if the user enters 5, 5 is an odd. Second program C++ program to check if a year is a leap year or not. So we will start the program here taking one variable called as int enter a year whatever the year is entered by the user is stored in a variable called year. There is same logic again if year module 4 is equal to 0 that is the year entered by the user is divisible by 4 and we have one more condition we are using nested if else condition here nested if else statement here if the same year is divisible by 100 also as well as 400 also then the year is a leap year. For example if you take 2000 as a year it is divisible by 4 it is divisible by 100 as well as divisible by 400 then 2000 is called a leap year. So there are three conditions it is 400 and 400 so the program is contained in the next slide else see out year is not a leap year else year is not is a leap year or else year is not a leap year. So return 0 for this the output will be if you enter a year 2019 2019 is a is not a leap year. So we will see next program that is C++ program to find the largest of two numbers so ash include iostream.h header file int main we are taking three variables here that is ab and the big so we need to take two numbers from the user and whatever the two numbers are entered by the user are stored in a and b I am using if statement again if a is greater than b then big is equal to a so the a will be bigger year in this case else b will be bigger. So the final output will be the biggest of the two numbers is we are calling b which is bigger return 0 the final output will be enter two numbers three and four the biggest of the two numbers is four. So try to think on a program to find the largest of the three numbers pause the video for few seconds and try to think okay here the program is similar to finding the largest of two numbers here we need to take one more variable extra than what we have taken in the finding for the two numbers. So here we are taking abc as a variable and big as one more variable so we need to take the three numbers from the user that is a b and c whatever the user enters that is stored in a b and c we assume that a is biggest in the first case let a that is biggest number then b and c if that big is less than b that big is nothing but a that a is less than b and we are using nester if conditions here if b is greater than c and b is big is equal to b else this can be one condition else big is equal to c so it can be a can be bigger b can be bigger and c can be bigger the program is considered in the next next slide so else if big is less than c if c is greater than b big is equal to c else big is equal to b or else big is equal to a so the biggest number will be amongst abc or c once the user enters three numbers that is 2, 3, 4 the biggest number will be 4 so we will see the next program to calculate average and percentage marks of a student so here we are taking we are taking int marks 5 that 5 refers to we are taking 5 subjects marks as a input and we are taking one more data type that is float sum c out enter marks obtained in 5 subjects and those 5 subjects are physics, chemistry, maths, c s and English so here we are using a for loop in for for studying or for knowing more about the for loop you refer the videos of my colleague wood guesser which is described in detail for the for loops so for for loop we are using initialization then assigning the value then incrementation if i is equal to 0 and if i is less than equal to 5 less than 5 and i plus plus here whatever the user enters 5 numbers that is 5 marks that is stored in marks then we are using a condition here sum is equal to sum plus mark then the program is considered the next slide so float here average is equal to sum divided by 5 whatever the sum of all 5 numbers was sum that is divided by 5 so from there we get a average so we are taking one more variable that is percent p r c percent is equal to sum divided by 500 that is summation of all the 5 digits divided by 500 into 100 so we get in percentage so the final output will be average marks and we are calling average and percentage is equal to we are calling the variable percent and showing it with a symbol also written 0 so you get the first statement as enter the marks obtained in those 5 subjects and if the user enters these values the average marks will be 76 and the simple formula is taking the sum of all 5 and divided by 5 you get average and for percentage sum divided by 500 if each subject is of 100 marks divided by 500 into 100 you get in percentage so the references these are the references which I have used thank you


All right, so we've seen that the basic idea, in order to construct a laser, you need a few things. You need a way to generate a population inversion, and then once you've, one way in fact to generate that population inversion is to have a pumping transition, so pump molecules up to some excited state, which you'll maintain at a higher population than some lower state, and then those two states with the population inversion represent the lasing transition. So that's the bare bones of what you need in order to have amplification of light be a stimulated emission to generate a laser. So let's consider a specific case, a helium-neon laser. So the optical cavity of the laser is going to contain these two gases, helium and neon. So gas phase lasers are not the most common type of lasers these days, solid state lasers are much more common, but the helium-neon laser is a relatively simple one to understand what's going on. So draw some sketches of the different transitions involved, the pumping and lasing transitions for this particular laser. So helium atoms are normally in the ground state. So ground state for the electronic state for the atoms in a helium, as you know, is 1s2. We could, if we don't want to write the electron configuration, we want to be a little more accurate, we could call that a singlet S term symbol. So the singlet S, the ground state is a singlet S state. There's a high-lying energy state that you could either write as electron configuration 1s2, or you could write that also, its term symbol is also a singlet S, so the spins are paired essentially. So that transition turns out as the pumping transition that's made use of in the helium-neon laser. So if you can get molecules up into this upper state, so the electrons are in the upper state of this helium atom, then that energy needs to get transferred to one of the neon atoms in the same gas. So it just so happens that between the ground state of neon, so the ground state of neon as an electron configuration, you'd write that as 1s2, 2s2, 2p6. That is a singlet S term symbol for the ground state. So it just so happens that there's an excited state of neon that's pretty close to the same energy as this particular excited state of helium. So that excited state for neon, again as an electron configuration, you could write 1s2, 2s2, 2p5, and then the 6a10, 10th electron is in the 5s state. So it's 1s2, 2s2, 2p5, 5s1. The term symbol for that state is a triplet p state, triplet p1. And like I said, just coincidentally, this energy level for neon is about as far above the ground state as the 1s2s state in the helium is above its own ground state. So what that means is this pair of states is convenient to use to transfer energy from the helium to the neon. So essentially what happens is an excited, so I'll write the excited helium atom as a helium with a asterisk on it. In the gas, these two atoms can come near each other, collide with one another. And the electronic excitation in the helium atom can be transferred to the neon. So we'll write that chemical reaction as just a collision between a helium and a neon atom, the electronic excitation energy of the helium, the helium falls down, the neon gets excited. There was no radiation involved in that transfer, it didn't involve emission and absorption of a photon, it's just energy transferred due to the collision. So we call it a collisional energy transfer. So the net result is we end up with a neon atom in this excited electronic state. Is now the state that's maintaining a population inversion relative to some lower states in that same atom. So the excited triplet P state of the neon, that's a little bit above another triplet P, triplet P2 I believe, state of neon. That one could be described with an electron configuration if you want to think about it as 1S2, 2S2, 2P5 and then 3P. So instead of thinking of it as a Hartree product of electron wave functions, the excited single electron is excited from a 2P state up to a 3P state here or a 5S state up here. So this emission, so this excited neon will fall down spontaneously to one of any number of states in this neon atom. But if it happens to fall down to this particular 1S2, 2S2, 2P5, 3P1 state, then it will give off a photon. That particular photon, so this is our lazing transition. So what happens is that photon when it bumps into another molecule that's in the same excited state will spontaneously, not spontaneously stimulate the emission of another photon. Those photons will bounce back and forth in our optical cavity, amplifying the light and generating more and more coherent photons with the same wavelength. So there will be, after the molecule falls down here, it will eventually spontaneously fall back to the ground state here. So we have this continuous source of excited state neon atoms via pumping and collisional energy transfer, maintaining a population inversion, more atoms in this upper state than in this state, and so we can have amplification of the light via this lazing transition. So this is, in principle, the way I've drawn it, a three state system, but of course there's more than just these three states of the neon atom, and it also involves this interaction with the helium as well. So there's a lot of complications that are not drawn in this diagram. I haven't drawn, here's the 3P state. I haven't drawn the 4S or the 4P or any of the other excited states of this atom. I haven't acknowledged the fact that there's, in fact, multiple different spin states, multiple term symbols nearby. So there's a bunch of different, there's a whole manifold of different spin states of this particular 1S2, 2S2, 2P5, 3P state, all of which differ in energy slightly. The most common wavelength to which this helium-neon laser is tuned by adjusting the size of the optical cavity appropriately, these photons that are given off are 633 nanometers when we fall from this state down to this state. You can tune the laser differently. There's not only this excited state for helium, there's other, there's a triplet S state that's the unpaired spin state that's lower than this state. So there's all sorts of other, if I collisionally transfer energy over to one of the other states and fall from a different excited state to a different lower state as the lasing transition, I can get light of various different frequencies to be emitted by this helium-neon laser. But the most common wavelength of light emitted by a helium-neon laser is between this pair of states, the triplet P1 state here and the triplet P2 state here that we use as our lasing transition. So that illustrates a key feature about constructing lasers is that if you want to change the wavelength of light that a particular laser generates, you need to find a pair of states to use as your lasing transition and find a way to maintain a population inversion between that particular pair of states. And then if you construct your optical cavity differently, tune it for selecting particular wavelengths you can amplify that particular wavelength over all the other wavelengths of light that may be being generated in that optical cavity.


Welcome to World Versus Virus, a podcast from the World Economic Forum that aims to make sense of the COVID-19 outbreak. This week, video games. Already the biggest sector of the global entertainment industry, and the pandemic means it's just getting bigger. Millions and millions played online. Only 200 qualifies for the Fortnite World Cup finals and this is the last game. In a world where sport has been put in lockdown, will e-sports replace physical games? Simply put, e-sports is watching other people play video games. Depending on who you are and perhaps how old you are, that idea either sounds as natural as watching golf or football on TV, or it's one of the weirdest ways of spending your leisure time that you've ever heard. The question I've been asked by people like Asian Older for the past 15 years has been why would anybody want to watch other people play video games?  Just in terms of the foundation that e-sports is built on, it's literally far and away the largest sector of the overall global entertainment industry. Now that pretty much my whole day is clear, I pretty much just play all day. I could get up in the morning, get online, and then not get offline until basically bedtime. Now is this something that the rest of us should be worried about? Gaming is not what it was when I was a kid in the 80s, which is sort of a solitary thing where you're trying to almost unlock a puzzle or beat a machine or create a high score. Gaming has mostly been for the past close to 20 years a social competitive activity. So that social component of it is what then led to formalization of leagues and competitions. It kind of started very grassroots when MLG got its start. eSports is the professional competitive stuff that Asepso puts it sits on top of gaming, which itself is a $150 to $170 billion industry and growing. In the second week of March, Verizon released a stat that in the U.S. their network usage specific to gaming had increased 75%. Effectively in the first week of the initial kind of quarantining of or lockdowns and in some of the first states and cities, gaming is up 75% already just in terms of network usage. Reality is most active gamers have hundreds of people across their Twitch, YouTube, various games, platforms like Discord where they communicate with each other. The connectivity that they already have is already there. Professional gaming has its superstars, but is someone who wields a joystick, really an athlete and so will eSports, which is thriving during this crisis, at some point replace physical sports, which are suffering so badly. Later in the show, the search for a vaccine. Around a third of the world's population has been under some form of lockdown. Now, many countries are cautiously reopening, but it does seem clear that we won't return to anything like normal until there's a vaccine. So when will we get one? And how? Our goal is ideally in the summer to start very large clinical trial phase three or people's own studies. And you're talking thousands of people, maybe up to 10,000 people across many different hospitals around the world. And the goal will be to be in a position to potentially assuming everything goes well, to go to the regulators and to actually ask for product approval as early as the end of this year. Right here.


Our administration's strong leadership, commitment to good governance, has proved to be a critical where our economy has reported successes, as we've demonstrated in recent years, that good governance and prudent management of resources means that you can do more with far less. We have despite almost 60% less revenues invested so far, 1.3 trillion Naira in capital expenditure, that's the highest in the nation's history. The current wisdom is in letting the private sector invest wherever it can, and in practically any sector of the economy. Our overarching goal is to make Nigeria a major global investment destination, by continually and incrementally implementing improvements and reforms in our business environment that will be visible, not merely in numerical rankings, but in the stories and testimonials of business owners and entrepreneurs across the entire country.


Welcome back in the last lecture we discussed natural reduction method and then before that we discussed various other decision procedure methods such as semantic tableaux method etc. So using those particular kinds of methods we can discuss we can decide whether a given el form formula is valid or when two groups of statements are considered to be consistent etc. So in this lecture I will be focusing my attention on some of the important and celebrated results in the first order logic and these are usually there many theorems which are widely used in the first order logic the celebrated results in all one of the important results in this first order logic and in that context I will be dealing with three important theorems I am not going to so when you say that something is a theorem it has to find a proof in all I may not be able to produce proof of all the theorems that I am going to talk about in this course but basically I will be giving you some kind of idea about these three important theorems. So I will be talking about completeness theorem which is due to a famous logician could go there and then I will be talking about one of the important theorems which is known as compactness theorem and third one which is discussed widely in the literature of logic and no course of logic would be complete without this celebrated result so that is the Godel's incompleteness theorem. So Godel has been credited for both the completeness theorem as well as the negative result that is incompleteness theorem, incompleteness theorem is used widely used misuse and even sometimes even abused us. So we will be talking about so the basic ideas of these particular kinds of theorems in this lecture to start with before going any further we need to know something about these three important logical properties. So any logical formal system any logician logicians dream is to have these three particular kinds of properties. So in this this course is all about first order logic which includes predicate and prepositional logic the one of the important characteristics of first order logic is that first order logics are considered to be consistent they are considered to be sound and they are also considered to be complete when you come to second order logics etc and all is very difficult to establish the completeness property so what are these important logical properties we will just go through some kind of detail about these important logical properties all the time we are using these three properties when we are while we are discussing about semantic tableaux method or natural reduction method etc. So consistency the first property is consistency, consistency means that none of the theorems of your formal system contradict one another so that means you are not in a position to derive both p and not p and all if you derive both p and not p then your system is considered to be consistent so that means all true prepositions can be proven for example if some something is a true preposition or true formula that is tautology all tautologies are obviously valid formulas and all valid formulas have to we have to find a proof for all the valid formulas in that context we use natural reduction and some other semantic tableaux method etc we already done those things second important property is soundness the soundness property tells us that a given formal systems rules of proof will never allow us false kind of inference from the true premises if you start with the true premises you always end up with the true conclusion on there is no way you can generate a contradiction when you start with tautologies so that is the reason why we are cleverly chosen axioms into consideration and then these axioms are transformed by means of substitution rules etc and all modus ponens etc and then you it will become theorem all the theorems are also considered to be true each step of your proof is considered to be true the final step of your proof is also considered to be true soundness ensures that you start with the axioms which are obviously true tautologies you will never end up with contradictions suppose if you start with tautologies and end up with contradictions something wrong with your formal system there is something wrong with the proof or there is something which is mistaken and all in the proof mistakenly considered in the proof the third important property is completeness which means that there are no true sentences in the system that cannot or at least in principle be proved in the system suppose if you say that something is a true proposition it has to find a proof that means we are also ensuring that only true propositions will find a proof suppose if I give you a contradiction then ask you to prove and there is no way in which you can prove that particular kind of contradiction but if I give you a tautology like PRP PR not P etc obviously you can find a proof for that so now these are some of the important virtues every logicians would dream of but we will be seeing very soon that in the works of good Godel he showed that no useful system of arithmetic Godel was looking for this interesting properties in the context of arithmetic you could find an important result that is incompleteness theorem with which he could say that no useful system of arithmetic can be both consistent at the same time it can be complete now so it has to be inconsistent to be complete or it has to be incomplete to be consistent etc these interesting things that you will see it will be treated so now we will be focusing on three important theorems first is completeness theorem second is compact next theorem which has its consequence to another important logician lovenham Scholem lovenham's theorem and then we will end up with Godel's incompleteness theorem and its impact on in the area of philosophy so before going further this we need to know something about the first order logic so when we say first order logic it means this first order logic only allows quantified variables to refer to objects in the domain in the domain we have objects predicates functional symbols etc now so the quantified variables refer to only objects in the individual in the domain of discourse but not the predicates are functions if you also take into consideration predicates in functions etc you are talking about higher order logics second order third order etc first order logic is usually considered to be powerful and expressive system which has been used to formalize basic systems of mathematics arithmetic etc set theory and any other real closed field which are related to these two fields it is mostly suited for the mathematical reasoning you should not be under the impression that all kinds of reasoning can be captured within the scope of first order logic that is mistake so first order logic is not supposed to capture everything and all it basically as far as possible it tries to capture mathematical reason so now to start with we will begin with the compactness theorem compare this theorem tells us this thing suppose if assuming that S is considered to be set of well-formed formulas of first order logic we have seen what how we constitute well-formed formulas for the first order logic so now if you take S to be the well-formed formula then every finite subset of S if it is satisfiable then that particular kind of set S is also considered to be satisfiable so there are S is considered to be some kind of set of well-formed formulas and then let us assume that S1 S2 S3 are subsets of S if every finite subset of S that means S1 S2 S3 they are all satisfiable then obviously the conjunction S1 and S2 S3 is also considered to be satisfiable that is if a set of sentences is such that every finite subset of it has a model then the whole set is also having a model so that means you need not have to worry much about all the all the sets of formulas and all but you can even if you have finite subset of set which satisfies this particular kind of thing then you can extend it to the whole set you can say that whole set is having the model one lemma for this one compactness theorem is this thing if S is consistent set of sentences and obviously S has to have a model so proof of compactness theorem goes like this just I am giving you a general description of proof so you need to note that each and every theorem should have should find a proof and all although I am not producing proofs of all the theorems that I am trying to discuss my intention is to talk about only the general idea of these proofs where it is later we can see where it can be applied and all so proof of compactness theorem goes like this let us consider the contra position of compactness that means you take the negation of the statement that you have seen in the theorem of compactness that means if S is not satisfiable then there always exist some kind of finite subset of S3 S1 S2 or anything and that also should not be satisfiable and all if each and every finite subset is satisfiable then S is considered to be satisfiable suppose if one of the important use of this compactness theorem is that if you can check the satisfaction with respect to subsets of a given set that will serve our purpose so now let us assume that S is not satisfiable that means in the context of predicate logic we need to have a structure a such that S is not a logical consequence of a he does not a models does not model S so we thus merely need to prove that there exists a finite subset S prime which is a subset of S such that S S prime is not satisfiable so now we have a completeness lemma which says that if S is consistent then obviously S has to find a model so that we will make use of it here and we say that so if S has no model then obviously S has to be inconsistent if you do not find any model of that one obviously you know in all the interpretation that formula is false that is why it is considered to be inconsistent so for a theory to be inconsistent is just for it to prove that it leads to some kind of contradiction that means you have come up with the case where you have a formula and its negation as an outcome of your that particular kind of set of well formed formulas that means let let that particular kind of proof which consists of this contradiction be a sequence of steps which is represented by X so that X as this thing first step is X 1 X 2 X n and the n step is something like Phi and not Phi there is a contradiction that you got in your proof where n stands for n is a natural number that means in the finite steps this proof ends that means since X must be finitely long and only finite a finitely many excise can obviously appear in it so that means you came across some kind of contradiction that means you could have got it through finite number of steps in so such that excise some excise that you take into consideration which has that particular kind of contradiction that belongs to S now let S prime be a set of well formed formula S of S which appear in the proof that you are trying to talk about where you have a contradiction then S prime should also be finite like the one which we have we have seen in the case of S that means we also have Phi and not Phi which is which comes as an outcome of S prime that means S prime has to be inconsistent and thus the finite even the finite subset S is also considered to be not satisfiable so what the essential thing that you need to note is that if you want to show that S is not satisfiable you can show that you can take some finite subset of S and you can show that it is not satisfiable and that will serve over purpose in that sense we call formal system to be compact each and every finite subset of S has to be consistent satisfiable so that the whole set is going to be satisfiable wherever one particular kind of subset of S is not satisfiable and the whole set S is not going to be satisfiable what is the use of a comparison this theorem is considered to be an important rule especially in the context of model theory model theory is important branch in the area of mathematical logic it provides us with the useful method for constructing models of any set of sentences that is finitely consistent so it is one of the important applications of this compactness theorem. Now let us talk about another important and interesting result in the first order logic that is lowenheim's theorem suppose you take SS to be set of well-formed formulas that is considered to be satisfiable that means at least one interpretation that formula S is true then obviously if it is satisfiable then it has to find some kind of systematic table for X that S which obviously cannot close that means all the open branches are leading to satisfiability means if you have a formula in the predicate logic you constructed a tree diagram and you have open branches that means that open branch tells us that the given formula is satisfiable in that particular kind of interpretation that means S has to be satisfiable in a denumerable more domain so let this lowenheim's theorem tells us this thing if S is considered to be satisfiable that means it finds an open branch after using the tree rules then S is satisfiable in a denumerable domain that means you can number of steps would be finite in number or it is satisfiable in a denumerable domain and the corresponding theorem is this thing if all finite subset of S are considered to be satisfiable then the entire set is considered to be satisfiable in a denumerable domain. So there is another interesting corresponding theory theorem in the context of lowenheim it is called as lowenheim's upward lowenheim's column theorem so this tells us this thing if a theory S the formal system S has an infinite model then S this particular S has arbitrarily large kind of models if it is infinite model it will have it will take lot of time it will take infinite number of steps so S has infinitely large models for example if you want to see the one of the applications of this particular kind of a theorem it is like this formula for all x px for all x qx implies for all x px or qx is going to be tautology and hence it is valid formula but if you take the vice first of that one that is for all x px or qx implies individually for all x px or for all x qx that is considered to be an invalid kind of formula and if you want to establish that it is unsatisfiable and you if you construct a tree diagram in finite number of steps it will end and then you will have some kind of open branches that means if you deny the formula you will have the open branches this example we have taken into consideration in the last few lectures so we can easily construct from the open branch a counter example and if you see that counter example you will have you only require some kind of finite domain and all which involves one or two elements one or two parameters not a or b to establish this particular kind of thing so you will just require a finite domain to prove whether it is satisfiable or unsatisfiable one important corollary of this particular kind of theorem is this thing suppose if x is a logical consequence of set of well-formed formulas s then x is also considered to be logical consequence of some finite subset of s so you have some large set of set of formulas and then s1 consists of some kind of set of formulas which are subset of this particular kind of s then if x is a logical consequence of s then x is also logical consequence of some finite subset of s so how do we prove this particular kind of thing a proof goes like this suppose that x is a logical consequence of s that is what is given to us that means if you add not x to s that leads to unsatisfiable that means if something is this particular kind of thing s is x then if you add not x to it then this becomes unsatisfiable you started with the premises and you deny the conclusion obviously it leads to contradiction that means it is unsatisfiable so s union not of x obviously has to be unsatisfiable hence if it is unsatisfiable then if you constructed a tree diagram using table of proofs obviously tends in finite steps and all hence it will have a finite model s0 of s the capital s that is even s0 union not x is also considered to be unsatisfiable so therefore obviously x is also a logical consequence of s0 so if you want to show that s is considered to be unsatisfiable you can take subset of s and you can show that even from the subset of s also that x is has to be a logical consequence so this is what is compared next and lovin heim's theorem now let us come back to the celebrated result in the first order logic that is the Godel's incompleteness theorem before talking about Godel's incompleteness theorem let us talk about this particular kind of startling kind of passage which you will find it in one of the important and the path breaking papers by Godel it is on some kind of formally undecidable prepositions so here is an important question which is worth discussing so Godel says this particular kind of thing so he is of the view that he says the development of mathematics in the direction of greater precision has led to large areas of it being formalized so that proves can be carried out according to just few mechanical rules that means you started with few axioms that is what we have seen in the case of Russell white at axiomatic system or Hilbert Ackerman axiomatic system etc you started with some 4 or 5 kind of rules and then you have some substitution rules and some definitions that is schemas and then you generated number of theorems and all numerous theorems and all so which just simply requires few mechanical rules and all and then axioms of course to start with the most comprehensive formal systems to date according to Godel on the one hand are these things one is principia mathematical for whitehead and Russell and on the other hand we have Jeremy Lofrankel's system of axiomatic which we did not discuss in this course but the context of set theory is very important now these are the two examples that he takes into consideration now it talks about some of the important merits of these things of both these systems are so extensive that all methods of proof used in mathematics today can be formalized within these two frameworks that is it can be reduced to a few axioms and rules of inference the grand program is to reduce mathematics to logic and all the notions of mathematics if it is expressed in the language of logic that means you have axioms rules etc and all then you in a way you are reducing mathematics to logic in that sense arithmetic can be reduced to logic or geometry reduced to logic etc. So it would seem reasonable according to Godel that therefore to surmise that these axioms and rules of inference are sufficient to decide all mathematical questions that can be formulated in the system concern so he is praising this thing in this way but he goes on and says that in what follows is that it will it can be shown that obviously this is not the case this grand program might fail but rather that in both the cited systems there exist relatively simple problems of theory of ordinary whole numbers that cannot be decided on the basis of these axioms you will not be in a position to decide whether X is X can be proved or not X can be proved and all that leads to undecidability undecidability or incompleteness if all the truths are probable and all the proof all the things which can be proved are true then your system is considered to be complete but you can come up with simple examples where life is not that easy and all so you can come up with simple examples where at least Godel showed that the formal system is going to be incomplete. So now before talking about Godel's negative result that is incompleteness theorem let us talk about some of the important theorems due to Godel that is the completeness theorem so Godel's completeness theorem is considered to be the fundamental theorem in mathematical logic in fact he worked for his Ph.D. thesis this particular kind of problem completeness so completeness tells us that all the valid formulas are probable and all the probable formulas are considered to be true that is valid Godel's completeness theorem is a fundamental theorem in the mathematical logic logic it establishes a correspondence between semantic truth and the syntactic probability in the first order logic so on the one hand we have this particular kind of thing there are two symbols that we have used earlier suppose if you write like this X and Y this means Y is reduced from X that means X together with some kind of axioms etc well-formed formulas and then your you got Y what a finite number of steps in it is in that sense Y is reduced from X we are not trying to talk about what we mean by X etc so there is another symbol which is called as this thing this means X entails Y or Y is a logical consequence of X etc so that means under all interpretations in which X is true Y also has to be true there is no way in which X is true and Y is false enough if that is a case you write it like this the simple things which we have done in this particular kind of course so now the first one is trying to talk about probability and the second one the double tensile is referring to semantic truth so now Godel's completeness theorem states that a deductive system of first order predicate logic of course we did not discuss the axiomatic system in the context of first order logic but you can extend the prepositional logic with adding some more quantifies to it and you can come up with an axiomatic system that particular kind of a deductive system of first order predicate logic is considered to be complete in the sense that no additional inference rules are required to prove all logically valid formulas you start with only axioms and the transformation rules and the modus ponens etc and that is all you need to prove to check the validity of all the formulas now you do not require any other formula any other kind of any other kind of inference rule which is outside of these things it is in that sense within the system you can show that they are complete so now the converse of this completeness theorem is what is called as soundness so now soundness ensures the fact that only logically valid formulas are provable and only those which are considered to be truths are provable and those who are considered to be false of course obviously it cannot be proved in now within the deduction system it ensures that whatever you proved at the end of the day has to be will be true enough in all the true formulas are again provable enough so taken together these theorems imply that a formula is logically valid if and only if the conclusion of if and only if it is considered to be the conclusion of formal deduction with some kind of proof procedure methods that we have seen natural reduction method a semantic tableaux method we should be in a position to establish that you can find a proof for a given valid formula so now Godus completeness theorem tells us this thing it is considered to be the general version of completeness theorem for any first order theory T and any sentence is in the language of that particular kind of theory there is a formal deduction of S from T you can use my axioms and all these things if and only if S is satisfied by every model of T if it is the case then S can be deduced from T so now let us come back to the negative results that Godel has come up with so these are widely discussed in the literature of logic so they are the famous two income in his theorems the first one is first income in his theorem it tells us that it roughly states that any formal mathematical system which is sufficiently powerful to include for example arithmetic geometry etc contains a particular kind of statement which is true but it cannot be proved within the system that means it in company is results in all so that particular kind of formula is obviously true but it cannot be proved so this is Godel's completeness theorem links these two things to notion this is semantic notion and the other one is syntactic notion so something which is true has to be provable now Godel has come up with an interesting observation which is considered to be a path breaking result in the area of first order logic that is does all the true statements all the valid formulas find a proof that is the question that he asked and in the context of arithmetic especially there are some kind of obviously true prepositions we talk about some examples little bit later and they are obviously true our gut feeling says that they are obviously true but they are not provable that leads to incompleteness that means whatever all the valid formulas are considered to all the valid formula should find a proof if you are not able to prove it in the system is called as incomplete and the second incompleteness theorem is like this it states that such a system contains a proof of its own consistency suppose if you want to show that if you want to show the consistency of that particular kind of system and you can show it only when if and only if it is in fact consists inconsistent it has to be inconsistent to be complete so that seems to be a major blow to Russell Whitehead grand program of logicism and even Hilbert Ackermann's Hilbert Ackermann's axiomatic system Russell Whitehead is motivated by arithmetic as well as whereas Hilbert Ackermann is motivated by geometry so here incompleteness means that there are that there are in the language there are some undecidable kind of sentences that means sentences that could not be proved nor disproved in the theory there are undigisable kind of sentences that means there are obviously true statements in all but we are not able to prove we know that X is true in all but we are not able to prove X we are not able to prove X means we are not able to deduce X and in the same time we are not able to deduce even not X also at least one of these things should come as an outcome in your theory if both the things will come as an outcome obviously the system is considered to be inconsistent so that means you should be in a position to derive either X I should be in a position to derive not X if both are not derivable and all that leads to incompleteness now the second inclinement is theorem means that the theory makes it possible to deduce both a sentence that is alpha and its negation that is if you can deduce X and not X then that is contradiction is part and parcel of your system and that means you can derive anything in all so this is what we have seen earlier if 2 plus 2 is equal to 5 it is a humor we use this particular kind of example if 2 plus 2 is equal to 5 which is considered to be contradiction better Russell has showed that he is considered to be is a pope 2 plus 2 is equal to 5 better Russell is a pope so from contradiction anything you can derive so if your system has to be inconsistent to prove the completeness and there is something wrong in the system that leads to incompleteness theorem 2 that means anything if you can prove anything in all then the theory is going to be entirely useless Godel has taken into consideration some simple examples with which he showed that there are some obvious sentences which you come across within the formal system which is not considered to be either probable not probable enough so let us consider the sentence to the sentence can never be proved these are the sentences which he has taken into consideration and then he showed that you cannot deduce you and X that means you cannot prove X that means the sentence can never be proved this can be deduced or the sentence can never be proved that is it is not the case that the sentence can never be proved also will come as an outcome of your formal system that means both cannot be proved that leads to incompleteness now take up the first sentence you have no way of knowing whether in the context of nights and nails puzzles Smolian has nicely put this thing in the context of Godel's incompleteness theorem let us take this example you have no way of knowing whether I am a knight or a new based on this statement this statement is a statement that we have made that is you have no way of knowing whether I am a knight or a new based on this particular kind of statement so this how this leads to incompleteness theorem is the one which you are trying to see assuming that the statement is true that is you have no way of knowing whether you are a knight or name so then if the statement has to be true then the statement has to be made by the knight so what we are trying to do is we are discussing this Godel's incompleteness theorem in the context of nights nails puzzles nights always tells the truth's nails always tells lies it is never the case that night nails tells the truth's so it must be a knight who's saying it that's why this sentence is true that means if that sentence is true then this is what follows the logician won't be able to figure out that he is a knight because obviously the sentence is true so now once the logician realizes that he can't figure it out he will know that statement is true then now what happens here is that logician now figures out that it is night because the statement is true so that leads to a kind of paradoxical kind of situation therefore the statement cannot be true and must be a new it must be a new saying it because the statement is false the logician is able to prove that it's a new is able to prove both night and both nails and all so that leads to some kind of a problem related to incompleteness Godel also takes into consideration some simple examples such as let us if you consider a formal system yes that proves various English sentences but only true ones now let us take one simple example now we are asking this question what sentence that particular kind of thing be such that it has to be true but it is not probable in the system yes taken natural language sentence and all you're trying to come up with one particular kind of statement which is obviously we know that it is true but it is not probable in the system he takes this particular kind of example this sentence is not probable in the system that particular kind of thing is considered be a sentence which represented which is represented by yes now if the sentence were false that means it is false that sentence is not probable in the system then contrary to what it says what will happen is it would be probable in the system if the sentence is false and all and what it says is true it contradicts the given fact that the system proves only true sentences and all because here it is we are proving false sentences also and hence therefore the sentence cannot be false so you are assuming that sentence can be false it leads to a fact that it cannot be false because it's contradiction but suppose if you assume that it is true then what the sentence really says is this thing the sentence is not probable in the system that means there are some kind of sentences which are not probable in the system that means the sentence is true but not sentence is obviously true but it is not probable in the system so in both cases if you take this particular kind of sentence that this sentence is not probable in the system if it is false there is a problem if it is true then also there is a problem so the system has the sentence has to be true to be not probable and it has to be probable then it has to be false that means all false sentences you are able to prove and all the true sentences which cannot be cannot be proven and all so that goes against this particular kind of thing that all the valid formulas should find a proof all the true formulas should find a proof and all but you are not able to find a proof for this one because you are not able to find X you are not able to find not X also so in a different context you discussed this particular kind of result in the context of there are some important conjectures in mathematics which our gut feeling tells us that is obviously true but it has no proof you have to note that all the theorem should find a proof if you if you say that something is a theorem and it has no proof and that is not considered a theorem it is simply either it can be called as a conjecture or some kind of assumption or your belief or etc so in mathematics proof means it has to sorry theorem means it has to have a proof. Now Goldberg's conjecture is like this every even number greater than 4 can be written as some of two odd prime numbers everyone knows even the elementary high school going student also knows that this seems to be the case and obviously the case that means if you take six into consideration that is nothing but some of two odd numbers that is three plus where three is considered to be odd odd prime number on the same way 14 if you take into consideration it is 7 plus 7 so we know that every even number can be expressed in terms of greater than 4 can be expressed as some of two odd prime numbers the prime numbers obviously odd only so now every number greater than 2 this is also another way of putting it is a Goldberg conjecture every number greater than 2 can be written as some of three prime numbers so now in the first case 8 for example even number can be expressed as 3 plus 5 where 3 is odd and 5 is odd prime numbers in 20 for example 13 plus 7 or it can be written as 17 plus 3 as well in the second class even number for example 42 is represented as 23 plus 19 etc. So our gut feeling tells us that this is obviously the case whatever number that you are taking into consideration even number that can be expressed in terms of some of odd prime numbers but till to date we do not have any proof for this particular kind of obviously known fact and all is considered to be true but we do not have any proof so we have some kind of reference which we will get it in the letter by Euler to Goldberg he says this there is absolutely little doubt about this particular kind of result that it is true and all there is no doubt that in a gut feeling says that that is obviously true and all because whatever number that you have even number that you have taken into consideration it is it is expressed as some of two odd prime numbers in all but what is the guarantee that there exists some kind of big number where it cannot be expressed as some of odd prime numbers in all we do not know at this moment so there is it is not proved it so there is little doubt that this result is true this is what Euler is expressing to Goldberg that every even number is some of two prime numbers I consider this as entirely certain theorem in spite of that I am not able to demonstrate that this is considered to be a theorem that is not able to prove either X you are not able to prove not exercise so this these are some of the things which poses some kind of challenges are set some kind of limits to the first order logic where we have said that all the true propositions are considered to be proved we will end this lecture with by saying some kind of insights from this Godel's in company so you need to note that we are not it proved this Godel's in company in a serum and all it requires entirely a different kind of course to talk about the celebrated result of good Godel but I only given the general idea of this Godel's in company in this theorem some of the insights we can talk of and then we can end this lecture so Godel's income in a serum establishes a kind of first of all occurs the company in a serum which is mostly ignored by many logicians in all is also considered to be one of the celebrated results and all mostly people are interested in the negative result in company next etc. But completeness also you worked out in in his PhD thesis it establishes a correspondence between semantic truth and the syntactic probability single turnstile and double turnstile in the first order logic whatever is probable is true whatever is true is probable and we have also seen that completeness theorem is applicable only for first order logic in the case of if you talk about variables ranging over predicates function symbols etc. We are talking about second order logics it loses some of the interesting features like completeness consistency etc. It is very difficult to establish these important logical properties the theorems become incomplete in the case of higher order logics third order logic second order logic etc. So now Godel's incompleteness theorem also says that a consistent system can never be complete if it has to be complete it has to be inconsistent that means consistency and completeness can never go together consistency means you are not in a position to derive both XN if you are able to derive both XN nautics the system is called as inconsistent either you have to derive X or you have to derive nautics completeness tells us that if something is true it has to find a proof this both the consistency and completeness never go together it's giving us some kind of impression that they don't go together. So now if you observe if you have if you have some kind of closer scrutiny over our own individual lives and all we realize that the realities of our life with its promises and uncertainties etc all can be expressed only in higher order higher in order so that means there is some kind of incompatibility between consistency and completeness so all these things there is some gap between consistency and completeness so now the real question comes to us is which will be rising in a while from now so now the mathematical notions of completeness and incompleteness together provides us insights for science and religion dialogue for a better comprehension of reality in life obviously we see that there is some kind of we know that consistency and completeness never go together with as a result of this Godel's incompleteness theorem a few fit pertinent questions one need to ask oneself before we end this lecture we have to ask this particular kind of questions in the context of Godel's incompleteness theorem can our life be consistent and complete at the same time taking into consideration higher all complexities etc and all the second question that we can ask is should we try for consistency and completeness together our third question is what is the rule of the rule of the experience of inadequacies inadequacies and incompleteness in making one's life more meaningful and enriching officially our goal is to make our life meaningful and enriching but we have a celebrated result where consistency and completeness cannot go together so in what sense we can make our lives meaningful and enriching so we will end this lecture with a summary of what we began with some of the important theorems of first order logic some of the important theorems we are not trying to cover all the theorems we started with compactness theorem and then we moved on to completeness theorem and then we discussed the celebrated negative result by Godel which sets limit to the grand program of logicism that means all the mathematics can be reduced to logic so we discussed Godel's incompleteness theorem and then to certain extent we discussed some of the philosophical impact of Godel's incompleteness theorem so the questions that I rise pertinent questions that requires valid answers it requires satisfactory answers so this lecture is not going not talking about answers for these particular kinds of questions