Presentation is loading. Please wait.

Presentation is loading. Please wait.

Desain & Analisis Algoritma

Similar presentations


Presentation on theme: "Desain & Analisis Algoritma"— Presentation transcript:

1

2 Desain & Analisis Algoritma
M. Ali Fauzi

3 TODAY

4 ~ What is Algorithm?

5 ~ What is Algorithm? ~ Important Aspects of Algorithm

6 ~ What is Algorithm? ~ Important Aspects of Algorithm ~ What is this course?

7 Puzzles

8 a balance scale 9 apples

9 You have 9 apples among which one is poisonous and it is lighter than the others. You have also a balance scale and you can compare the weight of any two sets of apples.

10 How can you find the poisonous apples?

11 How can you find the poisonous apple with three measurements only?

12 How can you find the poisonous apple with two measurements only?

13 You have 6 apples among which one is poisonous and you don’t know whether it is lighter or heavier than the others. You have also a balance scale and you can compare the weight of any two sets of apples.

14 How can you find the poisonous apple?

15 How can you find the poisonous apple with three measurements only?

16 What is Algorithm?

17

18 Algorithm is a recipe

19 An algorithm is a sequence of unambiguous instructions for solving a problem

20

21 الكتاب المختصر في حساب الجبر والمقابلة
أبو عبد الله محمد بن موسى الخوارزميّ ( 780 – 850 M ) الكتاب المختصر في حساب الجبر والمقابلة

22 Al-Khawārizmī Algorism Algorithm
Abu Abdullah Muḥammad ibnu Mūsā al-Khawārizmī ( 780 – 850 M ) Al-Khawārizmī Algorism Algorithm

23 Important Aspects of Algorithm

24 FINITENESS

25 int a=6; main() { while(a>5) cout<<a; a++; }

26

27 Finiteness : The Algorithm have to stop after several steps

28 DEFINITENESS

29

30 How could we define the “MIRACLE”?

31

32 Definiteness : Every single steps should be unambiguous defined

33 EFFECTIVENESS

34

35

36 Effectiveness : The problem should be solved

37 What is this course?

38

39 Algorithm Design Techniques
a general approach to solving problems algorithmically that is applicable to a variety of problems from different areas of computing

40 Designing an Algorithm and Data Structures
Designing an algorithm for a particular problem and choosing data structures appropriate for the operations performed by the algorithm

41 Methods of Specifying an Algorithm
Specify the algorithm in some fashion. i.e. Pseudocode, flowchart, or Natural Language

42 Analyzing an Algorithm
After correctness, by far the most important is efficiency : time efficiency, and space efficiency.

43 Coding an Algorithm Make your hands dirty

44 Any Questions?

45 Tugas Buat sebuah algoritma yang akan menerima sebuah bilangan X dari user. Tampilkan pesan “benar” jika X habis dibagi 2, 3 atau 7 dan tampilkan “salah” jika tidak habis dibagi. Terdapat 10 buah apel dalam sebuah keranjang. Buatlah algoritma untuk membagikan apel itu kepada sepuluh orang secara adil dengan menyisakan satu apel di keranjang


Download ppt "Desain & Analisis Algoritma"

Similar presentations


Ads by Google