Consultar ensayos de calidad


Algoritmos - tipos de algoritmos



Definicion: Algoritmo
Podemos encontrar muchas definiciones de algoritmo en los textos de programacion, todas ellas muy similares:
Conjunto ordenado y finito de pasos que permite hallar la solución de un problema.
Una secuencia de pasos que conducen a la realización de una tarea.
Descripción exacta de la secuencia en que se ha de realizar un conjunto de actividades tendientes a resolver un determinado tipo de problema o procedimiento.
Conjunto de sentencias / instrucciones en lenguaje nativo, los cuales expresan la lógica de un programa.
Es un sistema por el cual se llega a una solución, teniendo en cuenta que debe de ser definido, finito y preciso.
Toda receta, proceso, rutina, método, procedimiento, técnica, formula que resuelven un determinado problema.


Conjunto de instrucciones concretas y detalladas mediante el cual se consigue una acción determinada.
Conjunto de reglas que permiten obtener un resultado determinado a partir de ciertas reglas definidas.
Descripción precisa de una sucesión deinstrucciones que permite llevar a cabo un trabajo en un número finito de pasos.
Un conjunto de símbolos y procedimientos usados en la realización de un calculo.

¿tipos de algoritmos…?

Existen dos tipos y son llamados así por su naturaleza:
Cualitativos: Son aquellos en los que se describen los pasos utilizando palabras.
Cuantitativos: Son aquellos en los que se utilizan calculos numéricos para definir los pasos del proceso.

Lenguajes Algorítmicos

Un Lenguaje algorítmico es una serie de símbolos y reglas que se utilizan para describir de manera explícita un proceso.

Tipos de Lenguajes Algorítmicos
Graficos: Es la representación grafica de las operaciones que realiza un algoritmo (diagrama de flujo).


No Graficos: Representa en forma descriptiva las operaciones que debe realizar un algoritmo (pseudocodigo).

INICIO
   Edad: Entero
   ESCRIBA “cual es tu edad?”
   Lea Edad
   SI Edad >=18 entonces
      ESCRIBA “Eres mayor de Edad”
__________ ______ ____ _____ _______ ______ ______________

__________ ______ ____ _____ _______ ______ ______________

__________ ______ ____ _____ _______ ______ ______________

__________ ______ ____ _____ _______ ______ ______________

__________ ______ ____ _____ _______ ______ ______________

__________ ______ ____ _____ _______ ______ ______________

__________ ______ ____ _____ _______ ______ ______________

__________ ______ ____ _____ _______ ______ ______________

__________ ______ ____ _____ _______ ______ ______________

__________ ______ ____ _____ _______ ______ ______________

__________ ______ ____ _________________

“MUST”

Must' is most commonly used to express certainty. It can also be used to express necessity or strong recommendation, although native speakers prefer the more flexible form 'have to.'

Exercise 3
Mix and Match

He´s broken his leg. It must be great living here.

The house is huge. You must be very tired.

You’ve had a long day. It must be worth a fortune.

I can’t find my keys. He must be in terrible pain.

If you missed lunch, you must be hungry.

It’s a beautiful city. He’s older than me so he must be 20

Whose is this umbrella? You must be cold.

How old is William now? It must be Sally’s.What time is it? They must be here somewhere.

You’re not wearing a coat. It must be six o’clock by now.

Exercise 4
Complete the sentences using MUST or HAVE TO
1) I ____________ be at the meeting by 10:00. I will probably ___________ take a taxi if I want to be on time.

2) You _______________ submit the application if it has not been completely filled out. Check that the name, address, and background information are correct. If the form is not accurate and complete, you will be rejected and you will __________ reapply at a later date.

3) Tina: Look at these flowers - they're beautiful! But, there's no card. Who could have sent them?
Stephanie: It ____________ have been David. He's the only one who would send you flowers.

4) You _________________ forget to pay the rent tomorrow. The landlord is very strict about paying on time.
5) You __________________ be so rude! Why don't you try saying 'please' once in a while?

6) If you are over 18 in California, you ______________ take a driver training course to get a driver's license. You can have a friend or a family member teach you instead. But remember, you ___________ still get your permit before you start practicing.

7) Yesterday, I ____________ cram all day for my French final. I didn't get to sleep until after midnight.

8) Nate: Oh no! I completely forgot we were supposed to pick Jenny up at the airport. Barbara: She ___________ still be sitting there waiting for us.

9) When I was a child my grandmother was continually correcting our manners. She always used to say, 'One _____________ eat with one's mouth open.' Or, she would correct us by saying, 'One ____________ rest one's elbows on the table.' And every time I wanted toleave the table, she would say, 'One ___________ ask to be excused.'

10) I've redone this math problem at least twenty times, but my answer is wrong according to the answer key. The answer in the book ___________ be wrong!

REMEMBER: 'Do not have to' vs. 'Must not'
'Do not have to' suggests that someone is not required to do something. 'Must not' suggests that you are prohibited from doing something.
Examples:
* You must not eat that. It is forbidden, it is not allowed.
* You don't have to eat that. You can if you want to, but it is not necessary

“SHOULD
SHOULDN’T”
'Should' is most commonly used to make recommendations or give advice. It can also be used to express obligation as well as expectation.
Examples:
* When you go to Berlin, you should visit the palaces in Potsdam. recommendation
* You should focus more on your family and less on work. advice
* I really should be in the office by 7:00 AM. obligation
* By now, they should already be in Dubai. expectation

Exercise 5
Complete the sentences using “Should”

1.    FINSI
   ESCRIBA “fin del algoritmo”
   FIN


Política de privacidad