We will continue our discussions. First I would like to do a quick review of last lecture, look at matrix multiplication problem and we will look at one problem which I call file indexing. Then I will just present a program to you and ask you to figure out what exactly is being done and how. To begin with I would like to revisit time complexity. There was a syntax error in the notation that I used in the original slide which I have corrected. If you recall we had said that we compare algorithms on the basis of their behavior when the size of the problem increases to infinity. So as n tends to infinity we said some programs can be compared, not some, all programs can be compared on the basis of order of magnitude of computations that the program would require and if n is the size we said a program is order n square we write it as o n square. The difference is in this notation by mistake I had used a small o here but you have to use a big o because technically small o and big o are different things. They are not the same. Mathematically when you compare algorithms there is a small o notation which means something different. What we shall be using is what is called the big o notation. For all practical purposes what we mean is that we are talking about order of complexity. So order of complexity of the algorithm is big o n square. Another program may be order n. Some other program may be order log n. It is important to specify the basis of the logarithm because ordinarily log would mean natural log. Typically in computer algorithms you would have log n to the base 2 for obvious reasons. Clearly an algorithm with order log n is much superior to an algorithm with order n which in turn is much superior to algorithm n square. What would be a worse algorithm? Order n cube. Another order n raise to 4, order n raise to 5. This n square n cube n raise to 4, n raise to 5 you will recall are all polynomial terms. So in general n raise to k where k is a very large integer will be a very time consuming algorithm. But still that algorithm will be said to be bound as polynomial time algorithm. So polynomial time algorithm is algorithm which can complete its execution with some order of polynomial of the size n n square n cube n raise to 4 n raise to k whatever. Can there be anything worse than that? What could be worse than n raise to k? What is worse than polynomial in terms of increasing the number of computations or increasing the number in some sense? n raise to k where k is some high value. In general when you have a polynomial of that type n raise to k plus let us say b naught or b k n raise to k plus b k minus 1 n raise to k minus 1 etcetera, etcetera up to some b 1 n plus constant b naught. So this would be the time complexity of an algorithm which can be represented in polynomial time. Such algorithms although they become costlier as power of n increases they are all said to be bound by a polynomial time execution because the expression representing the time complexity is a polynomial expression. I ask what could be worse than polynomial? So what about a raise to n in general? Would you agree that this function increases more rapidly? Yes or no? So exponential functions are generally faster generally increase faster than polynomial and these would take you to the realm of impossible computational problems. So polynomial time and non-polynomial time are too very fundamental distinguishing features used and people have been trying to prove that in the worst case both could be safe very cruelly speaking. We will not go into those details. What is important for us however is that every algorithm that we write we generally understand the complexity. We are unlikely to write algorithms which will go beyond polynomial time complexity. If ever we come across one we shall point that out. Those will be impossible to solve problems kind. However within the polynomial time as I said order n is preferable to order n square, order log n to the base 2 is preferable to order n, order 1 upon something log n is still preferable etc. These things matter as I said when n tends to infinity. So for very large n these things are material. Otherwise do not forget what I said earlier that if you have an order n square algorithm and another algorithm which is order n ordinarily will require this as faster. But depending upon the actual expression of the time complexity it may turn out that for a certain value of n order n square algorithm is faster than order n. Beyond that value of n order n will be faster. Now if that value of n happens to be good enough for solving most of the practical problems in life then you would like to use that algorithm because that algorithm is faster. So whenever you are comparing algorithms even the order of complexity may be different it is still important to compare nittigrities and the detailed expression. In any case within two algorithms having the same order of complexity try to reduce the coefficients of the expression. Why I emphasize this generally when you write large programs and that is what you will all be doing in your projects you tend to forget about the efficiency of your program till the entire system is developed and when you try to run your programs later you find that the programs are not executing fast enough to meet the real life demands. In general then it is a good idea to keep the efficiency of program in mind while designing the program itself not subsequent. It is extremely difficult to tinker with the program and algorithm which is already written especially if the program is larger complex. I will very quickly repeat the redirection we have seen that ordinarily you read input from C in but if you use the input redirection then the program is capable of reading from an input file. As somebody is asking me yesterday why do I say dot txt? The file name is not important. The file name could be x dot y it is your choice entirely. What is important is what that file contains. The file must contain data which is amenable for reading by C in because redirection is a replacement for C in and nothing else. So for example yesterday somebody was asking whether I could input an image. We have not even discussed how do we represent an image but we take it for granted that the image representation will not be a text representation. In which case it is futile to try and give a file which contains an image because C in will try to make sense of the data only in the context of C in statements that you have given in your program. It cannot understand anything different. Therefore while the name of the file is not important the contents must be text contents as if you are typing them on the keyboard nothing else and that is what is read by C in statement. Typically I would give it an extension dot txt or earlier people used to call it dot d at which now has a different connotation in some operating system but the contents is what is important. Similarly you can redirect output. Again it does not matter what name you give but what will be contained in this file after the completion of execution of your algorithm or your program is exactly what you would have seen on the screen nothing else because what you produced using C out is what is being put into this file by the operating system nothing else. So keep that in mind. Names do not matter but they have to be text files available for handling by C in and C out statements. We also discussed the need for debugging and this is something I would like every student to experience and experiment during the lab sessions particularly as your programs become larger and larger. In fact even for small programs it is not uncommon to make a silly mistake somewhere and you cannot figure it out unless you put some intermediate print statement. So this is the facility where you are able to put code like this hash if something something some block of statements typically these will be output statements although they need not be outputs. For example you can even do some intermediate computation and print the result of that intermediate computation as a part of debugging. It is entirely your choice. The point is whatever statements you write in this block hash f x x x up to hash and all of that will either be completely ignored by the compiler in normal course or all of it will be compiled and then those statements will be executed in the normal course. So typically I use the name not sure because it conveys the meaning that I am not sure of what is happening. However there is no such sanctity of this name. You can use absolutely any name. You can use x x x x for example any string that you use without quotation marks that is what you write here hash f blank not sure and then these are samples C out statement. It could be any other statement or a group of statement ended by hash and so as I said ordinarily C++ compiler will ignore the block but if you compile your program with minus D option this is the way you write minus C++ blank minus capital D don't forget that blank and this is followed by the string which you have used in the hash if state and then of course a program. So these statements are compiled and are executed as part of the program. What is important to remember is they are executed not as a separate entity but they are executed exactly in the same order in which they physically appear in your program. So in fact if you want to understand how the program will behave with minus D option take your program forget the hash if and hash end if statement as if it is not there then whatever are the statements remaining they become now part of your program in the normal course they will be compiled and executed. I would like all of you to experiment this because this is what you will need when you compile when you write larger programs. I will repeat the announcements that I had made specifically the video lectures have been uploaded my team tells me that within 30 hours of a lecture they will be able to upload the lecture on the internet not on the internet but on the intranet. So you should be those of you who want to let's have missed the lecture want to go through some portion the speed is pretty fast we have tested it from multiple places and when you play it you can actually move the cursor up and down you need not listen to the whole lecture you can go to an arbitrary point in between just like you advance a movie or something like so for those of you who need to do that they can do it otherwise the resources tab which has been least explored in this course sadly I request you to explore it further more specifically there are lecture slides lecture notes and a fairly good amount of notes specifically written by professor run a day and the sample problems by run a day Sudarshan and Sony they're all there the difference is that the way they have treated this course the evolution has been slightly different for example they have discussed pointers and care type much earlier in the course we have avoided using that so far we shall do so very soon immediately after the mid say however in those notes I have a simple suggestion ignore anything that has not been discussed in the class and you should still be able to make a mean and sense out of the sample programs and the notes that have been given additionally I mentioned a beginner C plus plus it in no way reduces the importance of the poems book which have listed as a textbook although we have not been using it as a text then what is important about that book there are a whole lot of exercises I would like you to do those exercises solve those problems and that is where you can use collaborative small clubs within your own hostels everybody need not solve every problem if you distribute it sit down together and discuss where everybody explains the way one has solved one problem you can have tremendous advanced it's exactly like attending a small class where everybody is a teacher in turn this very important because we have been remember we have been going pretty slow so far and we have been going slow because there are a large number of people who either did not have any computing background or very limited exposure to computers but do not forget that that actually hampers the progress of the people who have already done a lot of programming and at the end of the course each one of you would be expected to write fairly large programs so to catch up very rapidly because from mid-sem onwards the pace will increase very quickly here are some modified announcements the mid-semester exam will be conducted as per following sitting arrangements batch 1 to 7 that is 1a1b1c1d etc 2a2b etc they will come here and they will sit in the blocks 1 2 3 4 5 6 7 the specific announcement of which segment of the block which particular batch should sit the lab batch for example 1a1b1c1d like that last time we had a lot of problem in deciphering the answer books and so on we don't want that batches 8 9 and 0 will sit in ic classrooms on the first second and third floor the ground floor ic room will be reserved for late comers if for any reason you are late don't ever go anywhere near the specific hall of your exam just go directly to ic one or whatever it is called the ground floor room we start that exam about 10 minutes late or 15 minutes late however if somebody for any reason is half an hour late doesn't matter he can come and join the exam there but the exam will end at the specified time at all places last time we discovered at least 35 answer books on which people had not written their batch numbers this is unacceptable so I'm thinking seriously of reducing marks if the batch number is not properly written because that's the sole sorting key for us when we try to recompile and compare it with attendance similarly last time there were several students who signed multiple attendance sheets so we had a tough time finding these things out why I'm mentioning these is that whenever we have a large group like this an absolute discipline needs to be maintained by everybody somebody rummages on the discipline the entire organization goes heaven you will learn some of it when you do the projects which is my next announcement the course projects in this course will be batch projects I call them group projects I am refining that now because every batch will do a project so that is exactly synonymous with your lab batch so 0a 0b whatever 1b 1c 1d 9a 9b each batch is a group each batch will have about five teams I have figured out that most of the batches are of the size 20 to 23 24 so that is why there will be five batches five teams ordinarily each team will have four students but one or two teams could have five students depending upon the total number of students in that and one of the students in that team would be a team leader now this choice of the team members and team leader is entirely yours I must spend some more time on this because it's very important how you form these teams in the batch somebody asked me for example that suppose the students with maximum programming experience prior to coming to IIT team up together then wouldn't that be nice and I said yes maybe for that particular team but remember there are 16 other people in that batch who will have to contribute meaningfully so if all other teams have no experienced person then the totality of the project that is delivered by the whole batch will be relatively lousy as compared to distributing your strengths within different teams of the batch why are these things important these are important because what you're learning here programming many of you will deploy this programming for developing large programming systems in your own fields some of you will actually join IIT services but some others will be building large computational libraries or large design libraries or whatever what such large systems are never ever written by one individual or by four individuals or by 10 individuals the typical team size which develops a reasonable size software these days is of the order of hundred or more people now when you develop software in of that magnitude which is what you are all destined to do in fact I expect each one of you to lead such effort somewhere or the other as a part of your activity in that case it is important to understand the organizational aspects of such a team it is not adequate to say I am a crack programmer because an individual crack programmer will crack if the burden is to write hundred thousand lines of code in six months no individual can do that 200 people can possibly do that provided they are organized I would like you to learn the organizational skills the leadership skills and the communication skills which are required in the modern programming teams to develop something substantial and to be proud of whatever you have developed so that's the reason why I'm introducing these batch projects I have done this experiment successfully at some other level in the information system course and some very excellent projects have been developed just to give you an example when I taught this not this course another course and data processing in 1984 or 85 I think I took a single problem for the whole batch and that problem was the salary system for the Institute for IIT Bombay we had a very small micro control kind of machine then which was getting out of commissioning within three months and the Institute wanted a new payroll system we had a 8-bit micro computer which ran an operating system called CPF there are no desks there were two floppy drives and it had a compiler for a programming language called cobalt so I use cobalt programming language to teach data processing and the whole batch the course project was developed IIT Bombay salary system they were I think about 20 or students in the computer science batch then as a part of one course they developed that system which for next five years actually paid the salaries of all IIT employees so they could construct something which was extremely meaningful in fact they did not have much time to test the programs they tested it to whatever extent they could and I still remember when the March salary which is paid in April was produced using new programs there are two errors one professor in those days professors who did consultancy would get their annual disbursement of consultancy in the March salary which is paid in the April so somebody was supposed to get 18,500 rupees got 8,500 rupees and another person who was supposed to get 21,900 got 1,900 and that is what was printed on their sheets on the salary slips and of course they came crying foul you know what was the problem when you format the output the student was responsible for producing those salary slips decided that since the president of India gets 10,000 rupees per month as the salary no Indian could get more salary than that so he printed the salary as four digit numbers so out of the five digits the first digit was lost that is how cobalt works and only four digits were printed but apart from that there was no error in fact the professionals in Mumbai from LNT and TCS complimented IIT Bombay because no salary system has ever been put to live usage without two months of parallel testing one of the teachers of this course was a million Sony was one of the leading students of that batch by the way I'm telling you this is that you are capable of doing astounding things provided you put your mind not only to programming but the aspects associated with designing organizing documenting and testing programs and that is what I want you to learn when you do the projects so in conclusion please form the teams immediately and while you form the teams of course you will come closer those three or four or five people who have sort of worked together know each other but keep the interest of the entire batch in mind each team will have a team leader and leaders from all the teams in the batch will constitute the batch coordination committee so there will be five sort of people who will coordinate all the activities please do not forget that the project has 30% evaluation weightage that means I'm responsible for allocating marks out of 30% weightage to each one of you the group projects are evaluated in the following way 20 out of 30 marks are reserved for the group work the amount of work done the quality of work done the quality of documentation and testing out of 20 marks the marks will be allocated for the entire batch every student in that batch out of 20 marks gets exactly the same doesn't matter if you are the crack programmer or you're the most useless program that's the advantage and disadvantage of belonging to a team however the remaining 10 marks will be for individual contributions now there are multiple mechanisms of evaluating individual contributions the one which I favor most is to ask for individual evaluation from the batch itself have you ever done that exercise self-evaluation in a group no somebody else has always given you marks right there's a very interesting exercise very important exercise because in professional lives you will be doing that you'll be evaluating yourself the idea here is the whole batch sits together and you have to grade everybody on the basis of contribution on a scale of 1 to 10 and the team leaders and the group coordinators shall ultimately resolve this if no consensus is formed I as the instructor in charge has the right to decide using means available at my disposal ordinarily I will honor the marks that you so give or the evaluation that you so give after some sample checks the sample check will consist of a one-to-one Viva with one or two arbitrarily selected members from that team based on of course the evaluation that you present and if my evaluation of those two individuals does not tally with your evaluation if it is substantially higher then everybody in the team loses marks out of those care now I will elaborate this process this process has worked successfully far more important than the evaluation marks I believe this process will teach you a lot about professional self-evaluation in a group we'll discuss this more later on when we go to the group projects the last but not the least many of you have already done a lot of programming not only in their 10th and 1112 standard I met someone from Bihar who has been programming from six standard I think he knows about six programming languages now such people are perhaps better placed than most others to suggest problems for the batch project even others who haven't handled programming per se of large magnitude can imagine problems which perhaps can be tackled by a batch or a sort of bunch of 20 25 people so what I would like you to do between now and Thursday is to submit some kind of your proposals problem proposals and submit these proposals on your moodle TAs will be instructed to collect these during the next week of mid semester we will work at the back end to define the problems for the batches which of course we'll allocate later but do suggest problems one more announcement in this regard the next lecture Thursday lecture I will not teach anything new but I will devote that entire class to solving problems any problem that you are faced in any program but I need a feedback from you as to which problems you would like to discuss so please send a mail to me specifically this is not you can additionally post it on the moodle but I must receive a mail independently and that mail message must have the following title this is important I get about 300 emails per day I try to read all CS 101 related emails although I am not able to respond to everyone but it is hell unless the subject line contains something very specific this should be the exact title CS 101 underscore problem all small letters sorry CS 101 blank problem you can understand if I have about 16,000 mails in my mailbox then searching on the subject if it is exactly written I'll be able to get all the mails immediately just to help me sort it out faster below this you can state your problem in the mail itself whatever is the problem you can make a reference to a particular slide number of a lecture saying that this problem is not clear or you can state a problem saying I could not do it you can give piece of code which you have written and which you can say I don't understand what is the problem in this piece of code absolutely any problem that you have in the course because I'm using this mechanism to collect all the problem areas that you have what I will try and do is on this Thursday and then at the bottom you must write your roll number name and badge do not forget to identify yourself completely so I would expect this email latest by tomorrow night Wednesday night so that I can work Wednesday night whole night to dissect some of the problems which I would like to discuss here so that is what we'll do on Thursday incidentally the mid-sem question paper will not contain any multiple choice questions in retrospect I think it was wrong to put that question in a regular quiz with five marks there because you either get zero or five and that is not a good idea because a whole lot of people who would have actually worked out the logic almost correctly would not get any credit for that logic so we'll correct that situation subsequently of course as I said our clicker devices are getting ready and after mid-sem I'll be conducting online quizzes without losing much of time in evaluation now this is the last but most important announcement and this concerns the fact that the materials from this course will be released in open source currently what you see on the intranet on the CS 101 home page will in some edited form go out and will be accessible to anybody and everybody in the country and in the world we're going to use the creative commons license as I mentioned now it will be very useful if most of you at least those of you who have let's say mark mastered the art of programming either in this course or because the earlier experience and even others who are the first timers could give sample programs or any other useful material if you have written notes if you submit that I will be designing a submission form which will be putting up around the mid-sem if you submit that that matter will be included in what IIT Bombay will release with of course your name and credentials for you more than the credentials you will be contributing to lakhs of other students who are learning programming and who might benefit from whatever you contribute this is of course provided you believe in the open source the open source retains your credit retains your copyright but it permits anybody has to copy use modify mutilate whatever that's the purpose of this additionally transcription of the audio lectures the audio video lectures are put there the transcription in English we are trying to get it done through some staff but I noticed that there are several students here who at least in the first few weeks had tremendous problem understanding English you will agree that there will be lakhs of such students all across the country so if anyone or more of you are interested in transcribing these lectures or even preparing the notes in other Indian languages you're most welcome to contribute I would expect at least an email for positive intent in which case I could organize some additional support for such people because when we do this material release in open source we would like it to be commensurate with the stature of the institution like IIT Bombay is putting something out it must have some added value as compared to other things that come out on the web okay we now go over to the matrix multiplication continuing from where we left off yesterday unlike the solution of simultaneous equations where I have a square matrix to deal with because I have n equations and n unknowns please remember that even in the solution of linear equation system it is not uncommon to have more equations than number of variables such a system is called over determined equation set so there could be an over determined equation set there may be for example ten equations then you have only five unknowns and if all ten are independent in some sense then it is possible for you to use any five of those however if you have ten equations and over determined set permits you to deal with numerical inaccuracies in a much better way however in general you would be dealing with n by n matrices now if you are two matrices one is r by m and the other is m by c which results in a matrix R R by c how would you do the matrix multiplication well each element R i j of the product matrix is a dot product of i th row and j th call yesterday we had discussed the dot product is a simple code which implements the dot product so for i equal to 0 to R and j equal to 0 to c so R and c are the two dimensions of the resultant matrix I am calculating the sum which I am accumulating in R i j itself by multiplying a i k by b k j varying k from 0 to m that is the standard matrix multiplication formula now this is the gist of the program but the way you would write the program and that is very important the way you will write the program should be such that the program is self documented so I have given some examples earlier here is an example for it so after include i o stream f stream whatever whatever whatever I write the whole lot of commands in fact any program that is submitted as a part of a worthwhile software system is considered completely useless if it is not documented in line in line documentation means within the program comments of this type as a matter of fact standard software development often mandates that the comment shall be of the following form although we don't have any such mandate but our programming standards or coding standards shall stipulate some minimal documentation now ordinarily when you have only two hours in a lab or when you are hurry in a hurry to write answers to your mid-sem question papers and so on the last thing on your mind is to write comments you would like to get your program right it is not a good practice to do that when you are developing software in fact the standard software development practices first you shall write comments in the entire program and then you shall write code which is commensurate with those comments that is considered the professional way of developing an algorithm there is much more to it in terms of analysis and design which precedes any line of coding for example for large systems which let's say are developed by 150 people you are 150 programmers you would expect that the problem is mentioned to them and each one of them starts writing programs that is absolutely sheer nonsense if it is a 10 month project let's say for developing that large program for first two months not a single line of code is written by anyone not a single line for the first two months you study the problem you analyze the problem then you design the software you decide how many functions will there be what main program will do which fights there will be what kind of data will be represented where all of that done then there is a review of the entire design the design is broken into function design modules etc etc only when the entire design is ready then people are said okay now you implement this design using whatever programming language that is been decided upon that is an important practice which you don't get used to there is something you will know during the project but this is just an exam here I say program for multiplying two matrices the authors are written the credentials are important to include your organization name like department of CSE IIT Bombay now this is a sample program for CS1 also is a purpose where the program file is written here so matrix multiplication dot CPP this is the name of the file itself sample input data file matrix dot text sample output file out matrix dot text you can see the immediate relevance of writing all this anybody who reads this program will know how to look for this file to look at the sample look for this file for the program it's wrong it is not uncommon either here or elsewhere to prescribe the entire directory path where that file is here is the use of if not sure so if I am going to use the if not sure thing at all I will use this if not sure here this is a sample so for example if I have used the minus D flag for compiling then the first line I will get will be debugging statements it will sort of tell me that either part of the output or all of the output that I will see on the screen is part of my debugging state in the absence of this line I will assume that the output produce is the normal output again this is not a standard convention this is how I would like to use it at the beginning of the program I put such a statement and then wherever I am not sure I will use the same structure to put some additional out here is an example of using compile time constants to declare the sizes of the array you remember we have said that I can say int mat a 10 or 100 or 50 or something please remember I can't in general say mat a n some people have made that mistake in the exam you cannot use a variable to define the size of an array because the size of the array must be known to see plus plus compiler to allocate so many locations you can't say size a and this is very important to understand because many people have made that mistake what would such a statement do you might think that since I am reading the value of n that value can be used to define the size of the area but remember the time difference the allocation of elements to this array has to be done by the compiler much before the execution starts the value of n will be supplied by you only when the execution starts so you can't say that use that to size the array size has to be fixed at what is known as the compile time that is whenever the compiler number c plus plus compiler looks at your program whatever it looks at it should be able to infer the size now going back to this particular example I have used here a variable size a by size m are these variables yes and no before this is declared I am giving a value which is a constant value not a variable value this is for this is for this is to when compiler reads this statement it has actually the knowledge that this variable has a value for this variable as a value for this variable as a value to so these are constant values as far as compiler is concerned and it will use these values here as a matter of fact there is a c plus plus syntax which permits you to define integer constant with variable names what is the advantage of doing such things here why why do I say 444 later on we shall see that such definitions are useful because by recompiling it without changing the program code I can change the array sizes remember I will not use it only for array sizes all my loops might run from 0 to size r i minus 1 0 to size m minus 1 etc. so they they automatically solve the purpose of n which is ordinarily variable is just one way of doing things not necessarily the best way is just to illustrate that variables are ordinarily not permitted to declare the sizes of the array however when the variables have been given constant values in the same program so that compiler understands how many locations to reserve then and only then such a thing is permitted here is a program part which reads from the in matrix file the in matrix file is matrix loss test there is a test if in mat file dot is open we have not understood because we have not studied the file declaration file handling at all we shall do that later but this is just to give an exposure that instead of using c in you can actually invoke a file please remember that c in requires you to give data from one stream typically it is keyboard and if you use redirection it could be one file however in larger programs in larger programming systems it might be required to read data from six different sources simultaneously for that program to execute take for example your academic grade processing system there is a file which maintains data about whether you have paid the fees or not that is with the account's office there is a file which says whether you have registered for the courses or not there is another file in the hostel which says you are inmate of this hostel you have paid the mess bill or not whatever what now these all will not never ever be kept at a single location in a single file so obviously if you are writing a program which does something comprehensive on all this information in that program you will be required to read data from multiple sources these multiple sources are different files and consequently it is important for you to understand how I can open a file read data from it close a file or write data on to a file I might be wanting to write data similarly not only on c out but on 20 different files so that is the reason why these files are important currently you take it only as a exposure value so I am reading this file and I print matrix A from 0 to size i and from 0 to size m because the first matrix is r i by m in exactly the similar way I read matrix B which is from size m to size r j so I am using r i for fixing the number of rows of the first matrix I am fixing r j to mention the number of columns in the second matter that is what is important I close these files if I can't open this file this else corresponds to let me go to the previous slide if in mat file is open then I do all this that means I have found a file and I have been able to open however suppose you run this program from a directory which does not contain that file then the operating system when it attempts to open a file because c plus plus wants that file operating system says sorry I can't find the file if that happens then this if statement will turn out to be false and you will come out here and when you come to else you'll say c out endl unable to open file this else statement closes here what else should be written here any suggestion is this adequate please remember that whether the file is open or not if the file is openable I will read the matrix if the file is not openable I will produce this unable to open file but in any case I seem to be going ahead with the matrix multiplication does it make sense to multiply matrices which I have not read at all so that means I should not go here unless I do something here so what is that something I should do else whatever see how return 1 ordinarily I say return 0 why I can't I say return 0 will it be wrong if I said return 0 first of all you agree that a return statement should be there that means my entire program should now be terminated because if I have not been able to open the file there's no merit in my trying to do matrix multiplication the question that I am asking is that return statement has to be there ordinarily we understand we write return 0 here I have written return 1 why is that so the reason is as follows in fact you will recall our discussion on writing functions we had written a function which was reading a file containing student marks etc and that function was returning a value which was equal to the value of the number of students actually every function is capable of returning a value of the type which is defined for that function so like if you define the function to be in it will return integer value float it will return a float value etc etc the main program that we write is also a function but it is not a function which you call it is a function which the operating system Lambo calls consequently just like any function within your program the returns of value to some other place in your program itself our return from the main will return a value to the operating system ordinarily operating system would not be concerned with the value that you return because it only understand that you have finished your job it will kick you out take somebody else's program or whatever else will show you the dollar symbol however it is often important for the operating system to understand whether your program executed correctly or your program executed wrongly the return value is often used by the operating system to determine that so if you return a value zero the operating system considers that your return is normal any abnormal value will say your program has not worked successfully somebody asked me a question yesterday how does it matter to the operating system after all the program has finished execution with a right or wrong is the program is responsible what will operating system reduce with such an information and that is because you cannot perceive of a system beyond operating system the example that I gave him I'll quote again consider a larger software which is working for railway reservation how many of you have done internet railway reservation many of you so what you do when you log in on the web page you get the IRCTC site and let's say you find out frontier mail so much reservation you give all the data there is some operating system in the IRCTC basically sitting in Delhi server which is probably maintaining files containing different train reservations and water when it confirms that it has seats it asks you to pay money typically you would pay money using credit card and that site will say okay who is your bank let's say city bank then that system will divert you to a city bank site which is actually as a server in Chennai let's now Chennai has another operating system Chennai has other set of programs and that is where it will collect money from me from the car it is important for the Chennai operating system to know whether my program has succeeded in giving money or it has not succeeded why because that operating system has to communicate with the operating system in Delhi whether the money has been collected or not collected it is therefore always important that whenever you exit from a program some indication to some higher authority is given whether the program has executed properly or program has executed improper the rest of the program is very straightforward we have already seen that I will just show you the glimpse of a program so there are two aspects of this program let's very quickly go through the slides the first slide here contains a lot of comments I would like you to write comments on the second third fourth and fifth slide there are some comments here which says matrix multiplication some comment which says read input matrix some comments which say real output matrix ordinarily when so much of explanation and discussion has accompanied such a program this much is sufficient but if you want to read a completely fresh program out of the blue then unless you have detailed documentation it becomes very difficult to read as an example how a program is very difficult to read I have listed here this is the contents of the input file is a 4 by 2 matrix and another 2 by 4 matrix when I execute this program matrix multiplication it produces matrix and matrix B wrongly again because it is using C out but the output is contained in a matrix called out matrix dot text this will be printed out by C out like this observe again that while 13 18 23 28 etc appear to be printed in an aligned fashion six at 10 12 get compressed here because they are single digit numbers so this is a question to ponder how to create an output with values which are properly aligned for example 100 should be towards the left not exact one should not be aligned to six as in this case is just to keep you thinking we shall discuss the formatting after the mid-sem it's not relevant to the mid-sem now here is an example I will just quickly grasp through the slides there's no time to look at it I don't want to explain it I want you to read this program to figure out what it is doing the title says file indexing look at this can you make sense out of this there is some indication of what this program might be doing from this page because it has roll number assignment marks file index there is a in marks file what I'm going to do is after this slide is uploaded I will also upload the example dot cpp along with the input file and the exercise is to figure out what this program is doing and what why it is doing this will be useful exercise this is the complete program and I will also put that input file which is actually input file containing roll numbers quiz marks assignment marks exam marks etc etc you have to figure out what this program is doing you take that as a homework for Thursday lecture thank you very much


