2.6 Applications Of Induction & other ideas Important Theorems

Slides:



Advertisements
Similar presentations
THE WELL ORDERING PROPERTY Definition: Let B be a set of integers. An integer m is called a least element of B if m is an element of B, and for every x.
Advertisements

College of Information Technology & Design
CMPS 2433 Chapter 8 Counting Techniques Midwestern State University Dr. Ranette Halverson.
22C:19 Discrete Structures Induction and Recursion Fall 2014 Sukumar Ghosh.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
A simple example finding the maximum of a set S of n numbers.
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 CHAPTER 4 - PART 2 GRAPHS 1.
CMPS 2433 Discrete Structures Chapter 5 - Trees R. HALVERSON – MIDWESTERN STATE UNIVERSITY.
Divide and Conquer Chapter 6. Divide and Conquer Paradigm Divide the problem into sub-problems of smaller sizes Conquer by recursively doing the same.
Advanced Topics in Algorithms and Data Structures Page 1 Parallel merging through partitioning The partitioning strategy consists of: Breaking up the given.
Chapter 11 Sorting and Searching. Copyright © 2005 Pearson Addison-Wesley. All rights reserved Chapter Objectives Examine the linear search and.
CSC 2300 Data Structures & Algorithms March 27, 2007 Chapter 7. Sorting.
Sorting and Searching. Searching List of numbers (5, 9, 2, 6, 3, 4, 8) Find 3 and tell me where it was.
Parallel Merging Advanced Algorithms & Data Structures Lecture Theme 15 Prof. Dr. Th. Ottmann Summer Semester 2006.
CHAPTER 11 Sorting.
CS 104 Introduction to Computer Science and Graphics Problems Data Structure & Algorithms (3) Recurrence Relation 11/11 ~ 11/14/2008 Yang Song.
Section Section Summary Recursive Algorithms Proving Recursive Algorithms Correct Recursion and Iteration (not yet included in overheads) Merge.
February 17, 2015Applied Discrete Mathematics Week 3: Algorithms 1 Double Summations Table 2 in 4 th Edition: Section th Edition: Section th.
Mathematical Maxims and Minims, 1988
Advanced Counting Techniques CSC-2259 Discrete Structures Konstantin Busch - LSU1.
CHAPTER 09 Compiled by: Dr. Mohammad Omar Alhawarat Sorting & Searching.
Recurrence Relation. Outline  What is a recurrence relation ?  Solving linear recurrence relations  Divide-and-conquer algorithms and recurrence relations.
HALVERSON – MIDWESTERN STATE UNIVERSITY CMPS 2433 Chapter 2 – Part 2 Functions & Relations.
CompSci 102 Discrete Math for Computer Science April 17, 2012 Prof. Rodger.
Intro to Nested Looping Intro to Computer Science CS1510 Dr. Sarah Diesburg.
Chapter 1: Real Numbers and Equations Section 1.1: The Set of Real Numbers.
Sorting and Searching by Dr P.Padmanabham Professor (CSE)&Director
7.3 Divide-and-Conquer Algorithms and Recurrence Relations If f(n) represents the number of operations required to solve the problem of size n, it follow.
Spring 2016 COMP 2300 Discrete Structures for Computation
Searching Topics Sequential Search Binary Search.
Young CS 331 D&A of Algo. Topic: Divide and Conquer1 Divide-and-Conquer General idea: Divide a problem into subprograms of the same kind; solve subprograms.
Chapter 9: Sorting1 Sorting & Searching Ch. # 9. Chapter 9: Sorting2 Chapter Outline  What is sorting and complexity of sorting  Different types of.
Computability Sort homework. Formal definitions of time complexity. Big 0. Homework: Exercises. Searching. Shuffling.
2.6 APPLICATIONS OF INDUCTION & OTHER IDEAS IMPORTANT THEOREMS MIDWESTERN STATE UNIVERSITY – COMPUTER SCIENCE.
Chapter 11 Sorting Acknowledgement: These slides are adapted from slides provided with Data Structures and Algorithms in C++, Goodrich, Tamassia and Mount.
Recursive Algorithms Section 5.4.
Decision Trees DEFINITION: DECISION TREE A decision tree is a tree in which the internal nodes represent actions, the arcs represent outcomes of an action,
Applied Discrete Mathematics Week 2: Functions and Sequences
College Algebra Chapter 3 Polynomial and Rational Functions
IGCSE 6 Cambridge Effectiveness of algorithms Computer Science
CS2210:0001Discrete Structures Induction and Recursion
Chapter 4 Divide-and-Conquer
Exercise 24 ÷ 2 12.
Taibah University College of Computer Science & Engineering Course Title: Discrete Mathematics Code: CS 103 Chapter 2 Sets Slides are adopted from “Discrete.
Divide and Conquer.
Topics discussed in this section:
Relations and Their Properties
MSIS 655 Advanced Business Applications Programming
The sum of any two even integers is even.
Intro to Nested Looping
Zeros of a Polynomial Function Shortcuts?
Exercise Use mathematical induction to prove the following formula.
Topic: Divide and Conquer
Intro to Nested Looping
Applied Combinatorics, 4th Ed. Alan Tucker
Time Complexity Lecture 14 Sec 10.4 Thu, Feb 22, 2007.
Divide-and-Conquer 7 2  9 4   2   4   7
Time Complexity Lecture 15 Mon, Feb 27, 2006.
Topic: Divide and Conquer
College Algebra Chapter 3 Polynomial and Rational Functions
Binary Search Counting
To Start: 15 Points Solve the following: 21,672 ÷ 3 = 45,225 ÷ 5 = 210,060 ÷ 10 = 7,224 9,045 21,006.
WJEC GCSE Computer Science
CMPS 2433 Chapter 8 Counting Techniques
Chapter 9.4 COMPARISONS OF SERIES.
Math 0332 Subsets Name ________________________
THE WELL ORDERING PROPERTY
Presentation transcript:

2.6 Applications Of Induction & other ideas Important Theorems Midwestern State University – Computer Science Dr. Ranette Halverson

Theorem 2.8 – Binary Search For any non-negative integer n, at most n+1 comparisons are required to determine if a particular number is in a list of 2n sorted numbers. Alternative: For any sorted list of n numbers, at most log2 n + 1 comparisons are required to determine if a particular number is in the list. Binary Search Complexity: O (log2 n)

Theorem 2.9 – Merge sorted lists Let A & B be sorted lists of numbers (both decreasing or increasing). Assume positive integer n represents the combined total of numbers in the 2 lists. A & B can be merged into a single list of sorted numbers in at most n-1 comparisons. Merge Complexity: O(n)

Theorem 1.3 – Number of subsets Yes, from chapter 1 If n is any non-negative number, the a set with n elements has exactly 2n subsets. Note – this can be used to determine the number of relations on a set.

Theorem 2.10 – Subsets of n items from r items Let S be a set of n elements & r is integer 0 <= r <= n. The number of subsets of S containing exactly r elements is n! / ( r! (n-r)! ) Application: How many 2 person committees can be selected from a set of 5 people?

Theorem 2.11 – Integers & Primes Every integer greater than 1 is either prime or a product of primes.

Homework – Section 2.6 Pages 91-92 – Exercises 1-8, 13 – 28 Homework – Supplementary Section Pages 95 – 96 – Exercises 1-8, 13-18, 31, 34, 35