StudySmarter - The all-in-one study app.

4.8 • +11k Ratings

More than 3 Million Downloads

Free

Suggested languages for you:

Americas

Europe

Algorithms

- Calculus
- Absolute Maxima and Minima
- Absolute and Conditional Convergence
- Accumulation Function
- Accumulation Problems
- Algebraic Functions
- Alternating Series
- Antiderivatives
- Application of Derivatives
- Approximating Areas
- Arc Length of a Curve
- Area Between Two Curves
- Arithmetic Series
- Average Value of a Function
- Calculus of Parametric Curves
- Candidate Test
- Combining Differentiation Rules
- Combining Functions
- Continuity
- Continuity Over an Interval
- Convergence Tests
- Cost and Revenue
- Density and Center of Mass
- Derivative Functions
- Derivative of Exponential Function
- Derivative of Inverse Function
- Derivative of Logarithmic Functions
- Derivative of Trigonometric Functions
- Derivatives
- Derivatives and Continuity
- Derivatives and the Shape of a Graph
- Derivatives of Inverse Trigonometric Functions
- Derivatives of Polar Functions
- Derivatives of Sec, Csc and Cot
- Derivatives of Sin, Cos and Tan
- Determining Volumes by Slicing
- Direction Fields
- Disk Method
- Divergence Test
- Eliminating the Parameter
- Euler's Method
- Evaluating a Definite Integral
- Evaluation Theorem
- Exponential Functions
- Finding Limits
- Finding Limits of Specific Functions
- First Derivative Test
- Function Transformations
- General Solution of Differential Equation
- Geometric Series
- Growth Rate of Functions
- Higher-Order Derivatives
- Hydrostatic Pressure
- Hyperbolic Functions
- Implicit Differentiation Tangent Line
- Implicit Relations
- Improper Integrals
- Indefinite Integral
- Indeterminate Forms
- Initial Value Problem Differential Equations
- Integral Test
- Integrals of Exponential Functions
- Integrals of Motion
- Integrating Even and Odd Functions
- Integration Formula
- Integration Tables
- Integration Using Long Division
- Integration of Logarithmic Functions
- Integration using Inverse Trigonometric Functions
- Intermediate Value Theorem
- Inverse Trigonometric Functions
- Jump Discontinuity
- Lagrange Error Bound
- Limit Laws
- Limit of Vector Valued Function
- Limit of a Sequence
- Limits
- Limits at Infinity
- Limits at Infinity and Asymptotes
- Limits of a Function
- Linear Approximations and Differentials
- Linear Differential Equation
- Linear Functions
- Logarithmic Differentiation
- Logarithmic Functions
- Logistic Differential Equation
- Maclaurin Series
- Manipulating Functions
- Maxima and Minima
- Maxima and Minima Problems
- Mean Value Theorem for Integrals
- Models for Population Growth
- Motion Along a Line
- Motion in Space
- Natural Logarithmic Function
- Net Change Theorem
- Newton's Method
- Nonhomogeneous Differential Equation
- One-Sided Limits
- Optimization Problems
- P Series
- Particle Model Motion
- Particular Solutions to Differential Equations
- Polar Coordinates
- Polar Coordinates Functions
- Polar Curves
- Population Change
- Power Series
- Radius of Convergence
- Ratio Test
- Removable Discontinuity
- Riemann Sum
- Rolle's Theorem
- Root Test
- Second Derivative Test
- Separable Equations
- Separation of Variables
- Simpson's Rule
- Solid of Revolution
- Solutions to Differential Equations
- Surface Area of Revolution
- Symmetry of Functions
- Tangent Lines
- Taylor Polynomials
- Taylor Series
- Techniques of Integration
- The Fundamental Theorem of Calculus
- The Mean Value Theorem
- The Power Rule
- The Squeeze Theorem
- The Trapezoidal Rule
- Theorems of Continuity
- Trigonometric Substitution
- Vector Valued Function
- Vectors in Calculus
- Vectors in Space
- Washer Method
- Decision Maths
- Geometry
- 2 Dimensional Figures
- 3 Dimensional Vectors
- 3-Dimensional Figures
- Altitude
- Angles in Circles
- Arc Measures
- Area and Volume
- Area of Circles
- Area of Circular Sector
- Area of Parallelograms
- Area of Plane Figures
- Area of Rectangles
- Area of Regular Polygons
- Area of Rhombus
- Area of Trapezoid
- Area of a Kite
- Composition
- Congruence Transformations
- Congruent Triangles
- Convexity in Polygons
- Coordinate Systems
- Dilations
- Distance and Midpoints
- Equation of Circles
- Equilateral Triangles
- Figures
- Fundamentals of Geometry
- Geometric Inequalities
- Geometric Mean
- Geometric Probability
- Glide Reflections
- HL ASA and AAS
- Identity Map
- Inscribed Angles
- Isometry
- Isosceles Triangles
- Law of Cosines
- Law of Sines
- Linear Measure and Precision
- Median
- Parallel Lines Theorem
- Parallelograms
- Perpendicular Bisector
- Plane Geometry
- Polygons
- Projections
- Properties of Chords
- Proportionality Theorems
- Pythagoras Theorem
- Rectangle
- Reflection in Geometry
- Regular Polygon
- Rhombuses
- Right Triangles
- Rotations
- SSS and SAS
- Segment Length
- Similarity
- Similarity Transformations
- Special quadrilaterals
- Squares
- Surface Area of Cone
- Surface Area of Cylinder
- Surface Area of Prism
- Surface Area of Sphere
- Surface Area of a Solid
- Surface of Pyramids
- Symmetry
- Translations
- Trapezoids
- Triangle Inequalities
- Triangles
- Using Similar Polygons
- Vector Addition
- Vector Product
- Volume of Cone
- Volume of Cylinder
- Volume of Pyramid
- Volume of Solid
- Volume of Sphere
- Volume of prisms
- Mechanics Maths
- Acceleration and Time
- Acceleration and Velocity
- Angular Speed
- Assumptions
- Calculus Kinematics
- Coefficient of Friction
- Connected Particles
- Conservation of Mechanical Energy
- Constant Acceleration
- Constant Acceleration Equations
- Converting Units
- Elastic Strings and Springs
- Force as a Vector
- Kinematics
- Newton's First Law
- Newton's Law of Gravitation
- Newton's Second Law
- Newton's Third Law
- Power
- Projectiles
- Pulleys
- Resolving Forces
- Statics and Dynamics
- Tension in Strings
- Variable Acceleration
- Work Done by a Constant Force
- Probability and Statistics
- Bar Graphs
- Basic Probability
- Charts and Diagrams
- Conditional Probabilities
- Continuous and Discrete Data
- Frequency, Frequency Tables and Levels of Measurement
- Independent Events Probability
- Line Graphs
- Mean Median and Mode
- Mutually Exclusive Probabilities
- Probability Rules
- Probability of Combined Events
- Quartiles and Interquartile Range
- Systematic Listing
- Pure Maths
- ASA Theorem
- Absolute Value Equations and Inequalities
- Addition and Subtraction of Rational Expressions
- Addition, Subtraction, Multiplication and Division
- Algebra
- Algebraic Fractions
- Algebraic Notation
- Algebraic Representation
- Analyzing Graphs of Polynomials
- Angle Measure
- Angles
- Angles in Polygons
- Approximation and Estimation
- Area and Circumference of a Circle
- Area and Perimeter of Quadrilaterals
- Area of Triangles
- Argand Diagram
- Arithmetic Sequences
- Average Rate of Change
- Bijective Functions
- Binomial Expansion
- Binomial Theorem
- Chain Rule
- Circle Theorems
- Circles
- Circles Maths
- Combination of Functions
- Combinatorics
- Common Factors
- Common Multiples
- Completing the Square
- Completing the Squares
- Complex Numbers
- Composite Functions
- Composition of Functions
- Compound Interest
- Compound Units
- Conic Sections
- Construction and Loci
- Converting Metrics
- Convexity and Concavity
- Coordinate Geometry
- Coordinates in Four Quadrants
- Cubic Function Graph
- Cubic Polynomial Graphs
- Data transformations
- De Moivre's Theorem
- Deductive Reasoning
- Definite Integrals
- Deriving Equations
- Determinant of Inverse Matrix
- Determinants
- Differential Equations
- Differentiation
- Differentiation Rules
- Differentiation from First Principles
- Differentiation of Hyperbolic Functions
- Direct and Inverse proportions
- Disjoint and Overlapping Events
- Disproof by Counterexample
- Distance from a Point to a Line
- Divisibility Tests
- Double Angle and Half Angle Formulas
- Drawing Conclusions from Examples
- Ellipse
- Equation of Line in 3D
- Equation of a Perpendicular Bisector
- Equation of a circle
- Equations
- Equations and Identities
- Equations and Inequalities
- Estimation in Real Life
- Euclidean Algorithm
- Evaluating and Graphing Polynomials
- Even Functions
- Exponential Form of Complex Numbers
- Exponential Rules
- Exponentials and Logarithms
- Expression Math
- Expressions and Formulas
- Faces Edges and Vertices
- Factorials
- Factoring Polynomials
- Factoring Quadratic Equations
- Factorising expressions
- Factors
- Finding Maxima and Minima Using Derivatives
- Finding Rational Zeros
- Finding the Area
- Forms of Quadratic Functions
- Fractional Powers
- Fractional Ratio
- Fractions
- Fractions and Decimals
- Fractions and Factors
- Fractions in Expressions and Equations
- Fractions, Decimals and Percentages
- Function Basics
- Functional Analysis
- Functions
- Fundamental Counting Principle
- Fundamental Theorem of Algebra
- Generating Terms of a Sequence
- Geometric Sequence
- Gradient and Intercept
- Graphical Representation
- Graphing Rational Functions
- Graphing Trigonometric Functions
- Graphs
- Graphs and Differentiation
- Graphs of Common Functions
- Graphs of Exponents and Logarithms
- Graphs of Trigonometric Functions
- Greatest Common Divisor
- Growth and Decay
- Growth of Functions
- Highest Common Factor
- Hyperbolas
- Imaginary Unit and Polar Bijection
- Implicit differentiation
- Inductive Reasoning
- Inequalities Maths
- Infinite geometric series
- Injective functions
- Instantaneous Rate of Change
- Integers
- Integrating Polynomials
- Integrating Trig Functions
- Integrating e^x and 1/x
- Integration
- Integration Using Partial Fractions
- Integration by Parts
- Integration by Substitution
- Integration of Hyperbolic Functions
- Interest
- Inverse Hyperbolic Functions
- Inverse Matrices
- Inverse and Joint Variation
- Inverse functions
- Iterative Methods
- Law of Cosines in Algebra
- Law of Sines in Algebra
- Laws of Logs
- Limits of Accuracy
- Linear Expressions
- Linear Systems
- Linear Transformations of Matrices
- Location of Roots
- Logarithm Base
- Logic
- Lower and Upper Bounds
- Lowest Common Denominator
- Lowest Common Multiple
- Math formula
- Matrices
- Matrix Addition and Subtraction
- Matrix Determinant
- Matrix Multiplication
- Metric and Imperial Units
- Misleading Graphs
- Mixed Expressions
- Modulus Functions
- Modulus and Phase
- Multiples of Pi
- Multiplication and Division of Fractions
- Multiplicative Relationship
- Multiplying and Dividing Rational Expressions
- Natural Logarithm
- Natural Numbers
- Notation
- Number
- Number Line
- Number Systems
- Numerical Methods
- Odd functions
- Open Sentences and Identities
- Operation with Complex Numbers
- Operations with Decimals
- Operations with Matrices
- Operations with Polynomials
- Order of Operations
- Parabola
- Parallel Lines
- Parametric Differentiation
- Parametric Equations
- Parametric Integration
- Partial Fractions
- Pascal's Triangle
- Percentage
- Percentage Increase and Decrease
- Percentage as fraction or decimals
- Perimeter of a Triangle
- Permutations and Combinations
- Perpendicular Lines
- Points Lines and Planes
- Polynomial Graphs
- Polynomials
- Powers Roots And Radicals
- Powers and Exponents
- Powers and Roots
- Prime Factorization
- Prime Numbers
- Problem-solving Models and Strategies
- Product Rule
- Proof
- Proof and Mathematical Induction
- Proof by Contradiction
- Proof by Deduction
- Proof by Exhaustion
- Proof by Induction
- Properties of Exponents
- Proportion
- Proving an Identity
- Pythagorean Identities
- Quadratic Equations
- Quadratic Function Graphs
- Quadratic Graphs
- Quadratic functions
- Quadrilaterals
- Quotient Rule
- Radians
- Radical Functions
- Rates of Change
- Ratio
- Ratio Fractions
- Rational Exponents
- Rational Expressions
- Rational Functions
- Rational Numbers and Fractions
- Ratios as Fractions
- Real Numbers
- Reciprocal Graphs
- Recurrence Relation
- Recursion and Special Sequences
- Remainder and Factor Theorems
- Representation of Complex Numbers
- Rewriting Formulas and Equations
- Roots of Complex Numbers
- Roots of Polynomials
- Roots of Unity
- Rounding
- SAS Theorem
- SSS Theorem
- Scalar Triple Product
- Scale Drawings and Maps
- Scale Factors
- Scientific Notation
- Second Order Recurrence Relation
- Sector of a Circle
- Segment of a Circle
- Sequences
- Sequences and Series
- Series Maths
- Sets Math
- Similar Triangles
- Similar and Congruent Shapes
- Simple Interest
- Simplifying Fractions
- Simplifying Radicals
- Simultaneous Equations
- Sine and Cosine Rules
- Small Angle Approximation
- Solving Linear Equations
- Solving Linear Systems
- Solving Quadratic Equations
- Solving Radical Inequalities
- Solving Rational Equations
- Solving Simultaneous Equations Using Matrices
- Solving Systems of Inequalities
- Solving Trigonometric Equations
- Solving and Graphing Quadratic Equations
- Solving and Graphing Quadratic Inequalities
- Special Products
- Standard Form
- Standard Integrals
- Standard Unit
- Straight Line Graphs
- Substraction and addition of fractions
- Sum and Difference of Angles Formulas
- Sum of Natural Numbers
- Surds
- Surjective functions
- Tables and Graphs
- Tangent of a Circle
- The Quadratic Formula and the Discriminant
- Transformations
- Transformations of Graphs
- Translations of Trigonometric Functions
- Triangle Rules
- Triangle trigonometry
- Trigonometric Functions
- Trigonometric Functions of General Angles
- Trigonometric Identities
- Trigonometric Ratios
- Trigonometry
- Turning Points
- Types of Functions
- Types of Numbers
- Types of Triangles
- Unit Circle
- Units
- Variables in Algebra
- Vectors
- Verifying Trigonometric Identities
- Writing Equations
- Writing Linear Equations
- Statistics
- Bias in Experiments
- Binomial Distribution
- Binomial Hypothesis Test
- Bivariate Data
- Box Plots
- Categorical Data
- Categorical Variables
- Central Limit Theorem
- Chi Square Test for Goodness of Fit
- Chi Square Test for Homogeneity
- Chi Square Test for Independence
- Chi-Square Distribution
- Combining Random Variables
- Comparing Data
- Comparing Two Means Hypothesis Testing
- Conditional Probability
- Conducting a Study
- Conducting a Survey
- Conducting an Experiment
- Confidence Interval for Population Mean
- Confidence Interval for Population Proportion
- Confidence Interval for Slope of Regression Line
- Confidence Interval for the Difference of Two Means
- Confidence Intervals
- Correlation Math
- Cumulative Distribution Function
- Cumulative Frequency
- Data Analysis
- Data Interpretation
- Degrees of Freedom
- Discrete Random Variable
- Distributions
- Dot Plot
- Empirical Rule
- Errors in Hypothesis Testing
- Estimator Bias
- Events (Probability)
- Frequency Polygons
- Generalization and Conclusions
- Geometric Distribution
- Histograms
- Hypothesis Test for Correlation
- Hypothesis Test for Regression Slope
- Hypothesis Test of Two Population Proportions
- Hypothesis Testing
- Inference for Distributions of Categorical Data
- Inferences in Statistics
- Large Data Set
- Least Squares Linear Regression
- Linear Interpolation
- Linear Regression
- Measures of Central Tendency
- Methods of Data Collection
- Normal Distribution
- Normal Distribution Hypothesis Test
- Normal Distribution Percentile
- Paired T-Test
- Point Estimation
- Probability
- Probability Calculations
- Probability Density Function
- Probability Distribution
- Probability Generating Function
- Quantitative Variables
- Quartiles
- Random Variables
- Randomized Block Design
- Residual Sum of Squares
- Residuals
- Sample Mean
- Sample Proportion
- Sampling
- Sampling Distribution
- Scatter Graphs
- Single Variable Data
- Skewness
- Spearman's Rank Correlation Coefficient
- Standard Deviation
- Standard Error
- Standard Normal Distribution
- Statistical Graphs
- Statistical Measures
- Stem and Leaf Graph
- Sum of Independent Random Variables
- Survey Bias
- T-distribution
- Transforming Random Variables
- Tree Diagram
- Two Categorical Variables
- Two Quantitative Variables
- Type I Error
- Type II Error
- Types of Data in Statistics
- Variance for Binomial Distribution
- Venn Diagrams