We're here at the Royal BC Museum and we are officially announcing BC Family Day. People have asked for a holiday in February for quite a long time, many of the other provinces have it. It's a long time between Christmas and Easter for people not to have that break of a three day weekend. Well, it's a really great day to just recognize how important families are to our province and to our communities and in our lives. So while it's just one day, I think it's a celebration and a recognition of the importance of families in BC. Family Day 2013, the second Monday in February or the third, that is the question. We're out doing a public consultation process asking people, what is the best day for you? Is it a non-aligned day away from the President's Day weekend in the United States so you can take advantage of our fabulous ski resorts when they're a bit wider or would you prefer to see it aligned with some of the other jurisdictions across Canada? There are advantages to both sides of the equation. Over the next two weeks we're going to be asking people what's best for you and then we'll make our final decision on Family Day for 2013.


figures from the witch report, which showed unsurprisingly that the border has a 10th slowest broadband out of 358 local authorities across the whole of the UK. The allocation of £200 million to pilot innovative approaches to rolling out full-fibre broadband in rural locations will go some way in improving the often patchy and unreliable broadband experience in the borders. I am sure that many members here today will agree with that. I thank Rachael Hamilton for taking the intervention. On that spirit of co-operation that she was talking about earlier on, she then agreed with me that the UK Government should actually increase its expenditure into the broadband scheme. I would say to Stuart McMillan that the Scottish Government has been very slow in rolling out the delivery. The money was allocated from the UK Government years ago but that money was not spent. I doubt that you will be able to deliver the broadband by 2021. I set you that challenge, Mr McMillan. We have heard a lot of support for the city deals today, but I think that sometimes the Scottish Government and the members who are here today are in a desperate attempt to stoke grievance. I do advise that they perhaps would seek teamwork and collaboration, but in closing for those benches, city deals and regional economic partnerships. We know that they bring prosperity and investment to the areas that, due to their geographical location, would otherwise be lost out. We support both the Scottish Government and the UK Government in delivering city region deals and support the campaign for every part of Scotland to be covered and benefit from the growth deal. I look forward to seeing both my own borderlines growth deal evolve and the other city deals and the islands deal, too. I hope that they come to fruition in the near future. There is a lot of potential out there, and we know that those deals help to unlock that. Let's see the next round to continue the good work that we have seen to date. Just with the avoidance of doubt, I say that Mr Wightman had the permission of the Presiding Officers and gave advance notice not to be present for closing speeches. I saw a couple of frowns on a couple of faces. That sets the record straight. I now call Jamie Hepburn to close for the Government minister until 5 o'clock. Thank you very much, Presiding Officer. I begin by thanking those members who have taken part in today's debate on what I believe is a subject of central importance to growing Scotland's economy. Jamie Greene said at the outset that he hoped that the Scottish Government would approach the issue on a constructive basis. Let me assure Mr Greene that, of course, we approach it on the same constructive basis that we approach each and every issue that we are discharged with responsibility for. That said, in relation to his amendment, I can say that we will not be supporting the amendment that he has presented today, not because there is anything fundamentally or inherently wrong with the terms that it has set out. However, I believe that it is important that this Parliament sends a very clear message to the UK Government that it is our expectation in the spirit of partnership that the UK Government should match the level of investment. The Scottish Government is investing in city, region and regional growth deals, which it has failed to do so thus far. I thought that Alasdair Allan made a very telling point that he said that what seems to be driving this is the treasurer's insistence on expenditure, delineation along devolved and reserved functions. That comes at the same time that the Scottish Government is spending on the mitigation of the impact of changes to social security and on the delivery of broadband. Of course, those are both reserved areas. On the latter point to Rachael Hamilton, we will meet our commitments in relation to the R100 programme, with the investment of some £600 million of which only £21 million is being delivered by the UK Government. In a minute, I will. However, let me say in relation to the investment that we are making in reserved areas. I heard Jamie Greene say from a sedentary position, so it might not have been picked up for the official report, but I am sure that he was confirmed that he said that. He said that it was our political choice to do so, and I accept that entirely. However, he must accept and concede that the UK Government's decision not to provide equivalent funding to city, region and growth deals is a political choice to one that I regret and one that I hope that it will revisit. Of course, I will give way to Mr Carson. Finlay Carson, please. Can the minister confirm whether the Government is on track to deliver the road map with timings for the roll-out of R100 in July, as it is committed to? Much of that is out to procurement just now, but let me make the fundamental point. We will hit the targets that we have set ourselves. City, region and other growth deals in the regional economic partnerships are inspiring. I believe that there is recognition of their potential in accelerating economic growth in a way that will drive both prosperity and societal equity. The Scottish Government has committed to those arrangements. Since 2014, we have committed almost £1.3 billion to city, region deals across Scotland. We have seen deals for all of Scotland's city regions now agreed or reached the stage of a head of terms agreement and that those deals are providing the catalyst for the development of new regional economic partnerships, bringing together partners to maximise all assets and opportunities for their regions, creating new cross-boundary ways of collaborating and maximising opportunities on terms agreed by local partners. As I mentioned, city region deals are a relatively new part of the economic development landscape. That was mentioned by a few members. Andy Wightman mentioned that Audit Scotland will shortly undertake a review into what has been put in place so far. I welcome them to looking at city region deals at Colin Smyth. Andy Wightman, Jenny Gilruth and Alec Rowley suggested that communities need to be involved more in deal partnerships. I would say that it is of course of fundamental importance that communities are involved in the creation and the design of such deals. It should be a transparent process and democratically elected local authorities should seek to engage with their communities and ensure meaningful connection between communities and the process going forward. Colin Smyth and others spoke about trying to establish a clear timetable for the agreement of heads of terms for those deals that are under negotiation. I am very happy to say in response to what was set out a moment ago by Rachel Hamilton that the Cabinet Secretary will meet the Secretary of State for Scotland next week and we look forward to his confirmation that the timescale that she has set out for heads of terms will be what the UK Government sets out. There have, of course, been challenges, some challenges in getting over the line with the Borderlands deal. The Cabinet Secretary laid that out. Much of this is out with our gift because it relates to investment that the UK Government must make through local authorities in England. I do not think that anyone, any reasonable person, would expect that the Scottish Government delivers that element of the deal. Of course, we want to see progress. If the timescale is as Rachel Hamilton has set out, it will be welcome. Ayrshire was mentioned. The three local authorities have been very clear that they are ready to sign heads of terms this Friday, this week, this Friday and Thursday. We have written to the UK Government to make very clear, abundantly clear, that we are ready to operate to that timescale as well. Thus far, the reply from the UK Government, we have had none. Let me send this very clear message to the UK Government here and now. We remain ready and willing and good to go for this Friday. If the UK Government is listening, I hope to see them in Ayrshire on Friday to sign that deal. Brian Whittle As I mentioned in my speech that I spoke to David McDonnell on Friday, he says that the signing is imminent and that the Treasury has committed to that project. However, in the spirit of collaboration, as you well know within growth deals, there are some devolved projects, as well as retained projects and joint projects. It is well within the Scottish Government's ability to commit to devolved projects, because when it comes down to it, it does not matter to me or to the people of Ayrshire, whether they are the leader or the British Government leader. It just needs somebody to take the initiative. I think that we still lack some significant clarity on the timescale for signing the heads of terms for the deal. Yes, of course, there are investments that we can leverage. We have set out very clearly the investment we will make in the halo project that was mentioned by Willie Coffey. However, in terms of what we debate today, we need a specific timescale, not some measurement on the basis of it being imminent. We are ready to go this Friday, the UK Government should be ready to go, the local authorities are ready to go, and I hope that the imminence that Brian Whittle speaks of is as imminent as has just been set out. There was also a request from Mr Smith about a timescale for those areas that do not yet have any commitment from the UK Government for a deal at all. Argyllun Bute, Falkirk and the Islands, with the best will in the world, if the UK Government has not yet committed to a deal at all, it is somewhat difficult for this Scottish Government to be able to commit to a specific timescale. However, let me say to all members, particularly those who represent those parts of the country, that they can be assured of the Scottish Government's commitment to all areas of Scotland. Bill Bowman said that he was unclear on the Scottish Government's investment in the Tays City region deal. Let me make it very clear that we have said that we will invest £150 million in the deal. Some of the specific areas are £25 million in the Tays City biomedical cluster, £37 million in culture and tourism, £20 million in the regional skills and employability programme, investment that Shona Robison was welcoming, and now that he is more acquainted with the detail, I look forward to Mr Bowman welcoming as well. A number of members mentioned the situation with Glasgow airport. Let me be very clear that the Scottish Government is committed to working with those involved in the airport access project to find a solution to improve surface access to the airport. John Lamont wanted to know that there was proper engagement. I can give her that insurance, Transport Scotland and Network Rail are continuing to work with the airport access project team. Indeed, the cabinet secretary will chair the next meeting of the steering group, which includes leaders of both Glasgow and Renfrewshire council, as well as Glasgow airport. John Lamont says that that might not be good enough, but throughout the debate, we have heard a call for collaboration and co-operation. I think that the process that is being taken forward is a sensible one, and I can see or hear that Ms Lamont is keen to intervene. I am happy to allow that. John Lamont You have mentioned in relation to other projects the importance of clarity of timescale. Will you confirm that the Scottish Government is committed to the surface project, as outlined in the business deal supported by the finance that is there? Will you give us a timescale for the delivery of that project, not just engagement but the delivery of a project that not just Glasgow needs, but the west of Scotland and Scotland as a whole? Jamie Hepburn The timescales that I have spoken about have been precisely about the process of engagement. We need a clear timescale from the UK Government to engage so that we can get the city deals forward. The process that I have laid out in relation to the area that Ms Lamont is interested in is, I believe, the correct one. Jenny Gilruth and Alex Rowley spoke about another rail link this time for Leaving Mouth. What I will say is that city region deals play a hugely important role. No, they are not the sole source of investment. Transport Scotland is working with Fife Council on the Leaving Mouth sustainable transport study. I know that there is stakeholder engagement. That will continue. A preliminary option is under way. I know that the cabinet secretary is due to meet Ms Gilruth as the local constituency representative on the issue tomorrow to discuss further. Let me draw my remarks to a close, because what I want to set out is that through the city region deals, through the area growth deals that we have put in place that we are presently negotiating that we want to see put in place, we are seeing a significant difference made to the country as a whole. It must be for the country as a whole. I go back to Jamie Greene's remarks about a desire for constructive working. Over the past four years, we have worked with the UK Government in partnership on city region deals. The most challenging partnership has delivered results. However, the time now is right to continue to press UK ministers to match our investment. I believe that that is something that this Parliament must do and to press UK ministers to confirm the timescale for the heads of terms for Ayrshire and to join us in common purpose by making a formal commitment to 100 per cent coverage of Scotland with growth deals. I believe that the people of Scotland would expect nothing less, and I hope that the Parliament unites this evening to that purpose. Thank you very much, and that concludes this afternoon's debate, and we're going to go straight to decision time. The first question this afternoon is that amendment 15493.2, in the name of Jamie Greene, which seeks to amend motion 15493, in the name of Michael Matheson, on a city deal and regional economic partnership, be agreed? Are we all agreed? We're not agreed. We'll move to our vote. Members may cast their votes now. The result of the vote on amendment 15493.2, in the name of Jamie Greene, is yes, 28, no, 86. There were no abstentions. The amendment is therefore not agreed. The next question is the amendment 15493.1, in the name of Colin Smith, which seeks to amend the motion in the name of Michael Matheson, be agreed? Are we all agreed? We are agreed. The final question is that motion 15493, in the name of Michael Matheson, as amended, on a city deal and regional economic partnership, be agreed? Are we all agreed? We're not agreed. We'll move to our vote. Members may cast their votes now. The result of the vote on motion 15493, in the name of Michael Matheson, as amended, is yes, 80, no, 33. There were no abstentions and the motion as amended is therefore agreed. That concludes decision time. We're going to move shortly now to members' business, in the name of Monica Lennon, on cervical screening uptake statistics, but we'll just take a few moments for members and for the minister to change seats.


