Docsity

Chapter 1 : introduction to Algorithm, Study notes of Algorithms and Programming

Toggle sidebar
bg1
Session N° : 1
Algorithmics and Data Structures 1
Chapter I. Introduction to Algorithm
University of Science and Technology HOUARI BOUMEDIENE
Faculty of Computer Science
Department of Artificial Intelligence and Data Science
Ilyes KHENNAK
Assitant Professor class A
Laboratory of Research in Artificial Intelligence (LRIA)
Office 212, Department IASD, Faculty of Computer Science
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17

Partial preview of the text

Download Chapter 1 : introduction to Algorithm and more Study notes Algorithms and Programming in PDF only on Docsity!

Session N° : 1

Algorithmics and Data Structures 1 Chapter I. Introduction to Algorithm University of Science and Technology HOUARI BOUMEDIENE Faculty of Computer Science Department of Artificial Intelligence and Data Science

Ilyes KHENNAK

Assitant Professor class A Laboratory of Research in Artificial Intelligence (LRIA) Office 212, Department IASD, Faculty of Computer Science

n Problem to Solve (statement)

n Calculate the area 𝒔 of a circle with radius 𝒓?

Slide 2 out of 23

n Solution (human organs) Data (input) Processing (operations)

  • ∗ − / Reading action Input organs (eyes, ...) Output organs (hands, ...) Result (output) Writing action Calculation action Processing organs

Memory (brain)

Slide 4 out of 23

n Solution (human calculation/application) Calculate the area 𝒔 of a circle with radius 𝒓, with: 𝒓 = 𝟐, 𝝅 = 𝟑. 𝟏𝟒 Input (Reading action) Read the radius value 𝒓: 𝒓 = 𝟐 Processing (Calculation action) Calculate the area 𝒔: 𝒔 = 𝝅 ∗ 𝒓𝟐^ = 𝟑. 𝟏𝟒 ∗ 𝟐𝟐 Output (Writing action) Write the result 𝒔: 𝒔 = 𝟏𝟐. 𝟓𝟔

Slide 5 out of 23

n Use of machines Electronic machine capable of performing high-speed calculations Calculator Smartphone Computer

Slide 7 out of 23

How can we communicate our solution in natural language to a machine?

Slide 8 out of 23

n Programming software (case of a computer) Software Hardware

Slide 10 out of 23

n Programming software (case of a computer) Software Hardware

Slide 11 out of 23

n Solution (machine organs) Data (input) Processing (operations) Reading action Input organs Processing organs

Memory Output organs Result (output) Writing action Calculation action Solution in natural language Solution in machine language

Slide 13 out of 23

n Solution (machine organs) Data (input) Processing (operations)

  • ∗ − / Reading action (^) Input organs (Keyboard, …) Processing organs (CPU)

Memory (RAM) Output organs (Screen, …) Result (output) Writing action Calculation action

Slide 14 out of 23

n Solution (machine calculation/application) Solution in machine language (program) DEV-C++ programming software sheet 1 Save the machine solution (program) to the physical memory of the computer

Slide 16 out of 23

n Solution (machine calculation/application) Lexical error Syntax error Lexical error Syntax error (the) Compilation Solution in machine language (program) DEV-C++ programming software sheet 2 Compile the machine solution (program) Check and correct lexical and syntax errors

Slide 17 out of 23

n Solution (machine calculation/application) Programmer Application – Human-Machine Interface (HMI) User Solution in machine language (program) DEV-C++ programming software sheet 3 Execute the machine solution (program) Execution Creation of the executable file: INGENIEUR.INFO.exe

Slide 19 out of 23

n Solution (machine calculation/application) Programmer 1 1 Solution in machine language (program) DEV-C++ programming software sheet User Application – Human-Machine Interface (HMI) Execution 3 Execute the machine solution (program) Read the value of the radius 𝒓 using the input organ (Keyboard), then store the value of the radius 𝒓 in memory (RAM)

Slide 20 out of 23