Good morning. Today, we are going to discuss another important control structure which permits us to repeatedly execute statements in a program. To begin with, however, we would look at a few facilities in C plus class which permit us to write sort of abbreviations for instructions which would otherwise become longer. It is not necessary that you use these abbreviations. You can use the full form as well, but this is just to introduce you with the facilities. In the process, we will also look at the complete table of precedences that C plus plus follows while evaluating expressions and also the associative rules for operators at the same precedence level if they occur multiple. We will of course end with some important announcements at the end. So, these are some shortcuts which are available in C plus plus. All that they do is they make instructions simpler to write, but they should be used with care because sometimes the abbreviations are so powerful that you could make a mess of whatever you write and not write semantically correct programs. For example, when you make an assignment operation which actually changes the value of the left hand side object, x is equal to x plus something, k is equal to k multiplied by something, m is equal to m minus 1. So, observe that in each of these statements, whatever is appearing on the left hand side, its value is being modified either by multiplying it with something or by adding something to it or by subtracting something. In all such cases, C plus plus provides for an abbreviated assignment operation which can be written as what is shown in the last three lines of the slide. So, when you say x plus equal to 3.75 star y, it actually means x is equal to x plus 3.75 star y. Is that clear? It is an abbreviation. You need not use the abbreviation, but it is sometimes found even in professional programs. So, at least you should be able to understand what abbreviation as it stands for. There is a special abbreviation when you want to increment or decrement the value of an object by 1, by 1 not by 5 or 7 or 24, 2.75, but by 1. So, observe that you have to write m is equal to m plus 1. What will that statement do? It will take the current value of m, add 1 to 8, find out a new value and assign it back to m. It is called the increment operation. We will soon see beginning with these lectures now when we discuss the for and while control structures that such increment and decrement operations are very frequently required in our programs. For that C plus plus has special provision of abbreviation. These are called post increment and pre-increment operators.  This is same as n is equal to n minus 1. Is that clear? It is an abbreviation. However, there is possible confusion because C plus plus also permits us to write the same operators in a post form which is i plus plus j minus minus. Curiously, i plus plus also means i is equal to i plus. j minus minus will also mean as j equal to j minus. So, how do you distinguish? For example, both these statements amount to the same thing. This amounts to saying j is equal to j plus 1 and this amounts to saying j is equal to j plus 1. So, you see there is no difference apparently in terms of the intent. You want to take the present value of the object j and add one to it. However, since these two forms are provided, there must be some difference. So, as you can see here as standalone statement, you just use this statement semicolon. This is exactly what it means. There is absolutely no difference. However, there is a difference because these operators can also appear in a larger expression. When they appear in a larger expression, the meaning could be different. The post increment operator means that the original value of the object will actually participate in the expression evaluation. The expression evaluation will be completed and then the effect will be given to the incremented value of that object. So, for example, you have m n j and j is equal to 5 n equal to 2, some arbitrary value. Suppose, I write now an expression m is equal to j plus plus star n. This is a varied expression. As we shall see, plus plus minus minus operators have higher precedence than star slash etcetera and they are called unary operator. You know what is a unary operator and a binary operator? A binary operator is one which requires two objects to operate upon, a plus b. So, that plus is a binary operator. b star c. So, star is a binary operator. Not in the binary number system, but it requires two operators. Any operator produces a value of finite. A binary operator operates upon two operands and produces a value. Unlike that, there are unary operators which require only one operand, j plus plus. j is the only operand and the effect is to increase the value of the error. Minus p. Minus p is also a valid expression. Here, the minus operates as a unary operator. It only changes the value of p to negative of whatever. So, unary binary operators could be there and there is a precedence rule which will make it clear. Coming back to this, then I write this expression m is equal to j plus plus star n. Observe the semantics or the meaning. The meaning says m is equal to j star n. j is equal to j plus 1. That means, first whatever is the current value of j is utilized to evaluate this expression. Result is assigned to m and after that, j is increased by 1. So, effect of j will occur after the expression is evaluated. That is why it is called post-input. On the other hand, if I use the same declarations and same initial values of j equal to 5 and 2 and say m is equal to n star plus plus j. Now, observe that this is a pre-incremented. So, this in effect is equal to or is same as j is equal to j plus 1 followed by m is equal to j star. So, let us look at. So, what will be the value of n in the first instance? I of course, must also tell you what is the value of j. Otherwise, it will be meaningless. Let us say j is equal to n. So, n will be equal to 10. At the end of this, n will be 10 and what will be the value of j? 3. In this case, n will be 15 because j would have increased before taking part in this expression evaluation and j of course, would be. Is this clear? However, if you ask me why it is perfectly all right to use j plus plus or plus plus j as a standalone operation, wherever you want to increment or decrement the value of an object by one, it is not very useful and clear to use such things inside larger expression. So, I have discussed this merely to tell you what the rules are and if you ever see such a construction in any expression in a program, should be able to understand what they mean. That is why you are concerned. I would suggest avoid using such things because there is no reason to confuse yourself and to confuse others who read your programs. Is that ok? That is why the word avoid is written in bold. Here is the table of all precedences. You need not copy this down. I have given a source. There is a internet source where this table is given. Most of the C plus plus books will give this detailed table. Other tables in the books may not be as exhaustive. There is indeed one operator here which we have not yet seen, which is called the question mark operator. Observe at number 9, question mark polar. Who is this fellow? We do not know. We will not bother about it right now. At an appropriate point, we will discuss all the other precedences. The 0th precedence of course is a pair of parenthesis. Any sub-expression you put in parenthesis, that must be evaluated first. Common sense rule. This is followed by the post increment and decrement operators first and this is followed by not plus plus minus minus that is pre-increment, unary plus unary minus. They are all at the same precedence. Then are our favorite multiplication, division and modular operators which appear at a precedence higher than addition and subtraction. I hope you understand what is meant by the associativity rule which is written on the right. What do you mean by left to right, right to left, left to right? Any idea? So what is associativity? Associativity rules come into picture when you have a sub-expression or expression which has operators which are all at the same precedence level. Remember I said that c plus plus is a very exact language. Now, in this particular case m plus n minus 4, you will say it should not make any difference. Whether you subtract 4 from n plus and then add the result to m or you add m and n and then subtract 4 should make a difference. Indeed, it would not make a difference in this case, but in case you have operands which are of different type, you know the rules of c plus plus, it will change integer to floating point if operands are different type. If operands are of the same type, it will actually execute the integer operation etcetera. And therefore, it could actually make a difference depending upon which part of the expression is evaluated first. So, the rule of c plus plus is that if there are operators at the same precedence level, then within those operations the associativity rule will take care of evaluation. So, in this case the associativity is left to right. What it means very specifically is that first this will be evaluated, some value will be found out and then this will be evaluated to find the result. Is that clear? That is what associativity means is very simple. But this is strictly followed, no confusion about it. Just to mention that addition and subtraction listed at number 4 appears after number 3, which is as per our convention of precedence. Within the comparison operators there is a small distinction. All comparison operators are not at the same level, less than equal to greater than greater than equal to are at one level of precedence. So, obviously if there are multiple operators like this, you know how to handle that left to right. The equality and inequality comparison is at the next level of precedence. Remember equality is represented by equal equal and exclamation mark equal for not equal. This is followed by the Boolean operators, logical operators which is logical and logical all. You have to write it as and and or that is vertical bar, vertical bar. Question mark we do not know. The last one is what we just saw, special abbreviations for the assignment operation. So, equal to plus equal, minus equal, star equal, slash equal, modulo equal. These are all these special forms of assignment. That is clear? No, no confusion. Yeah, the pre increment plus plus j. No, that is j plus plus, post increment. What you write? What you see that? So, post increment has a higher precedence than pre increment. So, you know what the modulo operation is? If value of m is 13, m modulo 7 will be how much? 13 modulo 7, 7 ones are 7. The result is 6. This result will be assigned to m. So, this value 13 will become 6, right? All that this statement says is, I can say m modulo equal to 7. Clearly, the right hand side should turn out to be an integer value. Otherwise, the modulo operation would not make any definitions. We shall see that example in one of the things today. Very simply, if I have to combine several different comparisons to generate a truth value. In fact, we might as well discuss this example now because in all our conditional executions and in some of the expressions which we will use for condition definition in our iterative examples, we will need to understand. You remember the bus travel problem where we said the age of a person, if it is greater than 12, but less than 60, then the person should pay whatever. Such an expression, a condition could be written as age greater than equal to 12 and age less than equal to 60. So, we are looking at the age which is given as such a value. If age is 53, it will satisfy this condition and it will satisfy this. So, you will observe that anybody whose age is as per these two composite conditions has to pay the regular. Here what we are doing? There are two separate comparisons. Each one will result in a value true or false and this and and merely says true and true is true, false and true is false, true and false is false, false and false is false. So, this logical and operator does this. These are all binary logical operators, the and and all. So, at one time they will operate upon two operands which are on either side of this. If you have to combine three conditions, you can say this and and this and and this. In fact, you can write a logical expression as complicated as a numerical expression. This and and this, all are this and and not of or or whatever whatever. Only thing is you have to be very careful on the meaning of that expression that you write. But yes, it is possible and all of this will evaluate to what? All of this. This will be evaluated to true or false. This will be evaluated to true or false and this will also be evaluated to true or false. So, finally the value that this logical thing gives you is either called true or called false and we had discussed this. C plus plus actually allocates what value to true and what value to false? 1 for true and 0. Also, inside a bracket, if I write an arithmetic expression t star 7.5, where I should have written a condition, the computer will actually evaluate t star 7.5. Suppose t is 2 or 3, let us say. So, if it is 3, what value you will get? 22.5. Now, this is neither 0 nor 1. So, when C plus plus has interpreted a numerical value as a logical value, then the interpretation is if it is 0, it is false. Anything else true? So, 22.5 will be true. 73.78142 is true. Minus 20,000 is true. Anything 0 is false. With this, we now go back to our problem of finding out maximum of 5 given numbers. You remember this program? We had discussed this last time and we had said that if we had to develop that tree-like structure for comparison, even for 3 values a, b and c, we got into a bit of a mess. If a greater than b, then if a greater than c, then max is a, s max is c. Else, again b and c comparison, etc. And we observed that if we had to do it that way for even whole objects, we would be completely confused. But we saw an alternate way of doing things and it turns out that this way is extendable. It is in this context that we had seen that if I have to find out the maximum of 5 numbers, the best thing is to read a number, assign it to be the current maximum. So, we say max is equal to a and then keep comparing with this max every other number. So, the next instruction says is b greater than max, set max to b. Is c greater than max, set max to c, etc. In terms of actual operations, this particular program may end up doing additional assignment operations which may not be very easy. Consider this for example, the values a, b, c, d, e that you have given are actually in the increasing order. Now, what this program will do? It will assume a to be maximum first. Then it will get b and find out b is greater than maximum. So, it will say max is equal to b. Next number is greater than b. So, that means it will end up doing every time an assignment which will be completely erased by the next assignment and so on. Point is you will get correct answer. The problem is this. Many problems will have large number of values. So, take this case. You have to write a separate instruction for comparison with every new number. So, suppose instead of 5 there are 10 values, what will you do? In a, b, c, d, e, f, g, h, i, j and then you will write those many instructions. Suppose you have 100 values a, b, c, d, z, then a, a, a, b, a, c, a, d. Of course, you can construct very many names, but you will have to write first read the first number, assign it to max and then 99 different instructions. If you have to compare 1000 numbers, the number of instructions that you write in a program is a major, not only of the length of the program that you write, but generally of the complexity of the program. Larger the program, it is expected that it is solving a relatively more complex problem. The major use in professional programming parlance is called LOC, not line of control, but line of control. So, when people say this programming system, not just a program, but maybe 100, has 50,000 lines of control, respectable amount. This programming system has 200,000 lines. A typical banking application could have 2 million lines of control. The more complex applications such as those which handles spacecraft controls, those which handle very complex what we call data mining problems, could run into multiple millions of lines. And in general, when you tell somebody that I have written a program these many lines, the amount of complexity is expected to be reflected by that. Now, suppose you meet some professional from PCS or Infosys and you tell him I have written 1000 lines program. He will be impressed, right? Oh, 1000 lines. What does it do? It finds maximum of 1000 numbers. So, you see, there is some problem here. We cannot afford our program to become as big as the number of values it handles. The program has to be shorter, but then shorter program will execute only one, two, three, four instructions that is not sufficient, which is very obvious that if 1000 numbers are given and maximum is to be found out, 1000 comparisons have to be made, 999 or whatever. So, somehow you have to figure out a way that you give one instruction to the machine, say compare, and you want to give another instruction to machine saying keep on doing this, keep on doing this for all that. That is called the repetitive control. And for that, not only C++ but every programming language has instruction. The requirement to use such instructions, we do not know what those instructions are, but whatever they are, the requirement first is to figure out a pattern of instructions which can be repeatedly executed. A pattern of instruction, somehow each execution of that block of instructions should handle different value, but the instructions themselves must be same because otherwise what do you say repeat? Let's go back to the previous slide and see. There is nothing that is repeatable here. Every instruction is unique. The first comparison instruction compares max with B, the next one compares to C, next one compares to D, etc. These are not actually usable directly by us. However, so in short, we want to write an instruction where the same location can be used at different execution times to represent different values. We shall see how we will lead to that. This was our original program. Now we will slowly modify this program to come to discovery of a repeatable pattern. So the first thing that we do is rewrite the program to take an input only when it is required. What is the difference? Earlier we were reading all values first and then evaluating them against the maximum comparison. Now when I read all values first, I have to keep them in separate identities necessarily. All that I am saying is instead of reading all values first, if I read a value when it is needed, then how will my program look like? It will look like. Do you understand what we have learned? We are first saying read A, that is okay. Assign it to max. Now I need to compare next number. So I will say read B now. Compare it with max. If it is greater than max, assign max to that B. Assign that B to max. Same thing with C, same thing with D, same thing with C. So whether I have 100 or 1000 numbers, every time I need a number I read it, examine it, take a decision on the value of max and go ahead. How do I know whether things are proceeding well or not? I will do one more modification. I will add an output statement after every comparison. We were here. So this is clear that we will read a number only when it is required. Now we observe something very important. We observe that while each instruction is actually different, I am looking at the set of those four comparisons. Each instruction is doing the same job, getting a number from outside, comparing it with max and reassigning max if required. In which case, why is it necessary to use B in one case, C in another case, D is another case? We presume that we are interested in finding out only the maximum of given numbers. We are not interested in individual identity of numbers. If that is so, then I do not need to use different names for these. So I further modify that. Now look at how the program reads. The first instruction says C in A max is equal to A, perfectly fine. Now subsequently, I have got input A if A greater than max, max is equal to A. Again I have got input A, A greater than max, max is A. Does this make sense? Will it work? Let us examine this. Let me write here the two locations. This is A and this is max. And let me hand execute the program. Assume that you are the C++ machine, C++. You are executing this. So let us go through this program. It has been compiled and therefore, int A and max, that first definition instruction, has resulted in these two locations being created. Now we start the program execution. C in greater, greater A. What will happen here? A will get what value? Please note that the input values are 3, 9, 2, 17, 5, return of the top. So we expect those values to be given in that signal. The value 3 will come and sit inside A. We will also write it here that A becomes 3 at this state. What is the value of max? Currently none. But when you execute max equal to A, it will get the value 3 and max will also become 3. Next statement. C greater, greater A. What happens? The next value is 9. This value 3 will vanish and 9 will come here instead. So A becomes 9. If A greater than max, is A greater than max? Yes, 9 is greater than 3. So what should happen? Max is equal to A. This will go and you will have 9. Next statement. Again C in greater, greater A. What happens? Value in A is 2. So 9 goes away. This becomes 2. Is 2 greater than 9? No. So the max continues to be 9. Next statement. Again input A, 17. Is A greater than max? Is 17 greater than 9? Yes. So what will happen? This will now go and become 17. I have this here as 17 and this as 7. Last instruction. Input A. What is the value? 5. Is 5 greater than 17? No. So this will remain 17. A will become 5. Is that clear?  But I did spend time to go through this because I want you to understand the importance of such a hand execution. Particularly when you write complex programs or when you are writing for the first time some new instruction structure in C++ which permits conditional or repetitive execution of statements. It is useful to hand execute a program with some simple value to know whether your logic is correct or not. In this case the logic is correct. It has been proved. But now we have got a fantastic deal. We have now written a program where there is a series of instructions which are identical. The instruction itself is same. I write 4 instructions like this and I end up getting maximum of 5. If I have to find out the maximum of 100 numbers I have to write exactly the same instruction 99 times more. Observe that the instruction is same. But every time an instruction is executed it is operating upon a different value. Because I am ensuring that that group of 3 instructions actually start with a new value every. This is the crux of our identification. Now identify a block which can be executed repeatedly. In this block of 3 instructions I add a fourth instruction now. An output statement which has been kept after the assignment to max. So observe how the statements are written. C is equal to a if a greater than max max is equal to a c out less less max. What will this program do now? It will do the same thing, find out the maximum of 5 numbers. But every time it executes a comparison it will give you what is the current maximum value. What is the current maximum value? Since our job we started off by saying that we want to identify a group of statements which can be repeatedly executed. I have rewritten these in a slightly different form. C a b max c in greater than a max equal to a this is sort of the initial rig model. After that what is written here? C in greater greater a if a greater than max max is equal to a oh god. Is this correct? Just compare this statement. This says if a greater than max max is equal to a c out less less max. This statement says if a greater than max max is equal to a c out less less max. But what is the logical difference? Are they meaning wise same? Whether the condition is true or not? Does everybody get it? In this case the value of max will be printed only if the new value a which was compared with max was greater than the max. Only if it changes it will change. In the earlier case whether it changed or not the max value would have been printed. Since we want to repeat this block of statements and we do want the maximum value currently maximum to be printed every time. What should we do? So in fact I should write this as if a greater than max I could have written it by the correction that I have indicated here. But this is the better way of writing because indentation remember indentation of my lines is supposed to indicate to me the block structure. And the fact that c out less less max is at the same indentation level as if it means that only when you finish the block of if and come out you have to do this. Same mistake here. What I have done? Why I have put that in a blue mistake? Because these are the set of instructions which I want to repeatedly execute. Now do you understand the power that I am seeking from c plus plus? Today I don't have that power. If I have to find out the maximum of 100 numbers I have to write this 99 times that same. But if I could somehow tell the machine look Baba I have got these statements. I want you to keep on executing them till I keep giving you value. This is called an infinite way. If there was an instruction in c plus plus we said keep on doing this. Then I will set up an iteration which will keep on doing this. But do I want it to be done till eternity?  I want to stop when a certain condition is met. In this case the condition is that if there is no more input I want you to stop. I would therefore like a structure which looks like this. I want to set up an iteration. You can see this control going back. But I don't want unconditionally to keep on repeating the block. I want to set up a condition at the top like a doorkeeper. That doorkeeper will first examine that condition. Is that condition satisfied? Is the value true? Yes. I will say go ahead and execute this block and come back again. So anybody who gets in through my door and goes into this house called repeated block cannot escape by the back door. The back door again leads to the front door and the same gatekeeper is sitting. Now you will agree that if I have such a control available then I could use it to set up a repetition or iteration as it is called that I can repeatedly execute the same set up. This structure I would like to have a simple wording for it. Just like for conditional execution. If condition do this, else do that. I have a structure. Similarly I want to have a condition, I want to have a statement that while this condition is true, if repeatedly executing this block the moment this condition becomes false, get out and go to the next step. Such is the structure available, the fundamental iterative control structure which is called the vibe to reflect exactly the meaning that we have in mind. The vibe structure syntax is something like as shown here. There will be some statements before the block. The block itself is written here. This is the block. So for example our statements C in greater greater A, if A greater than max etc, they form the block. All that I am saying by this statement is while this condition is true keep repeatedly executing the block. Every time you execute the block, come back and again check the condition. If the condition is true, go back again and do it. When the condition becomes false, get out and go to the next step. Can you see the power of expression here? So the semantics of the meaning is given at the end. The condition is evaluated at the beginning of each iteration. The block is executed if the value is true. Else the program will exit the loop and go to the next step. So it will jump out. How to set the condition? You have to be careful when you set that condition because you are designing that condition. The condition is going to be tested every time the repetitive block is to be executed because the meaning is while the condition is true, do it repeatedly. After every repetition condition is going to be checked. It should evaluate to true for continuation of the loop and if it evaluates to false, it will exit and jump out. Now some value, some component in that condition must change after every iteration. If it doesn't, if for example I write a condition inside the block, I have a statement like x is equal to something, y is equal to something, z is equal to something. Suppose these are exactly three assignment statements in the block. Now can you imagine what will happen? First time when I come to this file, whatever is the value of p, that will be tested against five. If suppose value of p is minus three. Well the condition is false right at the beginning. You don't get into the iterative block at all, you get out. But suppose p is say seven. Now what will the c plus plus do? Seven is greater than five, condition is true. Get inside. What it will do inside? Find out something for x, find out something for y, find out something for z and then the gatekeeper says come back to me again. So I come back to him again. What condition I will check? Nothing to do with x, y or z. Is p greater than seven? Of course it is greater than seven because it was greater than seven. Yesterday it will be today, it will be day after tomorrow. It till eternity p will remain seven. What I have got in spite of writing a condition, I have got an infinite loop because that condition is not changed. If I want that condition to change, then some component of that condition, here the only variable component of that condition is p. Therefore somewhere p equal to something must also happen. If it does not happen inside, I have got a wrong. This is stated here in words. If components of the conditions do not change in any iteration, it will always evaluate whether true or false. If it evaluates to true, the control will keep repeating the loop in final. But if it evaluates to false, it will jump out without evaluating the branch even once. Is this clear? This is both the power and the care that you have. I have written a program now in A max. Max is equal to zero while one, C in greater greater a, if a greater than max, max is equal to a, C out less less max, closing branch returns zero. This program I think is written. This is what it tries to do. It has this iterative loop. This will be executed repeatedly. If the condition is true, this is the entire problem. This program by the way has the corrected syntax for C out. Let us read this program carefully. Int main, int a, max, max is equal to zero. So far, good. While one, we will discuss that. While a, this means I am specifying repeated execution. The block to be repeated is from here up to here. What is stated inside the block? C out enters the number, so I am getting one number. C in greater greater a, that is input the number. If a greater than max, max is equal to a. So max gets reassigned if a is larger. Output max is whatever the current max is.  In fact, the arrow should not be here, the arrow should be here, saying that this is the place where I go back. But after going back, what will I do? I will again examine the condition. If the condition is true, I will carry on. Otherwise I will get out. Now what does while one mean? We just saw that some time ago. Instead of writing a condition, I am writing a constant. And that constant is one. If you interpret one as truth value, was it false or true? True. So whatever I have written, I have written an infinite loop. While one do means till eternity keep on doing, I will come back. When will the return zero statement executed in this program? Can someone tell me? I have said return zero. I want to go back to operating system. Because only when I go back to the operating system, I will get my favorite dollar where I can give a new command. So when will I go to the operating system? Anybody? When number? Less than zero. Why? No, statement will never be false. While one, that one is translated to a constant one during the translation phase. Nothing in the world can change that value. It is an infinite iteration. When you execute this program, this is what will happen. Enter the number three. Max is three. Enter the number nine. Max is nine. Enter number two. Max is still nine. Four. Still nine. Five. Six. Still nine. Eight. Still nine. Ten. Max is ten. Twelve. Sorry, 23. Max is 23. Twelve. Max is 23. But at the end, do you see a dollar anywhere? It says enter the number. It has become a booth. It will keep on asking you for numbers endlessly. Do you understand that this could create a problem? But do you also understand the power that you have now? You can actually make the machine keep on working infinitely. As we shall later see, there are other mechanisms of getting out of infinite loops. And it is not uncommon in some cases to find that people actually deliberately design an infinite loop but design other mechanisms of getting out. To give you a hint, we had seen the switch statement. In that switch statement, you had a statement called break. At that time, we interpreted break to mean get out of the entire switch block. Break is actually such a powerful statement. When you use it inside any loop, not necessarily infinite loop, it takes you out of the loop. But that we shall discuss later. Our objective today is not to see that. Our objective today is to rather emphasize that in most of the problems that we solve, we should not write infinite loop because that is dangerous. But if I don't want to write infinite loops, then what do we write? We have to indicate end of input. How do we indicate? Here is a modified problem. I change the problem itself. I say the problem is to find the maximum in a set of positive integers given as input one after another. And now I add, stop when value zero is given. And the problem says after reading each value, output the current maximum value. Same program as earlier. But now what is the difference? I am saying I will keep on giving values three. But all these will be positive integers. The moment I give zero, which is not a positive integer, terminate, stop. You see now this problem statement invites me to immediately come to the conclusion that the condition for continuity should be what? The number is non-zero. As long as the number is non-zero, I will keep continuing. The moment zero number comes, I should terminate. This then is the problem. What is the difference between this program and the previous program? The only difference is the while condition. The while condition says a not equal to zero, keep on doing it. While a is not equal to zero, keep on doing this, keep on doing this, keep on doing this. Every time what it will do? It will read a number, check it with maximum, replace maximum lesser. Read another number like the previous. But this is not a boot program. The moment I am tired, my lap time is over or I am hungry, I will give zero and get up. And the last max printed would be the maximum value that is there. Now can you see how many lines are there in this program? One, two, three, four, five, six, seven, eight, nine, ten, eleven, twelve, thirteen, fourteen, including closing brass, etc. How many executable instructions have you written? Start with c, n, n greater than a, max equal to a, while a not equal to zero if a greater than max, whatever. Eight, ten lines program. But now do you understand that legitimately you can say I have used the power of c plus plus to write just a ten line program which can find maximum of million numbers. It doesn't matter how many. Million positive integers, this particular. Is this clear? Because this is the crux of the repetitive instruction handling mechanism of c plus. If you understood this, you will be able to understand various different variations which we shall be seeing very shortly. Here is another program. Instead of finding out the maximum, it says find the sum of a set of positive integers given as input one after another. Stop when value zero is given. Do you notice the similarity between this program and the other program? Earlier we were finding out maximum of given number. Now I have to find the sum of given number. But I know exactly how to handle it. I can start with some zero value as sum because sum could be zero if there is nothing. And then I can use the same logic. Read a number, add it to some. Read a number, add it to some. As an added attraction, I don't even require any if statement to compare that number with anything because I have to keep adding that. And when do I stop? The moment somebody gives me zero, that is the indication to me saying my numbers are over. Consequently, this is the program to finding the sum. I have to go back to what we had done except that it says int a, sum equal to zero semicolon. Observe that max equal to a had to be written as a statement after reading the first number. But initial zero value to sum can be given as a part of my declaration itself because it's an initial value. So int a, sum equal to zero semicolon means set two locations a and sum and put zero value in sum. Now I read the first number while a not equal to zero nu sum is equal to sum plus a c out enter the next number c in greater greater a Observe that the condition is while a not equal to zero keep doing it and observe that every iteration executes an instruction which reads a new value for it. That means there is a chance for this condition to become false and therefore this is not an infinite I can get out. Let's just quickly execute this program. Let's assume some input. Can somebody give me a values? Let's say these are the input values okay. So what will happen now? Yes first value a first int a I don't know what is there is a question mark and when I said sum equal to zero is a value zero. This will happen before the program execution begins because this is part of my definition int a comma sum equal to zero to reiterate what we had once said that this is a instruction to the compiler the compiler while not direct compiler directive but the compiler while translating the program will reserve two locations one for a one for some and because I have said sum equal to zero it will put zero. I have not said anything about a a will continue to contain some and define that. Now the program execution starts see in this is the first statement that is being executed see in greater greater a what will happen at this stage the value 28 will be and 28 will go here eliminating the question while a not equal to zero is a not equal to zero yes 28 is not equal to zero I will enter the iteration here I will execute this statement sum is equal to sum plus a so what will sum become now next statement says enter the next number see in a so what will happen now a will get another number this 28 will go 4 will come here with this value 4 I come back now and when I come back I don't blindly enter the iteration I again check the condition is a not equal to zero because 4 is also not equal to zero I will get down again add this a value to sum what will sum become now 32 get another number for a which is 3 so this 4 will now become 3 and after becoming 3 I will come back again is a not equal to zero yes a still not equal to zero I will go inside add this 3 to sum sum will become 35 read the next number 8 which is I get zero here go back here this time the watchman will say sorry you got a number zero stop get out and when you get out you will say sum is sum what is the value of sum 35 will be free again I reiterate it's a good practice particularly when you are learning new construction experimenting because you know you already have a problem you have to design a set of instructions it can be repeatedly executed you have to design a condition which will facilitate repeated execution but it will also permit you to get out so it is possible that you might make some logical error it is useful to execute your programs like this and confirm things are working ok yeah here is a question is it possible to define a range of numbers like I want a to be between this and this I will add to this question what if I want to add three arbitrary numbers which are given as 13, 0 and 7 this program will never add at the moment it says 0 I am gone it will take 13 sum is 13 end of the matter if 0 has to be included I don't know what to do this program also does not permit me to add conventional fractional values 13.5 17.289 what if I want to add minus 21 luckily this program will work because in this program we are not checking whether the value is less than equal to 0 we are checking whether it is equal to 0 or not actually it will take minus 21 and it will add that and finish however if somebody has said that I will give you positive integers then it is your duty to want that person that look friend what value you are given is invalid as per your problem statement so ideally you have every right to say if I see minus 21 shout shout shout and get out I am not supposed to do if you want to do any such thing let's solve the problem of a range bound numbers suppose there are numbers in a range and I want to add them how could I do that is this problem fairly clear somebody wants to add various numbers which are in the range minus 74.5 to 128.9 and I want you to write a program how would I write the program forget the hash input something something using this thing we start writing the program can I say int a no because the numbers are fractional so I will have to say what float a sum can I initialize it to 0 yes of course I can but it is better to write 0.1 just to make it simpler now I can't write while because to kickstart while I require something what is that something is going to be let us write down the condition a greater than equal to minus 74.5 and and a less than equal to 128.9 we agree how powerful the while is one short I have taken care of these conditions if this is true I want to do what sum is equal to sum plus a here is a problem what is the value of a to begin with we don't know what the value is and we can't leave it undefined so I must read the first value before I begin the iterative thing so remember the word kickstart like a scooter you have to kickstart a while iteration has to be kickstarted otherwise the scooter will not start it will fall out of the loop or you will continue to execute the loop in less we can't leave it to charts that means the first number has to be given explicitly by a separate instruction that will kickstart the while once you come inside it will add some now what should I do can I say end of the thing no because then it will keep adding the same a without changing anything I have to read the next number simple iteration read the first number if it is within the range go down add it to some read the next number come back to the watchman get the new number examined the range again go down add it read the third number keep on doing this till you get a number which is outside this range when you come out here you can say see out here is an assumption that we have made any number which is outside the range prescribed for the valid values will terminate the iteration should write a comment any input invalid input terminates program whether this is fair this is correct we don't know it's an interpretation suppose I gave you this problem and said I want you to add numbers between this range and they are large numbers you write this program and I ask my assistant to execute this now while recording my experimental results somewhere some value in this range actually if such a invalid value comes what will be an interpretation of a scientist discard that and go ahead but you are not permitting me to do that the moment I make a mistake and give a wrong value say thank you so much go home is that fair I would like an indication about end of input value which is not based on a specific value for example suppose I give you a program I give you a question saying write a program which will add any numbers of numbers that I give any number of numbers that I give whenever I give numbers you add now every legal number is a valid input so you can't base your termination criteria on that value often you still ask are you sure you want every number he says no the numbers are generally between 10 to the power minus 9 some such now while number is greater than 1.0 10 e 9 or 10 e minus order there could be other mechanism of informing the machine that input has ended later on when we discuss file processing we will discuss various mechanisms which will actually tell us that you can terminate the input and indicate to your program if you press control D for example is considered as termination of input in the unix operating system the operating system can give a signal to that program please remember when you give a value you assume that that value is directly going to a program nothing goes directly to the program the operating system dumbo is the big boss all symbols that you send all symbols that come out will come out through the operating system operating system is capable of informing incidentally if you have an infinite loop okay there is a way to directly approach operating system dumbo so when you see on the screen perpetually things are happening you got into an infinite loop press a special key called control C so keep the control key pressed and see that control C is an SOS signal to operating system there sir my program is misbehaving please take me out of this the system will terminate that program for civilian combat there are such mechanisms which we shall see at a later time but currently we understand that we will have to decide on setting up of a proper condition for this iterative execution such that the execution can terminate after solving the problem here is another construct here is another construct in C++ do something while condition is true then it look very similar to why something keep doing something it look similar the difference is as follow this is actually my block of statements to be repeatedly executed the logic here is like this I come here and straight away enter the block so all the statements that I want to repeatedly execute are straight away enter however after completing the block I check the condition if the condition is true I go back and repeat the block if the condition is false I follow so what is the difference between this logic and the logic of while condition block the difference is that here the condition is checked after one execution of the block and after every execution in short my watchman is not sitting in the front of the house he says you enter the house finish your task but when you get out I will examine the condition and I will decide whether you go back again to the front to repeat or you get out in plain English it means that if I use a do something while condition construct then that something will be executed at least once always at least once always whereas while condition something it may not execute at all does this give you a slightly simplified way of finding some of given numbers let us again look at some of given numbers which are let's say positive integers or non-zero number or any range so let us quickly write down that program so how will I write this is what I want to write do agree do something while a not equal to 0 now earlier while a not equal to 0 was being examined at the top so I had to actually read the first input directly before going in I don't need to do that I know that when I say do something it will always be done at least once so I can actually enter this loop I can now say c in greater greater a so I take a number then check is it 0 if it is 0 I should get out notice that in this case even the last number 0 which I gave will actually get added to the sum and then only I am checking the condition in this particular case it does not matter because adding 0 to any sum does not change the value of the sum can that normally be true suppose I was finding I was able to find the product of given numbers I will start with product p equal to 1 and given numbers are non-zero and if I did it like this instead of sum equal to sum plus a I said p is equal to p star a so I will meticulously compile numbers given 2, 5, 7, 3 etc etc I will keep accumulating the product finally a 0 will come and the product will become 0 and I will terminate that is not correct so you have to be careful what problem are you solving which construct do you use should you use while something do or should you use do while something this is a matter of choice the same logic can be implemented using either this or that structure just as if then else as I mentioned to you could be used to implement the same logic in different ways similarly this is also we stop here I have just indicated some additional problem instead of saying add numbers till you get 0 I have a problem I know how many numbers I want to have let's say there are 468 students in CSW to find the average I will give exactly 468 marks and find the average I know that number can you write a program which will read a value of N and say add N number find factorial L I just want to think about it in the next lecture on Friday we will actually be discussing these and several other interesting problems ok thank you