To be competitive, you need to move faster and drive the innovations that meet ever-changing customer demands. That's why you're moving to the cloud. Cloud computing provides the agility to deliver applications at speed, but you might be asking, do I want my teams and budget focused on managing infrastructure? Or is our time better spent focusing on differentiation and higher value activities? Together, Red Hat and Amazon Web Services provide you the speed and agility to deploy applications quickly with a jointly operated and supported service. Red Hat OpenShift Service on AWS. Focus on building and deploying innovative applications, not managing and maintaining the underlying platform. Our global 24-7 site reliability engineering experts take care of that for you. Instead of spending days or weeks setting up your platform, get started immediately with a turnkey application platform that is purposefully engineered to work together, saving you time from integrating your own. With single vendor invoicing and flexible pricing options, you can pay for only what you use or choose a longer term commitment for more savings, and you get an integrated support experience from AWS and Red Hat with a 99.95% uptime SLA. As a native service, you can easily integrate with AWS CloudWatch for logging and metrics across your AWS resources and over 170 other AWS services to build applications faster. To get started, enable the Red Hat OpenShift Service on AWS directly from the AWS console. Accelerate time to value by creating a managed Red Hat OpenShift cluster in minutes. Then deploy your applications using familiar OpenShift tools. Manage all your OpenShift clusters from OpenShift Cluster Manager where you have full visibility into access control, add-ons, network cluster health and metrics, managing your nodes and more. Ready to focus your time and resources on what matters most to your business? Build and deploy applications faster on a turnkey application platform backed by our site Reliability Engineers with Red Hat OpenShift Service on AWS. Get started today.


