Permutations and Combinations

Slides:



Advertisements
Similar presentations
4.5 Generalized Permutations and Combinations
Advertisements

Counting Chapter 6 With Question/Answer Animations.
Statistics Review. Box-and-Whisker Plots The Parts of a Box and Whisker Plot Name the parts of a Box-and-Whisker Plot MedianUpper Quartile Lower.
1 Learning Objectives for Section 7.4 Permutations and Combinations After today’s lesson you should be able to set up and compute factorials. apply and.
Permutations and Combinations AII Objectives:  apply fundamental counting principle  compute permutations  compute combinations  distinguish.
Logic and Introduction to Sets Chapter 6 Dr.Hayk Melikyan/ Department of Mathematics and CS/ For more complicated problems, we will.
Chapter 7 Logic, Sets, and Counting Section 4 Permutations and Combinations.
6.4 Permutations and combinations For more complicated problems, we will need to develop two important concepts: permutations and combinations. Both of.
Math Duels Competition of Scholars. Rules  The class must be split into 2 groups.  Each group must select a team captain and they must do Rock-Paper-Scissors.
Generalized Permutations and Combinations
Chapter 7 Logic, Sets, and Counting Section 4 Permutations and Combinations.
Learning Objectives for Section 7.4 Permutations and Combinations
Barnett/Ziegler/Byleen Finite Mathematics 11e1 Learning Objectives for Section 7.4 Permutations and Combinations The student will be able to set up and.
PERMUTATIONS AND COMBINATIONS BOTH PERMUTATIONS AND COMBINATIONS USE A COUNTING METHOD CALLED FACTORIAL.
Lesson 0.4 (Counting Techniques)
37. Permutations and Combinations. Fundamental Counting Principle Fundamental Counting Principle states that if an event has m possible outcomes and another.
5.5 Generalized Permutations and Combinations
COUNTING Permutations and Combinations. 2Barnett/Ziegler/Byleen College Mathematics 12e Learning Objectives for Permutations and Combinations  The student.
Permutations and Combinations AII Objectives:  apply fundamental counting principle  compute permutations  compute combinations  distinguish.
Section 6.3. Section Summary Permutations Combinations.
Permutations and Combinations
CF 1334 Sistem Basis Data (3 SKS)
Diskusi-08 Jelaskan dan berikan contoh penggunaan theta join, equijoin, natural join, outer join, dan semijoin The slides for this text are organized into.
Generalized Permutations and Combinations
Diskusi-5 Sebutkan perangkat (tools) yang berpotensi mendukung kebutuhan tugas-tugas manajerial (management work) Jelaskan enam karakteristik informasi.
Storage and Indexes Chapter 8 & 9
Query-by-Example (QBE)
Copyright © Cengage Learning. All rights reserved.
Diskusi-1 Bacalah materi chapter-01, lalu buatlah ringkasan yang berisi tentang : Definisi EUIS Siapa end user Dampak euis pada lingkungan kerja Perencanaan.
Latihan Answer the following questions using the relational schema from the Exercises at the end of Chapter 3: Create the Hotel table using the integrity.
Diskusi-16 Buatlah ringkasan tentang pertimbangan dalam desain yang ergonomis pada tiga perangkat utama komputer yaitu monitor, keyboard dan mouse (lihat.
Hash-Based Indexes Chapter 11
Latihan Create a separate table with the same structure as the Booking table to hold archive records. Using the INSERT statement, copy the records from.
Tugas-05 a. Sebutkan primary key masing-masing tabel
Introduction to Query Optimization
Relational Algebra Chapter 4, Part A
Modeling Your Data Chapter 2 cs542
File Organizations Chapter 8 “How index-learning turns no student pale
External Sorting The slides for this text are organized into chapters. This lecture covers Chapter 11. Chapter 1: Introduction to Database Systems Chapter.
Chapter 7 Logic, Sets, and Counting
File Organizations and Indexing
File Organizations and Indexing
Team Project, Part II NOMO Auto, Part II IST 210 Section 4
Hash-Based Indexes Chapter 10
Selected Topics: External Sorting, Join Algorithms, …
Relational Algebra Chapter 4, Sections 4.1 – 4.2
Probability Warm Up page 12- write the question you have 10 mins to complete it. See coaching on page 85.
Permutations and Combinations
Lesson 11-1 Permutations and Combinations
Permutations and Combinations
B+Trees The slides for this text are organized into chapters. This lecture covers Chapter 9. Chapter 1: Introduction to Database Systems Chapter 2: The.
Counting techniques Basic Counting Principles, Pigeonhole Principle, Permutations and Combinations.
Permutations and Combinations
Evaluation of Relational Operations: Other Techniques
Distributed Databases
Bellwork Practice Packet 10.3 B side #3.
Introduction to Database Systems
Chapter 11 Instructor: Xin Zhang
Probability Warm Up page 12- write the question you have 10 mins to complete it. See coaching on page 85.
Day 2 - Combinations.
Permutations and Combinations
Standard DA-5.2 Objective: Apply permutations and combinations to find the number of possibilities of an outcome.
Tree-Structured Indexes
Permutations and Combinations
Lecture 7: Permutations and Combinations
File Organizations and Indexing
COSC 3480 Projects & Homeworks Fall 2003
Relational Calculus Chapter 4, Part B
Presentation transcript:

Permutations and Combinations Additional Problems . The slides for this text are organized into chapters. This lecture covers Chapter 1. Chapter 1: Introduction to Database Systems Chapter 2: The Entity-Relationship Model Chapter 3: The Relational Model Chapter 4 (Part A): Relational Algebra Chapter 4 (Part B): Relational Calculus Chapter 5: SQL: Queries, Programming, Triggers Chapter 6: Query-by-Example (QBE) Chapter 7: Storing Data: Disks and Files Chapter 8: File Organizations and Indexing Chapter 9: Tree-Structured Indexing Chapter 10: Hash-Based Indexing Chapter 11: External Sorting Chapter 12 (Part A): Evaluation of Relational Operators Chapter 12 (Part B): Evaluation of Relational Operators: Other Techniques Chapter 13: Introduction to Query Optimization Chapter 14: A Typical Relational Optimizer Chapter 15: Schema Refinement and Normal Forms Chapter 16 (Part A): Physical Database Design Chapter 16 (Part B): Database Tuning Chapter 17: Security Chapter 18: Transaction Management Overview Chapter 19: Concurrency Control Chapter 20: Crash Recovery Chapter 21: Parallel and Distributed Databases Chapter 22: Internet Databases Chapter 23: Decision Support Chapter 24: Data Mining Chapter 25: Object-Database Systems Chapter 26: Spatial Data Management Chapter 27: Deductive Databases Chapter 28: Additional Topics

Permutations and Combinations with and without Repetition Discrete Mathematics and its Applications 9/8/2018 Permutations and Combinations with and without Repetition (c)2001-2002, Michael P. Frank

n is number of distinct classes of objects in the original bag! - r-permutation without repetition - order matters (r distinguishable slots) - without replacement (n distinguishable objects) - r-combination without repetition - order does not matter (r indistinguishable slots) - without replacement (n distinguishable objects) n! / r! (n-r)! n! / (n-r)! - r-permutation with repetition - order matters (r distinguishable slots) - with replacement (n distinct classes of indistinguishable objects) n^r - r-combination with repetition - order does not matter (r indistinguishable slots) - with replacement (n distinct classes of indistinguishable objects) (n+r-1)! / r! (n-1)!

Combinations or Permutations? 1. In how many ways can you choose 5 out of 10 friends to invite to a dinner party? Solution: Does the order of selection matter? NO If you choose friends in the order A,B,C,D,E or A,C,B,D,E the same set of 5 was chosen, so we conclude that the order of selection does not matter. We will use the formula for combinations since we are concerned with how many subsets of size 5 we can select from a set of 10. C(10,5) =

Permutations or Combinations? How many ways can you arrange 10 books on a bookshelf that has space for only 5 books? Does order matter? The answer is yes since the arrangement ABCDE is a different arrangement of books than BACDE. We will use the formula for permutations. We need to determine the number of arrangements of 10 objects taken 5 at a time so we have P(10,5) = 10(9)(8)(7)(6)=30,240

Lottery problem A certain state lottery consists of selecting a set of 6 numbers randomly from a set of 49 numbers. To win the lottery, you must select the correct set of six numbers. How many possible lottery tickets are there? Solution. The order of the numbers is not important here as long as you have the correct set of six numbers. To determine the total number of lottery tickets, we will use the formula for combinations and find C(49, 6), the number of combinations of 49 items taken 6 at a time. C(49,6) = 13,983,816

Examples How many ways can a 3-person subcommittee be selected from a committee of a seven people? The number of ways that a three-person subcommittee can be selected from a seven member committee is the number of combinations (since order is not important in selecting a subcommittee) of 7 objects 3 at a time. This is:

Example (cont) How many ways can a president, vice-president, and secretary can be chosen from a committee of 7 people? The number of ways a president, vice-president, and secretary can be chosen from a committee of 7 people is the number of permutations (since order is important in choosing 3 people for the positions) of 7 objects 3 at a time. This is: P(7,3)

The five spades can be selected in C13,5 ways and the two Problem From a standard 52-card deck, how many 7-card hands have exactly 5 spades and 3 hearts? The five spades can be selected in C13,5 ways and the two hearts can be selected in C13,2 ways. Applying the Multiplication Principle, we have: Total number of hands

Order doesn’t matter and Repetitions are allowed Problem How many ways are there to select five bills from a cash box containing $1, $2, $5, $10, $20, $50 and $100 bills, such that the bills are indistinguishable and the order in which they are selected is unimportant. (there are also at least 5 bills of each kind). Solution Order doesn’t matter and Repetitions are allowed This is like drawing colored balls with replacement. The colors correspond to the values. Since the order doesn’t matter we have: C(7+5-1,5)=462

Combinations with Repetition Discrete Mathematics and its Applications 9/8/2018 Combinations with Repetition Approach: Place five markers in the compartments i.e., # ways to arrange five stars and six bars ... Solution: Select the positions of the 5 stars from 11 possible positions ! C(n+r-1,5)= C(7+5-1,5)=C(11,5) n=7 r=5 compartments and dividers markers (c)2001-2002, Michael P. Frank

exercise A combination lock will open when the right choice of three numbers (from 1 to 30, inclusive) is selected. How many different lock combinations are possible assuming no number is repeated?

exercise A basketball team consists of two centers, five forwards, and four guards. In how many ways can the coach select a starting line up of one center, two forwards, and two guards? Center: Forwards: Guards: Thus, the number of ways to select the starting line up is 2*10*6 = 120.

Problem A cookie shop has 4 kinds of cookies and we want to pick 6. In how many ways we can pick them? We don’t care about the order and cookies from one kind are indistinguishable. This is precisely the problem we saw to solve the r-combination with repetition C(6+4-1,6)=84.

Problem In how many ways can we place 10 indistinguishable items in 8 distinguishable boxes. This is precisely the problem we saw to solve the r-combination with repetition: C(10+8-1,10)

How many different “words” can we create by reordering SUCCESS ? Problem How many different “words” can we create by reordering SUCCESS ? Total number of permutations is 7!. However permuting the 3 S’s does not create a new word, idem 2 C’s: 7!/3! 2!

a) How many ways if the boxes are numbered? Problem Math teacher has 40 issues of a journal and packs them into 4 boxes,10 issues each. a) How many ways if the boxes are numbered?  assign boxes to issues: 40! / (10!)^4 b) How many ways if the boxes are indistinguishable.  There are 4! ways to label the boxes, once we have distributed them in unlabelled boxes. Since the number of ways to distribute them in labeled boxes is given by a) i.e..40! / (10!)^4 we get 40! / (10!)^4 4!.

How many different cross terms will we generate when we multiply out: Problem How many different cross terms will we generate when we multiply out: (x1+x2+...+xm)^n ? How many different exponents are there of the sort x1^n1 x2^n2 ... xm^nm with n1+n2+...+nm=n. Equivalent to : how many different way are there to put n balls in m boxes: C(n+m-1,n)

Tie-up 3 boys as one , thus it is Problem In how many ways can 7 girls and 3 boys line up, if the boys must stand next to each other? Tie-up 3 boys as one , thus it is about ordering 8 “things” and then choosing an order for the boys inside the one “big thing”. 8!*3!

Problem Suppose an operating system has a queue of 3 low priority and 5 high priority processes ready to run. In how many ways could these processes be ordered for execution if 2 low priority processes are not allowed to be executed back to back? Order H in 5! Ways To get HHHHH Then _H_H_H_H_H_ Order L in 3! Ways 6p3 for the 3 spots where we put the Ls. 5!*3!* 6p3