Docsity
Docsity

Prepara i tuoi esami
Prepara i tuoi esami

Studia grazie alle numerose risorse presenti su Docsity


Ottieni i punti per scaricare
Ottieni i punti per scaricare

Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium


Guide e consigli
Guide e consigli


Riassunto informatics, Schemi e mappe concettuali di Elementi di Informatica

Riassunto di informatics, algoritmi

Tipologia: Schemi e mappe concettuali

2024/2025

Caricato il 09/01/2026

Utente sconosciuto
Utente sconosciuto 🇮🇹

1 / 4

Toggle sidebar

Questa pagina non è visibile nell’anteprima

Non perderti parti importanti!

bg1
2.1 The Science of Algorithms
(Algorithmics) – Summary
Nature and Characteristics of Algorithms
Analgorithmis a central concept in mathematics and informatics. Originally referring to
arithmetic procedures, it now designates any exact and finite sequence of instructions that,
when executed, solves a problem. In informatics, an algorithm is defined as a precise and
finite list of instructions for an executor to process data and achieve the expected result.
Algorithms have several essential characteristics:
Discreteness:A finite number of sequential steps, each executed fully before moving
to the next.
Determinacy:Given the same input, the output is always identical.
Understandability:No ambiguous instructions; the executor does not make
independent decisions.
Effectiveness:Execution of all steps guarantees a result within real time.
Mass character:Works correctly for a class of problems, not just one instance.
Algorithms can be described in different forms:
Textual(natural language or algorithmic language),
Graphical(e.g., flowcharts),
Analytical(formulas),
Computer program(in programming languages).
Regardless of form, they can be translated into standard programming structures. Edsger
Dijkstra showed that serial, branched, and cyclic constructs suffice to represent any
algorithm. Algorithmics, as a science, intersects computer science, natural sciences,
economics, and technology. Its key areas are:
1. Algorithm design:Crafting efficient problem-solving procedures.
2. Algorithmic complexity theory:Studying the inherent difficulty of problems.
3. Algorithm analysis:Evaluating algorithm properties and resource requirements.
2.1.1 Algorithm Design
An algorithm represents a problem-solving idea independent of coding syntax or hardware.
Programs are implementations of algorithms, while algorithm creation combines creativity
and engineering. Several design paradigms evolved:
pf3
pf4

Anteprima parziale del testo

Scarica Riassunto informatics e più Schemi e mappe concettuali in PDF di Elementi di Informatica solo su Docsity!

2.1 The Science of Algorithms

(Algorithmics) – Summary

Nature and Characteristics of Algorithms

An algorithm is a central concept in mathematics and informatics. Originally referring to arithmetic procedures, it now designates any exact and finite sequence of instructions that, when executed, solves a problem. In informatics, an algorithm is defined as a precise and finite list of instructions for an executor to process data and achieve the expected result. Algorithms have several essential characteristics:  Discreteness: A finite number of sequential steps, each executed fully before moving to the next.  Determinacy: Given the same input, the output is always identical.  Understandability: No ambiguous instructions; the executor does not make independent decisions.  Effectiveness: Execution of all steps guarantees a result within real time.  Mass character: Works correctly for a class of problems, not just one instance. Algorithms can be described in different forms:  Textual (natural language or algorithmic language),  Graphical (e.g., flowcharts),  Analytical (formulas),  Computer program (in programming languages). Regardless of form, they can be translated into standard programming structures. Edsger Dijkstra showed that serial, branched, and cyclic constructs suffice to represent any algorithm. Algorithmics, as a science, intersects computer science, natural sciences, economics, and technology. Its key areas are:

  1. Algorithm design: Crafting efficient problem-solving procedures.
  2. Algorithmic complexity theory: Studying the inherent difficulty of problems.
  3. Algorithm analysis: Evaluating algorithm properties and resource requirements.

2.1.1 Algorithm Design

An algorithm represents a problem-solving idea independent of coding syntax or hardware. Programs are implementations of algorithms, while algorithm creation combines creativity and engineering. Several design paradigms evolved:

Operational Approach (early computers): o Emphasized minimal memory and time usage. o Relied on direct execution of low-level operations (assignment, arithmetic, jumps). o Drawback: excessive jumps caused confusing, unmaintainable code.  Structural Approach (1960s, Dijkstra & Wirth): o Based on hierarchical program architecture and subroutines as abstraction. o Benefits: programming discipline, understandability, reliability, effectiveness, reduced costs. o Enabled large, complex systems and correctness proofs. o Four principles:

  1. Formalized process development,
  2. Hierarchy of abstraction levels,
  3. Divide and conquer (problem splitting),
  4. Hierarchical ordering of modules. o Methods: step-by-step detailing or combining smaller units into higher abstractions.  Modular Approach: o A module = subroutines + the data they handle. o Provides abstraction, encapsulation, and separation of concerns. o Interfaces define interaction; implementation details remain hidden. o Advantages: prevents external interference, simplifies collaboration, and clarifies program design. o Ideally, each module serves one functionality with clear documentation. o Even languages without explicit module support (Pascal, C, PHP) implement modularity via functions, classes, or libraries. The choice of approach is critical, as different techniques can yield varying levels of efficiency.

2.1.2 Algorithmic Complexity Theory

Algorithm complexity measures the resources required by an algorithm, mainly time and space (RAM). Modern technology minimizes memory concerns, so focus is usually on time complexity.  Why time instead of seconds? Execution time depends on hardware, so complexity is measured by the number of elementary operations (arithmetic, assignment, comparisons, I/O).  Scaling of execution time: Important for large input data and real-time systems. Complexity is usually expressed in relative units (operation counts).  Examples: o Summing n numbers → O(n). o Sequential search in n -element array:

 Example 2: Double sum (nested loops) → O(n²).

  1. Assign costs to operations (add/sub = fast, mult/div = slower, large integers cost more).
  2. Express efficiency as growth functions.  Interpretation: Growth rates indicate overall efficiency, but constants and lower-order terms affect real-world performance (especially with small inputs or specific hardware). Asymptotic notation is most useful for large-scale computations.