The University of Georgia Department of Computer Science Department of Computer Science Introducing Parallelism through Sorting Integrating Concepts from.

Slides:



Advertisements
Similar presentations
Garfield AP Computer Science
Advertisements

Topic 7 Standard Algorithms Learning Objectives Describe and exemplify the following standard algorithms in pseudocode and an appropriate high level.
CSE332: Data Abstractions Lecture 14: Beyond Comparison Sorting Dan Grossman Spring 2010.
CS 106 Introduction to Computer Science I 02 / 29 / 2008 Instructor: Michael Eckmann.
CS 112 Introduction to Programming Sorting of an Array Debayan Gupta Computer Science Department Yale University 308A Watson, Phone:
Limited Time and Experience: Parallelism in CS1 Fourth NSF/TCPP Workshop on Parallel and Distributed Computing Education (EduPar-14) Steven Bogaerts.
BORIS MILAŠINOVIĆ KREŠIMIR FERTALJ UNIVERSITY OF ZAGREB FACULTY OF ELECTRICAL ENGINEERING AND COMPUTING CROATIA Teaching staff role in students projects.
Searching and Sorting Topics  Sequential Search on an Unordered File  Sequential Search on an Ordered File  Binary Search  Bubble Sort  Insertion.
Sorting Heapsort Quick review of basic sorting methods Lower bounds for comparison-based methods Non-comparison based sorting.
Title 4 Effects of a student designed multimedia project on 8th graders attitude and performance.
UMass Lowell Computer Science Advanced Algorithms Computational Geometry Prof. Karen Daniels Spring, 2004 Project.
CSSE221: Software Dev. Honors Day 23 Announcements: Announcements: Pass in yesterday’s capsule quiz Pass in yesterday’s capsule quiz Homework 7 electronic.
CS 106 Introduction to Computer Science I 02 / 28 / 2007 Instructor: Michael Eckmann.
The C++ Tracing Tutor: Visualizing Computer Program Behavior for Beginning Programming Courses Rika Yoshii Alastair Milne Computer Science Department California.
Wednesday, 11/13/02, Slide #1 CS 106 Intro to CS 1 Wednesday, 11/13/02  QUESTIONS??  Today:  More on searching a list; binary search  Sorting a list;
CS 106 Introduction to Computer Science I 03 / 03 / 2008 Instructor: Michael Eckmann.
CS 106 Introduction to Computer Science I 03 / 08 / 2010 Instructor: Michael Eckmann.
Algorithm Efficiency and Sorting
Activity for 1 1) Name some preconceptions you think students may have about and briefly describe how they would impact your teaching –Arrays Arrays are.
CS 106 Introduction to Computer Science I 10 / 15 / 2007 Instructor: Michael Eckmann.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
CS 106 Introduction to Computer Science I 10 / 16 / 2006 Instructor: Michael Eckmann.
MULTIPLES OF 2 By Preston, Lincoln and Blake. 2 X 1 =2 XX 2X1=2 1+1=2.
Teaching Teaching Discrete Mathematics and Algorithms & Data Structures Online G.MirkowskaPJIIT.
Applying creativity in CS high school education - criteria, teaching example and evaluation Romeike, R. (2007). Applying creativity in CS high school education.
Integrating Parallel and Distributed Computing Topics into an Undergraduate CS Curriculum Andrew Danner & Tia Newhall Swarthmore College Third NSF/TCPP.
Searching and Sorting Topics Sequential Search on an Unordered File
Software Requirements Engineering CSE 305 Lecture-2.
Comp 20 - Training & Instructional Design Unit 6 - Assessment This material was developed by Columbia University, funded by the Department of Health and.
Analysis of Algorithms
The Marketing Research Project. Purposes of the Project 1.Give you practical experience at conducting a marketing research project. 2.Examine some factors.
Early Adopter: Integrating Concepts from Parallel and Distributed Computing into the Undergraduate Curriculum Eileen Kraemer Computer Science Department.
Jay Summet CS 1 with Robots IPRE Evaluation – Data Collection Overview.
CSE332: Data Abstractions Lecture 14: Beyond Comparison Sorting Dan Grossman Spring 2012.
1 Data Structures and Algorithms Sorting I Gal A. Kaminka Computer Science Department.
Deriving Algorithms Ran Libeskind-Hadas Department of Computer Science Harvey Mudd College.
Learning Streams: A Case Study in Curriculum Integration Mani Mina, Arun Somani, Akhilesh Tyagi, Diane Rover, Matthew Feldmann, and Mack Shelley Iowa State.
© 2004 Pearson Addison-Wesley. All rights reserved October 19, 2007 Sorting ComS 207: Programming I (in Java) Iowa State University, FALL 2007 Instructor:
Bubble Sort Data Structures and Algorithms CS 244 Brent M. Dingle, Ph.D. Game Design and Development Program Department of Mathematics, Statistics, and.
CP SC 428/628 D. E. Stevenson 10 Jan 07.
12. Sorting Intro Programming in C++ Computer Science Dept Va Tech August, 2002 © Barnette ND & McQuain WD 1 Sorting Many computer applications.
FECS 2007 Assessment and its Role in Accreditation Deborah Whitfield Frances Bailie Adel Abunawass.
For more course tutorials visit ECET 370 Entire Course (Devry) ECET 370 Week 1 Labs 1 ECET 370 Week 2 Labs 2 ECET 370 Week 3 Lab 3 Linked.
Multi-Semester Effort and Experience to Integrate NSF/IEEE-TCPP PDC into Multiple Department- wide Core Courses of Computer Science and Technology Department.
Motivation: Sorting is among the fundamental problems of computer science. Sorting of different datasets is present in most applications, ranging from.
Sorting and Searching by Dr P.Padmanabham Professor (CSE)&Director
CS 106 Introduction to Computer Science I 03 / 02 / 2007 Instructor: Michael Eckmann.
Chapter 9 Sorting 1. The efficiency of data handling can often be increased if the data are sorted according to some criteria of order. The first step.
ICS201 Lecture 21 : Sorting King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science Department.
Data Structures and Algorithms in Parallel Computing Lecture 8.
©Wen-mei W. Hwu and David Kirk/NVIDIA Urbana, Illinois, August 2-5, 2010 VSCSE Summer School Proven Algorithmic Techniques for Many-core Processors Lecture.
1 Sobah Abbas Petersen Adjunct Associate Professor, NTNU Researcher, Sintef TDT4252 Modelling of Information Systems Advanced Course TDT4252,
Computer Sciences Department1. Sorting algorithm 4 Computer Sciences Department3.
19 March More on Sorting CSE 2011 Winter 2011.
Introduction A sorting algorithm is an algorithm that puts elements of a list in a certain order. The most-used orders are numerical order. Efficient sorting.
Information Seeking Behavior and Information Literacy Among Business Majors Casey Long Business Liaison Librarian University Library Georgia State University,
1 Algorithms Searching and Sorting Algorithm Efficiency.
AP Computer Science Principles
CSE 662 – Languages and Databases Class Overview
How to Parallelize an Algorithm
CS 21a: Intro to Computing I
2008/12/03: Lecture 20 CMSC 104, Section 0101 John Y. Park
Searching and Sorting Topics Sequential Search on an Unordered File
Lesson Objectives Aims You should be able to:
Instructions and Examples Version 1.5
Searching and Sorting Topics Sequential Search on an Unordered File
UMBC CMSC 104 – Section 01, Fall 2016
Greedy Algorithms: Introduction
Analysis of Algorithms Growth Rates
Presentation transcript:

The University of Georgia Department of Computer Science Department of Computer Science Introducing Parallelism through Sorting Integrating Concepts from Parallel and Distributed Computing into the Undergraduate Curriculum Eileen Kraemer

The University of Georgia Department of Computer Science Department of Computer Science Overview We are implementing an integrated approach to the inclusion of concepts in Parallel and Distributed Computing (PDC) in the undergraduate Computer Science curriculum. Timeline: – Spring ‘11 Intro to Computing and Programming (CSCI1301) – Fall ‘11 Software Development (CSCI 1302) – Spring’12 C++ and Unix Systems Programming (CSCI 1730) Data Structures (CSCI 2720)

The University of Georgia Department of Computer Science Department of Computer Science Intro to Computing & Programming Adaptation of this course involves the inclusion of several guest lectures, the first of which uses an evaluation of sorting algorithms to motivate and define parallelism and provide a platform for the discussion of the benefits and limitations of parallel processing. Thursday, April 21 st 3 sections ~100 students

The University of Georgia Department of Computer Science Department of Computer Science Introducing Parallelism Concepts: – definition and rationale of parallel and distributed computing – parallel sorting

The University of Georgia Department of Computer Science Department of Computer Science Pre-test Students were first asked to complete a survey of their knowledge of parallelism, sorting, and time complexity concepts. – See appendix for questions and representative responses.

The University of Georgia Department of Computer Science Department of Computer Science Motivating the notion of cost Human Bubblesort – Roles: Processor – Directed the students to change places, according to algorithm Array elements – held up signs with their value (57,92,77,...) Comparison counter – Given a bag of 50 Tootsie rolls. Had to pay one per compare. Swap counter – Given a bag of 50 chocolate eggs. Had to pay one per swap. Step counter – Kept a tally of the number of operations.

The University of Georgia Department of Computer Science Department of Computer Science Time Complexity Analysis XXXXXXXX We keep track of the number of XXXXXXX comparisons & swaps & then XXXXXX use this sketch to convince XXXXX ourselves that Bubblesort XXXX is an n 2 algorithm. XXX XX X

The University of Georgia Department of Computer Science Department of Computer Science Human MergeSort Students again act out the process of sorting an array of 8 elements. Use Mergesort Time Complexity Analysis performed

The University of Georgia Department of Computer Science Department of Computer Science MergeSort: time complexity 1 - XXXXXXXX11 - XXXX 2 – XXXX 12 - XX 3 – XX 13 - X 4 – X 14 - X 5 - X 15 - XX 6 - XX 16 - XX 7 - X 17 - X 8 - X 18 - X 9 - XX 19 - XX 10 –XXXX 20 - XXXX 21 – XXXXXXXX... and we convince ourselves that Mergesort is n log n

The University of Georgia Department of Computer Science Department of Computer Science Observation: The “array elements” spend most of their time waiting around with nothing to do Idea: – use more processors!

The University of Georgia Department of Computer Science Department of Computer Science Human Parallel MergeSort

The University of Georgia Department of Computer Science Department of Computer Science Time complexity analysis & discussion faster in terms of time (steps) – but same number of comparisons – and there’s a limit to the benefit of add’l processors – and some processors participate only briefly sequential elements remain

The University of Georgia Department of Computer Science Department of Computer Science Conclusion What affects running time? – size of problem – choice of algorithm – use of parallelism nature of problem; percent sequential – code optimization – leveraging domain knowledge characteristics of input set (e.g., already ordered)

The University of Georgia Department of Computer Science Department of Computer Science Post-survey administered Currently under analysis

The University of Georgia Department of Computer Science Department of Computer Science Appendices

The University of Georgia Department of Computer Science Department of Computer Science Explanation... This lecture was presented on to 100 undergraduate CS students. Compilation and analysis of their responses is under way and will be included in this appendix. Results of analysis will be incorporated into the presentation.

The University of Georgia Department of Computer Science Department of Computer Science Pre-test Questions & Responses What does “parallel computing” mean?

The University of Georgia Department of Computer Science Department of Computer Science Pre-test Questions & Responses What are some of the benefits of parallel computing? That is, why might parallel computing be useful/helpful?

The University of Georgia Department of Computer Science Department of Computer Science Pre-test Questions & Responses How are these benfits limited, if at all?

The University of Georgia Department of Computer Science Department of Computer Science Pre-test Questions & Responses What are some of the costs of parallel computing?

The University of Georgia Department of Computer Science Department of Computer Science Pre-test Questions & Responses Imagine that you have 8 test papers and that you want to put them into order by grade, from lowest to highest. The operations that you can use in performing the sort are: – to compare the values of two papers – to swap the locations of two papers in the collection You don’t have any information about the actual test grades or the initial ordering of the test papers.

The University of Georgia Department of Computer Science Department of Computer Science Pre-test Questions & Responses How many comparisons might you have to perform, roughly?

The University of Georgia Department of Computer Science Department of Computer Science Pre-test Questions & Responses How many swaps might you have to perform to sort the papers?

The University of Georgia Department of Computer Science Department of Computer Science Pre-test Questions & Responses Assume that each compare or swap takes one second, an any other work takes 0 time. How long might it take to sort the papers?

The University of Georgia Department of Computer Science Department of Computer Science Pre-test Questions & Responses Now, imagine that you are asked to sort 1024 papers rather than 8. You can have some friends help you, but you have to pay them $5 to enter the room and $1 for each time step (time required for a compare or swap) during which they are present. Your goal is to minimize the time and the cost of performing the sort.

The University of Georgia Department of Computer Science Department of Computer Science Pre-test Questions & Responses Explain how you and your friends would share and coordinate the work of sorting the papers.

The University of Georgia Department of Computer Science Department of Computer Science Pre-test Questions & Responses How quickly can you sort the papers now? Explain, briefly.

The University of Georgia Department of Computer Science Department of Computer Science Pre-test Questions & Responses How many comparisons are required? Explain, briefly.

The University of Georgia Department of Computer Science Department of Computer Science Pre-test Questions & Responses How many swaps are required? Explain, briefly.

The University of Georgia Department of Computer Science Department of Computer Science Pre-test Questions & Responses How many friends would you use? Explain, briefly.

The University of Georgia Department of Computer Science Department of Computer Science Pre-test Questions & Responses Name all the factors you can think of that might affect the running-time of a sorting program. Then, number the factors in order, using #1 for the factor that has the most effect and higher numbers for factors with lesser effects.