jagomart
digital resources
picture1_Algorithm Design Pdf 86323 | Note2 Item Download 2022-09-14 10-42-16


 157x       Filetype PDF       File size 0.34 MB       Source: turing.plymouth.edu


File: Algorithm Design Pdf 86323 | Note2 Item Download 2022-09-14 10-42-16
chapter 2 algorithm design before we discuss how to design algorithms we need to make up our minds as how to rep resent them i e what notation should we ...

icon picture PDF Filetype PDF | Posted on 14 Sep 2022 | 3 years ago
Partial capture of text on file.
       Chapter 2
       Algorithm Design
       Before we discuss how to design algorithms,
       we need to make up our minds as how to rep-
       resent them, i.e., what notation should we use
       to express algorithms so that they are clear,
       precise, and unambiguous.
       Wedon’twanttouseaprogramminglanguage
       at this stage since we want to be flexible but
       not have to deal with details. /
       Natural language is not a good choice either,
       since 1) the verbosity leads to an unstructured
       description; 2) it is live, thus unstable, so that
       it cannot be finitely specified; and 3) the con-
       text sensitivity could lead to ambiguity;
                                                1
                   Too much details...
       The following Java program implements the
       addition algorithm that we went through in the
       last chapter, on Page11.
       Wewill eventually come here, but not yet.
                                                2
                  What do you mean?
       Given the following statement:
           “Call me a taxi.”
       Question: Does this person ask someone to
       get a taxi, or wants to be called a “taxi”? /
       Another example could be
           “I saw someone on the hill with a tele-
           scope.”
       Question: Who has a telescope? /
       Remember the non-ambiguous and feasible re-
       quirement?
                                                3
                 What will we use?
       Pseudocode is a subset of English language
       constructs that looks like the statements avail-
       able in most programming languages.
       It is simple, flexible, and highly readable. With
       its well-defined structure, it is easier to visu-
       alize the organization of a pseudocode algo-
       rithm.  Finally, it is also easier to transform
       a pseudocode algorithm into a computer pro-
       gram, since its syntax resembles many pro-
       gramming languages.
       To start, we will present the three basic struc-
       tures: sequential, conditional and, iterative con-
       structs, in pseudocode.
       We will then see a few exemplary algorithms
       expressed in pseudocode.
                                               4
The words contained in this file might help you see if this file matches what you are looking for:

...Chapter algorithm design before we discuss how to algorithms need make up our minds as rep resent them i e what notation should use express so that they are clear precise and unambiguous wedon twanttouseaprogramminglanguage at this stage since want be exible but not have deal with details natural language is a good choice either the verbosity leads an unstructured description it live thus unstable cannot nitely specied con text sensitivity could lead ambiguity too much following java program implements addition went through in last on page wewill eventually come here yet do you mean given statement call me taxi question does person ask someone get or wants called another example saw hill tele scope who has telescope remember non ambiguous feasible re quirement will pseudocode subset of english constructs looks like statements avail able most programming languages simple highly readable its well dened structure easier visu alize organization algo rithm finally also transform into comput...

no reviews yet
Please Login to review.