0% found this document useful (0 votes)
0 views8 pages

Lecture 2 Algorithm

The document provides an intuitive definition of algorithms and their properties, emphasizing the distinction between constructive and non-constructive objects in algorithm theory. It outlines the characteristics of constructive objects, computable sets, and the nature of algorithms, including their parameters and properties such as determinism and massiveness. Additionally, it discusses the historical context of algorithms and the importance of defining them clearly to solve mathematical problems effectively.

Uploaded by

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

Lecture 2 Algorithm

The document provides an intuitive definition of algorithms and their properties, emphasizing the distinction between constructive and non-constructive objects in algorithm theory. It outlines the characteristics of constructive objects, computable sets, and the nature of algorithms, including their parameters and properties such as determinism and massiveness. Additionally, it discusses the historical context of algorithms and the importance of defining them clearly to solve mathematical problems effectively.

Uploaded by

ali.quliev2023
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Lecture 2

INTUITIVE DEFINITION OF THE ALGORITHM CONCEPT AND ITS PROPERTIES

Constructive Objects.

Numerical Functions and Their Computational Algorithms

Constructive Objects. In modern mathematics, especially in algorithm theory, it is essential to


clearly differentiate between "constructive" and "non-constructive" approaches when considering
objects and logical consistencies. To properly understand the concept of an algorithm, the
following question must be answered:

What objects are given as input to an algorithm, and what objects are produced as output during
the computational process?

The answer: constructive objects.

The phrase "computational process (procedure)" in the definition of an algorithm should be


understood in a broader sense than mere numerical calculations. The input (initial), intermediate,
and final (output) results of an algorithmic process are all constructive objects. The concept of
constructive objects is a fundamental notion in algorithm theory and will be explained below
through several examples.

The simplest example of a constructive object is words composed of a given alphabet. Suppose a
finite set A = {a, b, c, ...} is given. Let us call this set an alphabet. The elements of A are letters
and words. We may also consider countable alphabets, where the letters could be, for example,
a1, b’, etc.

A word in alphabet A is defined as:

where the sequence consists of letters from the given alphabet. If n ≥ 0 is a natural number, then
the length of word u is n. In algorithm theory, 0 is considered a natural number. Therefore, the
set of natural numbers is represented as:

N0 = {0, 1, 2, .....}.

A word of length 0 is called an empty word and is denoted by Λ.

Let us illustrate that the addition of two natural numbers is an algorithm that processes words.
Suppose the input of the algorithm is the word P = 12+24 of length 5. The output of the
algorithm is the word Q = 36. Both words P and Q are formed using the alphabet
A = {0,1,2,...,9,+}, which consists of 11 symbols, namely digits from 0 to 9 and the + sign. Thus,
the algorithm of the addition operation processes constructive objects, namely words in the
alphabet A.

Other examples of constructive objects include natural numbers written in any numeral system,
formulas in propositional calculus, and more. In school algebra, literal expressions are
considered; in higher algebra, matrices; in discrete mathematics, graphs; in computer science, a
program written in any programming language can be a constructive object.

For example, a non-linearly written matrix:

10 12 5
A= 3 24 7
6 5 −3

can be easily transformed into a linearly written matrix:

A = [[10,12,5],[3,24,7],[6,5,-3]].

This representation of matrix A in the GAP computer system is intended for computations in
discrete mathematics.

A constructive object A can be constructed using sub-objects A1, A2, ..., which in turn consist of
smaller components B1, B2, ..., and so on. Ultimately, we reach the smallest components that
cannot be further divided. These symbols are immediately recognizable and form the alphabet of
words used to represent the examined objects in a linear form. The transformation of matrix A
into the linear word form A = [[10,12,5],[3,24,7],[6,5,-3]] follows this principle. Here, the parts
of the matrix are its rows, which, in turn, consist of smaller parts—the elements of the row. The
row elements are composed of symbols from the alphabet {0,1,2,...,9,-}.

Thus, we have determined the following:

Constructive objects can be described as words in a finite alphabet with a specific writing format.

By performing operations on the constructive object A using a given set of instructions, we


modify this object in specific ways. These modifications occur locally by replacing some discrete
parts of the object with others. For example, in matrices, rows can be changed; in words,
uppercase letters can be replaced. The following are not constructive objects because they cannot
be represented as words in a finite alphabet:

 A real number α in the form of an infinite decimal fraction.


 A function f(x) that maps N to N.
Computable Sets- Let us recall some concepts related to computable sets.

A set A is considered equivalent to a set B if there exists a bijection (one-to-one


correspondence) between them. If set A is equivalent to the set of natural numbers N, then A is
called a computable set. In this case, a bijection f: N → A exists, and for any f(n) = a, the
element a can be substituted by n. Thus, we obtain the set A = {a0, a1, a2, ...}, where ai ≠ aj for
i ≠ j, indicating that A is computable.

Definition 2.1. A set A is computable if and only if its elements can be described as a non-
repeating infinite sequence:

A = {a0, a1, a2, ...}, where ai ≠ aj for i ≠ j. (2.2)