Hello. So as I said, we will begin a new chapter as an applications to celestial mechanics. The motion of the heavenly bodies has fascinated mankind since remote antiquity. There are references to this in Shakespeare's famous play, Merchant of Venice, when young Lorenzo has eloped with Jessica and they have come to the Porsche's garden and Lorenzo tells Jessica, look Jessica, how the floor of heaven is thick and laid with patterns of bright gold. There is not the smallest orb that thou beholdest, but in its motion sings to the young-eyed cherubins. I couldn't resist giving this quotation from Shakespeare. Here you see on the slide an epigram in Ptolemy's Almagust. I know that I am mortal by nature and ephemeral, but when I trace at my pleasure the windings to and fro of the heavenly bodies, I no longer touch the earth with my feet. I stand in the presence of Zeus himself and take my field of ambrosia. Almagust was a book that appeared in AD 145 and it has been one of the most influential books for 13 centuries in the western world. See the interesting article by Gingyarish was Ptolemy a Fraud, the quarterly journal of Royal Astronomical Society, volume 21, 1980, page 253 to 266. So let us begin with this chapter. In this chapter we shall discuss the original problem that led Bessel in 1824 to introduce the functions that bear his name. Wilhelm Bessel was an astronomer at Königsberg and his chief interest was a study of orbits of comets. We begin by recalling three basic laws of planetary motion enunciated by Johannes Kepler. The discovery of these laws forms an interesting culmination of classical astronomy. Equipped with calculus, Isaac Newton with his laws of dynamics was able to explain the motion of the planets, the precision of the equinoxes, the formation of tides. Astronomy which until now had been an empirical science transformed in the hands of Isaac Newton into a dynamical science. So, Kepler's laws of planetary motion. The first two laws were enunciated in 1609 in de Motibus Stele-Martis. Kepler's first law, the planets revolve around the sun in elliptical orbits and the sun lies at one of the two four sides. The second law says that the radius vector joining the sun and the planet sweeps out equal areas and equal intervals of time. This is just a restatement to the law of conservation of angular momentum. The third law, which is an approximate law neglecting the masses of the planet, appeared much later in 1619 in Harmonesis Mundi. Kepler's third law says that the square of the period t is proportional to the cube with a semi-major axis of the orbit. The constant of proportionality was determined by Gauss in his influential book on astronomy, Theoria Motors-Corporum Celestium and is today known as a gravitational constant. So, let's begin the problem. We first set the Kepler problem against the general backdrop in the theory of non-linear ODE's. We begin with the general ideas in the theory of ODE's. So, in equation 8.1, you see a system of non-linear autonomous system of ordinary differential equations, dyj by dt equal to fj, y1 by 2, yn, j running from 1 to n. Now, these functions fj's are assumed to be smooth functions and for simplicity, let us assume that they are independent of time or in other words, the system is an autonomous system. Now, what does it mean to say that we solve the equation 8.1? It means that for a given set of initial conditions that is yj of 0 equal to cj, j equal to 1, 2 up to n, we have to find a solution of 8.1 which means we have to find a trajectory, y1t, y2t, ynt and this can be thought of as a curve in Rn. So, idea is to find a specific curve in Rn. Now, what is the difficulty? To explain the difficulty, let us look at a very familiar system and even a linear system, the harmonic oscillator which we study from the time when we are in the 12th standard. So, what are the harmonic oscillator? x dot equal to y and y dot equal to minus x equation 8.2 and immediately we can see from 8.2, multiply the first equation by x, the second equation by y and add up and the right hand side becomes 0, xx dot plus yy dot equal to 0. So, x squared plus y squared must be a constant. What is the value of the constant? Remember, initial conditions are going to be given, x of 0 is given to you, y of 0 is given to you. The constant can be evaluated and you know that the function x squared plus y squared obtained above is constant and such a thing is called a first integral. So, let us define it in general terms. A non-constant smooth function phi y1, y2, yn is said to be a first integral for the system of OD is 8.1 if the function is constant along the trajectories. Namely, if I evaluate the function phi along the solution curve y1, t, y2, t, r, r, y, n, t, then the value remains constant. In other words, stated differently, you look at the level set phi equal to c. The level set phi equal to c is a surface in rn and the trajectory, the solution curve lies on the surface for all times. There are several different ways of looking at it. Another equivalent way of looking at it is that the gradient of phi dot with f equal to 0 where f is your f1, f2, fn. How do I know this? Remember that phi of y1, t, y2, t, r, r, yn, t is constant. Differentiate with respect to time, you are going to get 0 on the right hand side. How do you differentiate this composite function? Del phi by del xj dyj by dt, but dyj by dt is fj and so you get del phi by del xj fj summation j from 1 to n is 0. That is the last display in this slide. So, there are several different ways of understanding a first integral. So, what is the use of a first integral? The first integral tells you that the level set is a hypersurface. It is an n minus 1 dimensional hypersurface and our search for the solution is no longer the n dimensional space rn, but the n minus 1 dimensional entity, namely the locus 8.4 or we have reduced the problem to a n minus 1 dimensional problem. In physics books, you will say that the number of degrees of freedom has been reduced by 1. That is another way of saying the same thing. So, what happens for the harmonic oscillator? What was the first integral again? x squared plus y squared equal to constant and everybody knows that x squared plus y squared equal to constant is a circle in the plane and you know the circle. Maybe perhaps the initial conditions were such that this constant is 1, in which case you know that the circle is x squared plus y squared equal to 1 and the search for the solution has reduced from r2 to a circle, the unit circle. But remember that the unit circle can be parameterized in a variety of different ways. x squared plus y squared equal to 1 has several different parameterization, cos t comma sin t, sin t comma cos t minus sin t comma cos t, 1 minus t squared upon 1 plus t squared comma 2t by 1 plus t squared and so on and so forth. But if I give you x of 0 and if I give you y of 0, then the x t and y t are uniquely determined and so the solution of the original system of differential equation is 1 and exactly one of these infinitely many different parameterizations of the circle. So, the question is which one of these infinitely many different parameterization is the correct one. Now, remember that if I take a point x comma y on the circle, I could write x of t as cos of capital F t, y of t as sin of capital F t, where x t comma y t is the solution of our initial value problem. So, what we have to determine is the appropriate parameterization namely we have to find f of t. So, now let us differentiate this equation, what is x dot? x dot will be minus sin f of t times f dot t, but sin of f of t is y and but x dot equal to y because our first ODE is x dot equal to y. So, this cancels out and we are left with this condition f dot of t equal to minus 1. Moment you know that f dot of t equal to minus 1, then f of t must be alpha minus t for some constant alpha and we get the solution x equal to cos of t minus alpha y equal to minus sin t minus alpha as expected. We know that this is the solution of the harmonic oscillator not some other parameterization like 1 minus t squared upon 1 plus t squared 2 t by 1 plus t squared that is not the correct thing. This is the correct thing. So, to determine the correct parameterization we simply stipulate that since the point is lying on the circle x squared plus y squared equal to 1 the trajectory x t y t which is the solution of the differential equation I can write it as cos of f of t sin of f of t f has to be determined and we have determined f and we got the answer. Now, let us take a more complicated example the case of the harmonic oscillator was probably too simple and you are probably not convinced that the problem is non trivial. Let us consider Euler's equations for a spinning top. What are Euler's equations for a spinning top which ignores the effect of gravity a x dot equal to b minus c y z b y dot equal to c minus a x z c z dot equal to a minus b x y equation 8.5 that you see displayed in the slides. We immediately see that two first integrals say multiply the first equation by x second by y third by z and add up we get a x x dot plus b y y dot plus c z z dot equal to 0 or a x squared plus b y squared plus c z squared is constant and so that is a first integral multiply the first equation by a x second by b y third by c z and add and you will realize that a squared x squared plus b squared y squared plus c squared z squared is also a first integral and we know that the solution curve if I prescribe x of 0 y of 0 and z of 0 the solution to 8.5 is a certain curve in R 3 which curve in R 3 we do not know we have to search the whole of R 3, but no we can find out the constant values for these two first integrals and we know that the trajectory has to lie on both these ellipsoids and so the trajectory must lie on the intersection of these two ellipsoids. The intersection of these two ellipsoids is a curve. Now the gradients of these two functions a x squared plus b y squared plus c z squared a squared x squared plus b squared plus c squared z squared are linearly independent. So these two ellipsoids do cut along a curve and that curve is the solution curve that we are looking for, but not the actual parameterization. Again this intersection of these two is a curve which will admit infinitely many parameterizations which one of these infinitely many parameterizations qualifies to be called the solution of the ODE satisfying the given initial conditions. That is not obvious unlike the case of the harmonic oscillator where we could write our solution x y as x t equal to cos of f of t y t equal to sin of f of t. What is the corresponding procedure here? That is not so clear. Now let us do the following. The solution is x of t y of t z of t. Let us call x squared plus y squared plus z squared as u. So u is a function of t. So now we got a x squared plus b y squared plus c z squared which was alpha that was constant a squared x squared plus b squared y squared plus c squared z squared is beta that was also a constant. And now I am saying x squared plus y squared plus z squared is u that is not constant. So now I got three equations for x squared y squared and z squared. So solve them take square roots. I can write down x explicitly in terms of u y explicitly in terms of u z explicitly in terms of u where f, g and h are some known rational functions or with a square root thrown on it. And now let us substitute this into the system of differential equation the Euler's equation for the spinning top.  So now we got a first order variable separable ordinary differential equation for u and we can certainly solve this first order ordinary differential equation for u. What do we get t equal to integral from u 0 to u d s upon psi s equation 8.10. Now of course the question arises whether we can compute this integral. So there are two things left for us to do. We have to integrate this in classical literature we call it the problem of quadratures. So there is a problem of quadratures and the other problem which is equally difficult is we have got t as a function of u what we want is u as a function of t. If we can find u as a function of t then we can substitute it here and we would have obtained our solution the actual solution of the differential equation actual solution of the initial value problem x of t y of t z of t.  Already we see the innocent looking problem in three dimensions requires a substantial bit of work. So let us not underestimate the depth of the task the degree of difficulty. In the case of planetary motion it turns out that it is this last phase of inversion that calls for Fourier analysis. So it is here in the very last lap of the journey that Fourier analysis begins to enter and the equation that we need to invert the analog of 8.10 for the two body problem that is called the Kepler equation and the problem is of inverting the Kepler equation. Generally if we have a system of n differential equations and you have a system of n minus 1 first integrals with linearly independent gradients along their common locus then the intersection of these level sets is a curve and this is a solution curve except for parameterization. Finding the correct parameterization involves one integration and one inversion. So how do we get these first integral? Who is going to give us the first integrals? Physics will provide you a supply of first integrals, the law of conservation of energy, the law of conservation of momentum, linear momentum, angular momentum. Geometry may sometimes provide us with first integrals. When a system of ordinary differential equations exhibits symmetries then there are first integrals, there are conserved quantities. The harmonic oscillator x dot equal to y, y dot equal to minus x has a one parameter group of symmetries namely it is invariant under rotations. It is this one parameter group of symmetry that gave us the first integral x squared plus y squared. Now it is not surprising why x squared plus y squared was the first integral. For the case of the Euler spinning top we got two first integrals A x squared plus B y squared plus C z squared. What is this? It is twice the kinetic energy remember in chapter 6 we already encountered this rigid body problem. So A x squared plus B y squared plus C z squared is twice the rotational kinetic energy. ABC are the principle moments of inertia for the rigid body that is Euler's spinning top. What about A squared x squared plus B squared y squared plus C squared z? It is a square of the angular momentum. There is no external torque so that is going to be conserved. So we got two conserved quantities and in general if you can find n minus 1 conserved quantities we can expect to complete the problem of integration. Now let us come to the two body problem. The two body problem consists of two bodies a sun and a planet. In R3 the system is governed by Newton's laws of motion which is a system of six second-order ordinary differential equations for the instantaneous positions. Six second-order differential equations because Newton's law of motion gives you a second-order OD. We can convert it into a first-order system. When you take a second-order differential equation and convert it into first-order system we will get two first-order equations. So you see six second-order ODs three for the sun and three for the planet would mean 12 differential equations first-order ODs. So our system of ODs which we started out with 8.1 dyj by dt equal to fj j equal to 1 2 3 up to n. Here the n is 12. So we need a set of 11 first integrals in order to carry out the program. There are no external forces acting on it. So linear momentum is conserved.  So what is m1 v1 plus m2 v2 upon m1 plus m2 that is going to be conserved. That is the conservation of linear momentum right. The left-hand side is linear momentum. But moment you have m1 v1 plus m2 v2 upon m1 plus m2 is conserved what are the left-hand side d dt of m1 x1 plus m2 x2 upon m1 plus m2 that is constant where x1 and x2 are the positions. So what happens is that m1 x1 plus m2 x2 upon m1 plus m2 is ct plus d where c and d are constant vectors. So it may say that the center of mass which is this left-hand side moves along a straight line in R3. So choose the origin to be the center of mass. So we got a moving coordinate system but it is an inertial coordinate system alright because the center of mass moves along a straight line with constant velocity. So if we choose the origin at the center of mass and if we choose this as a moving coordinate system the differential equations decouple into two systems of six equations and these two equations are identical except for a scaling factor. So if you solve one system then the other system you can simply read off the solutions. So now we have got a system of six differential equations. How many integrals do we need? We need five more integrals. Now there is no external torque. So angular momentum is going to be conserved and that will give you three more first integrals. Energy is going to be conserved that gives you one more first integrals. So four and the earlier six, three from the linear momentum and three by integrating the linear momentum equation c and d. So all in all I got ten first integrals. Where is the eleventh one? The divergence of the system is going to be zero. The f1, f2, fn that you see that has zero divergence and there is a classical result of Jacobi which says that we can then find one more first integral. So we are exactly in the situation where we can have the solution curve but not the parameterization. The parameterization is still going to evade us. Finding this parameterization leads us to the problem of inverting the Kepler equation and that is exactly what we are going to derive now. We are going to derive the Kepler's equation. Instead of carrying out these first integrals, these first ten first integrals that we got that assumes the following form that gets subsumed as the Kepler's laws of planetary motion. The Kepler's laws of planetary motion is a corollary of these first integrals and so what we will do is that we will derive the Kepler equation using the Kepler's laws of planetary motion because the Kepler's laws of planetary motion itself can be derived from these ten first integrals. So we short circuit this job and the second law basically is a law of conservation of angular momentum and the third law arises from the energy equation. So now our next job is to use the Kepler's laws of planetary motion and derive the Kepler equation and then turn to the problem of inverting the Kepler equation. Inverting the Kepler equation is exactly the problem that is going to lead us to Fourier analysis and we are going to use Bessel's functions and Fourier series both things that we studied in the first part of the course and so we see that as we go along we keep returning back to the earlier parts of the course time and again and I think this is a very good place to stop this lecture and we will continue this and finish this problem in the next capsule. Thank you very much.


