Data Structures & Algorithms Lecturers : Boontee Kruatrachue Room no. 913 Kritawan Siriboon Room no. 913 Lecturers : Boontee Kruatrachue Room no. 913 Kritawan.

Slides:



Advertisements
Similar presentations
Polynomial Time Algorithms for the N-Queen Problem Rok sosic and Jun Gu.
Advertisements

Eight queens puzzle. The eight queens puzzle is the problem of placing eight chess queens on an 8×8 chessboard such that none of them are able to capture.
Chapter 5: Decrease and Conquer
Sudoku. Introduction In this presentation I will cover the Sudoku puzzle, some basics of its complexity as well as specifically discussing the complexity.
SEARCHING, SORTING, TOPOLOGICAL SORTS Most real world computer applications deal with vast amounts of data. Searching for a particular data item can take.
EECS 311: Chapter 4 Notes Chris Riesbeck EECS Northwestern.
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.
Search Problems Russell and Norvig: Chapter 3, Sections 3.1 – 3.3 Slides adapted from: robotics.stanford.edu/~latombe/cs121/2003/home.htm by Prof. Jean-Claude.
CSCE 210 Data Structures and Algorithms
1 CENG 707 Data Structures and Algorithms Nihan Kesim Çiçekli Department of Computer Engineering Middle East Technical University Fall 2010.
DAST, Spring © L. Joskowicz 1 Data Structures – LECTURE 1 Introduction Motivation: algorithms and abstract data types Easy problems, hard problems.
Overview CS113, Fall 2000 Gene Itkis. The Promise Heavy Fast-paced Challenging Rewarding.
1 Advanced Data Structures. 2 Topics Data structures (old) stack, list, array, BST (new) Trees, heaps, union-find, hash tables, spatial, string Algorithm.
Data Structures & Algorithms What The Course Is About s Data structures is concerned with the representation and manipulation of data. s All programs.
Review for Test 2 i206 Fall 2010 John Chuang. 2 Topics  Operating System and Memory Hierarchy  Algorithm analysis and Big-O Notation  Data structures.
CS 206 Introduction to Computer Science II 11 / 03 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 03 / 25 / 2009 Instructor: Michael Eckmann.
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 Lecture-1:Introduction
METU Computer Engineering Department
1 CSC 427: Data Structures and Algorithm Analysis Fall 2011 See online syllabus (also available through BlueLine): Course goals:
CSE 221/ICT221 Analysis and Design of Algorithms Lecture 06: CSE 221/ICT221 Analysis and Design of Algorithms Lecture 06: Analysis of Algorithm using List,
CSC 202 Analysis and Design of Algorithms Lecture 06: CSC 202 Analysis and Design of Algorithms Lecture 06: Analysis of Algorithm using List, Stack and.
COMPE 226 Data Structures 2015 Fall Murat KARAKAYA Department of Computer Engineering.
CS212: DATA STRUCTURES Lecture 1: Introduction. What is this course is about ?  Data structures : conceptual and concrete ways to organize data for efficient.
Back Tracking Project Due August 11, 1999 N-queens: –A classic puzzle for chess buffs is the N- Queens problem. Simply stated: is it possible to place.
HISTORY The problem was originally proposed in 1848 by the chess player Max Bezzel, and over the years, many mathematicians, including Gauss have worked.
Télécom 2A – Algo Complexity (1) Time Complexity and the divide and conquer strategy Or : how to measure algorithm run-time And : design efficient algorithms.
Two Dimensional Arrays
CSE 3358 NOTE SET 1 Data Structures and Algorithms.
1 CSC 427: Data Structures and Algorithm Analysis Fall 2010 See online syllabus (also available through BlueLine): Course goals:
Sorting Algorithms Data Structures & Problem Solving Using JAVA Second Edition Mark Allen Weiss Chapter 8 © 2002 Addison Wesley.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 223 – Advanced Data Structures Course Introduction.
5.4 – Solving Compound Inequalities. Ex. Solve and graph the solution.
EECS 311: Chapter 6 Notes Chris Riesbeck EECS Northwestern.
Overview of Course Java Review 1. This Course Covers, using Java Abstract data types Design, what you want them to do (OOD) Techniques, used in implementation.
Stacks and Queues Data Structures & Problem Solving Using JAVA Second Edition Mark Allen Weiss Chapter 16 © 2002 Addison Wesley.
CSE 3358 NOTE SET 1 Data Structures and Algorithms.
Data Structures Using C++ 2E1 Recursion and Backtracking: DFS Depth first search (a way to traverse a tree or graph) Backtracking can be regarded as a.
Two Dimensional Arrays. Two-dimensional Arrays Declaration: int matrix[4][11]; 4 x 11 rows columns
Data Structures for Programmers Vamshi Ambati
Recursion Data Structures & Problem Solving Using JAVA Second Edition Mark Allen Weiss Chapter 7 © 2002 Addison Wesley.
Data Structures Lecture 1: Introduction. Course Contents Data Types   Overview, Introductory concepts   Data Types, meaning and implementation  
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 223 – Advanced Data Structures Course Introduction.
Review for Final Exam – cs411/511 Definitions (5 questions, 2 points each) Algorithm Analysis (3 questions, 3 points each) General Questions (3 questions,
Linked Lists Data Structures & Problem Solving Using JAVA Second Edition Mark Allen Weiss Chapter 17 © 2002 Addison Wesley.
1 Data Structures CSCI 132, Spring 2014 Lecture 1 Big Ideas in Data Structures Course website:
Backtracking & Brute Force Optimization Intro2CS – weeks
Data Abstraction and Problem Solving with JAVA Walls and Mirrors Frank M. Carrano and Janet J. Prichard © 2001 Addison Wesley Data Abstraction and Problem.
© 2006 Pearson Addison-Wesley. All rights reserved 6-1 Chapter 6 Recursion as a Problem- Solving Technique.
Course Introductions.  Introduction to java  Basics of Java  Classes & Objects  Java Collections and APIs  Algorithms and their analysis  Recursion.
Reference Types Data Structures & Problem Solving Using JAVA Second Edition Mark Allen Weiss Chapter 2 © 2002 Addison Wesley.
 Saturday, April 20, 8:30-11:00am in B9201  Similar in style to written midterm exam  May include (a little) coding on paper  About 1.5 times as long.
Heap Sort Uses a heap, which is a tree-based data type Steps involved: Turn the array into a heap. Delete the root from the heap and insert into the array,
Data Structures By Dr. Mehedi Masud ِAssociate Professor, Computer Science Dept. College of Computers and Information Systems Taif University 1.
1 CENG 707 Data Structures and Algorithms Nihan Kesim Çiçekli Department of Computer Engineering Middle East Technical University Fall 2013.
Data Structures & Algorithms Lecturer : Kritawan Siriboon, Room no. 913 Text : Data Structures & Algorithm Analysis in C, C++,… Mark Allen Weiss, Addison.
CSC 421: Algorithm Design & Analysis
CENG 707 Data Structures and Algorithms
COMP9024: Data Structures and Algorithms
CSSE 230 Day 25 Skip Lists.
Midterm Review.
CS 315 Data Structures B. Ravikumar Office: 116 I Darwin Hall Phone:
CSC 421: Algorithm Design & Analysis
Linked List (extra) Lecturer : Kritawan Siriboon, Room no. 913
CENG 213 Data Structures Nihan Kesim Çiçekli
Overview Analysis Notation Specific ADTs
Presentation transcript:

Data Structures & Algorithms Lecturers : Boontee Kruatrachue Room no. 913 Kritawan Siriboon Room no. 913 Lecturers : Boontee Kruatrachue Room no. 913 Kritawan Siriboon Room no. 913 Text : Data Structures & Algorithm Analysis in C, C++,… Mark Allen Weiss, Addison Wesley

Text Text : Data Structures & Algorithm Analysis in C Mark Allen Weiss, Addison Wesley res/ds/Data_Structures_and_Algori thm_Analysis_in_C.pdf

1. Algorithm State how to solve problem step by step. Ex: Finding a fake coin out of n real gold coins. Given * a two arm scale. * the fake coin is lighter.

Algo.1 :Two coins at a time Best Case Worst Case Average Case 1 n/2 How many times you weight?

Algo 2 : Half Cutting Best Case Worst Case ½ ½ Time Remaining 1 2 d = n d = log 2 n = n/2 1 = n/2 2 = n/ = n/2 d 2 n/4 3 n/ d 1 n/2 1 How many times you weight?

2. Data Structure Structures of all data : how to keep related data in memory. Ex. The Eight Queen Problem.

The Eight Queen Problem Puting eight Queens on 8 x 8 chessboard such that none of them is able to capture any other using the standard chess queen’s move. Q Q Q Q Q Q Q Q

The Eight Queen Solutions It has 92 distinct solutions. If solutions that only differ by symmetry operatons (rotations & reflections) of the board are counted as one, the puzzle has 12 unique solutions.

The Eight Queen Problem Data Structures col Row Coloumn row Q Q Q Q Q Q Q Q D array1-D array

2-D array & 1-D array x A B x … A[1][5] B[13] B[13] : BaseAdd + 13 * sizeof(int) A[1][5] : BaseAdd + ( (1*8 ) + (5) )*sizeof(int) Column size

Data Structures & Algorithms Data Structures  abstract data type: linked list, stack, queue, trees, heap, graph. Algorithms : recursion, complexity (algorithm analysis), hashing, searching, sorting.