Now next video characteristics of algorithm. What are the characteristics? What are the properties of an algorithm? So let us check.
First one algorithm must take some input. So algorithm some algorithm may not take any input also but algorithm can take zero or more input they can take zero or more input. Next output algorithm must generate at least one output otherwise it's no use of writing algorithm it must generate some result see imagine them like function C language function like when you call a function function may not take any parameters also but function returns something if it's not returning we say void but it does something definitely if it is written means it it should not be a return type like but the function gives some result definitely that's what is the output at least one output.
Then Definiteness. Every statement should be unambiguous and it should have a single and exact meaning. You cannot write any statement which cannot be understood or which cannot be solved. Like if we human cannot solve it, we can't ask our computers to solve that one. So every statement that you are writing should be definite.
That's clear. So definiteness. You cannot use the value, for example, I tell you, you cannot use the value that suppose root minus 1. It's unknown value.
unknown value so we say it has imaginary number so you cannot treat it as a real number and in the algorithm right this is an example i'm giving you so every statement must give clear meaning only one meaning that's it then next is finiteness algorithm is just like a function as i said a function will have some limited set of steps and it will stop and read returns the result. So same way algorithm must terminate at some point whether it may be having 10 statements or may be having 10,000 statements but it must have finite set of statements. The duration of algorithm must be finite definitely you will stop writing after some statements you may stop but the meaning here is that there are some programs which runs continuously unless and until you stop them like example database server or regular server you start and if you leave the machine as it is and don't stop it then oracle server will be keep on running sql server it will be keep on running it's like a service web server keep on running so it is not a service it's an algorithm it's a procedure so it must stop then effectiveness now this is simple you should not write unnecessary statements in an algorithm whatever the statement you write the objective is that it should do something serve some purpose in the procedure in the steps of an algorithm don't write unnecessary statements see algorithm is like a procedure So there are many procedures like a chemistry experiment done by the students in the laboratory is a procedure and Physics experiment done by the students in the laboratory is also a procedure Or if you take a procedure for preparing our dish cooking a dish that is a recipe That is also a procedure and every procedure the names I have given you examples I have given you every procedure needs some input the chemical experiment needs some chemicals and apparatus and physics experiment needs instruments and the recipe needs some ingredients.
Then Objective of that procedure is to give some result. You are cooking and cooking but no dish is prepared. Nothing like that. You are doing some experiment but no solution is obtained in chemistry experiment.
No, there must be some solution. So definitely there must be some solution at least one solution. Definiteness all the steps that you are doing are known step only.
You are not doing anything. magical right known steps you are performing every step that you are doing here is known step and it's nothing is magical right only known steps you are performing and finiteness if you are preparing our dish you will stop at some point and the dish is ready if you're doing chemical experiment you will stop at some point and the solution is ready definitely and effectiveness effectiveness you will not do anything unnecessary while doing this procedure like you are boiling some chemical and but you're not using it in the experiment it's not mixed with the solution you are getting some vegetables in the recipe but that is not used in the dish so there's unnecessary things are not done in the procedure so here also in the algorithm you should not have any unnecessary statements