2.6 APPLICATIONS OF INDUCTION & OTHER IDEAS IMPORTANT THEOREMS MIDWESTERN STATE UNIVERSITY – COMPUTER SCIENCE.

Slides:



Advertisements
Similar presentations
CMPS 2433 Chapter 8 Counting Techniques Midwestern State University Dr. Ranette Halverson.
Advertisements

1 Section 4.3 Permutations & Combinations. 2 Permutation Set of distinct objects in an ordered arrangement An ordered arrangement of r members of a set.
Permutations and Combinations Rosen 4.3. Permutations A permutation of a set of distinct objects is an ordered arrangement these objects. An ordered arrangement.
Pascal’s Triangle Row
Copyright © Cengage Learning. All rights reserved. CHAPTER 5 SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION SEQUENCES, MATHEMATICAL INDUCTION, AND RECURSION.
CSE115/ENGR160 Discrete Mathematics 04/17/12
Data Structures, Spring 2004 © L. Joskowicz 1 Data Structures – LECTURE 3 Recurrence equations Formulating recurrence equations Solving recurrence equations.
Data Structures, Spring 2006 © L. Joskowicz 1 Data Structures – LECTURE 3 Recurrence equations Formulating recurrence equations Solving recurrence equations.
Basics of Probability. Trial or Experiment Experiment - a process that results in a particular outcome or “event”. Simple event (or sample point), E i.
CS 104 Introduction to Computer Science and Graphics Problems Data Structure & Algorithms (3) Recurrence Relation 11/11 ~ 11/14/2008 Yang Song.
Recursive Definitions Rosen, 3.4 Recursive (or inductive) Definitions Sometimes easier to define an object in terms of itself. This process is called.
Section Section Summary Recursive Algorithms Proving Recursive Algorithms Correct Recursion and Iteration (not yet included in overheads) Merge.
Set, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS Slides.
Binomial Coefficient.
Mathematical Maxims and Minims, 1988
Rev.S08 MAC 1140 Module 12 Introduction to Sequences, Counting, The Binomial Theorem, and Mathematical Induction.
The Binomial Theorem.
Discrete Mathematics, 1st Edition Kevin Ferland
Counting. Why counting  Determine the complexity of algorithms To sort n numbers, how many instructions are executed ?  Count the number of objects.
7 Further Topics in Algebra © 2008 Pearson Addison-Wesley. All rights reserved Sections 7.4–7.7.
Advanced Counting Techniques CSC-2259 Discrete Structures Konstantin Busch - LSU1.
C++ Programming: Program Design Including Data Structures, Fourth Edition Chapter 19: Searching and Sorting Algorithms.
Notes 9.2 – The Binomial Theorem. I. Alternate Notation A.) Permutations – None B.) Combinations -
THE NATURE OF COUNTING Copyright © Cengage Learning. All rights reserved. 12.
Chapter 2 Mathematical preliminaries 2.1 Set, Relation and Functions 2.2 Proof Methods 2.3 Logarithms 2.4 Floor and Ceiling Functions 2.5 Factorial and.
Copyright © 2007 Pearson Education, Inc. Slide 8-1.
1 Binomial Coefficients CS 202 Epp, section ??? Aaron Bloomfield.
11.1 – Pascal’s Triangle and the Binomial Theorem
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
Computer Science: A Structured Programming Approach Using C1 8-7 Two-Dimensional Arrays The arrays we have discussed so far are known as one- dimensional.
Great Theoretical Ideas in Computer Science for Some.
CompSci 102 Discrete Math for Computer Science April 17, 2012 Prof. Rodger.
Advanced Counting Techniques CSC-2259 Discrete Structures Konstantin Busch - LSU1.
Lesson 6.8A: The Binomial Theorem OBJECTIVES:  To evaluate a binomial coefficient  To expand a binomial raised to a power.
Chapter 18: Searching and Sorting Algorithms. Objectives In this chapter, you will: Learn the various search algorithms Implement sequential and binary.
The Binomial Theorem.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 6 Counting and Probability Instructor: Hayk Melikyan Today we will review sections 6.6,
Slide Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
2-6 Binomial Theorem Factorials
1 CS 140 Discrete Mathematics Combinatorics And Review Notes.
Spring 2016 COMP 2300 Discrete Structures for Computation
Computer Science: A Structured Programming Approach Using C1 8-7 Two-Dimensional Arrays The arrays we have discussed so far are known as one- dimensional.
Introduction to Graph Theory & its Applications
Section 6.4. Powers of Binomial Expressions Definition: A binomial expression is the sum of two terms, such as x + y. (More generally, these terms can.
Binomial Coefficients and Identities
5.4 Binomial Coefficients Theorem 1: The binomial theorem Let x and y be variables, and let n be a nonnegative integer. Then Example 3: What is the coefficient.
Chapter 12.6 Notes. O A positive integer n is the product of the positive integers less than or equal to n. 0! Is defined to be 1. n! = n ● (n -1) ● (n.
Week 9 - Friday.  What did we talk about last time?  Permutations  Counting elements in sets  Brief introduction to combinations.
The Binomial Theorem Section 9.2a!!!. Powers of Binomials Let’s expand (a + b) for n = 0, 1, 2, 3, 4, and 5: n Do you see a pattern with the binomial.
Recursive Algorithms Section 5.4.
Chapter 10 Counting Methods.
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,
Chapter 12.5 The Binomial Theorem.
The binomial expansions
Great Theoretical Ideas In Computer Science
Permutations and Combinations
The Binomial Theorem Objectives: Evaluate a Binomial Coefficient
2.6 Applications Of Induction & other ideas Important Theorems
Permutations and Combinations
The Binomial Theorem.
Time Complexity Lecture 14 Sec 10.4 Thu, Feb 22, 2007.
Binomial Theorem; Pascal’s Triangle
The Binomial Theorem OBJECTIVES: Evaluate a Binomial Coefficient
Chapter 12 Section 4.
Divide-and-Conquer 7 2  9 4   2   4   7
Time Complexity Lecture 15 Mon, Feb 27, 2006.
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
CMPS 2433 Chapter 8 Counting Techniques
Section 11.7 The Binomial Theorem
Presentation transcript:

2.6 APPLICATIONS OF INDUCTION & OTHER IDEAS IMPORTANT THEOREMS MIDWESTERN STATE UNIVERSITY – COMPUTER SCIENCE

PROVE THE FOLLOWING USING INDUCTION ( N) 2 = …+ N 3

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 2 n sorted numbers. Alternative: For any sorted list of n numbers, at most log 2 n + 1 comparisons are required to determine if a particular number is in the list. Binary Search Complexity: O (log 2 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 2 n 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)! ) Also called combinations of n things taken r at a time. Application: How many 2 person committees can be selected from a set of 5 people?

PASCAL’S TRIANGLE The rth column of the nth row is C(r,n)= n! / ( r! (n-r)! ) C(0,0) C(1,0) C(1, 1) C(2,0) C(2,1) C(2,2) and so on What about permutations of n things taken r at a time???

EVALUATING C(N,R) From Pascal's triangle we see that the following is true C(n,r) = C(n-1,r-1) + C(n-1,r) So how do you calculate C(n,r) in a computer program?

THEOREM 2.11 – INTEGERS & PRIMES Every integer greater than 1 is either prime or a product of primes. Could you write a program that printed the primes and do it efficiently? How. Could you write a program that converts an integer into its product of primes?