Page 41 - CT_AI_Class-5
P. 41

Important Rules for a Good Algorithm

                 Every good algorithm follows these rules:
 ALGORITHMIC                                  Important Rules for a Good Algorithm


 THINKING




                                         It has a definite                  Steps are written
                                        beginning and a                       in a clear and
                                          definite end.                       simple order.





                                                                             It produces the
                                        Each step is easy                  correct result every
                                         to understand.                     time it is followed.






                 For example, tying your shoelaces.

                 Algorithm:

                 Step 1   Start

                 Step 2   Cross the laces over each other. Pull them tight.

                 Step 3   Make a loop with one lace.
                 Step 4   Wrap the other lace around the loop.


                 Step 5   Pull it through to make another loop.
                 Step 6   Pull both loops tight.

                 Step 7   End


                                                                                   fact bits

                                                                      The word algorithm comes from the
                                                                     name of a 9th-century mathematician
                       ethical minds
                                                                        Al-Khwarizmi, who wrote books
                                                                        on mathematics. When his books
                        Good algorithms are not just                   were translated into Latin, his name
                        correct,  they should also be                   Algoritmi slowly became the word

                        fair, safe and responsible.
                                                                            algorithm we use today.








                                                                                          Algorithmic Thinking    39
   36   37   38   39   40   41   42   43   44   45   46