EDMEDIA, June 24, 20041 A New Approach to Learning Algorithms Tomasz Müldner*, Elhadi Shakshuki and Joe Merrill Jodrey School of Computer Science, Acadia.

Slides:



Advertisements
Similar presentations
Introduction to Algorithms Quicksort
Advertisements

September 12 1 An Algorithm for: Explaining Algorithms Tomasz Müldner.
Semantics Static semantics Dynamic semantics attribute grammars
Character and String definitions, algorithms, library functions Characters and Strings.
Lecture Set 3E Introduction Basic Software Development Issues 1. Notes on Software Development 2. Intro to Software Development Tools 7/31/2008 2:43PM.
CMPT 225 Sorting Algorithms Algorithm Analysis: Big O Notation.
ISBN Chapter 3 Describing Syntax and Semantics.
Binary Trees, Binary Search Trees COMP171 Fall 2006.
Software Testing and Quality Assurance
INTRODUCTION COMPUTATIONAL MODELS. 2 What is Computer Science Sciences deal with building and studying models of real world objects /systems. What is.
CHAPTER 3 COLLECTIONS Abstract Data Types. 2 A data type consists of a set of values or elements, called its domain, and a set of operators acting on.
CSC 2300 Data Structures & Algorithms March 27, 2007 Chapter 7. Sorting.
Binary Search Trees CMSC 132 Chapter 8.1 Nelson Padua-Perez Bill Pugh.
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 17: Linked Lists.
CS 104 Introduction to Computer Science and Graphics Problems Data Structure & Algorithms (3) Recurrence Relation 11/11 ~ 11/14/2008 Yang Song.
Describing Syntax and Semantics
Introducing Hashing Chapter 21 Copyright ©2012 by Pearson Education, Inc. All rights reserved.
Algorithm Analysis and Big Oh Notation Courtesy of Prof. Ajay Gupta (with updates by Dr. Leszek T. Lilien) CS 1120 – Fall 2006 Department of Computer Science.
Data Structures Using C++ 2E
C o n f i d e n t i a l Developed By Nitendra NextHome Subject Name: Data Structure Using C Title: Overview of Data Structure.
COMP s1 Computing 2 Complexity
Object Oriented Data Structures
HOW TO SOLVE IT? Algorithms. An Algorithm An algorithm is any well-defined (computational) procedure that takes some value, or set of values, as input.
An Introduction Chapter Chapter 1 Introduction2 Computer Systems  Programmable machines  Hardware + Software (program) HardwareProgram.
SOFTWARE ENGINEERING BIT-8 APRIL, 16,2008 Introduction to UML.
` Tangible Interaction with the R Software Environment Using the Meuse Dataset Rachel Bradford, Landon Rogge, Dr. Brygg Ullmer, Dr. Christopher White `
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved ADT Implementation:
An Introduction to Visual Basic
June 27, 2002 HornstrupCentret1 Using Compile-time Techniques to Generate and Visualize Invariants for Algorithm Explanation Thursday, 27 June :00-13:30.
Saturday, 04 Apr 2010 University of Palestine Computer Science II Trees.
Introduction to Formal Methods Based on Jeannette M. Wing. A Specifier's Introduction to Formal Methods. IEEE Computer, 23(9):8-24, September,
TECH Computer Science Data Abstraction and Basic Data Structures Improving efficiency by building better  Data Structure Object IN  Abstract Data Type.
Information and Computer Sciences University of Hawaii, Manoa
Edmedia, June 23, My Webpage can Speak Many Languages Tomasz Müldner*, Fei Wang and Darcy Benoit Jodrey School of Computer Science, Acadia University,
Chapter 11 Arrays Continued
 2005 Pearson Education, Inc. All rights reserved Searching and Sorting.
 Pearson Education, Inc. All rights reserved Searching and Sorting.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 122 – Data Structures Standard Template Library (STL)
Chapter 9 (modified) Abstract Data Types and Algorithms Nell Dale John Lewis.
1 CSE 1342 Programming Concepts Lists. 2 Basic Terminology A list is a finite sequence of zero or more elements. –For example, (1,3,5,7) is a list of.
Chapter 10 Algorithm Analysis.  Introduction  Generalizing Running Time  Doing a Timing Analysis  Big-Oh Notation  Analyzing Some Simple Programs.
Algorithm Analysis CS 400/600 – Data Structures. Algorithm Analysis2 Abstract Data Types Abstract Data Type (ADT): a definition for a data type solely.
Deriving Operational Software Specification from System Goals Xin Bai EEL 5881 Course Fall, 2003.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
The Other Face Or Why Document? By Chris Bradney Or Why Document? By Chris Bradney.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
XP Tutorial 7 Creating a Flash Web Site. XP New Perspectives on Macromedia Flash 82 Objectives Plan and create a Flash Web site Create a Flash template.
Chapter 9 Sorting. The efficiency of data handling can often be increased if the data are sorted according to some criteria of order. The first step is.
Linear Search Linear Search is a fundamental search algorithm. Linear search, also known as sequential search, is a process that checks every element in.
Course: Programming II - Abstract Data Types HeapsSlide Number 1 The ADT Heap So far we have seen the following sorting types : 1) Linked List sort by.
Document that explains the chosen concept to the animator 1.
Code: BCA302 Data Structures with C Prof.(Dr.) Monalisa Banerjee By.
16 Searching and Sorting.
Document that explains the chosen concept to the animator
CSE 1342 Programming Concepts
Chapter 0: Introduction
Creating a Flash Web Site
ICS 3UI - Introduction to Computer Science
DDC 2423 DATA STRUCTURE Main text:
Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008
Object-Oriented Analysis and Design
Reasoning with invariants
COP 3503 FALL 2012 Shayan Javed Lecture 15
Algorithm Analysis CSE 2011 Winter September 2018.
Teach A level Computing: Algorithms and Data Structures
Algorithm Analysis and Big Oh Notation
Algorithm design and Analysis
Introduction to Data Structure
Algorithm Analysis and Big Oh Notation
CMPT 120 Lecture 19 – Unit 3 – Graphics and Animation
Presentation transcript:

EDMEDIA, June 24, A New Approach to Learning Algorithms Tomasz Müldner*, Elhadi Shakshuki and Joe Merrill Jodrey School of Computer Science, Acadia University, Wolfville, NS, Canada * presenting

EDMEDIA, June 24, Standard approach The user has to map the problem domain to the graphical domain and then looking at the animation they have to retrieve essential properties of the algorithm.

EDMEDIA, June 24, Contents of the Talk Introduction to Algorithm Visualization Description of Algorithm Explanation Example: Selection Sort Conclusions Future Work

EDMEDIA, June 24, Standard Algorithm Visualization 1.take the description of the algorithm (usually the code in a programming language, e.g. C) 2.graphically represent data in the code using bars, points, etc. 3.use animation to represent the flow of control 4.show the animated algorithm 5.hope that the learner will now understand the algorithm

EDMEDIA, June 24, Algorithm Explanation (AE) To make algorithm explanation possible, the learner has to build a mapping: AE uses a variety of tools to help the students to learn algorithms, including textual and visual representation learner’s conceptions of these entities and events the domain consisting of the algorithm entities and temporal events 

EDMEDIA, June 24, Goals of AE Understanding of both, what the algorithm is doing and how it works. Ability to justify the algorithm correctness (why the algorithm works). Ability to program the algorithm in any programming language. Understanding the time complexity of the algorithm.

EDMEDIA, June 24, Requirements of AE the algorithm is presented at several levels of abstraction each level of abstraction is represented by the text and optionally by visualization active learning is supported the design helps to understand time complexity presentations are designed by experts.

EDMEDIA, June 24, AE Explanations An explanation of a single algorithm consists of the following four parts: Hierarchical Abstract Algorithm Model Example of an abstract implementation of the Abstract Algorithm Model Tools to help predicting the algorithm complexity. Questions for students, including “do it yourself” mode for each level of abstraction.

EDMEDIA, June 24, Example: Selection Sort Abstraction tree selection smallestswap

EDMEDIA, June 24, Top Level of Abstraction ADT consists of sequences of elements of type T, denoted by Seq, with a linear order. There is a function (or a type) int comparator(const T x, const T y) which returns -1 if x is less than y, 0 if they are equal and +1 otherwise

EDMEDIA, June 24, Operations from top-level ADT prefix(t), possibly empty (NULL), which can be incremented by one element; inc(prefix(t)), which increments a prefix by one element; suffix(t), where a prefix followed by the suffix is equal to the entire sequence t ; first(suffix), which returns the first element of the suffix; T smallest(seq t, Comparator comp), which finds the smallest element in t (using comp ); swap(T el1, T el2), which swaps el1 and el2.

EDMEDIA, June 24, Top Level Code: Text void selection(Seq t, Comparator comp) { for(prefix(t) = NULL; prefix(t) != t; inc(prefix(t))) swap( smallest(suffix(t), comp), first(suffix(t))); }

EDMEDIA, June 24, Visualization shows Invariants INVARIANT 1 All elements in the prefix are smaller (according to the “comp” relation) than all elements in the suffix. In the visualization, the prefix box is smaller than the suffix box INVARIANT 2 The prefix is sorted. In the visualization, elements in the prefix are growing

EDMEDIA, June 24, ADT: Low Level The ADT consists of data described before, and the following operations: first(t), which returns the first element of the sequence t ; next(current, t), which returns the element of the sequence t, following current, or NULL if there is no such element.

EDMEDIA, June 24, Low Level Code: Text T smallest(Seq t, Comparator comp) { small = current = first(t); while((current=next(current,t))!=NULL) if(comp(small, current) < 0) small = current; return small; }

EDMEDIA, June 24, Post Test What is the number of comparisons and swaps performed when selection sort is executed for a sorted sequence and a sequence sorted in reverse. What is the time complexity of the function isSorted(t), which checks if t is a sorted sequence? Hand-execute the algorithm for a sample set of input data of size 4. Hand-execute the next step of the algorithm for the current state. What’s the last step of the algorithm?

EDMEDIA, June 24, Conclusions A new approach for learning algorithms: an algorithm is explained at various levels of abstraction each level is designed to present a single operation used in the algorithm all operations are shown in a textual and visual form the visualization system presented in this work is implemented using Macromedia Flash MX

EDMEDIA, June 24, Future Work Generic visualizations for various classes of algorithms such as iterative and recursive A complete system with a student model to provide an intelligent and adaptive learning system.