Algorithm, ADT Metodický koncept k efektivní podpoře klíčových odborných kompetencí s využitím cizího jazyka ATCZ62 - CLIL jako výuková strategie na vysoké škole C:\Users\21536\AppData\Local\Temp\7zOCBEF4013\interreg_Rakousko_Ceska_Republika_RGB.jpg https://www.email.cz/download/k/vPwBms0jPnQoTvgo0jFvvGwDhdh9Jlfl9rKdiuyzDRyHOOMId1HvJLvOPRBH2skc4uZ VKBw/image001.png Fachhochschulen Oberösterreich C:\Users\21536\AppData\Local\Temp\7zOCBEF4013\interreg_Rakousko_Ceska_Republika_RGB.jpg https://www.email.cz/download/k/vPwBms0jPnQoTvgo0jFvvGwDhdh9Jlfl9rKdiuyzDRyHOOMId1HvJLvOPRBH2skc4uZ VKBw/image001.png Fachhochschulen Oberösterreich Algorithm •Exact instructions or procedures to solve the task type •The theoretical principle of solving the problem (as opposed to precise implementation a particular programming language). •Properties •Finality •Generalities •Determination •Output (Resultativity) •Elementarity C:\Users\21536\AppData\Local\Temp\7zOCBEF4013\interreg_Rakousko_Ceska_Republika_RGB.jpg https://www.email.cz/download/k/vPwBms0jPnQoTvgo0jFvvGwDhdh9Jlfl9rKdiuyzDRyHOOMId1HvJLvOPRBH2skc4uZ VKBw/image001.png Fachhochschulen Oberösterreich Algorithm •Design methods •Top down - Explain the progress of the solution to simpler operations until we reach elementary steps •Bottom up - from the elementary steps we create resources that ultimately required to deal with the problem •The combination of both – to the Top down approach we will add "a partial step" bottom-up (use the library functions, high-level programming language or system programming ...) C:\Users\21536\AppData\Local\Temp\7zOCBEF4013\interreg_Rakousko_Ceska_Republika_RGB.jpg https://www.email.cz/download/k/vPwBms0jPnQoTvgo0jFvvGwDhdh9Jlfl9rKdiuyzDRyHOOMId1HvJLvOPRBH2skc4uZ VKBw/image001.png Fachhochschulen Oberösterreich Algorithm •Design methods •Divide and conquer - divides the problem into sub-tasks (to be independent), which is then solved, often implemented recursively or iteratively •Greedy algorithm - solving optimization problems, always chooses a local minimum in an attempt to find a global minimum •Dynamic programming - divides the problem into sub-tasks (may be dependent), which is then solved •Backtracking - way of solving algorithmic problems based on a search of the state tree, improved brute force search solution, based on depth-first search of possible solutions C:\Users\21536\AppData\Local\Temp\7zOCBEF4013\interreg_Rakousko_Ceska_Republika_RGB.jpg https://www.email.cz/download/k/vPwBms0jPnQoTvgo0jFvvGwDhdh9Jlfl9rKdiuyzDRyHOOMId1HvJLvOPRBH2skc4uZ VKBw/image001.png Fachhochschulen Oberösterreich Algorithm •Types of algorithms •Recursive algorithms - use (call) themselves. •Probabilistic (probabilistic) algorithms - make some decisions randomly or pseudo-randomly. •Parallel algorithms - split a job between multiple computers •Genetic algorithms - work on the basis of imitation of biological evolutionary processes •Heuristic algorithm - trying to find only some appropriate approximation; It is used in situations where available resources (eg time) are insufficient to use exact algorithms (or if no suitable exact algorithms are known at all). C:\Users\21536\AppData\Local\Temp\7zOCBEF4013\interreg_Rakousko_Ceska_Republika_RGB.jpg https://www.email.cz/download/k/vPwBms0jPnQoTvgo0jFvvGwDhdh9Jlfl9rKdiuyzDRyHOOMId1HvJLvOPRBH2skc4uZ VKBw/image001.png Fachhochschulen Oberösterreich ADT – Abstract data type •Data types that are independent of their own implementation •Goal - Simplify and clarify the program that performs operations with the given data type •All ADTs can be implemented using basic algorithmic operations (assignment, addition, multiplication, conditional jump, ...) C:\Users\21536\AppData\Local\Temp\7zOCBEF4013\interreg_Rakousko_Ceska_Republika_RGB.jpg https://www.email.cz/download/k/vPwBms0jPnQoTvgo0jFvvGwDhdh9Jlfl9rKdiuyzDRyHOOMId1HvJLvOPRBH2skc4uZ VKBw/image001.png Fachhochschulen Oberösterreich ADT •Properties •Generality of implementation - Once designed, ADT can be built-in and run smoothly in any program. •Exact description - The link between the implementation and the interface must be unambiguous and complete. •Simplicity - The user does not have to worry about internal implementation and administration of ADT in memory. •Encapsulation - The interface as a closed part, the user knows what ADT does, but not how it does •Integrity - The user can not interfere with the internal data structure •Modularity •If ADT is object-oriented programmed, these properties are usually met. C:\Users\21536\AppData\Local\Temp\7zOCBEF4013\interreg_Rakousko_Ceska_Republika_RGB.jpg https://www.email.cz/download/k/vPwBms0jPnQoTvgo0jFvvGwDhdh9Jlfl9rKdiuyzDRyHOOMId1HvJLvOPRBH2skc4uZ VKBw/image001.png Fachhochschulen Oberösterreich ADT •Types of operations •Constructor - Creates a new ADT value, constructing a valid internal representation of the value based on the supplied parameters •Selector - is used to retrieve values that are components or attributes of a specific value of an abstract data type •Modifier - Changes the value of the data type