Algorithm Representation Primitives Dr M Tanvir Afzal Algorithm

  • Slides: 11
Download presentation
Algorithm Representation (Primitives) Dr. M. Tanvir Afzal

Algorithm Representation (Primitives) Dr. M. Tanvir Afzal

Algorithm – Representation (Primitives) Algorithm Representation ü Representation of an algorithm requires some language.

Algorithm – Representation (Primitives) Algorithm Representation ü Representation of an algorithm requires some language. ü In case of human this could Urdu, English, German etc. or language of pictures 2

Algorithm – Representation (Primitives) Algorithm Representation ü Sometime misunderstanding! ü Visiting Grandchildren can be

Algorithm – Representation (Primitives) Algorithm Representation ü Sometime misunderstanding! ü Visiting Grandchildren can be problematic! Have two meaning. 3

Algorithm – Representation (Primitives) 4

Algorithm – Representation (Primitives) 4

Algorithm – Representation (Primitives) Algorithm Representation ü Student of origami would have little difficult

Algorithm – Representation (Primitives) Algorithm Representation ü Student of origami would have little difficult to follow the instructions as compared to other students. 5

Algorithm – Representation (Primitives) Primitive ü Computer Science establishes set of building blocks from

Algorithm – Representation (Primitives) Primitive ü Computer Science establishes set of building blocks from which algorithm can be constructed, such building blocks are known as primitive. 6

Algorithm – Representation (Primitives) Programming Language ü A collection of primitives along with a

Algorithm – Representation (Primitives) Programming Language ü A collection of primitives along with a collection of rules stating how the primitives can be combined to represent more complex ideas constitutes a programming language. 7

Algorithm – Representation (Primitives) Primitives ü Each primitive has its own syntax (symbol) and

Algorithm – Representation (Primitives) Primitives ü Each primitive has its own syntax (symbol) and semantics (meaning) 8

Algorithm – Representation (Primitives) Origami Primitives 9

Algorithm – Representation (Primitives) Origami Primitives 9

Algorithm – Representation (Primitives) Representation in machine level ü Machine level representation is ultimately

Algorithm – Representation (Primitives) Representation in machine level ü Machine level representation is ultimately required. ü It is tedious ü Therefore, high level programming language have been built, mapping primitives to machine level instructions 10

Summary Representation(Primitives) ü Primitives ü Programming language ü Origami ü Machine representation 11

Summary Representation(Primitives) ü Primitives ü Programming language ü Origami ü Machine representation 11