0% found this document useful (0 votes)
7 views4 pages

Understanding Algorithmic Thinking Basics

This document introduces the concepts of algorithms and algorithmic thinking. It explains that an algorithm is a precise series of instructions to solve a task and that algorithmic thinking involves understanding, executing, evaluating, and creating algorithms. It also describes how algorithms are communicated through programming languages and flowcharts, and why algorithms are important for automating tasks and enabling new capabilities.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

Understanding Algorithmic Thinking Basics

This document introduces the concepts of algorithms and algorithmic thinking. It explains that an algorithm is a precise series of instructions to solve a task and that algorithmic thinking involves understanding, executing, evaluating, and creating algorithms. It also describes how algorithms are communicated through programming languages and flowcharts, and why algorithms are important for automating tasks and enabling new capabilities.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Introduction to algorithmic thinking

By Dr. Wayne Brown

Profile
What is an algorithm?
What is algorithmic thinking?
How will the algorithms communicate?
Why are algorithms important?
What are the main properties of algorithms?
• An example - how to create an algorithm
What is an algorithm?

An algorithm is a precise, step-by-step set of instructions to solve a task. An algorithm


does not solve a task, but instead gives a series of steps that, if executed correctly, will result in a
solution to a task. Use everyday algorithms, but often not explicitly think about the steps
individuals of the algorithm. For example, from your car, putting on your clothes, accessing your computer, or a
recipe to cook a dish, they are all done using an algorithm, a series, step by step of the
actions.

For an algorithm to be valid, each step (or instruction) must be:


unequivocal - the instruction can only be interpreted in a single way
• executable - the person or device executing the instruction must know how to carry out the instruction, without
no additional information.
• order - the steps of an algorithm must be arranged in a proper sequence to be carried out correctly
the task.

An example algorithm is shown in seven steps. This algorithm explains how to make 'frozen lemon'.
cake fridge" (which is this author's favorite dessert).
Step 1: Pour a can of refrigerated condensed milk into a bowl.
Step 2: Whip the animal milk until peaks form.
Step 3: "Fold" 1 cup of sugar and 1/2 cup of lemon juice.
Step 4: If you want more lemon flavor, add 1 teaspoon of lemon zest.
Step 5: Extend a cookie crust on the bottom of a 13" by 9" pan.
Step 6: Pour the mixture of the domestic animal's milk into the pan.
Step 7: Place in the freezer until frozen.
Before leaving this example, ask yourself if the steps for this algorithm meet the mentioned criteria.
previously. That is, each step is clear, executable, and in the correct order?

This reading explains the concept of algorithms, some important properties of algorithms, and how they are
create algorithms, executed and validated.
What is algorithmic thinking?
Algorithmic thinking is the ability to understand, execute, evaluate, and create algorithms. We will discuss each
one of these ideas separately.

To be an algorithmic thinker, one needs the ability to understand and execute algorithms. Some people
find it easier to follow a series of precise instructions, while other people find it very difficult.
difficult. Some people seem to lack the patience and diligence needed to follow a step-by-step plan.
step. However, it is a valuable skill that everyone should master. Algorithmic thinking
requires patience, because each instruction must be executed in its correct sequence without skipping ahead or
overlooking some of the instructions. In addition, the algorithmic thinking to demand diligence and the
perseverance. It is often tedious to follow the steps of a complex algorithm, and people sometimes do not complete it.
an algorithm, since simply "giving up."

Algorithmic thinking also requires the ability to evaluate algorithms. It involves determining whether a
algorithm really solve a specific task. This can be very difficult. For example, a 'list of
"Pre-flight check" is an algorithm for preparing an airplane for takeoff. Let's assume that they were given
the task of determining whether a new 'pre-checklist' for the F35 (Joint Strike Fighter) is correct
(check all systems on the plane correctly) and complete (controls will not be carried out)
important). We hope that you would agree that this is an important job - the life of the pilot
it depends on doing things right - and that obtaining the correct and complete checklist will not be easy.
Note aside, one way to create the pre-checklist is to determine the blame of each one who crashed.
the new plane and add a new checklist to the list to prevent future accidents. However, the cost in lives and
money is too big. We need to get the right algorithm and complete it before the first
plane that takes off in order to avoid a loss of a single aircraft!)
And finally, algorithmic thinking includes the ability to create new algorithms. This is probably the
most challenging aspect of algorithmic thinking. Given a task, it can create a series of precise,
step by step the instructions that always solve the task correctly? Obviously, the complexity of the
The task has a great impact on the complexity of an algorithm that can perform the task. Simple tasks
typically can be achieved with simple algorithms, while complex tasks typically require
more complex algorithms.

A critical aspect of algorithm creation is the 'white executor' of an algorithm. For example, the 'target executor.'
a pre-checklist is a pilot. The average person on the street could not execute the list of
previous verification correctly, as it does not understand the instructions. The three, as previously indicated,
the characteristics of an algorithm instruction (that is, an instruction must be unambiguous, executable, and ordered
a) it must be consistent with the knowledge and experience of the "target executor." When creating an algorithm,
make sure that each instruction can be clearly interpreted and executed by the 'target executor.'

We live in the "information age," where many of the tasks that people need (or want) to do are
can be performed by computers. However, computers today do not have a real understanding
or cognition - that they can only perform tasks that people have developed algorithms to solve. For
So, to create algorithms that computers can execute, you must understand what a computer is.
capable of executing and able to write a series of unambiguous instructions that a computer can
execute successfully. For the rest of this document, we will limit our discussion to the development of algorithms
that can be executed on computers.

How will the algorithms communicate?


Each step (instruction) of an algorithm must be precisely indicated. It is very difficult to explain algorithms of
precision using only the English language. For example, re-read the sample algorithm for manufacturing
"frozen lemon fridge cake" and then answer the following questions:
Do livestock milk come in containers of different sizes? How much milk is 'one can'?
Does it matter what type of whisks are used to whip pet milk?
Is 'teaspoon' referring to a small spoon or a table spoon?
If it was about putting into practice the recipe for making lemon icebox cake, you could well discover others.
ambiguities in the instructions. To eliminate these communication problems, we need a language
I need for the algorithms that determine, especially because our 'white executioner' is a mute team. A
precise language to affirm the instructions of an algorithm that can be executed by a device called
a programming language.

Many programming languages have been developed over the years and each language has its own
special features and benefits. You have probably heard of some of these languages, such as C,
C++, Pascal, Basic, Java, Perl, Python, and Ada. A significant amount of time is required to learn a
new programming language and it is not a goal of CS110 to teach you how to program computers. We want
that the cadets become better problem solvers by becoming thinkers
algorithmic. One of the most common ways to express algorithms without the need to use a language of
Programming called flowcharts. Flowcharts provide a visual description of a process.
step by step. The biggest drawback of using flowcharts is that they are tedious to draw and difficult to
modify if they are hand-drawn on paper. A computer program called RAPTOR was
developed by Doctor Carlisle here at the USAF Academy, which allows a person to create an algorithm
in the form of a flowchart and then execute the flowchart to test its validity. Very
Cool! We are going to discuss the details of how to use RAPTOR in future lessons.

Why are algorithms important?


