like i said your set of instances can be infinitely large you can not be running -- you can only run your experiment on a small set of instances and that might not really be indicative of the time that your algorithm is taking for other inputs which you're not considering in your experiments further if you have two algorithms and you have to decide which is better you have to use exactly the same platform to do the comparison by platform i mean both the hardware and software environments because as you can imagine different machines will make a difference not just different machines in fact even the users who are working on that system at a particular point will make a difference on the running time your algorithm so it becomes very messy if you have to do it this way so what we are going to do as part of this course and in fact in this very first lecture is to develop a general methodology which will help us analyze the running time of algorithms and we are going to do it as follows we are first going to develop a high level description of an algorithm a way of describing an algorithm and we are going to use this description to figure out the running time and not implement it on any running system our methodology would help us tke into account all possible input instances and it would help us -- it would allow us to evaluate the efficiency of the algorithm in a way that is independent of the environment independent of the platform we are using so i said we'll give a high level description of the algorithm this very first point here so what is this this brings me to what we'll call pseduo code and this is how we're going to be specifying all our algorithms for the purpose of this course so here is an example of pseudo code and you might have seen this in your earlier courses also so what is this algorithm doing this algorithm taks an array A which stores n integers in it and it's trying to find the maximum element in this array what i have written here is not a program because i think the syntax is all wrong it is pseudo code it is a mixture of natural language and some high level programming constructs so i'm going to be using -- i'm going to come to all of them but i'm going to be using like a for do loop an if then else statement a while loop all of that i'll use but i'll not bother about ok there should a semi colon here or there should be a colon here i'm not going to bother about those those are things that are required by a compiler but for our understanding this is completely celar what this program is doing so what is this doing? it's keeping track of the maximum variable in a variable called currentmax which is initialised to the first element in the array and then it is going to run through the remaining elements of the array compare them with the current maximum element that we have seen if the current maximum element that we have is less that the current element the element under consideration then it would update currentmax a[i] becomes the new max and when this loop terminates we would just return currentmax so it's a very simple algorithm but just with this pseudo code we're able to understnd what this is doing it will not run on any computer it's pseudo code but it conveys the ideas, it conveys the concepts any questions to this point? it's more structured, pseudo code is more structured than usual prose but it is less formal than a programming language and wht pseudo code will look like we'll use standard numerical, numeric and boolean expressions in it instead of the assignment opertor which is = in java i will use this left arrow and instead of the equality operator operator equality relationship in java, which is two equls in java i will use just the single equal and i'll declare methods in this manner so name algorithm name what are the parameters it takes i'll use all kinds of programming constructs so i'll use if then sttements if then else statements while repeat until for do to index arrays i'll say a[i] a[ij] so on and on it should be clear wht this is doing and i'll use a return when the procedure terminates and return value will tell me wht is the value returned by a particular function and when i have to make a call to a method i'll sepcify that with method, name of the method the argument and what is the method it is returning any questions to this point? so what was the object? this is specificy the type of the value returned by the particular method you'll see more of this when we come across more pseudo code so how do we analyse algorithms? so we identify wht are primitive operations in our pseudocode? 