Everyone gets excited when its summer time because it means no more school for a while. We get to do different things and visit family. Every day is a new activity. But during the school period you do the same thing every week day, especially in the mornings. If you write down everything you do in the morning in the order that you do them, that is called an **algorithm**. You can also call the series of steps you take to solve a math problem an **algorithm**.

In this article, we will learn about **algorithms**, their properties and their applications.

An **algorithm** shows the order in which a process should be followed for an event to occur or for a problem (a mathematical problem) to be solved.

Almost every activity you can think of has an algorithm. Your morning routine has an algorithm. The recipe for your food and how you prepare it has an algorithm. The process of building a house has an algorithm. Basically, anything you can think of that involves a series of processes has an algorithm. For example if you want to make a cup of tea in the morning you'll probably follow the steps below.

Step 1 - Boil water in a kettle

Step 2 - Put a tea bag in a cup

Step 3 - Pour the boiled water into the cup

Step 4 - Add milk to the tea

Step 5 - Add sugar to the tea

Step 6 - Stir the tea

Step 7 - Drink the tea

The above steps make up an algorithm for preparing a cup of tea.

An algorithm should contain an **input**, the process to be carried out and the desired **output**. Apart from your everyday activities, algorithms also help in problem-solving. When the process for solving a problem is properly outlined in the correct order, the problem will be more easily solved.

