CEG 221 Introduction Mr. David Lippa. Overview Introduction –What’s this course about? A synthesis of language, theory, and application Language: –Programming.

Slides:



Advertisements
Similar presentations
Introduction to Algorithms Quicksort
Advertisements

Announcements You survived midterm 2! No Class / No Office hours Friday.
1 CS101 Introduction to Computing Lecture 17 Algorithms II.
CPSC 171 Introduction to Computer Science Efficiency of Algorithms.
Lecture 12: Revision Lecture Dr John Levine Algorithms and Complexity March 27th 2006.
CS105 INTRODUCTION TO COMPUTER CONCEPTS INTRO TO PROGRAMMING Instructor: Cuong (Charlie) Pham.
ISOM MIS 215 Module 7 – Sorting. ISOM Where are we? 2 Intro to Java, Course Java lang. basics Arrays Introduction NewbieProgrammersDevelopersProfessionalsDesigners.
Reference: Message Passing Fundamentals.
Data Structures Data Structures Topic #7. Today’s Agenda How to measure the efficiency of algorithms? Discuss program #3 in detail Review for the midterm.
Chapter 11 Sorting and Searching. Copyright © 2005 Pearson Addison-Wesley. All rights reserved Chapter Objectives Examine the linear search and.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
CEG 221 Lesson 5: Algorithm Development II Mr. David Lippa.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Chapter 2: Algorithm Discovery and Design
CEG 221 Lesson 1: Review I Mr. David Lippa. Overview: Review of Required Concepts Basic data types –Normal basic types, size_t, time_t Basic programming.
Chapter 1 Software Development. Copyright © 2005 Pearson Addison-Wesley. All rights reserved. 1-2 Chapter Objectives Discuss the goals of software development.
TTIT33 Algorithms and Optimization – Dalg Lecture 2 HT TTIT33 Algorithms and optimization Lecture 2 Algorithms Sorting [GT] 3.1.2, 11 [LD] ,
Wednesday, 11/13/02, Slide #1 CS 106 Intro to CS 1 Wednesday, 11/13/02  QUESTIONS??  Today:  More on searching a list; binary search  Sorting a list;
Elementary Data Structures and Algorithms
Searching1 Searching The truth is out there.... searching2 Serial Search Brute force algorithm: examine each array item sequentially until either: –the.
1 CS101 Introduction to Computing Lecture 19 Programming Languages.
Introduction CSE 1310 – Introduction to Computers and Programming
HOW TO SOLVE IT? Algorithms. An Algorithm An algorithm is any well-defined (computational) procedure that takes some value, or set of values, as input.
CIS 068 Welcome to CIS 068 ! Lesson 9: Sorting. CIS 068 Overview Algorithmic Description and Analysis of Selection Sort Bubble Sort Insertion Sort Merge.
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
Week 2 CS 361: Advanced Data Structures and Algorithms
Recursion, Complexity, and Searching and Sorting By Andrew Zeng.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
{ CS203 Lecture 7 John Hurley Cal State LA. 2 Execution Time Suppose two algorithms perform the same task such as search (linear search vs. binary search)
Chapter 2: Algorithm Discovery and Design Invitation to Computer Science, C++ Version, Third Edition.
Invitation to Computer Science, Java Version, Second Edition.
Computer Programming I An Introduction to the art and science of programming with C++
Mr C Johnston ICT Teacher BTEC IT Unit 06 - Lesson 01 Introduction to Computer Programming.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
COMP 232 Intro Lecture. Introduction to Course Me – Dr. John Sigle Purpose/goals of the course Purpose/goals Prerequisites - COMP 132 (Java skill & Eclipse)
CS 1308 Computer Literacy and The Internet Software.
Introduction to Algorithms By Mr. Venkatadri. M. Two Phases of Programming A typical programming task can be divided into two phases: Problem solving.
Major objective of this course is: Design and analysis of modern algorithms Different variants Accuracy Efficiency Comparing efficiencies Motivation thinking.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
CS 361 – Chapters 8-9 Sorting algorithms –Selection, insertion, bubble, “swap” –Merge, quick, stooge –Counting, bucket, radix How to select the n-th largest/smallest.
1-1 Software Development Objectives: Discuss the goals of software development Identify various aspects of software quality Examine two development life.
Chapter 8 Sorting and Searching Goals: 1.Java implementation of sorting algorithms 2.Selection and Insertion Sorts 3.Recursive Sorts: Mergesort and Quicksort.
Sorting.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 23 Algorithm Efficiency.
Introduction CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Searching Topics Sequential Search Binary Search.
PREVIOUS SORTING ALGORITHMS  BUBBLE SORT –Time Complexity: O(n 2 ) For each item, make (n –1) comparisons Gives: Comparisons = (n –1) + (n – 2)
Quick Sort Modifications By Mr. Dave Clausen Updated for Python.
Amortized Analysis and Heaps Intro David Kauchak cs302 Spring 2013.
Sorting – Lecture 3 More about Merge Sort, Quick Sort.
The process of establishing a connection between a client and a server is called as Client – Server communication.
Winter 2016CISC101 - Prof. McLeod1 CISC101 Reminders Assignment 5 is posted. Exercise 8 is very similar to what you will be doing with assignment 5. Exam.
Algorithms and Problem Solving
Week 9 - Monday CS 113.
Object-Oriented Software Engineering Using UML, Patterns, and Java,
Sorting by Tammy Bailey
Course Description Algorithms are: Recipes for solving problems.
Introduction CSE 1310 – Introduction to Computers and Programming
Objective of This Course
Unit-2 Divide and Conquer
Welcome to CIS 068 ! Lesson 9: Sorting CIS 068.
Programming Languages
Algorithms and Problem Solving
Tonga Institute of Higher Education IT 141: Information Systems
Tonga Institute of Higher Education IT 141: Information Systems
Course Description Algorithms are: Recipes for solving problems.
CS203 Lecture 15.
CSCE156: Introduction to Computer Science II
Sorting and selection Prof. Noah Snavely CS1114
Presentation transcript:

CEG 221 Introduction Mr. David Lippa

Overview Introduction –What’s this course about? A synthesis of language, theory, and application Language: –Programming Languages –Modular C programming Theory: Algorithm development & analysis Application: Algorithm implementation Syllabus Review-ish Questions

Programming Languages: High-Level vs. Low-Level High-Level Languages –Close to English, but slightly slower –Easy to use and easily read/interpreted code –Platform independent Low-Level Languages –Difficult to use but very fast –Typically is machine-specific

The Language: Why C? Strengths: –Powerful, Fast, Portable yet relatively high-level language –Provides organizational structure for creation, testing, and verification of code –Provides similar design paradigms to other engineering languages, such as FORTRAN Weaknesses: –Inferior to Object Oriented Programming (C++, Java) for releasable applications that require GUIs or greater complexity

Theory: Algorithms Algorithm – a series of steps that results in the performance of a task –Common algorithms used in CS: sorting, searching, populating data structures Algorithms are frequently analyzed based on the number of steps to complete the task based on the amount of elements to process. –Basically, answer the question: How much work does it take to process n elements in terms of n? (Big-Oh, Little-Oh notation – not covered in this course)

Algorithms: An Example Assume a room full of people, each person is a processor. In practice, sorting that room full of people by height is faster than by first name. Common sense tells us this, right? Everyone is an independent processor and can figure out where he/she belongs. Takes at most n memory accesses (look around the room at n people) to sort by height with n processors = n 2 steps of work. Sorting by name requires each person to ask every other person to figure out where he/she belongs. Takes n requests to each person (ask each person his/her last name) by n processors = n 2 steps of work. They’re the same!?

Algorithm Example (Continued) No – they’re not the same –Each person asking every other person takes longer than each person scanning their eyes around the room to find their place. –One can either ask or listen, so it requires each processor to wait for its turn to speak –Everyone can look at everyone else without any such conflicts THUS, sorting by height is the same Both take n 2 work under analysis, but when implemented, come out differently This is part of Algorithm Analysis

Algorithms: Analysis & Implementation There are various ways to implement “sorting people in a classroom.” –Divide and conquer – Selection Sort –Divide and merge – MergeSort –Move each to the proper spot – BubbleSort Each have best/worst cases. What you also need to look at is the average case. Pick the best depending on Best, Worst, Average Cases and the situation

Syllabus

Next Time: Review of Required Concepts Basic data types –Normal basic types, size_t, time_t Basic programming structure –Flow control / Repetition –Scope –Documentation of code –Modular programming Libraries Pass by reference (in C, by pointer) vs. pass by value Basic algorithm development –Design document –Pseudo code

QUESTIONS? My policy on questions: –You have the right to ask questions at ANY time in class. –The only stupid question is the one you don’t ask. Any questions?