Algorithms are important for many reasons:
An algorithm documents the 'how' to carry out a particular task.
• Si un algoritmo está escrito así, se puede utilizar para llevar a cabo no sólo una sola tarea sino todo un grupo de
related tasks.
The existence of an algorithm means that the task can potentially be automated (i.e., performed by
a computer).
The automation of repetitive, tedious, or dangerous tasks frees people from having to perform them.
boring, time-consuming, or potentially deadly tasks.
The automation of some tasks that makes new things possible (for example, accessing web pages of all
the whole world in the blink of an eye.

Consider the possibility of telephones, for example. When telephones were invented, the problem of how
connecting a phone call to another person who is calling has been a problem for many years.
It was manually resolved by the telephone operators who removed the cables from the console and connected the
cables in the correct connection. It has been calculated that if this manual method is still used today to handle the
current daily phone calls made worldwide, each person on the planet would have to be a
telephony operator! Fortunately, due to the invention of computers and fast algorithms for
instruct the computers, almost all phone calls made today are automatically connected without
human intervention. What would your life be like without a phone? Can you imagine it? Without the algorithms, which is the way
What would life be like!

Algorithms are studied in CS110 because algorithmic thinking is transferable. If you can think and
reasoning accurately and solving algorithmic problems in a domain (for example, programming of
computers), then their ability to analyze and solve problems in other areas will improve.

What are the main properties of algorithms?


La siguiente es una lista de algunas de las propiedades importantes de algoritmos. Esta lista no es en absoluto
exhaustive or complete.

Property 1: For any given task (or related tasks), it is not trivial, there are many algorithms.
possible to carry out the task.

This greatly confuses many students. "Do you mean that there is more than one correct answer?"
The answer is YES! Remember that an algorithm is not the solution to a problem, but rather a step-by-step set.
the instructions to find a solution. Is there only one way to go from Mitchell Hall to Arnold Hall?

Property 2: An algorithm does not encode the theory underlying the instructional measures.

An algorithm explains how to perform a task. If the algorithm is correct, and if you follow the instructions
Exactly, it will carry out the task. But you cannot understand why some of the steps were taken. If a
the team is running an algorithm, this lack of understanding is not a problem. If a person is trying
to understand an algorithm so that it can be updated or improved, this lack of understanding can lead to
changes almost impossible. Complex algorithms often come with the documentation that provides a
detailed explanation of how they work.

Property 3: Some algorithms are more efficient than other algorithms.

The execution of an algorithm requires a certain amount of time. If an algorithm is used frequently, its
efficiency becomes a problem. It is common to create multiple algorithms to perform a task in
particular and then select the fastest algorithm to include in a final product. One of the development challenges
the software is to decide how much time and effort should be dedicated to the search and development of more algorithms
efficient.

Property 4: Computer programs that have been used for many years usually must be
modified over time to adapt to the changes in task requirements.

Computer programs are generally not static objects. They require 'maintenance' to
keep them updated with changes in task requirements. For example, a software program that calculates
income taxes should change every year as income tax laws change. Some
studies have shown that up to 75% of software development costs are consumed by the
maintenance of existing software.

In conclusion, when new algorithms are developed, they attempt to create one of the many possible sequences.
of instructions that will solve our task at hand. Ideally, we would like the algorithm to execute
quickly and be good,” he commented, “so it can easily be maintained over time.

An example - How to create an algorithm


This section will guide you through the process of creating an algorithm for a simple problem. We hope that
you can use the principles discussed here when the time comes for you to develop your
own algorithms for different tasks.

Example problem: two people work for the same company and have a combined total salary of dollars
W, but one person earns Q dollars more than the other person. How much does each of them earn?

Principle 1: Solve a specific case of the problem by hand, with pencil and paper.

A specific example of a problem is when all the 'variables' are given a specific value. Let's suppose
Let W be $57.00 and Q be $5.00. Now the problem reads:

Specific
Problem
Instance: Two people work for the same company and have a combined total salary of $57.00, but one
persona gana $ 5.00 dólares más que la otra persona. ¿Cuánto gana cada uno de ellos?
There are multiple ways to think about this problem. Two possible solutions are:
Arithmetic reasoning: algebraic reasoning:
Out of the $57, Person1 receives $5 more than Person2.
Therefore, both will equally share $57 - $5 = $52.

$52/2 is 26 dollars, so each one gets at least $26.

Person1 receives $31 ($26 + $5)


Person2 receives $26 Let X = Person1's payment
What pays Y = Person2 of.
Therefore, we know that the problem is that:
X=Y+5y
X + Y = 57.
Solve these 2 equations by substitution:
(Y + 5) + Y = 57
Y = 26
Therefore X = Y + 5 = 31
Please note: If you cannot solve this problem manually, it is impossible for you to write a
algorithm to solve the problem!

Principle 2: Generalize the solution by replacing the specific instance values with 'variables'.

The two previously shown solutions are now converted into:

Arithmetic reasoning: algebraic reasoning:


From the total salary W, Person1 earns Q dollars more than Person2.
Therefore, to both equally action (W - Q).

Each one gets at least (W - Q) / 2.

Persona1 gets (W - Q) / 2 + Q
Person2 gets (W - Q) / 2 Sea X = salary of Person1
What pays Y = Person2 of.
Therefore, we know that the problem of:
X=Y+Qy
X+Y=W.
Solve these equations 2 by substitution:
(Y + Q) + Y = W
Y = (W - Q) / 2
Therefore X = (W - Q) / 2 + Q

Principle 3: manual for executing the algorithm on various test cases to verify that responses are produced
correct. This is called desktop control or walking through the algorithm.
.
Ejemplo 1: W = 100, Q = 10
Persona1 = (100 - 10) / 2 + 10 = 55
Person2 = (100 - 10) / 2 = 45
(This is correct because 55 + 45 = 100 and Person1 earns 10 dollars more than Person2)

Example 2: W = 31, Q = 2
Person1 = (31 - 2) / 2 + 2 = 16,5
Person2 = (31 - 2) / 2 = 14.5
(This is correct because 16.5 + 14.5 = 31 and Person1 earns 2 dollars more than Person2)

Principle 4: After a general solution to the known task, write the correct instructions for
programming to implement the solution on the team.

How to write the correct programming instructions will be discussed in the upcoming lessons.

You might also like