What's up navigation traders today is Friday December 29th. Hope everybody's having a great holiday week Hope you had a good week of trading Today is the last trading day of 2017 so I hope you had a great year of trading really looking forward to 2018 hopefully we can get some more volatility in this market It's been a very interesting fairly one-way directional market, especially in stocks Which is not always the best for us, but we've definitely held our own But really looking forward to 2018 not to mention all the cool stuff that we have coming out for you our members If you haven't already seen the announcement And you're watching this video and this is the first time you've heard it If you're in your members area you'll find that you've got access to every single one of our courses now So we just we automatically upgraded your membership. No additional cost or anything to you. So Happy holidays to you for that and and basically going forward We're turning it into what we're calling our pro membership where you get not only the alerts, but all of the Training courses that we've that we've created the cool thing for you as members a you're locked in at the $49 a month so as long as you're an active member You're gonna stay locked in at that low cost and as we come out with additional courses Which we're working on a couple right now that'll come out later this year Those are automatically gonna be added to your members area. No additional cost to you just for being a member So I hope you appreciate that. We're really trying to provide more and more value to our members and then for those who Can sign up before January 5th So if you have any trading buddies that have been kind of on the fence on on trying to get going and learn Let them know about this if they go to navigation trading calm for slash pro dash membership If they sign up before January 5th, they're gonna lock in that same low rate of $49 a month or 490 90 year and At because after January 5th the price is going up to 99 bucks a month So if you have any like I said if you have any trading buddies who are on the fence Let them know about that before it's too late or before the price goes up. I should say Let's jump into the alert for this week so obviously a shortened week with December 25th being Christmas, so our first trade started on Tuesday the 26th and The first trade was an opening adjusting trade in soybeans So we added an iron condor and soybeans in the March cycle with 59 days to expiration and as I mentioned if Even though I sent this out as an adjustment If you don't have a current soybean position, this could also be considered as a new trade So if we go to the platform Here's that trade so still very centered not much going on there moving pretty slow and then we've also got Let me reset this here So I can uncheck those boxes So we've also got this The put side vertical of what was an iron condor so new a little bit of up movement in soybeans to benefit that piece I've had a pretty sizable down move in soybeans So it's coming back a little bit today if we can get a little bit of a pop-up take care of that piece and And we'll continue to manage and monitor soybeans So working our way back really nicely obviously we had that huge move earlier in the year in soybeans Let's see if we go to the actual full chart and soybeans you can see a little bit better You know this big down move here that we've been working our way out of almost back to even on this one But that's that's what happens. Sometimes if you have those huge one directional moves You're gonna be in the trade longer managing and justing your way out, but that's working out nicely. So Still still continue to love to trade the grains Especially when implied volatility is fairly low in a lot of other symbols Next trade was an opening trade in EWW, which is the Mexican ETF IV popped up to 58 at the time we put this on I also mentioned if you prefer to find risk you can trade an iron condor with low price symbols like this You know under 50 bucks you just got to be careful about you know If you when you buy the wings you're lowering the amount of credit you receive So you just need to make sure it's worth the transaction costs and the risk that you're taking on the trade So let's go to EWW and check that out. You can see the implied volatility has did definitely come down Intraday was up to whatever I said 58, but it's but it's come down since then If we take a look still very centered here well within our range on EWW So nothing else to do at this point except for weight Next trade was another opening trade and we did this in Ford slash ZN, which is the 10-year notes I'd be percentile with TLT, which is the corresponding ETF. It got up to 56 So we put this trade on and if we take a look at the analysis tab on ZN You can see we've got a little bit of profit here Not enough to take off yet So we'll continue to monitor and watch that if we take a look at TLT the corresponding ETF to look at the implied volatility You can see it's come down. It's contracted nicely So now we just need a little bit more time to pass and for price to stay in a decent range So on this alert, I also mentioned that you know You could do a short strangle or iron condor in Ford slash ZB ZN or TLT So TLT, I just didn't like the amount of credit didn't like the risk reward.  So I I prefer trading the one in the middle, which is ZN So you get a really good risk reward really good credit and And and you can still stay at a small manageable size on this one. We sent out the alert at two contracts So if you're trading a smaller account, you could even do just one or you could look to You know buy the wings and do an iron condor in any of those three symbols would have worked for this trade Next trade was another opening trade in Microsoft. So in this we put on a short put vertical This is a bullish play and part of the reason was it set up nicely for a bullish directional trade Which I'll show you in a minute But also, you know, our portfolio started to get a little bit too short by us. So to help balance that out We wanted to add some long delta to help balance it out a bit So if we take a look at Microsoft And we're gonna be releasing this this charting piece this charting indicator later this year but basically What we're looking at here is, you know, it's had a decent run-up. It's kind of pulling back I won't get into it now, but we've got this these little dots that kind of help potentially signify a continuation pattern in that stock and so we just need a little bit of a pop-up back up to about 87 even is all we need and at that point, you know a book I want to book about a hundred fifty hundred eighty five dollars somewhere in that vicinity for a profit in here before I take that off Next trade was an opening adjusting trade in QQQ. So we added an iron condor in the cues and And as I mentioned if you don't have a positioning cues that this could have been considered for a new trade as well So if we take a look at cues you can see this iron condor still very centered Nothing nothing too much going on there yet. We've also got these other pieces in cues Which is a 155-158 call spread which was Previously part of an iron condor We need a little bit of a down movement more down movement in the cues to benefit that piece And then a very another very similar piece from a former iron condor Which is the 154-157 call spread again needing a little bit of downside to benefit that piece Next trade was a closing trade in FXI So we closed the strangle in FXI for a nice profit If we go to the charts real quick for FXI You can see you got a nice contraction in implied volatility We had made a couple adjustments to this trade In fact, if we just go to the closing trades tab you can see we made One two three adjustments before we closed that out but ended up booking a nice profit of three hundred fifty six dollars on That trade and while we're on these these closed trades. You can kind of scan through here I'll be sending out a an update on performance and you can see that was $356 winner Adobe a $98 winner SPX calendar spread 165 GLD iron condor booked 120 bucks there EEM 116 bucks an Adobe earnings butterfly 343 10-year note short strangle 156 EWZ 147 these are all December trades by do $200 profit there Adobe post earnings iron condor. This is the one that got us with that surprise announcement that came out We ended up just taking a loss here and booking that loss of 587 and then Lastly EWW for 135 so another great month of Trades and by the way, we've produced a new performance page Obviously you guys as members get access up to date live as they happen all the trade statistics But we've also got another page here if you just go to any page on our site click on performance We've got this prefer performance page, which totals up. This is for 2017 64 closed trades average profit 127 bucks winning percentage over 87 percent And then we just break it down by month showing this closed date symbols contracts strategy traded Monthly totals so you can see we June July August September October November and then at the end of each month will total this up so December will be coming soon So hope you like that. Good little addition Going into the new year Let's go back to the alerts. So that was FX I That was this one here Next trade was a closing adjusting trade where we Bought back a strangle in XRT So we closed one of our strangles made over 50% of max profit on that piece still holding the 44 puts and 44 calls which is an adjusted strangle and And as I mentioned, we'll be rolling this piece by next week IV percent I was currently at 66 and then the last trade and the one that we did today was Also an XRT where we opened a another strangle so implied volatility as you see here It was at 66 but it popped back up today up to 75 at the time we put this on and So we put on another strangle. So if we go to XRT Take a look and see the IV popped back up there Go the analyze tab as of course we just put it on so still very centered and then our other piece is the 44 straddle basically Which was a strangle, but it's been adjusted into a straddle and we'll look to roll this to February next week Once we get under that 21 days once we get under that three weeks to expiration remember on these on these Uncover these strangles straddles we like to we like to roll them to the next expiration because as we get closer to expiration That gamma or that risk really starts to accelerate So we've with the back testing and from our trading experience have come to the Come to the realization that The sooner we roll the better so kind of in that two to three weeks to expiration as when we'll roll So we'll get that done next week some of the other positions that we have on forward slash ES which is the S&P futures So we've got two pieces on here. We've got a Short call spread which used to be part of an iron condor so need a little bit down movement to benefit that piece and then we've got a Long put vertical and reset these Got a long put vertical which is just in our portfolio strictly for that hedge strictly for that downside bias And so we need some downside to benefit that piece Natty gas we've got two iron condors in here We've got this one where you can see price has breached our upside break even So I didn't get a question. You know why why haven't we adjusted this yet? Well, part of the reason is we just put it on we've got a lot of time left And if you look at just the untested side the puts you still see we got a little bit of premium left in there So we're at about a hundred sixty dollars. There's a total of two hundred dollars of total profit in that piece So that's in this kind of situation where we've got this amount of time We just put it on sometimes I like to give it a little bit more time to get back in range Especially when there's a decent amount of premium still left in here Now if it stays here or continues higher in the next week, we will definitely make that adjustment But for now, we're just gonna give it a little bit more time And then we've got this other iron condor on here Which is fairly centered So now it this one was actually starting to break Get close to breaking the break even to the downside But we've just had a huge rally last few days in that gas getting that piece back into range So continue to monitor that need a little bit more theta decay to happen time to pass before we book a profit there If we look at the implied volatility UNG's the corresponding ETF Just staying really high So that gas has just been a nice nice vehicle to trade with that high implied volatility Giving us additional credits when we enter those trades. So we'll continue to trade that gas For the time being went over the notes whenever soybeans wheat So we've still got a position two positions on in wheat we've got this iron condor here, which is Got about a hundred fifty bucks a profit one a little bit more So a little bit slight more up movement to book that piece And then we've got another iron condor where price is kind of at the other side of its range Down here. So hopefully we can book the profit in the other one And then you know, this might bounce back a little bit and we can book a profit there as well Similar to soybeans. We're we're working our way back in this nicely almost back to break even in wheat And so hopefully come out the some some profits there in the next cycle or two We got Costco. So this is one where we put on a post earnings short put so They announced earnings here Costco had a big move up above its expected move And what typically happens is price will stay above that level trade sideways to grind higher in this case it has dipped Nothing to nothing to be, you know concerned about and that's why I kept it on in fact You know looking at looking at this if it can hold above that 185 mark, you know, I think we're good there I'd look at and obviously we need a little bit more up movement to benefit that piece You know if we can get back to the kind of the 195 level in in Costco will book that profit and it'd be out of that one DIA we've got two pieces here. We've got an iron condor Which let me click off these two. So it's hanging out near the upper end of the range No need to adjust or anything yet Just need a little bit down movement in DIA to benefit that and then we've got this other piece of what was an iron Condor which is now just the call vertical So I need a little bit of downside to benefit that piece as well EWW I mentioned IBM. So this is a trade that we put on and it has been adjusted We're actually profitable in this trade now Didn't I wanted to get a little bit more profit So if we can get a little bit more theta decay, we haven't gotten any implied volatility Contraction so if we get a bit of implied volatility contraction in the next week That'll that'll push our profits up in this one and we'll book this one IBM releases on the 18th, so we've got you know about 18 plus days before Before they announce earnings, I will not hold this through earnings So definitely want to be out before that point But hoping just to squeeze a little bit more profit out of this one It shows 182 but after rolls and adjustments were up We're up about 50 bucks on the trade, but we'd like to get a little bit more IWM so we've got this piece here Which is part of an iron condor need a little bit of a down move to benefit that piece We'll potentially look to add another Piece to this trade add another iron condor in if implied volatility pops up It's it's still it's decent enough to do it now, but I'd just like to see Potentially getting this popped up over that 50 level that we like to see before we sell any more premium in IWM Microsoft I mentioned this one Cues mentioned that Starbucks. So this was another bullish play that we put in to kind of balance out our deltas hasn't worked out yet, but just down a little bit need a little bit of up movement in Starbucks to benefit that piece So really back up to that 59 level. We'd probably be able to book that profit So just kind of hold on and wait to see in Starbucks But again, one of the reasons we added that was to add some of that long delta back in our back in our portfolio We we don't want to we always want to keep short delta We always want to have a short tilt a short a short bias in our portfolio But we're given getting a little bit too short. So having that long delta in there is a benefit to the overall portfolio Excel you we've got a butterfly on in Excel you As you can see here, we got a little bit of profit a little bit of down movement a little little bit more contraction and implied volatility to benefit that and Then I mentioned XRT. So that's all the positions. That's all the trades from the week Everybody have a great weekend new years is Monday. So the markets are closed. We will not be doing our live broadcast Due to the holiday and in the market being closed, but we will be back with you Tuesday Happy New Year. Everybody. Have a great weekend and we'll talk to you then