For example, the set of integers Z is computable because it can be described as the sequence
0,1,-1,2,-2,3,-3, ...

Basic Properties of Computable Sets

1. A subset of a computable set is either finite or computable.


2. The union of a finite or countable number of computable sets is computable.
3. The set of real numbers is not a computable set.
4. If xi is a computable set for any n ≥ 0, then the set M formed from sequences
(x1, x2, ..., xn) is computable.

5. If A is a finite alphabet and X is the set of words in this alphabet, then X is a computable
set.

If M is a set of infinite constructive objects and serves as an infinite set of input objects for an
algorithm, then M can be considered a set of words in an alphabet. According to Definition 2.2
(5), M is a computable set.

Algorithms and Functions. The exact definition of the algorithm proposed by George and
Klini, the algorithmic process is reduced to the calculation of the value of a certain function f in
the set of natural numbers N. Let us consider what this position is based on.

Suppose that we have some algorithm ℳ. The input of this algorithm is an object P consisting of
the data set u1,u2,...,un. Each ui - constructive object is a word of the alphabet A -. In the
alphabet A - words form a countable (countable) set and are numbered by natural numbers.
Therefore, each u - constructive object has a number x ϵ N. The operation of assigning such
numbers is called encoding of objects. The x-numbers assigned (assigned) to objects are called
their code numbers. Note that the determination of an object by number and a number by an
object is carried out with the help of algorithms. We will consider this topic in lecture 8.
code numbers x1,x2,...,xn. Suppose that the input of the algorithm ℳ is a string of constructive
During various calculations, instead of the constructive objects u1,u2,...,un, we can consider their

objects u1,u2,...,un, and the output of the algorithm is an object v with the number y. In this case,
after switching to code numbers, we can consider that the input of the algorithm is a string
(x1,x2,...,xn) consisting of n natural numbers, and the output is a number y ϵ N.

( x1,x2,...,xn) Algorithm instruction y


By the instruction of the algorithm we mean “the rule that assigns the element y ϵ N to the string
(x1,x2,...,xn)”. If we consider that the function f( x1,x2,...,xn ) is defined in the set N - the set of

The ℳ -algorithm computes the n -dimensional function f(x1,x2,...,xn ) defined in the set N –
arguments (x1,x2,...,xn) corresponds to one value of the function, we get the following.

natural numbers.

From the above, it becomes clear why functions defined on the set of natural numbers are the
subject of discussion in the theory of algorithms.

Partial functions. When considering the above, it is necessary to take into account the following

the output as a result of processing. Therefore, the f - function calculated by the algorithm ℳ is
facts. The object P given to the input of the algorithm does not always turn into an object Q at

not always defined for all arguments. Therefore, the concept of a partial function arises. Suppose
that n ϵ N.

Definition 2.1. By an n -dimensional partial f - function defined on the set of natural numbers,
we mean a rule that assigns to a certain set (x1,x2,...,xn ) natural numbers of the same amount

f( x1,x2,...,xn )∈ N.

Thus, the function f(x1,x2,...,xn ) may not have a value. The values of the set X (x1,x2,...,xn )
where the values of the function are determined are called the domain of the function f and are
denoted as Dom(f). The values that the function f takes are called the range of the function and
are denoted as Ran(f). The nth degree of the set of rows (x1,x2,...,xn ) is called N n and is denoted
as Nn. Here xi  N and i=1,2,,...,n. According to what was said

Dom (f)  Nn and Ran(f)  N.

Then

Dom( f)= {(x1,x2,...,xn ) | f (x1,x2,...,xn) exists} , (2.3)


Ran( f)={f( x1,x2,...,xn ) | x1,x2,...,xn  N} . (2.4)
Thus, the partial function f of dimension n is the inverse of the subset X = Dom(f)
of the set Nn in the set N. This gives the following remark. Remark 2.1. Suppose
that f is a partial function of dimension n satisfying the condition Dom(f)≠Ø. In
this case, n is uniquely defined. Here we want to note that f – n-dimensional
function along with the concept of f – n-argument function.
If the value of the function is determined at any value of the argument, then such a
function f – is called a function defined everywhere. Therefore, for the partial
function f (x1,x2,...,xn ) to be defined everywhere, Dom(f)=Nn must be defined.
When n = 0, we will consider a function defined everywhere, f – a zero function,
without any arguments. In this case, the value of the f -function does not change
and always corresponds to any number a. In this case, the f -function (the function
that takes the value a) is taken to be equal to the number a.
The above is also true if the set N is replaced by any set A. If there is a function f
that maps the set A to the set B in a certain order, then the expression f : AB is
true. If Dom(f) = A, then we say that f is the inverse of the set A in the set B. From
now on, unless certain conditions are set in advance, a function will be understood
as a partial function of some variable defined in the set of natural numbers. The

Definition 2.2. If there is an algorithm ℳ that can compute the f -function, then
value of the function must also be a natural number.

understood by the term “algorithm ℳ that can compute the f -function”.


the function f(x1,x2,...,xn) is called a computable function. The following is

1. If the input of the algorithm ℳ is given arguments (x1,x2,...,xn) belonging