Algorithms are very essential, especially for mathematicians, computer scientists and programmers. Before they attempt to solve any problem, they must, first of all, write down the steps to be taken to solve the problem in the correct order. This helps to solve the problem quickly because there is a clear path to follow.

The steps that makes up an algorithm can also be represented in other forms like in a flow chart. To see what a flow chart looks like and to know more about it, check out the article on Charts and diagrams.

There are many properties of algorithms but the general ones are below.

**Input**- An algorithm can have zero or more inputs. This means that there can be algorithms with no input at all, just one input, or multiple inputs. For example, if the algorithm is only going to print a statement, there is no input for that. You will have an output which is the statement. On the other hand, if an algorithm shows how to add two numbers there are two inputs which are the numbers to be added.**Output**- Unlike the input, an algorithm cannot have zero output. It must have at least one output even if there are no inputs.**Finiteness**- When something is finite, it means it is limited to a specific number. So, an algorithm should have a finite number of steps. The process cannot go on and on. There should be a point of termination or end.**Definiteness**- Every step or instruction in an algorithm must be definite. It must be clear and precise. It shouldn't contain any ambiguity because it needs to be easily understood and interpreted. The instructions should have a meaning and this meaning must be specific. It shouldn't have multiple meanings.**Effectiveness**- An algorithm must be effective. It should be able to do what it was written to do. It should not contain any unnecessary or wrong statements otherwise, it won't be able to perform as it should and the correct output won't be gotten.