Standard of California, on behalf of independent chevron gas stations and standard stations throughout the west, invites you to let George do it. Out of mind, another adventure of George Valentine. Personal notice, Stange is my stock and trade. If life's more sound and fury than you can stand, you got a job for me, George Valentine. Write full details. Dear Mr. Valentine, a dark, inexplicable thing is happening in the lives of my two sisters. The mind of a man is driving them to inevitable tragedy. He came to their house as a guest and lingered on like a poisonous growth. It's a weird situation in which I find myself helpless. You may have the answer. Will you call my office so we can arrange to meet and take the suburban special to Fenton? Yours truly, Roger Winslow. No matter how tricky it might seem, Winslow, there's always an answer to that sort of metal gymnastics. Tell you, Valentine, this man really can read your mind. Oh, does he wear a turban and call off the serial numbers on the bills in your wallet? Nothing like that, Miss Brooks. He's very much the continental galant with just that touch of the roux a women can't seem to resist. Louvain, the mentalist. Yeah, I've heard of him. But how did he get entrenched in your sister's house? That brings us to Birdie. She's the older one. Thirty-eight, unmarried, frustrated, and a pushover for every cult and fad that comes her way. She saw Louvain perform in the Fenton Civic Auditorium about a month ago and she asked him to spend a weekend at the house. He's been there ever since. Well, this is just a random observation, Mr. Winslow, but would you seem well able to bounce Monsieur Louvain right out on his psychic phenomenon? I tried that last weekend, but my sisters were all over me like a couple of wailing banshees. Besides, clear view isn't my house. But I thought you... No, before my father died, we both decided that the house and whatever money he had should go to the girls. I'm well able to take care of myself. Oh, from when I gather Winslow, Louvain doesn't just go around reading minds. He seems to have some kind of a hold over Sybil, too. Now, what's she like, your younger sister? I'm afraid you're going to begin to think our family is a roster of improbable characters. Sybil has been starved for beauty ever since she got out of college. She thinks Louvain is the only man who's ever understood her frail, sensitive soul. Oh, I know what you mean. I pass through that poetic phase, too. I thought I was another Elizabeth Barrett browning, and I was... Except that you had the constitution of a horse. Well, you could have at least said Philly. Go on, Winslow. Well, Sybil is still young and beautiful enough for me to hope she'll desert the muse for marriage and kids before she's 30. You said something about the inevitable tragedy. If you're talking about two jealous women fighting over a man, I don't see that I have any place in this picture, Winslow. Well, maybe I'm over-dramatizing it, Valentine, but I'm afraid Louvain is uncovering something in my sisters that they themselves don't know exists. Something hateful and ugly, perhaps. Have you got any reason to think that? My father, he was a very successful doctor, tried to make clear of you a happy place, apart from the world. He built it high on the side of a mountain, sort of symbol of the way he felt. What do you mean? He wanted his children to be above all the petty menaces of the world. And now, in the person of Louvain, everything that dad despised has come right into the house. Sibyl and Birdie aren't used to being exposed to anything like that. The poisonous growth you mentioned in your letter? Yes. I get the feeling that Louvain just stands and listens somewhere. Every time Birdie and Sibyl fly at each other over the smallest, most trivial things. I won't let you go through with it, Sibyl. I won't. Don't shout at me. The tower room is on my side of the house. You know father would never stand to see anything altered. Father is dead, Birdie. Please, Miss Birdie, Miss Sibyl. Please be quiet, Mr. Gumball. Yes, ladies.   Why don't you slap me again, Birdie? Won't make any difference. I'll still be here to remind you of all the emotions you let shrivel up because you're afraid to live. About that balcony again, ladies. Two men working on it, you know. Time half after five. I insist that things remain the way father left them. Isn't it enough that we made shrines out of his consulting room in a dispensary? They're in your half of the house. I don't care. But in my house... Father wanted the wall of the tower room to build land right in with the side of the mountain. He would have hated a balcony, and I saw her. Like something out of Romeo and Juliet. You already made French doors in the tower room for the balcony. Gotta make up your minds now. Finish it, Mr. Gumball. Yes, ma'am. You're not fooling me, Sybil, all this sentimental posturing. You're solitary walks in the moonlight, a balcony, so you can feel you're all alone between heaven and earth. All to impress Levain, isn't it? You're in love with him, isn't it? Here's my answer. Mr. Gumball. No. Go and finish the job. Yes, Miss Sybil. Don't know what I can do tonight, but it'll get done. You'll never have Levain, Sybil. No matter what I have to do about it. Well, Valentine, now that you've had dinner, what do you think?  He doesn't believe we're just a couple of friends you brought to your sister's house for the weekend. And my feminine intuition tells me that this war of nerves between Birdie and Sybil is gonna turn into a scorcher any day now. You know, frankly, Winslow, what this situation calls for is a combination human relations counselor and a psychiatrist. There's nothing particularly sinister about this setup. It's only two humans. I know, but as I said... I'm afraid I'd be like the man who tries to stop a husband from beating his wife. It ends with both jumping all over him. Now, no thanks. I think Miss Brooks and I will be taking the first train back in the morning. I do hope I am not including? Not at all. Come in, Levain. Thank you. You know, it is always interesting to be present when one is being discussed. Go on, please. How do you know you're gonna like what we might say about you? The human ego is easily satisfied. The mere sound of one's name is rewarding in itself. Incidentally, Mr. Valentine, there's an 810 out of Fenton in the morning. Well, now that's just fine. Is there someone on it you want me to wave to when it leaves? No. But you are thinking of going back to town, aren't you? I take it this is the mentalist at work. Or an ear at the keyhole. You know, Miss Brooks, at first Roger here also doubted my ability to read the human mind. Nothing gives me greater pleasure than to make converts out of cynics. Suppose I tell you what you're thinking about. Okay. But you'd better censor it as you go along. In so many words, it is something like this. This Levain. He is a handsome charming rascal at that. I wonder if that is a real wave in his hair. Or is he wearing it to pay? Yes, that's part of it. Delightfully feminine. Rest assured, Sherry, this is the hair I was born with. All right, Levain. We don't need any more of your demonstrations. Now, you, Mr. Valentine... Oh, I ought to be a pushover. I've only got one thought. And it's not very feminine. I know. You're saying to yourself in these very words what I would not give to sockbuster here right in the kisser? Huh. My feminine intuition. You heard that, didn't you, Levain? How could it be helped?  You play one half against the other. Well, have you decided which one you're going to hurt? You forget I'm in this house by invitation. Which one would be easier to handle? I'm not going to give you a chance to decide.  Now, sit down. I'm too sparring with him. Don't make a miter out of him.  Why, me? Oh, it was nothing, you see. Roger was merely trying to illustrate his brotherly concern. Oh. Well, let's clear the atmosphere right now. Roger, I'll repeat what I just told Bertie. Levain and I love each other. We're going to get married. Well, what do you want me to say? Not a word. We can dispense with all the deception now. You can pay off Mr. Valentine so we can step out of our affairs. Oh, yes, that 810 in the morning, Valentine. I got news for you, Buster. I'm staying on. I'm also a guest in this house. You forget this is my house. Only half of it, Sybil. I promise we'll stay on Bertie's side. Well, a beautiful Saturday morning in the country, George, and nobody enjoying it except the birds. And that character stretched out there on the lawn. You know, he looks beautiful in short. Yeah. Levain's supposed to be replenishing his cosmic cells or something. Look at him sipping hot milk on a day like this. Oh, well, that's to relax his nerves, Angel. Brother, he can afford to relax. He knows Roger isn't getting anywhere arguing with Sybil. And he's just as sure Bertie's tears aren't going to change his plans. You think he can really read minds, George? Well, that isn't important one way or the other, now. Don't mean to interrupt nothing, but anybody see Miss Sybil? What's her? Mark Gumpel's the name. Contractor. That's not it. Just taking my men off the job for the day. Wanted to make sure Miss Sybil ain't going to change her mind about that balcony. Well, I'm afraid she's pretty tired up at the moment. Did what she told me this morning just checking. Louvain. George, look. Yes, I see. Well, breathe. What's going on? Hurry, please. What is it, Bertie? What's the matter with you? Look at me, Louvain. What's the matter? I don't know. Nice stomach. Louvain. Now what? Is this another one of his acts? I came out on the lawn to talk to him. And I found him just... Somebody better call a doctor. Looks like he's been poisoned. Don't understand it, Valentine. Don't understand it at all. Don't you understand, Dr. Adams? There's no doubt about it. Louvain was poisoned. Agriphine. According to every tenant in the former copier, he should have died almost instantly. And he's been hanging on for hours. In other words, he's not only a mental marvel, but a medical freak. Well, I've done everything I can for him. We'll just have to wait. Um, Dr. Adams, as an old friend of Dr. Winslow and his family, this will probably come as a rude shock to you. I know what you're going to say. Someone in this house has guilty of attempted murder. One of John's children. It's incredible. A man like Louvain makes incredible things happen. Yes, I could see something like this coming. Of course, I should call the police. But perhaps if we wait and the man pulls through... Then, uh, we could call it Tom Vain. The lob still Louvain had for dinner last night? I don't know. In a situation like this, it's hard to be sure when you're doing right. Uh-huh. Doctor, there's a roll of match bottles on the dispensary. John's pride and joy, that dispensary. Everything's so neatly in its place. The bottle of agrofine isn't there. Whoever took it still has it. What? Roger, Bertie, Sybil, they were all in and out of the kitchen when the cook was warming up the milk full of Vain. Valentine, they're all nice people. I can't believe any one of them would do a thing like this no matter what the provocation. That's all right, Brooks. We don't have to keep anything from the doctor. Well, you were right, George. Someone did come back to put that bottle with the others. Yeah, who? Bertie. Good heavens. I'm afraid she knows I saw her. If it had to be one of the three, I guess it would be Bertie. Poor, unhappy Bertie. Well, we might be able to say that puzzle was cleared up. Except for one thing. What's that? What didn't you notice, Brooksy? There's another bottle missing in that room. What was it, Valentine? The label on the shelf right under the empty space says... Farolic acid. That's even more deadly thanigraphy. Which leaves us with a question we'd better answer real fast. Who's walking around with that bottle? We'll return to tonight's adventure of George Valentine in just a moment. Have you read about it? Heard about it? It's that new, improved, Chevron Supreme gasoline. Through constant laboratory research and road testing, standard of California has perfected Chevron Supreme to give modern cars peak performance. For today's high compression engines, you can't buy a better gasoline. It's specially blended to assure faster starts, faster warm-ups, extra pep in traffic, and ping-free power on hills. And it's a premium quality gasoline that's climate tailored. No matter which temperature or altitude zone of the west you're driving in, you may be sure new Chevron Supreme gets the best out of your car. Try a tank full tomorrow. Ask for new Chevron Supreme at standard stations and at independent Chevron gas stations where they say, and mean, we take better care of your car. And now back to tonight's adventure of George Valentine. Two sisters, jealously squabbling over a man. The man in question, a most unsavory character. But after all, you're not writing a paper on why women prefer heels. But before you can bow out, the man Louvain is poisoned. And what's more, Marley lingers on you and there's still another bottle of deadly poison circulating through the house. If, like George Valentine, you believe in direct action, you don't pull any punches when you talk to the brother of the two ladies involved. Yes, Winslow, it was Birdie who thought Louvain's milk should be fortified with a liberal shot of putz, and what makes you so sure? I'm afraid I saw her going in and out of your father's dispensary, Roger. Sorry. I see. Well, Louvain isn't dead yet. No one need ever know if he doesn't... Look, I gotta talk to Birdie. You know where she is? A few minutes ago. I needn't tell you what state of mind she's in, and now to upset her even more. Never mind that. Where did she go? Strange. She said she was going upstairs to the tower room. What? Catch a breath of fresh air on the new balcony. That is strange after they've been rowing over it so much. George, where are you going? The tower room. Get away from me. You have no right to stop me. Come away from those doors, Birdie. Now don't open them. You hurt me. No, you take a hand. Leave me alone. I'll scratch my eyes out. Now look, Birdie. Cut it out. Birdie, what's the matter? You've gone crazy. It's all right.  It's never going to be over. Not now. Louvain's going to die. I killed him. You didn't. You couldn't have. Look, Birdie, it's better if you didn't say anything, at least for the time being. There isn't anything to say that you don't already know. This brook saw me putting the poison back on the shelf in the dispensary. In my own way. But you had to stop him.  Go on, brooksy. Take her to her room. Ask Dr. Adams to give her something to quiet her down. Yeah, come along, Birdie. Roger!  Now go on. Yes, Roger. I think you'd better turn in two wins long. Get some rest. You know I couldn't sleep. It's a pain. When a guy gets a lethal dose of poison, he ought to drop dead. Deadly Poisons. They're effects and properties by Sebastian Kinsler, M.D. You want to finish that tonight, George? I'm almost finished now, Angel. Hand me that pad, would you? Well, shouldn't every doctor's dispensary have a couch? Now here's a book I'd like to curl up with. The Human Foot. It's Anatomy and Pathology. Darling, what are you doing? What are you scribbling? Look, see, I have just verified a universal truth. Oh, goodie. Every cause and by the same token vice versa. You know you got something there, mister? Whatever it is. But if you don't break it down so that I can un... Roger, I was wondering when you were going to show up. I couldn't let Birdie take the blame for something I did, could I? Hey, what's going on here? You'd better put that bottle of Ferella Gas back on the shelf before anybody finds out who took it. Yes. I said I poisoned Louvain. I put this stuff in his milk this morning. Here, Booksy, you put this bottle back where it belongs. Yes, but I... Oh, okay. Birdie tried to take the blame because she thought I did it. Even tried to kill herself. I'm not going to risk that happening again. But she did poison Louvain. Just as you did. What? She used Acrophene.  Well, that's insane, Valentine. You couldn't possibly have lived through that. Yeah, he should have dropped that twice. So let's go upstairs and see if he's making any concessions to what's expected from ordinary human beings. Can't you see that I'm your cold-doctor, Adam? George, I hope you know what you're doing. Come on, Buster, set up. Maybe Adam should be in on this, Valentine. Louvain, you'll never improve on the death scene from Camille. The act is over. Please, go away.  While you wallow around up here in bed, things are happening to people's lives. Really? Birdie tried to do away with herself. Sibyl's outside somewhere, walking up and down, worrying about you. Dr. Adams is neglecting his practice, waiting for you to decide between life and death. And all the time, you've been no sicker than if you'd swallowed a bad oyster. Don't tell me he's been faking all this time. Why, I ought to drag you out of there. You are not going to do anything, Roger. I'm sorry. I underestimated you, Valentine. Don't let a worry of friend. But tell me, how did you discover that the two poisons, agrofine and pharyllic acid, cancel each other? I looked it up, just as you did. I happened to see Roger leaving the dispensary. Since hardly anyone ever goes in there, I thought, well, I thought, I'd tell you, look, I noticed that there were two bottles missing. So out of curiosity, I checked up on their properties. You see, I was sure they were going to be used to make my departure from Clearview quite a permanent one. I suppose you found that out by reading mine. In this case, that was not necessary, Miss Brooks. After everything that happened, I suspected that my morning glass of milk would provide Birdie and Roger with the opportunity they wanted. When I saw each of them go in and out of the kitchen, there was no doubt about it. It was a thousand-and-one chance that they should have picked those two particular poisons, one an added out to the other.  You know, you've asked for something like this ever since you came into this house. But now you're going to get out, Levene.  But this time I won't use anything but my hands. I'll amplify what I said before, Roger.  Roger, get Birdie and meet me in the tower room. Why? I would like to have a little family conference before Siebel gets back. I would rather not have her know how unscrupulous I can really be. Before you call for the spotlight, Levene, maybe I ought to remind you of something. What is that, Valentine? There isn't a person in this house who wouldn't be willing to swear you weren't poisoned and the dispensary door had never been opened. Now you are underestimating me. I poured off a little of the milk before I drank it. I have it to be analyzed whenever the occasion calls for it. Why did I bring you into this house? You're not human. None of that, Birdie. Please. Well, here is what I am going to do. My self-esteem would suffer badly if I did not take advantage of my improved position after two attempts on my life. George, can't you make him get to the point? It'd better, Levene. Siebel will be back any minute. She'll be up here in the tower room looking for us. I shall, of course, marry Siebel. Sorry, Birdie. But then we'll always find room somewhere in the house for you. I shall expect you not to tell my future wife anything about our conversation here tonight. Now, about the financial arrangements. I was wondering when you were going to get to that. Naturally, I shall have Siebel's half of the estate. But I know that you and Birdie will be very happy to add to that, generously, because I've spared you all scandal and unpleasantness. Roger, you are the spokesman for the family. Can you say to my terms, Valentine, what can I do? People have lived through worse things than what happened here today.  You know the holiday the papers would have with this story. We'd never live it down. And Siebel, still in love with him, he'd make her hate us for what we did. She'd never believe anything about blackmail. All right, Levene. I know when I don't have an out. So... All better. Yes, of course, Siebel. Thank him. I was so frank. All that talk about poison, so much nonsense. It was nothing more glamorous than domain. And all is sweetness and light once again. Yes, I was wondering about this conclave in the middle of the night. Oh, just to congratulate us, my dear. Even Birdie wishes us the best now. Don't you? I... Don't answer, my dear. Let me read your mind. Oh, another performance yet. Oh, Birdie, how can you be thinking of Siebel's new balcony at a time like this? At least let my thoughts be my own. Oh, Birdie, I meant to tell you... Life's just beginning for me in this lovely place. I owe myself a view of what shall be mine for years to come. Levene! No! No! Church!  There is no balcony. Nothing out there. He said he was reading my mind. I thought the balcony was there. I honestly did. I was trying to explain. This morning I ordered Mr. Gumpel to tear it down. Deep as George, I'll be glad to get back to town. Yeah. I don't think I'll ever forget that sight. Levene stepping out into space like that. Well, fake or genius, he certainly read Birdie's mind. You couldn't have expected him to prove it more conclusively. Darling? I feel a lot better right now if you could read my mind. Well, let's see now. I'll get it. Exactly what I was thinking of. How'd you ever do it? Guesswork, Brucey. Guesswork. When you closed your eyes like that, it could have been that you were just sweeping tourists. Want to put spring in your driving? Then let me remind you about that new Chevron Supreme Gasoline. It's specially blended to give your car faster starts, faster warm-ups, new alertness in traffic, and on hills all the ping-free power you could hope for. In fact, for today's high compression engines, you can't buy a better gasoline. You'll like the way new Chevron Supreme is specially tailored to the West's different altitude and temperature zones. That means wherever you drive, new Chevron Supreme gets the best out of your car. Try this new motoring thrill tomorrow. Make full at an independent Chevron gas station or at a standard station, where they say, and mean, we take better care of your car. Next week, when a somewhat breathless George Valentine rushes into a lavish apartment to meet Brucey, we'll hear... Hey, what goes here, Brucey? Has Nick been over there like that all that time? I don't know, George. I just found him that way. Where have you been? Somebody wanted that briefcase so bad they floated me out of town. Hey, Buster, snap out of it. Come on, sit up in that chair. George... Yeah. One of our friends fixed it so Nick will be stone cold on the hottest day in July. The ninth adventure of George Valentine has been brought to you by Standard of California on behalf of independent Chevron gas stations and standard stations throughout the West. Robert Daley is starred as George with Francis Robinson as Brucey. Let George do it was written by David Victor and Herbert Little Junior and directed by Don Clark. Also heard in the cast were Jay Novello as Louvain, Ken Harvey as Roger, Frank Hale as Bertie, Lerene Tuttle as Sybil, Don Messick as Mr. Gumpel and Ralph Moody as Dr. Adams. The music is composed and presented by Eddie Dunstetter, your announcer, John Heaston. Listen again next week, same time, same station to let George do it. This is the Mutual Don Lee Broadcasting System.


