Exam 3 Flashcards Preview

Math (Comp. Sci) > Exam 3 > Flashcards

Flashcards in Exam 3 Deck (25)
Loading flashcards...
1

How do you find the sum of the nth row?

2^n

2

What is row 0 of pascals triangle

1

3

what is row 1 of pascals triangle

1 1

4

what is row 2 of pascals triangle

1 2 1

5

what is row 3 of pascals triangle

1 3 3 1

6

what is row 4 of pascals triangle

1 4 6 4 1

7

what is row 5 of pascals triangle

1 5 10 10 5 1

8

what is row 6 of pascals triangle

1 6 15 20 15 6 1

9

what is row 7 of pascals triangle

1 7 21 35 35 21 7 1

10

what is row 8 of pascals triangle

1 8 28 56 70 56 28 8 1

11

How do you find the # of subsets that an asset with n elements has?

2^n

12

What is a powerset

set of all subsets

13

What does a ∩ b mean

Intersection. The intersection of two sets is a new set that contains all of the elements that are in both sets.

14

what does a ∪ b mean

The union of two sets is a new set that contains all of the elements that are in at least one of the two sets. The union is written as A ∪ B or “ A or B ”.

15

What does B' mean

everything that is not inside B

16

How do you find the number of bit strings in length n?

2^n

17

How do you find the number of bit strings of length n that contain an exact amount of #? (length 9 with exactly 5 1s and 4 0s)

ex: do 9 nCr 5 (length 9 with exactly 5 1s and 4 0s)

18

What does 3! mean

3*2*1 (6 permutations)

19

What is the formula for permutations

n! = n(n-1)(n-2_..(3)(2)(1)

20

How do you calculate the number of permutations assuming 2 people must be adjacent (a group of 5 people but A and B need to be adjacent)

1 (1,2) 2 3 4
4!2! = 48

21

How do you calculate the number of permutations assuming 2 people cannot be adjacent (a group of 5 people but A and B cannot be adjacent)

You take the compliment (total - opposite)
5!-4!-2!

22

What is the formula for the compliment

total - opposite

23

How do you calculate the number of permutations assuming 3 people must be adjacent (a group of 5 people but A and B and C need to be adjacent)

3!3!
(5-3 = 2 + 1 (1 group of 3)) x (amount that needs to be together)

24

When calculating in a horse race with 9 horses, how many ways can the top 3 finish?

Use nPr so 9p3 = 504
(# of permutations of n things taken # at a time)

25

What if each 0 in a length 9 bit string must be immediately followed by a 1? (4 zeros)

a (01) b (01) c (01) d (01) e
(9-4*1(4 groups of 01)) is c (5,1)
5 letters (a,b,c,d,e) with 1 combination of 01 because it can only ever be 1 combo regardless of position