Every day we work side by side with our emergency service colleagues to protect our communities. We face some of the most challenging situations together and are there to support Victorians on what may be the worst days of their lives. Today is Blue Ribbon Day, a chance to honour and pay our respects to members of Victoria Police, those we have lost and those still with us and recognise the incredible work they undertake in our society. From all of us at CFA, we say thank you Victoria Police, today and every day.


One of the primary factors of blow-pressure fire is the use of the program, so that they're open. That brings you an important announcement that marks the new high standards of fire safety. For now, General has added to the famous blow-off proof fire with the patented blow-pressure construction, the final factor of safety, the remarkable skid-safe protection of the new silent safety crest.  The blow-off proof fire is patented. It is made only by General, and it is sold exclusively by General Tire Dealers. This General Tire Dealer in your community is a successful, independent person. A real Tire expert with the experience of factory training can call him freely about tires, regardless of length, or about any related driving problems. He will give you personal, interested, and intelligent service. And don't forget, it is through the General Tire Dealer alone that you can get the only truly blow-off proof Tire, the General Tire, with the patented blow-pressure construction. Good evening, ladies and gentlemen. And now, I want you to meet a most versatile gentleman, a man who has accomplished things. You bet I have. And a man who will probably make this the hottest program on the air. Our janitor. I tang you. Maybe I'm in the wrong studio. Say, fellow, what program is this? General Tire. Well, here I am. Doesn't that mean anything? Jack Benny is my name. Pardon me, I didn't get that. Jack Benny. What is it again? Constantine Acropolis. Oh, Jack Benny, yes. Who do you want to see? I don't want to see anybody.  Well, that's news to me. News to you. Say, didn't you see that article about me in the paper? No, I seldom read the one, Ed. Oh, it looks like it's going to have plenty of trouble here, too. Well, tell me, Mr. Wilson, what's your racket?  I sell general tires. No skidding. That's good. And they're not only skid-less, but run on 30% to 40%. Hey, wait a minute. Listen, that reminds me, Wilson. You know, you being the announcer, I'd like to have an understanding right now before we go any further. Well, what's that? You see, Mr. Wilson, for the past two years, I've been having trouble with you announcers. I mean, you always insist on budding in with the advertising. Oh, you won't have that trouble here, Mr. Benny. Well, I'm glad to hear it. Of course, I don't mind if you find the right place for it, you know, but don't keep dragging it in every minute. Oh, I'll remember that. But you'll have to admit that the general tire is absolutely safe. Yes, but you're not. So keep away from me with that advertising. Okay. Hey, say, by the way, Wilson, I'd like to meet some of the people in the company. I mean, as long as I'm going to be here, you know... Oh, of course, of course. Jack, I want you to meet Mr. Bester, the director of the orchestra. Oh, glad to know you, Mr. Bester. The pleasure's all yours. That's what you think, huh? So your name, your name is Bester, A, and the first name... Don. Don, well, that's strange. Don, you're Don Bester, and he's Don Wilson. Well... Two Don and one to go. That's good. That's our boy, our wee hop tonight, and it's only our first program. You seem to have quite an orc here, Mr. Bester. Oh, yes. I've augmented my musical constituents to embellish my symphonic interpretation. What did he say, Wilson? Oh, he says he's pretty good. Well, he doesn't have to use medical terms, you know. Sounded to me as though he read that off of a prescription or something. Mr. Bester, you seem to be a college man. Oh, yes, Carnegie Tech's 28, and you, Leavenworth 10, 31, man. We're just a couple of freshmen out on parole, you know. Well, Mr. Bester, how about a number? I'd like to hear the boys. Certainly. We'll run a little competition that I wrote in title contented. Hmm, that's fine. Glad to hear that. Hello, Mr. Benny. Oh, hello. Remember me? Your faces. Don, who? No, Dan. Well, that helps a little. So long, Mr. Benny. Hey, Yonder, wait a minute. It looks like, you know, it looks like we're going to be together for quite a few weeks, and I was just wondering if, you see, I happen to be a little short tonight, and I was just wondering if you could let me have five until next Friday night. Glad to have seen you, Mr. Benny. So long. I've got to go now. Play, Frank. I mean, Don, it looks like I mixed up with a cheap crowd again. Let's go. Hi, cooking boys. You got there, Don. Thank you. Of course, I doubt whether up there or whether it's a double. That's the end of the video. Who is a wrestler from the Coles? Mr. Benny, there's a lady at the door that wishes to see you. Send her in. Right this way. Well, Mary, well, well, what are you doing up here? See, I'm glad to see you. Well, I just thought I'd drop in and see how your new program's coming along. Yeah, sweet of you. I ran up here without having any dinner. See, I'm starved. Oh, waiter, waiter, will you get me a ham sandwich? Mary, that's Don Destro. Oh. Well, what's he wearing that apron for? That's his dress shirt sticking out, you know. Well, don't tell him. No. By the way, now. Well, I've been around looking for work, and I found a job yesterday as a private secretary. Isn't that swell? A private secretary? Yes, nice work. How'd you get it? I told him your recommendation, but I got the job anyway. You did, huh? Well, that's good. Is the boss like your work? Does he? At the end of the first day, he put his arm around me and kissed me. Oh, he did? Mm-hmm. You think I ought to go back there tomorrow? No, not if he's that appreciative, I wouldn't know. Say, Mary, I want you to meet Don Bester, our new orchestra leader here. Mr. Bester, this is Miss Livingston. Farmed, I'm sure. Oh, my word. Oh. He isn't he cute? Mm-hmm. Say, Jack, who do you remind you of? Somebody. Now, don't tell me. I won't. I won't.  Boris Karloff, man. Yeah, but that isn't the one. I give up. Well, Mary, I'm glad you came up, huh? Oh, who does that fella look like? You mean Don Bester? That's it. He looks just like Don Bester. That is Don Bester. Then I was right. I noticed he resembled us right away. Yeah, now we're getting someplace together. Oh, Jack, you should have been over at our house last night. We had the slowest party. Yeah, I wish I'd have known us, Mary. Everybody was there. See what a blowout. But when you use the general tire, you will have no blowout because it is soft, flexible. There it goes, Mary. There it goes. Yeah, I'm going to have that same trouble here. Oh, who's that tall handsome fella? What do you think, Jack? Yeah. Wilton, this is Mary Livingston. I know Mary. Hello. Hey, Jack, who does he remind you of? I don't know, Mary. Lord Bernard Gandhi or somebody. You better run along now. All right.  What? I met Frank Parker today. He opened up a music store on 8th Avenue. That's nice. How's he doing? Oh, it's terrible. He just can't seem to get started. Oh, that's too bad. I'll tell you. Let's go over and see him. I'm sure he'll appreciate it. Oh, I haven't got the time now, Mary. You know, it's a program. Oh, but, Jack, it's only two blocks in here. Come on. You know, he'll be so happy to see you. But Mary, I'm busy right now, you know. There's nothing doing around here anyway. Oh, all right. Let's go then. Play, Frank. I mean, John. See, I'm all mixed up on this. Here you are, driver. I think it's a place here. He's never known it was a music store. That doesn't put a sign out or something. Well, Mary, let's go in and see him, huh? Hello, Parker. How are you, Jack? Well, hello, Mary. Hello, Frank.  How's business? Oh, it's... I see. Aren't you making any money? No. Last week, I lost $100,000. I'm sorry. I'm sorry. I'm sorry. I'm sorry. I'm sorry. No. Last week, I lost $100 and the week before, $200. Well, why don't you close up this week and break even? That's a good idea, Mary. Say, Mary, who does he remind you of? Uh, Frank Parker. That's marvelous. That a girl. You know, Frank, I know what's the matter with this place. It's a music store, all right, but nobody knows it. You've got to have a little noise around here. A little excitement. I'll show you what I mean. Mary, you go over to that piano. See, we'll help them out. Frank, give me that fiddle. Here you are. Mmm, it's a shred of areas. Do you mind if I use it? No, go right ahead. It's an old one, anyway. Oh, well, that's a trouble. You ought to get some new stock in here, you know.  Let's get a little excitement. Go ahead. That's it. We get a little thing going. Sign up this music store, eh? Wait a minute. Wait a minute, wait a minute, fellas. You see here? See, here comes the customer already. Uh, good evening, madam. What can I do for you? I'd like a copy of Going to Heaven on a Mule from Wonderbar. Uh, Going to Heaven on a Mule? Yes. I'm sorry. We're all out of that. Any other place you'd like to go? No. Well, matter, we, uh, we won't cope here, though. Anything else? Let me see. Give me a copy of Your Time is My Time. Yes, ma'am. Here it is right here. Your Time is My Time. How much is it? Uh, three dollars. Three dollars? What for? A dollar for Your Time and two dollars for My Time. You see, My Time is very valuable. Oh, here comes another customer. Go ahead, Frank. See what you can do. How do you do, sir? What do you wish? Brother, can you spare a dime? Yes, sir. Here's the copy. I'd sooner have the cash. Oh, all right. Here you are. Thanks. Well, what do I do now, Jack?  The fine businessman. Mary, get behind the counter while I check up on the stock. Okay, Jack. And don't forget, everybody buys something. If you haven't got what they want, show them something just as good.  Here, if somebody wants St. Louis Blues and we haven't got it, I'll give them the Cincinnati Reds. Mary, what's the matter with you? Mary, that's a baseball team. That's what they think. Oh, I get the word. Remember, the customer, the customer is always wrong and no money will be carefully refunded. I get it. How do you do? Uh, what do you wish, madam? Alice Blue Doll. Yes, ma'am. What size? I want plain Alice Blue Doll. I understand, but do you want to put dust around the house if the evening wears? Mary. No, I want the song. Da-da-da-da-da-da-da-da-dom. Oh, I see. Jack. Yes, Mary. Have we got da-da-da-da-da-da-da-da-dom? Wait, I'll see. No, no, no, but we've got da-da-da-dom. Da-da-da-da-dom, da-da-da-dom. Uh, how about that, madam? No, I want da-da-da-da-da-da-da-dom. But we haven't got da-da-da-da-da-da-da-da-dom. No, ma'am. You see, all we have is da-da-da-dom. Da-da-da-dom, da-da-da-dom. I don't care. I want da-da-da-da-da-da-dom. All right, all right. We'll order a coffee for you. Good day, lady. Good day, and this is the last time I'll ever come in here. Hey, Jack, who does he remind you of? I don't care and don't bother me. Oh, they care so much. Did you make a sale, Mary? No, I'm just taking a dollar out for lunch. Well, Parker's better than playing the horses, you know. Um, good evening, madam. How do you do? Hmm. How do you expect that from Duke here? No, we have the quartet from Ducktooth, I think. I don't think I'd care for that. What kind of moon songs have you? Moon songs? Just a moment. Oh, Miss Living's Leather. Uh, yes, Mr. Bennington. Uh, what kind of, uh, what kind of moon songs have we? Uh, Shine on Harvest Moon underneath the Hall of Moon, and I hate to see the evening sun go down. Uh, there you are, madam. Which one would you like? The last one strikes me. How does it go? Goes like this. I hate to see that evening sun go down. Hoot, hoot, hoot, hoot, hoot, hoot, hoot. Never mind, never mind, never mind. I'll take a can of tomatoes. Yes, ma'am. What team? What team, madam? Oh, say, I just thought of something. I want to hear Orchids in the Moonlight. Yes, ma'am. We'll have one of our regular men for you. I wish you would. Uh, Mr. Parkinson. Oh, Mr. Parkinson. Yes, ma'am. Hmm. Try and help, Lafella. Will you sing Orchids in the Moonlight? I'll be glad to. What's that, another tale? No, I have to go out to lunch soon. Sing, Frank. That was Orchids, Orchids in the Moonlight, sung by Frank Parker. Well, madam, can I send you a copy? No, I'll take Frank Parker. Wrap him up. Very good. Goodbye, madam. So long, Parker. Oh, Mr. Livingsmore. Yes, Mr. Benningworth. We'll have to both sing. Yes, ma'am. Yes, ma'am. Oh, Mr. Livingsmore. Yes, Mr. Benningworth. We'll have to both sing up our instrument trade. What are we getting for piano? Four dollars. We'll cut them to three and a half. We have too much stock as it is. Oh, another customer. Looks like Don Vester. Who do you remind me of? Quiet, will you? Yes, sir. I am an orchestra leader. I'd like to see a baton. Well, here you are, sir. This is guaranteed to lead 25 men to keep strict tempo. I don't like to look at that stick. That's all right, the orchestra boys never look at it anyway. You know what I'm trying to say? All right, I'll take it. By the way, I want some music, too. Okay. I'd like to get a copy of the Chimney Exhaust to find this way into your optics. You mean smoke gets in your eyes? Yes. If you want to be vulgar. Repeat that line. It's a good laugh. I want to hear it. Go ahead, Frank. I say yes, if you want to be vulgar. That's good. I think that's cute, huh? Here you are, sir. That'll be a dollar 30 cents. A dollar for the stick and 30 cents for the music. Here you are. Goodbye. Goodbye. Step right over here. That's what it is for you, like to hear. I'd like to hear the signature and buckle. I'm afraid we can't... I'm afraid we can't get too stoop legal and see they don't come sour. That's a good radio. But then I... I'm sorry, huh? Well, what can I hear now? Well, I can give you something good. Now listen. Do it now. Mary, turn the radio off, please. That's just a small thing, you know what I mean. Well, how, um... How did you like it? Free. Well, I'm sorry. Come in, um... Come in again sometime. You should live so long. Say, what's your name anyway? I'd like to keep track of all our customers. Ginsburg. Ginsburg, and the first name? Dunn. Where are you from? Morton Donny. Yeah. How do you do? Anything for you, sir? I'd like to buy a musical instrument. Yes. What kind? Microphone. Funny, we have one right here. In fact, it's the only thing we have left in stock. Do you mind if I try it out? No, no, no. Go right ahead. When you're thinking of buying tires, go to the general tire, blow out through the tire with an even silent safety thread. Well, the safety is impossible. Yes. What did he remind you of? To the day. What do you say, Parker? Okay, Jack. What's that, Parker? A sale? No, we might as well all go to lunch. At a boy. Let's go, huh? Da-da-da-da-da-da-da-da-da. Play, Frank. I mean, Don. What's the important thing is how many more safe miles are left in warmer weather means faster driving and longer trips. That's when weak tires fail. Don't risk the terrible consequences of an unexpected blowout. The general blowout through tires give you what no other tire can. The absolute protection of riding on 30 to 40 percent less air. See the general tire dealer tomorrow. The store of this independent tire merchant is not only a quality headquarter, but bargain hunters will find his wax always full of new and used tires of all lengths taken off in exchange for blowout through general. For your own safety and the security, remember this. It's the patented low pressure construction that makes general the only truly blowout through tire. This exclusive feature plus the new silent safety thread makes general the safest tire ever built. In Canada, general tires are built by the general tire and rubber company of Canada Limited, Toronto. This is the last number of the first program in the new general tire series. Well, folks, I hope you all enjoyed our half hour and we'll get to you again at the same time next Friday night. Oh, Don, too many Dons on this program. Good night, folks. This is the National Board Country Club.


Welcome back to the session on latex. In session 12, we explored the different ways in which we can style and typeset our content using different font styles and sizes like text BF, EMPH, large, huge, etcetera. Session 13 was a bit more interesting as we could finally add colors to the text and page. We also mix two colors to get a different color. Session 14 dealt with alignment. By default, the content is justified. To change the alignment of a large part in the document, the commands are flush left, flush right and centering. To change the alignment of only a certain part, it is advised to use environments which are flush left, center and flush right. In session 15, using the set space package, we can typeset the entire document or a certain part in single one half or double spacing. We also looked at vertical and horizontal spacing. Some of the most used commands are V fill and H fill. In session 16, we learnt to organize content into points. Itemize enumerate and description environments help us do the needful. In session 17, we looked at typesetting mathematics in latex and experienced how beautifully typesets with hardly any efforts from our side. We covered basic mathematics, finding unknown symbols by drawing, fractions, summations and changing the size of the braces. In the last session, we explored some more concepts like typesetting integration, limits, matrices and equations. This completes topic 3 of our course. Thank you. Have a nice day.