Well, being teachers, I'm sure you will know that these are very important and simultaneously very sensitive topics. While teaching Hajj Tulveda, it must be emphasized that it was and still it is a unique event in the history and particularly history of Islam and also the students should be told that if one thoroughly goes through the last sermon which is delivered at the time of Hajj, almost everything required to be practiced in the life of a Muslim is given in that. And how precise it is, it is a mixture of Sunnah and Quran as the Prophet sallallahu alaihi wa sallam told and quoted at lot many places. The students must be taught with emphasis that the number of people who gathered around the Prophet sallallahu alaihi wa sallam for Hajj is unique and wonderful phenomenon, something like 1,44,000 people listened the last sermon and it's not a small number at that time. It would be better if important dates, places and incidents are very briefly written on the whiteboard before the lecture begins so that the students have some idea. The last activities of Prophet sallallahu alaihi wa sallam must be taught with reference to the places where they occurred because if the place is changed then the meanings and interpretations of the whole things will change. There's also something important that dates and years of Islamic calendar and common era calendars should also be taught in a way that they should understand the difference between the two calendars because it has been observed that most of the people are not really aware of the Hijra calendar. Since the junior grade may not be able to understand the minute details therefore they should be taught in a broader way which they can digest also and they do not feel sad also whereas the senior grade should be taught in detail and remember that in your mind you should categorize the students and ask questions from students of every category so that you know the feedback and you know how successful you have been and you know where improvement or repetition or amendment is required and according to that give them the homework also and check that next time because these all these things and covered are very very sensitive and very very important as well for the students of Islamic studies.


The Venice Lagoon is an important site belonging to the Italian Long-Term Ecological Research Network, LTER, which has experienced a number of changes over the past two decades. These include rising temperatures, increased levels of colonization by alien species, and a decrease in the resident zooplankton population. This paper examines the effects of these changes on the zooplankton community and how they may be linked, to the overall ecosystem balance. It was found that the zooplankton community has undergone significant structural changes, but no major shifts in composition. Additionally, the authors suggest that the changes in the environment have caused a compression of the spatial gradients of the habitat, leading to more intense interactions between marine and estuarine species. This article was authored by Elisa Camati, Francesco Acre, Amelia de Lozari, and others. We are article.tv, links in the description below.