Lex Humanitas reveals where form hides power and replaces meaning.

Structure and the Working Mechanism of an Object

In ordinary speech, “the structure of an object” and “the way an object is organized and works” often merge into one concept. But when constructing a framework for algorithms, they can be distinguished as follows:

Structure of an object — what parts it consists of and how those parts are connected.
Working mechanism of an object — how that structure works, and what rules of access,
modification, and behavior it has.

That is:

structure = composition + connections
working mechanism = composition + connections + operating rules

Using an array:

array = [7, 3, 9, 1, 5]

Structure of an Array

Structure answers the question:

What is inside, and how is it arranged?

An array has:

elements
indices
order
length
positions

That is, one can say:

an array is a sequence of elements,
where each element occupies a particular position
and can be accessed through an index.

That is structure.

Working Mechanism of an Array

The working mechanism answers the questions:

How does it work?
What can be done with it?
What rules govern this form?

For example:

an element can be read by index
an element can be modified by index
indices range from 0 to length - 1
access by index is usually fast
inserting into the middle may require shifting elements
deleting from the middle may require shifting elements
the size may be fixed or variable, depending on the specific implementation

That is already the working mechanism.

In Brief

Structure of an array:
[index] → [element]
[index] → [element]
[index] → [element]

Working mechanism of an array:
you can access an element by index
you can replace a value
you can traverse from left to right
you can search for a value
elements may shift during insertion

A Very Important Distinction

Structure is closer to a picture of the object.

Here are the elements.
Here are the positions.
Here is the order.

Working mechanism is closer to the mechanics of the object.

How do you retrieve an element?
How do you modify an element?
What happens when one is added?
What happens when one is deleted?
What is fast?
What is slow?

An Example Outside Programming

Consider a bicycle.

Structure of a bicycle:

frame
wheels
handlebars
chain
pedals
brakes

Working mechanism of a bicycle:

the pedals drive the chain
the chain transmits motion to the wheel
the handlebars change direction
the brakes slow down the wheel

Thus, structure tells us what exists and how it is connected.

The working mechanism tells us how all of it operates.

For a Diagram

OBJECT

1. Structure:
- what it consists of
- what parts exist
- how the parts are arranged
- how the parts are connected

2. Properties:
- what is inherent in this structure
- what parameters it has
- what limitations it has

3. Characteristics:
- what can be said about the object's specific current state

4. Operations:
- what can be done with the object

5. Working mechanism:
- how structure + properties + operations work together

Thus, the working mechanism is broader than structure.

Structure is the skeleton.
The working mechanism is the skeleton plus the mechanics of operation.

Using an array:

Structure:
the array consists of elements arranged by index.

Properties:
there is order, there is length, and there is access by index.

Characteristics:
length = 5, minimum = 1, maximum = 9.

Operations:
read, modify, traverse, search, sort.

Working mechanism:
the array stores elements in order, allows access to them by index,
and some operations require traversal or shifting of elements.
Scroll to Top