Mathematical problems can be solved using an algorithm like adding and subtracting numbers, finding the squares of numbers, calculating the areas of shapes, and many more. Let's take some examples to illustrate this.

Write an algorithm to add two numbers \( a \), \( b\) and \( c\).

**Solution.**

This algorithm will have three parts. The input, the process for addition, and the output. Here, there are two inputs \( a\) and \( b\). Below is the algorithm.

**Step 1** - Place \( a \), \( b\) and \( c\) on top of each other according to their place values forming columns.

**Step 2 **- Add the numbers from the right taking note of their place values.

**Step 3** - If you add the numbers in the right column and the number exceeds \( 9\), carry over the tens unit of the number to the next column.

**Step 4** - Write the sum of the numbers.

This algorithm is correct because it satisfies the properties of an algorithm. It has an input and output, it has a finite number of steps, each step of the algorithm is complete and easy to understand and the algorithm is able to perform the task that it is written for.

Let's take another example.

Write an algorithm to find out if a number is an odd number.

**Solution.**

**Step 1** - Divide the number by \( 2\)

**Step 2** - If after division there is a remainder, then the number is odd. Otherwise, it is not.

This algorithm is clear and complete. It has a finite number of steps and can give the desired result. It posses the properties of a good algorithm

Let's see some other examples.

