Lecture 11 Data Structures, Algorithms & Complexity Introduction Dr Kevin Casey BSc, MSc, PhD GRIFFITH COLLEGE DUBLIN.

Slides:



Advertisements
Similar presentations
College of Information Technology & Design
Advertisements

1 ICS102: Introduction To Computing King Fahd University of Petroleum & Minerals College of Computer Science & Engineering Information & Computer Science.
COMPSCI 105 S Principles of Computer Science 12 Abstract Data Type.
COEN 352 Data structures and Algorithms R. Dssouli.
1 Module 2: Fundamental Concepts Problems Programs –Programming languages.
Introduction to Analysis of Algorithms
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Lecture 2: Fundamental Concepts
1 Module 2: Fundamental Concepts Problems Programs –Programming languages.
Lecture 14 Go over midterm results Algorithms Efficiency More on prime numbers.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
© 2006 Pearson Addison-Wesley. All rights reserved4-1 Chapter 4 Data Abstraction: The Walls.
CSE 830: Design and Theory of Algorithms
1 Data Structures A program solves a problem. A program solves a problem. A solution consists of: A solution consists of:  a way to organize the data.
Abstract Data Types (ADT)
1 ES 314 Advanced Programming Lec 2 Sept 3 Goals: Complete the discussion of problem Review of C++ Object-oriented design Arrays and pointers.
Introduction - The Need for Data Structures Data structures organize data –This gives more efficient programs. More powerful computers encourage more complex.
1 A Introduction to Data Structures and Algorithm Analysis Data Structures Asst. Professor Kiran Soni.
DATA STRUCTURE Subject Code -14B11CI211.
1 Design and Analysis of Algorithms تصميم وتحليل الخوارزميات (311 عال) Chapter 1 Introduction to Algorithms.
The Beauty and Joy of Computing Lecture #6 Algorithms Alan Turing ( ) would have turned 100 this year. He was a brilliant British mathematician.
Teaching Teaching Discrete Mathematics and Algorithms & Data Structures Online G.MirkowskaPJIIT.
CS223 Algorithms D-Term 2013 Instructor: Mohamed Eltabakh WPI, CS Introduction Slide 1.
Lecture No.01 Data Structures Dr. Sohail Aslam
ITEC 2620A Introduction to Data Structures
Invitation to Computer Science, Java Version, Second Edition.
Fundamentals of Algorithms MCS - 2 Lecture # 1
Algorithms and their Applications CS2004 ( ) Dr Stephen Swift 1.2 Introduction to Algorithms.
Course Web Page Most information about the course (including the syllabus) will be posted on the course wiki:
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Ver Chapter 9: Algorithm Efficiency and Sorting Data Abstraction &
Instructor Information: Dr. Radwa El Shawi Room: Week # 1: Overview & Review.
ดร.สุรศักดิ์ มังสิงห์ SPU, Computer Science Dept.
DATA STRUCTURES (CS212D) Week # 1: Overview & Review.
Prepared By Ms.R.K.Dharme Head Computer Department.
1 CS 350 Data Structures Chaminade University of Honolulu.
CSIS 123A Lecture 9 Recursion Glenn Stevenson CSIS 113A MSJC.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
1Computer Sciences Department. Book: Introduction to Algorithms, by: Thomas H. Cormen Charles E. Leiserson Ronald L. Rivest Clifford Stein Electronic:
Data Structures and Algorithms Lecture 3 Instructor: Quratulain Date: 8 th September, 2009.
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
Data Structures and Algorithms Lecture 1 Instructor: Quratulain Date: 1 st Sep, 2009.
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.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 240 Elementary Data Structures Array Lists Array Lists Dale.
DATA STRUCTURES (CS212D) Overview & Review Instructor Information 2  Instructor Information:  Dr. Radwa El Shawi  Room: 
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
1 A Practical Introduction to Data Structures and Algorithm Analysis Chaminade University of Honolulu Department of Computer Science Text by Clifford Shaffer.
BITS Pilani Pilani Campus Data Structure and Algorithms Design Dr. Maheswari Karthikeyan Lecture1.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
1 The Role of Algorithms in Computing. 2 Computational problems A computational problem specifies an input-output relationship  What does the.
1 Structured Programming Arab Academy for Science and Technology CC112 Dr. Sherif Mohamed Tawfik The Course.
Design and Analysis of Algorithms Faculty Name : Ruhi Fatima Course Description This course provides techniques to prove.
Maitrayee Mukerji. INPUT MEMORY PROCESS OUTPUT DATA INFO.
Advanced Data Structures Lecture 1
Introduction toData structures and Algorithms
Introduction to Algorithms
Algorithms and Problem Solving
Lecture 2 of Computer Science II
Data Structures (CS212D) Overview & Review.
Objective of This Course
Data Structures: Introductory lecture
Chapter 0 : Introduction to Object Oriented Design
Algorithm Discovery and Design
Week # 1: Overview & Review
Data Structures (CS212D) Overview & Review.
ITEC 2620M Introduction to Data Structures
Algorithms and Problem Solving
Introduction to Algorithms
Introduction to Data Structure
Presentation transcript:

Lecture 11 Data Structures, Algorithms & Complexity Introduction Dr Kevin Casey BSc, MSc, PhD GRIFFITH COLLEGE DUBLIN

Lecture 12 Course Format Twelve weeks Two lectures and one tutorial per week Assessment is 50% exam and 50% continuous assessment We will be using the Java programming language Lecture notes will cover most of the material Recommended reference texts will be in the library

Lecture 13 Why Data Structures? Professor Niklaus Wirth – Algorithms + Data Structures = Programs What is a computer program? A series of operations carried out on data We are always seeking to write better, more efficient, faster, more understandable, or in other words, better quality programs The operations we carry out on data both affects, and is affected by, the way we structure the data in the computer. We want to study how to develop good data structures and good algorithms

Lecture 14 Good Programs Programs which don't run correctly are of little use. Programs need to run efficiently. This is usually understood to mean in the minimum time - but occasionally there will be other constraints, such as memory use Better running times will generally be obtained from use of the most appropriate data structures and algorithms This course will focus on solving problems efficiently: you will be introduced to a number of fundamental data structures and algorithms (or procedures) for manipulating them.

Lecture 15 Efficient Solutions Failed software is hugely expensive There is an enormous amount of bad software in circulation We will study well-known solutions to well-known problems Using these techniques will mean that not only do you produce correct and fast programs in the minimum time, but you make you programs easier to modify Another software engineer will find it much simpler to work with a well-known solution than something that has been hacked together and “looks a bit like” some textbook algorithm

Lecture 16 Abstraction A modular approach to problem solving is a tried and tested technique We need a formal basis for partitioning our large task into smaller ones. The notion of abstraction is extremely useful here Abstractions are high level views of objects or functions which enable us to forget about the low level details and concentrate on the problem at hand

Lecture 17 Example What data is important in order to solve the problem at hand? We wish to store information in relation to a person. What is important? Name? Gender? Social Security Number? Eye colour? It depends on the application If developing a medical diagnostic system we will ‘abstract’ particular data that is of use. If developing a Student information system for the college we will ‘abstract’ different data. The view we take is called an ‘abstraction’.

Lecture 18 Algorithms An algorithm is any well-defined computational procedure that takes some value, or set of values, as input and produces some value, or set of values, as output An algorithm is a series of operations performed on data to achieve a set goal E.g. Unsorted input – sort the data – sorted output We can also view an algorithm as a tool for solving a well- specified computational problem The analysis is language independent and in the notes we will use pseudocode

Lecture 19 Pseudocode Indentation indicates block structure Fib(F, x) F[0] = 0 F[1] = 1 for i = 2 to x F[i] = F[i-1] + F[i-2] endfor endalg I will introduce the conventions during lectures

Lecture 110 Data Structures A Data Structure is a model of how we store individual pieces of data. A set of data items Sets are as fundamental to computer science as they are to mathematics The sets of data manipulated by algorithms can grow, shrink, or otherwise change over time We call such data sets dynamic Operations on a dynamic set can be grouped into two categories: queries, which simply return information about the set, and modifying operations

Lecture 111 Typical Operations Search(S, x) Given a set S and a reference x to an element in S, return the position of x or nil if no such element is found Insert(S, x) Add the element x to the set S. Delete(S, x) Remove the element x from the set S. Minimum(S) Given a totally ordered set S return the element of S with the smallest value

Lecture 112 Typical Operations Maximum(S) Given a totally ordered set S return the element of S with the largest value Successor(S, x) Given an element x from a totally ordered set S, return the next element in S, or nil if x is the last element Predecessor(S, x) Given an element x from a totally ordered set S, return the previous element in S, or nil if x is the first element

Lecture 113 Operations on Data Structures Why are we interested in whether an operation queries the set, or modifies the set? We have looked at these operations in the Abstract. What do they mean in particular situations? E.g. The data set of BSc students. How would we apply each of the operations outlined? Are there other issues we need to consider?

Lecture 114 Comparing Efficiency The steps we take to carry out the function constitutes the algorithm We could solve the same problem using different steps If two algorithms perform the same task in different ways, can we say one is ‘better’ than the other? What do we mean by ‘better’? Effectiveness versus Efficiency

Lecture 115 Questions This module interested in questions. How we decide what data we need? How we decide to store that data? How we manipulate that data to achieve certain results? How we decide on the ‘best’ way to manipulate the data? How we compare different answers to the above.

Lecture 116 Summary Computing Science is about problem solving. How do we represent problems? How can we improve our results? We store the information in Data Structures. We solve the problems using algorithms. We judge our results based on analysis of complexity