to the domain of the function f – then the algorithm stops and gives the

2. If the input of the algorithm ℳ is given arguments that do not belong to the
result f( x1,x2,...,xn ).

domain of the function f – then the algorithm will either run infinitely or
will finish without giving any result.
The concept of a computable function is based on the intuitively defined concept of
an algorithm and does not yet have a precise definition. Therefore, the following
statement is true. The concept of a computable function is intuitive and does not
have a precise definition.
In the following lectures, the intuitive concept of computable functions will be
contrasted with the mathematically defined concept of a partially recursive
function.
INTUITIVE DEFINITION OF THE CONCEPT OF ALGORITHM AND ITS
PROPERTIES

Even in ancient times, in Egypt and Greece, problems were solved using
various calculation rules. Here, problems were solved by applying precisely
defined operations to the initial data. Finding an algorithm for solving a certain
class of problems is one of the main goals of mathematics. For example, any
algebraic equation of degree k has no more than k distinct roots. Here, the problem
arises of creating an algorithm that would make it possible to solve the problems of
determining the number of roots of an algebraic equation, whether it is repeated or
not, and determining the roots of the solution with a certain accuracy.

We know that in algebra, the Sturm rule was found for determining the real
roots of an algebraic equation, and the Lobachevsky algorithm for determining
these roots.

The history of the emergence of the algorithm is very ancient. Thus, in the
9th century, an Uzbek mathematician first discovered the rule for performing four
mathematical operations. The Greeks called this rule an algorithm, and the
Europeans called it an algorithm. If we generalize, the algorithm can be defined as
follows.

An algorithm is a sequence of operations designed to solve a given problem. In


other words, an algorithm is a sequence of operations on the initial data, the
execution of which leads to a solution to the problem under consideration. Later,
the term algorithm acquired a more general meaning and was used as a sequence of
operations that must be performed to achieve a certain goal. After the creation of
the computer, this concept began to be applied more widely and eventually turned
into a theory. Starting from the 1930s, the computational process and its
applications developed as procedures. For example. Algorithm for solving a square
trinomial, algorithm for summing the elements of the main diagonal in a square
array, algorithm for the product of the elements of the lower diagonal, algorithm
for finding numbers whose cubes are equal to the sum of the digits in three-digit
numbers, etc. The theory of algorithms is a section of mathematical cybernetics
that studies the general aspects and properties of algorithms.

There are 6 main parameters that characterize an algorithm:

1) starting rule (starting rule)


2) data set,
3) direct operation rule,
4) set of possible intermediate results,
5) termination rule (final rule),
6) rule for obtaining the result.

In the intuitive definition of an algorithm, concepts such as “clear instruction,”


“precise instruction,” “operation,” and “solving an arbitrary problem” need to be
clarified, meaning that the properties of the algorithm must be explained.
1. The algorithm must be described in such a way that the executor can
determine it with a single value. Each step must be definite. This property is
called the determinism property.
2. The algorithm must have the property of massiveness. This means that the
general problem must be determined for the solution of all specific problems.
For example. The Euclidean algorithm has a massive nature in finding the
greatest common divisor of any two natural numbers.
3. The algorithm must have a result. That is, the result must be obtained after a
finite step. For example. In the calculation of y=x/(1-x2), due to the
impossibility of division by zero, a termination occurs when x=1. This property
is called the consequentiality property.
4. The discreteness property of the algorithm – (interruptions, separations) –
the algorithm must perceive the process of solving the problem as a sequential,
simple execution of steps, and each of its steps must be executed
independently. In other words, in the algorithmic process, the sequential
processing of the initial data set occurs in steps; step 1, step 2, ..... Each step is
determined by replacing one data set with another data set.
If any sequence of actions does not satisfy one of these properties, then that
sequence of actions is not an algorithm. In general, after solving any problem, we
can draw a conclusion about its solution algorithm. However, if we cannot solve
any problem, we cannot make a judgment about whether it has a solution algorithm
or not. The reason for this is that we do not know the exact mathematical definition
of an algorithm. If we knew this definition, then we would check whether the
problem satisfies this definition or not. If it did, then there would be a solution
algorithm for that problem, otherwise there would be no such algorithm. Thus, the
need to give an exact mathematical definition to an algorithm arises.
L-2. Intuitive definition of the concept of algorithm and questions related to its
properties.
1. What can you say about constructive objects?
2. Give the simplest examples of a constructive object.
3. What can you say about numerical functions and their calculation algorithms?
4. Explain algorithms and functions.
5. What can you say about the concept of algorithm?
6. How did people think about algorithms after the creation of the computer?
7. Can you give an intuitive definition of an algorithm?
8. How did people intuitively view algorithms after 1930?
9. How many basic parameters characterize an algorithm and what are they?
10. How many basic properties does an algorithm have?
11. What can you say about the property of certainty or determinism of an
algorithm?
12. - What can you say about the property of mass? Give examples.
13. What can you say about the property of discreteness? Give examples.
14. The property of consequentiality or finiteness - Give examples.
15. What does it mean to need to give a mathematical definition of an algorithm?

You might also like