1 CENG 707 Data Structures and Algorithms Nihan Kesim Çiçekli Department of Computer Engineering Middle East Technical University Fall 2010.

Slides:



Advertisements
Similar presentations
Introduction to CS170. CS170 has multiple sections Each section has its own class websites URLs for different sections: Section 000:
Advertisements

CMPT 225 Data Structures and Programming. Course information Lecturer: Jan Manuch (Jano), TASC TAs: Osama Saleh,
1-1 CMPT 225 Data Structures and Programming Instructor: Aaron Hunter Section: E300 Campus: Harbour Centre Semester: Spring 2007.
CSCE 210 Data Structures and Algorithms
COMP171 Data Structures and Algorithms Spring 2009.
CMSC 132: Object-Oriented Programming II
CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh Department of Computer Science University of Maryland, College Park.
CS101- Lecture 11 CS101 Fall 2004 Course Introduction Professor Douglas Moody –Monday – 12:00-1:40 – – –Web Site: websupport1.citytech.cuny.edu.
1 CENG 302 Introduction to Database Management Systems Nihan Kesim Çiçekli URL:
EE 220 (Data Structures and Analysis of Algorithms) Instructor: Saswati Sarkar T.A. Prasanna Chaporkar, Programming.
CENG 213 Data Structures Department of Computer Engineering Middle East Technical University Fall 2014 CENG 213 Data Structures 1.
CSCE 3110 Data Structures and Algorithm Analysis.
Data Structures and Programming.  John Edgar2.
METU Computer Engineering Department
Computer Science 102 Data Structures and Algorithms V Fall 2009 Lecture 1: administrative details Professor: Evan Korth New York University 1.
COMP 151: Computer Programming II Spring Course Topics Review of Java and basics of software engineering (3 classes. Chapters 1 and 2) Recursion.
© 2004 Goodrich, Tamassia CS2210 Data Structures and Algorithms Lecture 1: Course Overview Instructor: Olga Veksler.
Teaching Teaching Discrete Mathematics and Algorithms & Data Structures Online G.MirkowskaPJIIT.
Data Structures and Programming.  Today:  Administrivia  Introduction to 225, Stacks  Course website: 
Computer Networks CEN 5501C Spring, 2008 Ye Xia (Pronounced as “Yeh Siah”)
Course Introduction Software Engineering
COMPE 226 Data Structures 2015 Fall Murat KARAKAYA Department of Computer Engineering.
Introduction. 2COMPSCI Computer Science Fundamentals.
COMPE 574 Fundamentals of Algorithms Spring Murat KARAKAYA Department of Computer Engineering.
DATA STRUCTURES (CS212D) Week # 1: Overview & Review.
CS 140 Computer Programming (I) Second semester (3 credits) Imam Mohammad bin Saud Islamic University College of Computer Science and Information.
Bilgisayar Mühendisliği Bölümü CENG 102 – Computer Programming Melek OKTAY Syllabus Administrative Information.
Introduction to Data Structures
CSE 3358 NOTE SET 1 Data Structures and Algorithms.
© 2011 Pearson Addison-Wesley. All rights reserved. Addison Wesley is an imprint of Stewart Venit ~ Elizabeth Drake Developing a Program.
CSEB114: PRINCIPLE OF PROGRAMMING Course Introduction.
COMP2012 Object-Oriented Programming and Data Structures Fall 2015.
CSE 3358 NOTE SET 1 Data Structures and Algorithms.
Introduction to ECE 2401 Data Structure Fall 2005 Chapter 0 Chen, Chang-Sheng
Introduction Fall 2001 Foundations of Computer Systems Prerequisite:91.166* or * Section A Instructor: Dr. David Hutchinson Office:
Introduction to Computer Programming (FIT-I pro) J. H. Wang Sep. 17, 2007.
Data Structures and Algorithms Dr. Tehseen Zia Assistant Professor Dept. Computer Science and IT University of Sargodha Lecture 1.
Course Info Instructor U.T. Nguyen Office: CSEB Office hours: Tuesday, 14:30-15:30 Thursday, 12:00-12:45 By.
Data Structures and Algorithms in Java AlaaEddin 2012.
Course Introductions.  Introduction to java  Basics of Java  Classes & Objects  Java Collections and APIs  Algorithms and their analysis  Recursion.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
Principles of Imperative Computation Lecture 1 January 15 th, 2012.
Data Structures By Dr. Mehedi Masud ِAssociate Professor, Computer Science Dept. College of Computers and Information Systems Taif University 1.
CENG 3511 CENG 351 Introduction to Data Management and File Structures Nihan Kesim Çiçekli Department of Computer Engineering METU.
| MSC 8102:PROGRAMMING CONCEPTS By Vincent Omwenga, PhD. 1.
1 CENG 707 Data Structures and Algorithms Nihan Kesim Çiçekli Department of Computer Engineering Middle East Technical University Fall 2013.
CENG 213 Data Structures1 Nihan Kesim Çiçekli Department of Computer Engineering Middle East Technical University.
Advanced Higher Computing Science The Project. Introduction Worth 60% of the total marks for the course Must include: An appropriate interface using input.
Data Structures Dr. Abd El-Aziz Ahmed Assistant Professor Institute of Statistical Studies and Research, Cairo University Springer 2015 DS.
CS140 – Computer Programming 1 Course Overview First Semester – Fall /1438 – 2016/2017 CS140 - Computer Programming 11.
CENG 213 Data Structures Nihan Kesim Çiçekli
CENG 707 Data Structures and Algorithms
Computer Engineering Department Islamic University of Gaza
CSCE 121, Sec 200 Fall 2012 Prof. Jennifer L. Welch.
COMP9024: Data Structures and Algorithms
GC101 Introduction to computers and programs
Intro Data Structure.
CENG 213 Data Structures Nihan Kesim Çiçekli
March 27 – Course introductions; Adts; Stacks and Queues
GC101 Introduction to computers and programs
CENG 213 Data Structures Dr. Cevat Şener
Principles of Computing – UFCFA Lecture-1
CS 201 – Data Structures and Discrete Mathematics I
Data Structures (CS212D) Overview & Review.
CENG 213 Data Structures Nihan Kesim Çiçekli
Data Structures (CS212D) Overview & Review.
Introduction to Programming
Principles of Computing – UFCFA Week 1
Computer Engineering Department Islamic University of Gaza
CENG 351 Introduction to Data Management and File Structures
Presentation transcript:

1 CENG 707 Data Structures and Algorithms Nihan Kesim Çiçekli Department of Computer Engineering Middle East Technical University Fall 2010

2 CENG 707 Instructor: Nihan Kesim Çiçekli Office: A308 Lecture Hours: Mon. 18:00-21:00 Course Web Page: Teaching Assistant:

3 Course Description Course Objectives: To introduce abstract concepts for data organization and manipulation, to show how these concepts are useful in problem solving. Prerequisite: C programming References Data Structures and Algorithm Analysis in C, by Mark Allen Weiss, Addison-Wesley, Problem Solving and Program Design in C, 3rd edition Hanly and Koffman, Addison-Wesley. Data Structures, Algorithms & Software Principles in C, by T.A. Standish, Addison Wesley, 1995.

4 Course Outline 1.Introduction: C Review 2.Algorithm analysis 3.Recursion 4.Searching and Sorting 5.Stacks 6.Queues 7.Linked Lists 8.Trees 9.Hash Tables 10.Graphs

5 Grading Midterm Exam 120% Midterm Exam 220% Final Exam30% Programming Assignments30%

6 Policies Policy on missed midterm: –no make-up exam Lateness policy: –Late assignments are penalized up to 10% per day. All assignments and programs are to be your own work. No group projects or assignments are allowed.

7 Introduction Computers are devices that do only one kind of thing: They carry out algorithms to process information. To computer scientists, the algorithm is the central unifying concept of computing, the mode of thought that is the core of the computing perspective.

8 ALGORITHM A set of logical steps to accomplish a task. A “recipe of action”. A way of describing behavior.

9 Correct Algorithm It must correctly solve the problem for any valid input data. For the same input data, it must always give the same answer. Invalid input data should produce an error message or some other indication that the algorithm cannot correctly solve the problem. It should not produce an answer when given incorrect data since the user will think that the answer is valid.

10 Abstraction Idea: Define/implement the general idea, isolate the details. The steps in the algorithm should be grouped into related modules or blocks. You may use one module inside another module. You may refer to other algorithms by name instead of including all of their steps in the current algorithm.

11 Levels of Abstraction Well-designed algorithms will be organized in terms of abstraction. The simple instructions that make up each major logical step are hidden inside modules. By hiding the details inside appropriate modules, we can understand the main ideas without being distracted.

12 Computational Abstractions Problem: Calculating a letter grade for the course, based on a student’s various numerical scores (exam, quiz, and hw) and on the weights assigned to each Inputs: Student’s name, hw average, quiz average, exam score, their respective weights Output: Letter grade for the student

13 Algorithm: Calculate Grade 1. Get data(student_name, hw_avg, quiz_avg, exam_score) 2. num_grade = Calc_Avg(hw_avg, quiz_avg, exam_score) 3. letter_grade = Calc_Ltr_Grade(num_grade) 4. Output_Grade(student_name,letter_grade)

14 Software Development 1.Problem Understanding –Read the problem carefully and try to understand what is required for its solution. 2.Analysis –Identify problem inputs and outputs. 3.Design (Top-down design) –Map out the modular structure of your algorithm. Give a descriptive identifier for each module. –Refine your modular design. Does each module do only one logical task? Subdivide any module that does not, as many times as necessary. –Define the interface of each module before writing any code. –Begin the bottom-up work of constructing each module.

15 4.Implementation –Implement the algorithm as a (C) program. –Convert steps of the algorithm into programming language statements. 5.Testing and Verification –Test the completed program, and verify that it works as expected. –Use different test cases (not one) including critical test cases.

16 Exercise Write an algorithm to find the minimum of three numbers. 1.Problem Understanding 2.Analysis: What are the inputs and outputs? 3.Design: How to solve the problem. 4.Implementation: in C 5.Verification and Testing.

17 Algorithm 1 1. Read three numbers into a, b and c. 2. Keep a variable to hold the minimum value. 3. if (a < b) then min  a else min  b 4. if (c < min) then min  c 5. Print min.

18 Algorithm 2 1. Read three numbers into a, b and c. 2. if (a < b) and (a < c) then print a else if (b < c) then print b else print c.

19 Algorithm Components 1.Data structures to hold data. 2.Data manipulation instructions to change data values. 3.Conditional expressions to make decisions 4.Control structures to act on decisions. 5.Modules to make the abstraction manageable by abstraction.