Write an algorithm to calculate the area of a triangle.

**Solution.**

When calculating the area of a triangle, you consider the base and the height. Having this in mind, let's write the algorithm.

**Step 1** - Note the value of the base \( b\) of the triangle.

**Step 2** - Note the value of the height \( h\)** **of the triangle.

**Step 3** - Multiply the value for the base and height of the triangle (\( b \cdot h \)).

**Step 4** - Divide the result from the multiplication by \( 2\) to get the area \( \left( \frac {b \cdot h} {2} \right) \).

The algorithm above is a good one. You can identify the inputs as \(b\) and \(h\), and the output as the area of the triangle. It has a finite number of steps and each step is complete and precise. The algorithm can do what its meant to do.

Let's take another example.

Which of these is the correct algorithm for finding the perimeter of the shape below.

**Step 1**- Add \( a\) and \( b\).

** Step 2** - Add \( c\), \( d\) and \( e\) .

**Step 3** - The sum is the perimeter.

B. **Step 1** - Count the number of sides of the shape.

**Step 2** - Add.

**Step 3** - The sum is the perimeter.

C. **Step 1** - Note the value of the sides of the shape - \( a\), \( b\), \( c\), \( d\) and \( e\).

**Step 2** - Add the values \( a\), \( b\), \( c\), \( d\) and \( e\) to get the perimeter.

