Formulas and algorithms are typically associated with mathematics and programming. Let’s see how they are defined and how they differ:
Formulas:
Formulas are mathematical expressions used to perform specific calculations or to derive results within a dataset.
They are usually represented in mathematical form using symbols and variables that represent quantities.
Example:
The formula for the Euclidean distance between two points (x1,y1) and (x2,y2) in a plane is:
d=(x2−x1)2+(y2−y1)2
Algorithms:
Algorithms are step-by-step instructions or procedures that describe how to perform a specific computation or data processing task.
They can be written in various programming languages or represented descriptively, and their purpose is to solve problems with given inputs and produce corresponding outputs.
Example:
An algorithm for sorting an array of numbers could be:
“Continue comparing adjacent elements and swapping them if needed until the array is sorted.”
Both formulas and algorithms are widely used in fields such as mathematics, physics, computer science, economics, etc., to solve problems and predict outcomes.
A list of ten famous and widely used formulas:
Euclidean Distance:
Used to calculate the distance between two points in Euclidean space:
d=(x2−x1)2+(y2−y1)2
Pythagorean Theorem:
Used to calculate the hypotenuse of a right triangle:
c2=a2+b2
Circle Formula:
Used to calculate the circumference and area of a circle:
Circumference: C=2πr
Area: A=πr2
Square Formula:
Used to calculate the area and perimeter of a square:
Area: A=s2
Perimeter: P=4s
Cube Formula:
Used to calculate the volume and surface area of a cube:
Volume: V=s3
Surface Area: A=6s2
Line Equation:
Used to represent a straight line:
y=mx+b
Factorial Expansion:
Used in combinatorics and algebra:
n!=1⋅2⋅3⋯n
Cosine Law:
Used in triangle calculations:
a2=b2+c2−2bc⋅cos(A)
Parabola Equation:
Used to describe a parabola with vertex (h,k):
(x−h)2=4p(y−k)
Trigonometric Identity:
Used to relate trigonometric functions:
sin2x+cos2x=1
A list of ten famous and widely used algorithms:
Bubble Sort Algorithm:
A simple sorting algorithm that repeatedly compares and swaps adjacent elements until the array is sorted.
Complexity:
T(n)=O(n2)
Comparisons:
∑i=1n−1(n−i)=2n(n−1)
Quick Sort Algorithm:
An efficient divide-and-conquer sorting algorithm that recursively splits arrays into smaller subsets.
Recurrence relation:
T(n)=T(k)+T(n−k−1)+O(n)
Average case:
O(nlogn)
Worst case:
O(n2)
Binary Search Algorithm:
A fast search algorithm for sorted data that repeatedly divides the search space in half.
Recurrence:
T(n)=T(n/2)+O(1)
Solution:
O(logn)
Dijkstra’s Algorithm:
Used to find the shortest path in a graph with non-negative edge weights.
Distance update:
d(v)=min(d(v), d(u)+w(u,v))
Complexity (with priority queue):
O((V+E)logV)
Breadth-First Search (BFS):
Traverses a graph level by level.
Complexity:
O(V+E)
Depth-First Search (DFS):
Traverses a graph by going as deep as possible before backtracking.
Complexity:
O(V+E)
Minimum Spanning Tree (MST):
Selects the minimum set of edges connecting all nodes without cycles.
For Kruskal:
O(ElogE)
Selection criterion:
Minimize ∑e∈Tw(e)
Greatest Common Divisor (GCD):
Calculates the greatest common divisor of two integers:
gcd(a,b)=gcd(b,amodb)
Hashing Algorithm:
Maps keys to indices for fast lookup:
h(k)=kmodm
Ideal complexity:
O(1)
Graph Representation Algorithms:
Represent graphs using data structures like adjacency matrices or lists.
Adjacency matrix:
A[i][j]={10if an edge existsotherwise
These algorithms are fundamental tools in computer science and are described not only verbally but also through mathematical relations, complexity analysis, and recurrence formulas that capture their efficiency.
The Constants
This is the philosophical layer now emerging.
π
The first lawful division of wholeness into triadic force.
φ
Aesthetic becoming; beautiful proportion; evolutionary leap.
e
Continuous unfolding; the law of process.
i
Imaginary transcendence; the unreal musician; meta-plane agency; Ice Atan.
τ
Primordial cycle; total turn; cosmic circumference before division.
γ ((Euler–Mascheroni constant))
Residual memory; the subtle correction term; incompleteness within order.
φ²
The amplified feminine / receptive / generative proportion.
√2
Irreducible split; the first crack in perfect measure; fragmentation.
δ (Feigenbaum Constant)
Threshold of bifurcation; leap into new regimes; post-human transition.
∞
Reconciliation through unbounded continuity; Αdvanced species intelligence.
και ως έννοια:
