Chapter 4 : Discrete Probability Flashcards
What is the Applications of using Discrete Probability in Computer Science? ( 3 )
- Probability theory plays important role in study of the complexity of algorithms
- Counting is required to determine enough telephone numbers, internet protocol addresses
- Programmers use probability to measure the success of the program before running it
List out 2 basic counting rules and when to use
- The Sum Rule
- If the task can’t be done at the same time
- The Product Rule
- If the task can be done at the same time
- Procedure can be broken down into 2 tasks
A student can choose a computer project from one of three lists. The three lists contain 23, 15 and 19 possible projects respectively. How many posible projects are there to choose from?
- 23 + 15 + 19 = 57 Projects
- The student need to choose a project from 1 of 3 lists so he may just choose 1 from 23 , 15 or 19 which the task can’t be done at the same time, he is required to choose 1 project on any one list
A student can choose a computer project from one of every lists. The three lists contain 23, 15 and 19 possible projects respectively. How many posible projects are there to choose from?
- 23 * 15 * 19 = 6555 Projects
- The student need to choose a project from every lists so he need to choose 1 from 23 , 15 or 19 which the task needed to be done at the same time.
How many different 8 - letter ( uppercase ) password are there?
1. With repetitions
2. Without repetitons
- 26 x 26 x 26 x 26 x 26 x 26 x 26 x 26 = 26^8
- 26 x 25 x 24 x 23 x 22 x 21 x 20 x 19 = 62990928000
- It uses the Product rule since we need to choose uppercase letters ( A - Z ) and put it in the first place and so on
How many difference license plates are available if each plate contains a sequence of 3 letters followed by 3 digits?
- 26 x 26 x 26 x 10 x 10 x 10 = 17576000
If there are 6 men and eight women auditioning for the leading male and female roles, how many ways the director can cast his leading couple?
- 6 x 8 = 48 ways
There are 7 different introductory books each on C++, Java and Perl. How many books that can be recommended to a student who is interested in learning a first programming language?
- 7 + 7 + 7 = 21 Books
A bag containes nince dics numbered from 1 to 9
If the number is even, a coin is tosses. If the number is odd, then a dice is thrown.
- 4 x 2 + 5 x 6 = 38
- 4 ( Even 2 , 4 , 6 , 8 ) x 2 ( Coin - Head , Tail )
5 ( Odd 1 , 3 , 5 , 7 , 9 ) x 6 ( Dice )
What does a Tree Diagram consists?
- Branch
- Branch is used to represent each possible choice
- Leaves
- Leaves is used to represent possible outcome
What is the definition of Permutation ( nPa ) ?
- Any linear arrangement of n discinct objects
A class has 4 students A , B , C , D , 4 students are to be chosen and steated in a row for a picture, How many such linear arragements are possible?
- 4! = 24
What does n! involves?
- Involve arrangement of all items
- Students A B C D form in a row to take picture
4!
What does P ( n , r ) involves?
- Involve arrangement of some items
- Form password uppercase ( A - Z ) with the length of 8 without repeating
P ( 26 , 8 )
What does n^r involves?
- Involve arrangement of repetition
- Form password uppercase ( A - Z ) with the length of 8
26^8
There are 6 children in a drawing class
1. In how many ways can all these 6 children be arranged in a line?
2. In how many ways can 4 children from the class be arranged in a line?
- 6! = 720
- P ( 6 , 4 ) = 6! / 2! = 360
If repetitions of letters are allowed, how many 5 - letter sequences are possible for letters CDE?
- 3^5
n = 3 ( C , D , E )
r = 5 ( 5 - letter sequence )
Does sequence / arrangement matter in Combination?
- No
How to press 1. P ( 26 , 8 ) and 2. C ( 26 , 8 ) in calculator ?
- Shift x ( Multiplication )
- Shift / ( Division )
What does 1. n and 2 . r represent in Permutation and Combination?
- Total Items
- Selection
What is the outcome for C ( n , 0 ) ? ( 2 )
- 1
- C ( n , n )
C ( n , 0 ) = 1
= C ( n , n )
What is the outcome for C ( n , 1 ) ? ( 2 )
- n
- C ( n , n-1 )
C ( n , 1 ) = n
= C ( n , n-1 )
There are 5 women and 4 men in a club. A team of four has to be chosen. How many different teams can be chosen if there must be either one women or exactly 2 women on the team?
5C1 x 4C3 + 5C2 x 4C2
5C1 x 4C3 ( Either One Women )
One Women x 3 Men
5C2 x 4C2 ( Exactly 2 Women )
2 Women x 3 Men
Automobiles comes in 4 models, 12 colors, 3 engine sizes and 2 transmission types
( i ) How many distinct automobiles can be manufactured?
( ii ) IF one of the available color is blue, how many different blue automobiles can be manufactured?
i. 4 x 12 x 3 x 2 = 288
ii. 4 x 3 x 2 = 24