D. **Step 1 - **Note the value of the sides of the shape - \( a\), \( b\), \( c\), \( d\) and \( e\).

**Step 2 - **Add the values \( a\), \( b\), \( c\), \( d\) and \( e\).

**Step 3 **- Divide the sum by \( 5\) to get the perimeter.

**Solution**

The answer is option **C. **All other options do not possess the properties of an algorithm. They are ineffective and ambiguous.

Here's why the other options are wrong.

Option **A** is not effective. Following those steps will not give you the perimeter of the shape.

Option **B **is ineffective and ambiguous. You will not get the perimeter following the steps and the second step has no meaning.

Option **D** is a wrong algorithm. Its Step 3 says to divide by 5. You do not get the perimeter of a shape by dividing by anything. It is ineffective.

Let's see another type of example.

A friend has given you the following algorithm to look over. Explain why or why not this is an algorithm.

**The Algorithm**

**Step 1 - **Pick it up.

**Step 2 - **Walk to the bin.

**Step 3 - **Throw it away.

**Solution**

You should first examine each step of the algorithm to see what is wrong and what is write.

Step 1 says to ''pick it up''. What exactly should be picked up? It doesn't say what to pick up or where to pick it up from. There is no clarity and it doesn't make much sense. This goes against the definiteness property of an algorithm.

