Add Your Blog | | Signup
Algorithms Orbit · 4M ago

Decreasing Complexity Means Increasing Performance

What is wrong the piece of C Language code below?for ( i = 1 ; i <= length(str) ; i ++ ) { // Do some stuff}There is a recalculation of the length of the string at every iteration, which ...
Algorithms Orbit · 1Y ago

Indirect Recursion - A Natural Phenomenon

Indirect recursion could be noticed in seeds and trees: a seed ends up to be a tree, and the latter produces many seeds, which themselves become trees and so forth.An interesting case was be...
Algorithms Orbit · 1Y ago

Triple Nested Loops - Two Linear Loops and One Logarithmic with a non-Constant Base - The Monster

To obtain the function that tells the exact number of iterations a set of nested loops would perform didn't seem to be a tedious exercise. However, I came accross this interesting case:- Li...
Algorithms Orbit · 1Y ago

Logarithmic Summations and Discrete Loops - Ceiling and Floor Functions

Reading the so called paper "Discrete Loops and Worst Case Performance" (by Dr. Johann Blieberger), I came across some interesting summations:
Algorithms Orbit · 1Y ago

Asymptotic Analysis - Vehicles Race and Algorithm Running Time

First, watch this video:Now, let's assume the vehicles, namely the Jet, the Car, and the Motorcycle are your algorithms.Also, suppose the length of the racecourse is the size of the data n.C...
Algorithms Orbit · 1Y ago

Asymptotic Analysis - Approaching Algorithms to Mathematics (I)

Complexity theory is the field of mathematics that allows to determine the asymptotic order of growth of a given mathematical function.Let's take a look first at different possible orders of...
Algorithms Orbit · 1Y ago

Delving into Algorithm Analysis - Deducing the Mathematical Representation of a Determined Study Case (III) [Recursive Algorithms and Recursive Relations]

We have seen previously how could represent an iterative algorithm as a mathematical function.But how are we going to do so for recursive algorithms?Let's take a look at the renowned recursi...
Algorithms Orbit · 1Y ago

Delving into Algorithm Analysis - Deducing the Mathematical Representation of a Determined Study Case (II) [Iterative Algorithms and Sigma Notation]

In the precedent post, we concluded that the following code fragment: for (i = k; k <= n; i += inc) { /* * instructions */ }is equivalent to the following m...
Algorithms Orbit · 1Y ago

Delving into Algorithm Analysis - Deducing the Mathematical Representation of a Determined Study Case (I) [Iterative Algorithms and Sigma Notation]

First of all, it is pointless to try to study a constant time algorithm (see isFibonacci() routine below), so we can skip this situation.For example:short isFibonacci(int number) { int ...
Algorithms Orbit · 1Y ago

Algorithms - a Debut (III) [Algorithm Analysis - The Gist!]

Grasping algorithmic notions utilizing a programming language, along with data structures are enough to engage into writing impeccable computer programs and applications.With a little of exp...