What is an Algorithm?

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Rhombus

Input/output

Give a general definition for an algorithm.

An algorithm is a finite sequence of precise instructions for performing a computation or solving a problem. OR An algorithm is a well defined sequence of instructions that describe a process or a systematic generic solution of an engineering problem.

Sequential

First do X, then do Y, then do Z

Pentagon

Off page

Circle

On page

Oval

Start/end

Divided rectangle

Subroutine

Pseudocode

● A linear written algorithm (narrative set of instructions) to solve an engineering problem ● Every step included must not be subject to misinterpretation ● Clear list of actions and decisions

Flow diagrams

● Start, Input, Processing, Output, End ● Shapes have specific meanings ● Arrows show flow of control

Arrow

Control flow

Conditional

If some condition is met, then do X, else do Y

Flow diagram shapes

*insert picture*

Name the properties of algorithms.

1. Input 2. Output 3. Definiteness 4. Correctness 5. Effectiveness 6. Finiteness 7. Generality *Use Haley's Song*

Diamond

Conditional test or decision

Concurrency structures

Do X and Y at the same time

Rectangle

Process instruction

Repetition (parallel)

Repeat X N times (for loop) Repeat X until a condition is met (while loop)


Kaugnay na mga set ng pag-aaral

Chapter 22 Vocabulary and Questions

View Set

NURS 224: Nurse's Role in Health Assessment

View Set

Maternity Test 2 Chapter 20 Application

View Set

Market Efficiency, Market Failure, International Trade

View Set

Covalent, Polar Covalent, and Ionic Bonds -- Chem. 121

View Set

mkt 327 for exam 3 quiz 13, 14, 15, 16, Marketing Chp. 15, 16, 21, Marketing Ch 9 10 12, MKTG 3433 Exam 2 UARK, MGMT 3433 UARK Exam 2, Marketing 3433 Lezon Test 2, MKTG 3433 UARK Test 2, MKTG 3433 Chapters 9,10,12,13,14,15,16,17,18 EXAM 2 (SUMMER), M...

View Set