Step 2 says to ''walk to the bin''. It is an instruction to take an action. It makes sense on its own but because you do not know what step 1 is communicating, step 2 won't make as much sense as it should. This also goes against the definiteness property of an algorithm.

Step 3 says to ''Throw it away''. Again, throw what away? We do not know what we are to throw away. So this goes against the definiteness property of an algorithm.

The problem with this algorithm is that it doesn't have a clear meaning. It is incomplete and not easy to understand. That means you can go ahead to let your friend know that this is not an algorithm.

Let's see some more examples.

Which of the following is the correct sequence for an algorithm for brushing your teeth.

- Brush your teeth.
- Open your mouth.
- Open the toothpaste.
- Put tooth paste on the toothbrush.
- Rinse your mouth with water.

- 4, 3, 1, 2, 5
- 3, 2, 1, 4, 5
- 4, 2, 5, 1, 3
- 3, 4, 2, 1, 5

**Solution**

The correct option is **D. **It is the correct order of steps for brushing your teeth.

Let's take the last example.

Write an algorithm to solve \( 2 + 5 \times 4 \).

**Solution**

To write the correct algorithm for this, you need to have know about BODMAS. (To know more about BODMAS, check out the article on Structure and Calculation)

The algorithm is as follows.

**Step 1** - Multiply 5 and 4

**Step 2** - Add the result from the previous step to 2 to get the answer.

This algorithm can give the result it is supposed to give, The steps are clear and complete and it has a finite number of steps. Hence, it is a good algorithm.

As we've seen every activity we carry out and problem we try to solve has an algorithm. Let's look at some applications of algorithms.

- Algorithms are used in solving mathematical and scientific problems. Algorithms can be written for various mathematical problems and these algorithms will help for easy problem-solving.
- Algorithms are used in our everyday lives. You can write algorithms by yourself to help you carry out your daily activities properly. The recipes we follow for our food, our morning routine, the process of brushing our teeth and other activities all have algorithms.
- Algorithms are used in computer programming. Before programmers write their codes, they first write down a set of instructions in an orderly manner to follow. These instructions are the algorithms and they help the programmer to write accurate codes that will solve their problems.

- An algorithm shows the order in which a process should be followed for an event to occur or for a mathematical problem to be solved.
- An algorithm should contain an input, the process to be carried out and the desired output.
- The properties of algorithms are below.
**Input**- An algorithm can have zero or more inputs. This means that there can be algorithms with no input at all, just one input, or multiple inputs.**Output**- An algorithm cannot have zero output. It must have at least one output even if there are no inputs.**Finiteness**- An algorithm should have a finite number of steps. There should be a point of termination or end.**Definiteness**- Every step or instruction in an algorithm must be clear and precise. It shouldn't contain any ambiguity because it needs to be easily understood and interpreted.**Effectiveness**- An algorithm must be effective. It should be able to do what it was written to do.

An example of an algorithm is the steps taken to add two numbers.

Algorithms are used for problem solving and they are used to help carry out activities.

Properties of algorithms are below.

- Should have an input.
- Should have an output.
- Finiteness
- Definiteness
- Effectiveness.

Some types of algorithms are:

- Recursive algorithm
- Brute force algorithm
- Dynamic programming algorithm
- Greedy algorithm

More about Algorithms

Be perfectly prepared on time with an individual plan.

Test your knowledge with gamified quizzes.

Create and find flashcards in record time.

Create beautiful notes faster than ever before.

Have all your study materials in one place.

Upload unlimited documents and save them online.

Identify your study strength and weaknesses.

Set individual study goals and earn points reaching them.

Stop procrastinating with our study reminders.

Earn points, unlock badges and level up while studying.

Create flashcards in notes completely automatically.

Create the most beautiful study materials using our templates.

Sign up to highlight and take notes. It’s 100% free.

Over 10 million students from across the world are already learning smarter.

Get Started for Free