Data Structures, Algorithms, & Applications

Slides:



Advertisements
Similar presentations
Advanced Data Structures Sartaj Sahni
Advertisements

Data Structures & Algorithms Richard Newman Clip Art Sources s s s s
Data Structures & Algorithms What The Course Is About s Data structures is concerned with the representation and manipulation of data. s All programs.
Data Structure TA: Abbas Sarraf
Time Complexity s Sorting –Insertion sorting s Time complexity.
CSC 171 – FALL 2004 COMPUTER PROGRAMMING LECTURE 0 ADMINISTRATION.
Simple Sort Algorithms Selection Sort Bubble Sort Insertion Sort.
Data Structures & Agorithms Lecture-1: Introduction.
Computer Science 102 Data Structures and Algorithms V Fall 2009 Lecture 1: administrative details Professor: Evan Korth New York University 1.
CSCI 1301 Principles of Computer Science I
COP 3530: Data Structures, Algorithms, & Applications Instructor: Kristian Linn Damkjer.
Data Structures, Algorithms, & Applications
CSc 2310 Principles of Programming (Java) Dr. Xiaolin Hu.
Fundamentals of Algorithms MCS - 2 Lecture # 1
Overview Algorithms Baojian Hua
CS 140 Computer Programming (I) Second semester (3 credits) Imam Mohammad bin Saud Islamic University College of Computer Science and Information.
Introduction to Data Structures
Fall 2o12 – August 27, CMPSC 202 First Day Handouts  Syllabus  Student Info  Fill out, include all classes and standard appointments  Return.
Asymptotic Notation (O, Ω, )
CSE 113 Introduction to Computer Programming Lecture slides for Week 1 Monday, August 29 th, 2011 Instructor: Scott Settembre.
CPSC 121: Models of Computation Unit 0 Introduction George Tsiknis Based on slides by Patrice Belleville and Steve Wolfman.
King Saud UniversityCSC112 - First Semester CSC 112 Java Programming I Introduction.
Data Structures Engr. Umbreen sabir What The Course Is About s Data structures is concerned with the representation and manipulation of data. s All programs.
Data Structures and Algorithms Dr. Manuel E. Bermudez Alter ego to Dr. Sartaj Sahni.
Data Structures, Algorithms, & Applications Instructor: Babak Alipour Slides and book: Sartaj Sahni.
Dr. Sajib Datta CSE Spring 2016 INTERMEDIATE PROGRAMMING.
CS210: Programming Languages Overview of class Dr. Robert Heckendorn.
Data Structures and Algorithms in Java AlaaEddin 2012.
MCA 301: Design and Analysis of Algorithms Instructor Neelima Gupta
Algorithms Design and Analysis CS Course description / Algorithms Design and Analysis Course name and Number: Algorithms designs and analysis –
Introduction to Algorithms Book by Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest and Clifford Stein Powerpoint by Michael Block.
Operating Systems CMPSC 473 Introduction and Overview August 24, Lecture 1 Instructor: Bhuvan Urgaonkar.
Data Structures Dai Tian-Shyr
CS50x Kansas City. Agenda Welcome! This is CS50x, Kansas City Edition Introduction to: LaunchCode CS50x Course Tools used in the course Programming How.
Data Structures, Algorithms, & Applications
Introduction to CSCI 1311 Dr. Mark C. Lewis
CSc 120 Introduction to Computer Programing II
Design and Analysis of Algorithms
Computer Network Fundamentals CNT4007C
Computer Engineering Department Islamic University of Gaza
CSc 1302 Principles of Computer Science II
CSC 321: Data Structures Fall 2016
Computer Networks CNT5106C
Jeremy Bolton, PhD Assistant Teaching Professor
CSC 321: Data Structures Fall 2015
ICE 245: Algorithms Instructor: Dr. Mohammad Arifuzzaman
Course Information Mark Stanovich Principles of Operating Systems
CS515: Bioinformatic Algorithms
Data Structures Algorithms: (Slides to be Adopted from Goodrich and aligned with Weiss' book) Instructor: Ganesh Ramakrishnan
Computer Science 102 Data Structures CSCI-UA
CSE1320 INTERMEDIATE PROGRAMMING
CSE1320 INTERMEDIATE PROGRAMMING
CS 583 Fall 2006 Analysis of Algorithms
Definition In simple terms, an algorithm is a series of instructions to solve a problem (complete a task) We focus on Deterministic Algorithms Under the.
Computer Networks CNT5106C
Foundations II: Data Structures and Algorithms
Data Structures, Algorithms, & Applications
CSE1320 INTERMEDIATE PROGRAMMING
CSE1320 INTERMEDIATE PROGRAMMING
Data Structures, Algorithms, & Applications
Sorting Rearrange a[0], a[1], …, a[n-1] into ascending order.
Tonga Institute of Higher Education IT 141: Information Systems
CMSC201 Computer Science I for Majors Final Exam Information
CSC 321: Data Structures Fall 2018
CSc 2310 Principles of Programming (Java)
Computer Networks CNT5106C
Dr. David Matuszek Spring, 2003
Warmup Write a function to add two integer parameters and return the result.
Introduction CSE 2320 – Algorithms and Data Structures
Tonga Institute of Higher Education IT 141: Information Systems
Presentation transcript:

Data Structures, Algorithms, & Applications Instructor: Babak Alipour Slides and book: Sartaj Sahni

Course website http://cise.ufl.edu/class/cop3530sp17/ Presentations Contact information Canvas (http://elearning.ufl.edu/) Coming soon Announcements, Assignments, quizzes and Discussion board

Got Questions? Use the Canvas discussion board for most questions Ask the graders (TBA) Ask the Teaching TA (fardad@ufl.edu) Ask the Instructor (babak.ap@ufl.edu) IF YOUR REQUEST CONTAINS SENSITIVE ACADEMIC INFORMATION, EMAIL Fardad or myself ONLY!

Email format Subject MUST include “cop3530sp17” (No spaces, no caps) Include your name and UFID

Got Feedback? For general course-related issues: Email me (babak.ap@ufl.edu) You don’t have to include name and UFID For specific issues with assignments: Email Fardad (fardad@ufl.edu)

When in doubt… ASK Canvas discussion board Graders, TA, Instructor Announcements, requirements, syllabus, anything you find ambiguous, ASK RIGHT AWAY!

Books Data Structures, Algorithms, and Applications in C++ by Sartaj Sahni Introduction to Algorithms by Charles E. Leiserson, Clifford Stein, Ronald Rivest, and Thomas H. Cormen (Widely known as CLRS book) Algorithms by Robert Sedgewick

Quizzes Once every week (or so) Online (through Canvas) 5 to 10 minutes (starting at the beginning of the class) Also acts as attendance roll call (access code announced in class) Graded automatically

Assignments Up to 6 assignments Graded automatically by a judge (based on correctness of output and timeliness of algorithm, using several input test cases) Address will be: http://cop3530.cise.ufl.edu/ ONLY last submission counts WARNING: If output is incorrect or output format is not adhered to or timer runs out, you get NO CREDIT for the test case. (e.g. if you pass 3 out of 5 test cases, you get a 60)

Online judges Familiarize yourself with online judges such as HackerRank, LeetCode, SPOJ, etc. Some assignments will involve solving problems in these platforms.

Projects Two projects TBA Involves thinking A LOT (and coding a bit) Grading based on judge test cases AND demo in front of a TA/grader in person

Exams 2 exams Midterm: TBA Final: Group 27B Non-cumulative BUT the final exam material will depend upon midterm material.

Grading (Tentative) Quizzes 10% Assignments 10% Exams 40% Projects 40% Subject to change depending on the progression of the course and feedback from class

Grading – The perks I will announce some perks to help you with graders Everyone is A(wesome)++, for now. Focus on learning, a good grade follows naturally.

Tips on studying Slides only provide bullet points Read the corresponding section in at least one of the books Use Wikipedia (and other internet sources) Some algorithms are explained very well

Tips on studying There will be additional/extra readings at the end of some slides, study them PRACTICE, PRACTICE, PRACTICE Use the online judges mentioned Implement data structures and algorithms discussed in class Challenge yourself!

Clip Art Sources www.barrysclipart.com www.livinggraphics.com www.rad.kumc.edu www.graphicmaps.com

What The Course Is About Data structures is concerned with the representation and manipulation of data. All programs manipulate data. So, all programs represent data in some way. Data manipulation requires an algorithm. Data: Streets in a city. Mapquest. Manipulation: Do something with the data. Add a new street. Close a street. Make a street one way. Find route from your home to nearest gas station. Input/output data. Data representation: simple variables…int, float array variables… int [], float [] Others to be studied in this course. Algorithm…sequence of steps that results in the performance of a specific task (find nearest gas station to home).

What The Course Is About Algorithm design methods needed to develop programs that do the data manipulation. The study of data structures and algorithms is fundamental to Computer Science. What we do in this course will be used in most of the follow-up courses you will take. Essential to become expert in what we do this semester. Else, you will be handicapped in later courses. Foundation material.

What The Course Is About Perhaps the most important course in Computer Science We will discuss multiple real world applications as we go along

Prerequisites C++ Asymptotic Complexity Big Oh, Theta, and Omega notations Java review … Chapter 1 Performance Analysis … Chapter 2 Asymptotic complexity … Chapter 3

Web Site For Book www.cise.ufl.edu/~sahni/dsaac

Source Codes Download source codes from Web site and make sure you can compile and execute at least one code. Use the readme file to map text programs to file names. X.cpp is C++ program; X.output is output generated by X.cpp; and X.input is the input data (if any is required). Must be able to compile code on CISE Ubuntu machines (Ubuntu 14.04 as of August 2016)

Organization of Text Three parts Part I … Chapters 1-4, Background Part 2 … Chapters 5-16, Data Structures Part 3 … Chapters 17-21, Algorithms Each chapter … concepts + applications

Sorting Rearrange a[0], a[1], …, a[n-1] into ascending order. When done, a[0] <= a[1] <= … <= a[n-1] 8, 6, 9, 4, 3 => 3, 4, 6, 8, 9 Strictly speaking, nondecreasing order: 2, 2, 3, 6, 8, 8, 10.

Sort Methods Insertion Sort Bubble Sort Selection Sort Count Sort Shaker Sort Shell Sort Heap Sort Merge Sort Quick Sort First 5 are simple (conceptually and to program). First 4 done in chapters 2 and 3. Shaker sort and shell sort are in the enrichment section of the text’s Web site. The remaining three are done in the algorithm design chapters of the text.

Insert An Element Given a sorted list/sequence, insert a new element Result 3, 5, 6, 9, 14

Insert an Element 3, 6, 9, 14 insert 5 Compare new element (5) and last one (14) Shift 14 right to get 3, 6, 9, , 14 Shift 9 right to get 3, 6, , 9, 14 Shift 6 right to get 3, , 6, 9, 14 Insert 5 to get 3, 5, 6, 9, 14

Insert An Element // insert t into a[0:i-1] int j; for (j = i - 1; j >= 0 && t < a[j]; j--) a[j + 1] = a[j]; a[j + 1] = t;

Insertion Sort Start with a sequence of size 1 Repeatedly insert remaining elements

Insertion Sort Sort 7, 3, 5, 6, 1 Start with 7 and insert 3 => 3, 7

Insertion Sort for (int i = 1; i < n; i++) {// insert a[i] into a[0:i-1] // code to insert comes here }

Insertion Sort for (int i = 1; i < n; i++) {// insert a[i] into a[0:i-1] int t = a[i]; int j; for (j = i - 1; j >= 0 && t < a[j]; j--) a[j + 1] = a[j]; a[j + 1] = t; }