DATA STRUCTURES INTRODUCTION CSC 172 SPRING 2004.

Slides:



Advertisements
Similar presentations
June 13, Introduction to CS II Data Structures Hongwei Xi Comp. Sci. Dept. Boston University.
Advertisements

Complexity Analysis (Part I)
General Announcements Project Due Friday, 1/30 Labs start Wednesday & Thursday – Java review – Weiss 1.19, 1.20 – You may show up & hand in Workshops.
DATA STRUCTURES INTRODUCTION CSC 172 SPRING 2002.
Object Oriented Programming CSC 171 FALL 2001 LECTURE 11.
CS261 Data Structures Winter 2011 Professor Timothy Budd.
Administrivia- Introduction CSE 373 Data Structures.
CS 106 Introduction to Computer Science I 03 / 03 / 2008 Instructor: Michael Eckmann.
CS503: Tenth Lecture, Fall 2008 Review Michael Barnathan.
CSC 171 – FALL 2004 COMPUTER PROGRAMMING LECTURE 0 ADMINISTRATION.
COMP171 Data Structures and Algorithm Qiang Yang Lecture 1 ( Fall 2006)
CSSE221: Software Dev. Honors Day 3 Announcements Announcements Should get in habit of checking in BigRational code as you go Should get in habit of checking.
EE 220 (Data Structures and Analysis of Algorithms) Instructor: Saswati Sarkar T.A. Prasanna Chaporkar, Programming.
CSCE 110 PROGRAMMING FUNDAMENTALS WITH C++
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.
July 16, Introduction to CS II Data Structures Hongwei Xi Comp. Sci. Dept. Boston University.
DATA STRUCTURE Subject Code -14B11CI211.
CSCE 3110 Data Structures and Algorithm Analysis.
Data Structures Lecture-1:Introduction
METU Computer Engineering Department
Abstract Data Types (ADTs) Data Structures The Java Collections API
WEEK 1 CS 361: ADVANCED DATA STRUCTURES AND ALGORITHMS Dong Si Dept. of Computer Science 1.
Teaching Teaching Discrete Mathematics and Algorithms & Data Structures Online G.MirkowskaPJIIT.
CS 221 Analysis of Algorithms Data Structures Dictionaries, Hash Tables, Ordered Dictionary and Binary Search Trees.
Data Structures and Programming.  Today:  Administrivia  Introduction to 225, Stacks  Course website: 
Data Structures Lecture 1: Introduction Azhar Maqsood NUST Institute of Information Technology (NIIT)
CSCA48 Course Summary.
CSC 212 – Data Structures Prof. Matthew Hertz WTC 207D /
Introduction. 2COMPSCI Computer Science Fundamentals.
Course Web Page Most information about the course (including the syllabus) will be posted on the course wiki:
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
Instructor Information: Dr. Radwa El Shawi Room: Week # 1: Overview & Review.
Discrete mathematics Kwon, Taekyoung Courtesy of Dr. Michael P. Frank University of Florida.
DATA STRUCTURES (CS212D) Week # 1: Overview & Review.
CS212: DATA STRUCTURES Lecture 1: Introduction. What is this course is about ?  Data structures : conceptual and concrete ways to organize data for efficient.
CSC 171 – FALL 2001 COMPUTER PROGRAMMING LECTURE 0 ADMINISTRATION.
1 CSC 222: Computer Programming II Spring 2004 See online syllabus at: Course goals:
Introduction to Data Structures
CSE 3358 NOTE SET 1 Data Structures and Algorithms.
CSC 172 DATA STRUCTURES. THEORETICAL BOUND  Many good sorting algorithms run in O(nlogn) time.  Can we do better?  Can we reason about algorithms not.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 223 – Advanced Data Structures Course Introduction.
Course Introduction Andy Wang COP 4530 / CGS 5425 Fall 2003, Section 4.
CPSC 121: Models of Computation Unit 0 Introduction George Tsiknis Based on slides by Patrice Belleville and Steve Wolfman.
CSE 3358 NOTE SET 1 Data Structures and Algorithms.
Introduction to computers and programming Instructor: Alex Iskold.
Data Structures Lecture 1: Introduction. Course Contents Data Types   Overview, Introductory concepts   Data Types, meaning and implementation  
Algorithm Analysis CS 400/600 – Data Structures. Algorithm Analysis2 Abstract Data Types Abstract Data Type (ADT): a definition for a data type solely.
Lecture 11 Data Structures, Algorithms & Complexity Introduction Dr Kevin Casey BSc, MSc, PhD GRIFFITH COLLEGE DUBLIN.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 223 – Advanced Data Structures Course Introduction.
Data Structures and Algorithm Analysis Introduction Lecturer: Ligang Dong, egan Tel: , Office: SIEE Building.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
CS 106 Introduction to Computer Science I 03 / 02 / 2007 Instructor: Michael Eckmann.
1 Data Structures CSCI 132, Spring 2014 Lecture 1 Big Ideas in Data Structures Course website:
CS321 Data Structures Jan Lecture 2 Introduction.
Data Structures and Algorithms in Java AlaaEddin 2012.
Algorithm Design Techniques An Example The Problem Algorithm 1: Cubic Time Algorithm 2: Quadratic Time Algorithm 3: O(n log n) Time Algorithm 4: Linear.
DATA STRUCTURES (CS212D) Overview & Review Instructor Information 2  Instructor Information:  Dr. Radwa El Shawi  Room: 
CS 367 Introduction to Data Structures Charles N. Fischer Fall s367.html.
CSC 212 – Data Structures Lecture 15: Big-Oh Notation.
BITS Pilani Pilani Campus Data Structure and Algorithms Design Dr. Maheswari Karthikeyan Lecture1.
Lecture 1 Data Structures Aamir Zia. Introduction Course outline Rules and regulations Course contents Good Programming Practices Data Types and Data.
CSC 172 DATA STRUCTURES.
CS190/295 Programming in Python for Life Sciences: Lecture 1
Introduction CSE 373 Data Structures.
Introduction to CS II Data Structures
Administrivia- Introduction
CSCE 221 Professor Lupoli TAMU CSCE 221 Intro.
Administrivia- Introduction
COMP 122 – Design and Analysis of Algorithms
Presentation transcript:

DATA STRUCTURES INTRODUCTION CSC 172 SPRING 2004

COURSE GOALS Write (lots of) great code Understand the use of abstraction in computer science Design efficient data structures and algorithms Understand the use of mathematical tools in analysis for computer science Develop general problem solving skills

What this course is about Abstraction – Specifically, abstraction in computer programming through the use of abstract data types (ADTs) – Abstraction is powerful Complexity of detail is encapulated and hidden Allowing operations at a higher level – Your ability to abstract directly effects your productivity (as a lot of things) Analysis – What makes a good abstraction?

Abstraction “The The acts of the mind, wherein it exerts its power over simple ideas, are chiefly these three: 1. Combining several simple ideas into one compound one, and thus all complex ideas are made. 2. The second is bringing tow ideas, whether simple or complex, together, and setting them by one another so as to take a view of them at once, without uniting them into one, by which it gets all its ideas of relations. 3. The third is separating them from all other ideas that accompany them in their real existence: this is called abstraction, and thus all its general ideas are made” - John Lock, An Essay Concerning Human Understanding (1690)

Abstraction “Leaving out of consideration one or more qualities of a complex object so as to attend to others.” - Mirriam Webster’s 9 th Collegiate

Computer Science The Mechanization of Abstraction “Computer Science is a science of abstraction – creating the right model for thinking about a problem and devising the appropriate mechanizable techniques to solve it” - Alfred Aho, 1995

Creativity as Science “Every other science deals with the universe as it is. The physicist’s job, for example, is to understand how the world works, not to invent a world in which physical laws would be simpler or more pleasant to follow. Computer Scientists, on the other hand, must create abstractions of real-world problems that can be understood by computer users and, at the same time, that can be represented and manipulated inside a computer” - Jeffrey Ullman, 1995

Example: Dictionary ADT A dictionary is an abstract model of a database In dictionaries, we look up definitions using words – Words : “keys” – Definitions : “elements” The main operation supported by a dictionary is searching by key

Dictionary ADT Simple container methods – size() – isEmpty() Querry methods – findElement(k) Update methods – insertItem(k,e) – remove(k) Special object – NO_SUCH_KEY, returned by an unsuccessful search

Example: Dictionary ADT As “users”, we can think about dictionaries in terms of such functionality without worrying about how they are implemented – Abstraction, problem conceptualization As “programmers” we can think about how dictionaries are implemented without worrying about how they are used – Analysis, what is fast & efficient

Which Abstractions/Implementations? Lists Stacks Queues Trees Sets Graphs

What analysis? “Anyone” can write a computer program. What is the difference between a good solution and a not-so-good solution? – Running time – Memory requirements Mathematical tools – Proof by induction – Combinatorics – Probability – Asymptotic analysis (Big-Oh)

Example One dimensional pattern recognition Input: a vector x of n floating point numbers Output: the maximum sum found in any contiguous subvector of the input. X[2..6] or 187 How would you solve this?

Obvious solution Check all pairs int sum; int maxsofar = 0; for (int i = 0; i<x.length;i++) for (int j = i; j<x.length;j++){ sum = 0; for (int k = i;k<=j;k++) sum += x[k]; maxsofar = max(sum,maxsofar); }

How long does the obvious solution take? We could “measure” it – benchmarking – What is a “good size” of input to measure? – What machine do we measure it on?

How long does the obvious solution take? We could “analyse” it – Multiply the “cost” (time required) to do something by the number of times you have to do it. – If n is the length of the array – Outer loop runs exactly n times – Inner loop runs at most n times – Inner most loop runs no more than n times – Let’s say the “+=“ and “max” take unit time

How long does the obvious solution take? Innermost cost = n * 1 //worst case Innerloop cost = n * (Innermost cost) +1 Outerloop cost = n * (Innerloop cost) Outerloop cost = n * ( n * (Innermost cost) +1) Outerloop cost = n * (n *(n + 1) +1) Outerloop cost = n * (n 2 + n + 1) Outerloop cost = n 3 + n 2 +n

How long does the obvious solution take? We call this an “n 3 ” solution Can you think of a better (faster) way? Can you do an analysis that will prove it better? That is what we do in CSC 172 – For some very common tasks

Instructor Prof. Ted Pawlicki, CSB 722, ext Office Hours: TR 2PM-3PM -lunch meetings also available Lecture: T,R 2:00PM-3:15PM AM Dewey 1-101

Text Data Structures & Problem Solving using Java 2 nd Ed. By Mark Allen Weiss – Class, Lab, & Workshops

Grad TAs (Mostly Projects)

Lead UG TA (Mostly grades)

Labs: Taylor 30 Labs: Taylor 30 MW 4:50-6:05 MW 6:15-7:30 * MW 2:00-3:15 TR 3:25-4:40 * Register as a class

WORKSHOPS WORKSHOPS Sign up Tuesday

EXAMS

Workshops Required - attendance 10% of Grade Positive effect on grades – Independent of extra credit Group skills are valued by employers – Industrial & academic

Extra Credit Reports 10% boost for page analysis of the UG CS curriculum at a selected institution – Instructor assigns institution – Overview of curricular requirements – Syllabus of 1 st year courses (CS1 & CS2) – Compare & contrast to UR CS curriculum – Revision expected

Is this a hard course? Yes One course has to be the hardest All majors have hard courses “No pain, no gain” Start early

Q&A Do you understand what is expected of you?