Alice chap 4 - 4 THE LOGICAL STRUCTURE OF ALGORITHMS After...

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
After finishing this chapter, you should be able to: Provide a brief definition of the following terms: binary branching, binary bypass, binary choice, branch, concurrency, control variable, count-controlled loop, flowchart, linear sequence, loop, multiple branching, parallel algorithm, post-test loop, pre-test loop, pseudo-code, repetition sequence, selection sequence, sentinel loop, thread List and describe the three major elements of logical structure found in algorithms and describe how they relate to one another List several criteria that should be met by each linear sequence Describe how binary bypass and binary choice branching routines work, create simple flowchart segments for each, pseudo-code for each, and implement each in at least one Alice method Describe how count-controlled and sentinel loops work, create simple flowchart seg- ments for each, pseudo-code for each, and implement each in at least one Alice method Describe what is meant by concurrent execution of instructions in an algorithm, and how to implement concurrent execution in Alice THE LOGICAL STRUCTURE OF ALGORITHMS 1 4
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2 Chapter 4 • The Logical Structure of Algorithms This chapter includes readings about the logical structure of algorithms—including linear sequences, selection sequences, repetition sequences, and concurrent execution of instruc- tions in an algorithm—followed by four tutorials that will provide you with experience implementing these in Alice. ELEMENTS OF LOGICAL STRUCTURE Algorithms contain the steps necessary to complete a particular task or solve a particular problem. A recipe for baking a cake will have a list of all the ingredients needed, as well as step-by-step instructions on what to do with those ingredients. The recipe provides an algo- rithm for baking a cake. When young children learn to perform long division, they are learning an algorithm. Professionals, such as engineers, architects, and doctors, apply many different algorithms in the course of their daily work. Some algorithms are simple; some can be quite long and complex. The Holtrop and Mennen Algorithm, which is used by naval architects to design the optimum propellers for an ocean going ship, involves several thousand steps and must be run on a computer. Algorithms are sequential in nature. There are examples where several instructions in an algorithm are executed at the same time, but generally, we can think of the instructions in an algorithm as being executed one at time. They form a kind of sequential logic. Modern approaches to developing software recognize that this is only part of the story, but program- mers still need to be able to design, manipulate, and implement sequential algorithms. They need to understand sequential logic. There are certain patterns that exist in the design of sequential logic. These patterns fall into categories that can be understood as elements of logical structure, which can be com- bined in a myriad of ways to form the logical structure of algorithms in modern computer software. A programmer who is familiar with the design patterns of logical structure can
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern