CS 315 Data Structures Spring 14 Instructors (lecture) Bala Ravikumar Office: 116 I Darwin Hall Phone: 664 3335 piazza, (Lab.

Slides:



Advertisements
Similar presentations
Review. What to know You are responsible for all material covered in lecture, the readings, or the programming assignments There will also be some questions.
Advertisements

CSCE 210 Data Structures and Algorithms
Welcome CS 315 Data Structures. Instructor: B. Ravikumar Office: 116 I Darwin Hall Phone: Course Web site:
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
CS 315 Data Structures B. Ravikumar Office: 116 I Darwin Hall Phone: Course Web site:
CS 206 Introduction to Computer Science II 04 / 29 / 2009 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 12 / 10 / 2008 Instructor: Michael Eckmann.
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
The Design and Analysis of Algorithms
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
CSCE 3110 Data Structures and Algorithm Analysis.
Data Structures and Programming.  John Edgar2.
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.
Instructor: Dr. Sahar Shabanah Fall Lectures ST, 9:30 pm-11:00 pm Text book: M. T. Goodrich and R. Tamassia, “Data Structures and Algorithms in.
Teaching Teaching Discrete Mathematics and Algorithms & Data Structures Online G.MirkowskaPJIIT.
CS223 Algorithms D-Term 2013 Instructor: Mohamed Eltabakh WPI, CS Introduction Slide 1.
Data Structures Lecture 1: Introduction Azhar Maqsood NUST Institute of Information Technology (NIIT)
CHAPTER 09 Compiled by: Dr. Mohammad Omar Alhawarat Sorting & Searching.
CS212: DATA STRUCTURES Lecture 1: Introduction. What is this course is about ?  Data structures : conceptual and concrete ways to organize data for efficient.
DATA STRUCTURE & ALGORITHMS (BCS 1223) NURUL HASLINDA NGAH SEMESTER /2014.
Data Structures Lecture 1: Introduction. Course Contents Data Types   Overview, Introductory concepts   Data Types, meaning and implementation  
Elementary Data Organization. Outline  Data, Entity and Information  Primitive data types  Non primitive data Types  Data structure  Definition 
Hashing 1 Hashing. Hashing 2 Hashing … * Again, a (dynamic) set of elements in which we do ‘search’, ‘insert’, and ‘delete’ n Linear ones: lists, stacks,
Course Review Fundamental Structures of Computer Science Margaret Reid-Miller 29 April 2004.
Hashing COMP171. Hashing 2 Hashing … * Again, a (dynamic) set of elements in which we do ‘search’, ‘insert’, and ‘delete’ n Linear ones: lists, stacks,
Data Structures and Algorithms in Java AlaaEddin 2012.
DATA STRUCTURES (CS212D) Overview & Review Instructor Information 2  Instructor Information:  Dr. Radwa El Shawi  Room: 
CS 315 Data Structures Fall 2011 Instructor: B. (Ravi) Ravikumar Office: 116 I Darwin Hall Phone: Course Web site:
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
BITS Pilani Pilani Campus Data Structure and Algorithms Design Dr. Maheswari Karthikeyan Lecture1.
Data Structures Dr. Abd El-Aziz Ahmed Assistant Professor Institute of Statistical Studies and Research, Cairo University Springer 2015 DS.
Mohammed I DAABO COURSE CODE: CSC 355 COURSE TITLE: Data Structures.
Introduction toData structures and Algorithms
CSC 421: Algorithm Design & Analysis
CSCE 210 Data Structures and Algorithms
Why indexing? For efficient searching of a document
CSC 427: Data Structures and Algorithm Analysis
CSE373: Data Structures & Algorithms Priority Queues
Planning & System installation
Course Developer/Writer: A. J. Ikuomola
CHP - 9 File Structures.
The Design and Analysis of Algorithms
Priority Queues An abstract data type (ADT) Similar to a queue
CS 315 Data Structures B. Ravikumar Office: 116 I Darwin Hall Phone:
Lecture No.43 Data Structures Dr. Sohail Aslam.
Exam Hints.
Data Structures Data Structure is a way of collecting and organising data in such a way that we can perform operations on these data in an effective.
Datastructure.
CSC 421: Algorithm Design & Analysis
structures and their relationships." - Linus Torvalds
Data Structures (CS212D) Overview & Review.
Design and Analysis of Computer Algorithm (CS575-01)
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.
structures and their relationships." - Linus Torvalds
Objective of This Course
Data Structures: Introductory lecture
Week # 1: Overview & Review
Data structures and algorithms
Data Structures (CS212D) Overview & Review.
Introduction to Data Structures
Hashing Sections 10.2 – 10.3 Lecture 26 CS302 Data Structures
Priority Queues An abstract data type (ADT) Similar to a queue
Chapter 12 Query Processing (1)
COP3530- Data Structures Introduction
Hashing.
Important Problem Types and Fundamental Data Structures
OPIM 915 Fall 2010 Data Structures 23-38,
EECE.3220 Data Structures Instructor: Dr. Michael Geiger Spring 2019
structures and their relationships." - Linus Torvalds
Lecture 3 – Data collection List ADT
Presentation transcript:

CS 315 Data Structures Spring 14 Instructors (lecture) Bala Ravikumar Office: 116 I Darwin Hall Phone: piazza, (Lab Section 1) Bala Ravikumar (Lab Section 2) Noah Melcon Course Web site:

Textbook: Data Structures and Algorithm Analysis in C++ by Mark Weiss, 4 th edition, Cengage Publishing. (3 rd edition is acceptable.) Course Schedule Lecture: M W 8:00 – 9:15, Darwin Hall 107 Lab: F 9 – 12 noon (Section 1), T 5 – 8 PM (Section 2), Darwin 28

Data Structures – central themes programming larger problems (than what was studied in CS 215) advanced features like recursion, classes and libraries new data types (images, audio, video, text) algorithm design and analysis performance issues comparison of data structures, algorithms time, storage requirements applications image processing data/image compression web search, parsing (arithmetic expressions) board games scheduling problems, simulation and modeling graph algorithms

Data Structures – the central issues How to organize data in memory so that the we can solve the problem most efficiently? Hard disk RAM CPU

Data Structure – the central issues Topics of concern: software design, problem solving and applications reactive programs: query response trade-offs between operations efficiency, simplicity, scalability, …

Course Goals Learn to use fundamental data structures: arrays, linked lists, stacks and queues hash table priority queue binary search tree Improve programming skill recursion, classes, algorithm design, implementation build projects using different data structures Analytical and experimental analysis quantitative reasoning about the performance of algorithms (time, storage, etc.) comparing different data structures

Course Goals Projects/applications: image storage, manipulation Image labeling compression (text, image, etc.) computing with unlimited size integers Discrete-event simulation Index generation Geometric problems image rotation, image stitching Game tree search evaluating arithmetic expression

Data Structures – key to software design Data structures play a key role in every type of software. Data structure deals with how to store the data internally while solving a problem in order to Optimize the overall running time of a program the response time (for queries) the memory requirements other resources (e.g. band-width of a network) Simplify software design make solution extendible, more robust

Abstract vs. concrete data structures  Abstract data structure (sometimes called ADT -> Abstract Data Type) is a collection of data with a set of operations supported to manipulate the structure  Examples: stack, queue insert, delete priority queue insert, deleteMin Dictionary insert, search, delete  Concrete data structures are the implementations of abstract data structures: Arrays, linked lists, trees, heaps, hash table  A recurring theme: Find the best mapping between abstract and concrete data structures.

Abstract Data Structure (ADT) container supporting operations Dictionary search insert primary operations Delete deleteMin Range search Successor secondary operations Merge Priority queue Insert deleteMin Merge, split etc. Secondary operations primary operations

Linear data structures key properties of the (1-dim.) array: a sequence of items are stored in consecutive physical memory locations. main advantage: array provides a constant time access to k-th element for any k. (access the element by: Element[k].) other operations are expensive: Search Insert delete

2-dim. arrays  Used to store images, tables etc.  Given row number r, and column number s, the element in A[r, s] can be accessed in one clock cycle.  (usually row major or column major order is used.)  Other operations are expensive.  Sparse array representation Used to compress images Trade-offs between storage and time

Linked lists  Linked lists: Storing a sequence of items in non- consecutive locations of the memory. Not easy to search for a key (even if sorted). Inserting next to a given item is easy. Array vs. linked list: Don’t need to know the number of items in advance. (dynamic memory allocation) disadvantages order is important

stacks and queues stacks: insert and delete at the same end. equivalently, last element inserted will be the first one to be deleted. very useful to solve many problems Processing arithmetic expressions queues: insert at one end, deletion at the other end. equivalently, first element inserted is the first one to be deleted.

Non-linear data structures  Various versions of trees Binary search trees Height-balanced trees etc. Lptr key Rptr 15 Main purpose of a binary search tree  support dictionary operations efficiently

Priority queue  Max priority key is the one that gets deleted next. Equivalently, support for the following operations: insert deleteMin  Useful in solving many problems fast sorting (heap-sorting) shortest-path, minimum spanning tree, scheduling etc.

Hashing Supports dictionary operations very efficiently (most of the time). Main advantages: Simple to design, implement on average very fast not good in the worst-case.

Applications arithmetic expression evaluation data compression (Huffman coding, LZW algorithm) image segmentation, image compression backtrack searching finding the best path to route in a network geometric problems (e.g. rectangle area)

Some projects from past semesters Unlimited precision arithmetic: Compute values like 1000! = (concepts : recursion, linked list)

Some projects from past semesters Image manipulation: (concept: arrays, library, algorithm analysis)

image manipulation

Image rotation

Bounding box construction: OCR is one of the early success stories in software applications. Scan a printed page and recognize the characters in it. First step: bounding box construction.

Image filtering input output

Input: Output: “In 1830 there were but twenty-three miles of railroad in operation in the United States, and in that year Kentucky took … “ Final step:

Spelling checker: Given a text file T, identify all the misspelled words in T. Idea: build a hash table H of all the words in a dictionary, and search for each word of the text T in the table H. For each misspelled word, suggest the correct spelling. (hashing, strings, vectors)

Peg solitaire (backtracking, recursion, hash table) Find a sequence of moves that leaves exactly one peg on the board. (starting position can be specified. In some cases, there may be no solution.)

Geometric computation problem – given a set of rectangles, determine the total area covered by them. Trace the contour, report all intersections etc. Data structure: binary search tree.

Given two photographs of the same scene taken from two different positions, combine them into a single image.

Image compression original (compressed x10) (compressed x 50) (Quadtree data structure)

Index generation for a document Index contains the list of all the words appearing in a document, with the line numbers in which they appear. Typical index for a book looks: Data structure binary search tree, hash table

Image stitching

solution