Final Flashcards
Inverse of p->q
!p ->!q
contrapositive of p->q
!q->!p
converse of p->q
q->p
!ExP(x) ->?
Ax!P(x)
!AxP(x) ->?
Ex!P(x)
!AxP(x) with negation inside
Ex!P(x)
Proof by contraposition
p->q = !q->!p then prove this to be true
perfect square x
for some int a; x=a^2
Proof by contradiction
assume false then find a case that makes it true
def: rational number
number can be stated in terms of a/b where a and b are integers and a and b are written in the lowest common term
def: irrational number
number can not be stated in terms of a/b where a and be are integeres
prove if n=ab then (a <= sqr(n))
proof by contradiction a>sqr(n) and b>sqr(n) a>sqr(n) > 0 b > sqr(n) > 0 s > x > 0 t > y > 0 st>xy ab>n contradiction
if n^2 is odd prove n is odd
suppose n is even
n=2k ; n^2 = 4k^2
2*(2k^2) so is even
proof by contraposition
prove sqr(2) is irrational by contradiction
suppose sqr(2) is rational sqr(2) = a/b 2 = a^2/b^2 2b^2 = a^2 so a is even a=2c 2b^2 = 4c^2 b^2=2c^2 so b is even then a and b share common factor b CONTRADICTION
prove sum of rational and irrational is irrational
contradiction:
x=r;y=i;z=r
x+y=z; y=z-x; x = z +(-x)
a/b + c/d = ad+cb/bd which is rational
prove product of 2 rational is rational
a/b * b/c = ab/bc which is rational
prove product of 2 irrational is irrational
sqr(2) * sqr(2) = 2 contradiction
if a < b prove average of a and b is > a
b = a + x
average = (a + a + x)/2
2a/2 + x/2 = a+x/2
x/2 > 0 so true
prove if x is rational x/2 is ratinal
x=a/b
2a/b is rational
prove if x is rational then 3x-1 is rational
x=a/b
3a/b -1
3a/b -b/b
3a-b/b is rational
Identify the following sets N: Z: Z+: Q: R: R+: C:
N: 0,1,2,3 Z:integers Z+: positive integers Q:rational numbers R:real numbers R+:real positive number C:complex numbers
def subset
every element of A is in B
def strict subset
every element of A is in B but there exists an element in B which is not in A
def: power set
all subsets of given set
{0,1} = {{o},{0},{1},{0,1}
def Cartesian Product
A x B = {(a,b) | a∈A ^ b∈B}
def: union of sets
a set that contains elements in A or B or both
A u B = {x| x∈A v x∈b}
def intersection of sets
set contains elements in both A and B
A n B = {x| x∈A ^ x∈B}
def: disjoint sets
intersection of sets is empty
def: complement set
ā = { x∈U | x !∈ a}
def: difference of A and B
A-B = {x | x∈A ^ x!∈B}
prove (A n B) is a subset (<=) A
A n B -> x∈A ^ x ∈ B -> x ∈ A
prove A-B subset of A
(A-B)-> x∈A ^ x !∈B -> x∈A
prove A n (B-A) = 0
A n (B-A) = A n (B ^ !A) A n B n !A = A n !A = 0
prove A u (B-A) = A u B
Au(B-A) = A u (B ^ !A
A u B u(A ^ !A) = A u B
does A=B if A u C=B u C
no if A={1,2} ;B = {3} ;C={1,2,3}
does A=B if A n C = B n C
no, what if A and C have different members both not in C
does A=B if
1. Auc = Buc
and
2. AnC=BnC
yes
1. implies A and B don’t have members different outside of wahts in C
2. implies A and B dont have different numbers besides whats outside of C
Thus they must be the same
How many different three letter initials with none of the leters repeated can people have
26x25x24
How many bit strings of length n where n is a positive integer start and end with 1s
2^(n-2) + 1
How many strings are there of four lowercase letters that have the letter x in them
26^4 -25^4(all strings possible - all strings without the letter x
How many positive integers between 1000 and 9999 are divisible by 9
9999/9 - 999/9all divisible by 9 - lower than 1000 divisible by 9
How many positive integers between 1000 and 9999 are even
9999/2 - 999/2all even - even below 1000
How many positive integers between 1000 and 9999 have distinct digits
9x9x8x7(1-9)x(0-8)x8x7
How many positive integers between 1000 and 9999 are not divisible by 3
(9999-999) - (9999/3 - 999/3)all integers - integers divisible by 3
How many positive integers between 1000 and 9999 are divisible by 5 or 7
(9999/5-999/5) + (9999/7+999/7) -(9999/35 - 999/35)all divisible by 5 + all divisible by 7 - all divisible by both
How many positive integers between 1000 and 9999 are divisible by 5 but not by 7
(9999/5-999/5) -(9999/35 - 999/35)all divisible by 5 - all divisible by 5 and 7
How many positive integers between 1000 and 9999 are divisible by 5 and 7
(9999/35 - 999/35)
How many subsets of a set with 100 elements have more than one element
2^100 - 101all possible - 100 1 elements sets and 1 empty set
A palindrome is a string whos reversal is identical to the string, how many bit strings of length n are palindromes
(2^n/2)
In how many ways can a photographer at a wedding arrange 6 people in a row from a group of 10 people, where the bride an d groom are among these 10 people if the bride must be in the picture
6(9x8x7x6x5)(1x9x8x7x6x5) + (9x1x8x7x6x5) + (9x8x1x7x6x5) + (9x8x7x1x6x5) + 9x8x7x6x1x5) + (9x8x7x6x5x1)
In how many ways can a photographer at a wedding arrange 6 people in a row from a group of 10 people, where the bride an d groom are among these 10 people if the bride is not next to the groom
(5x6)(8x7x6x5)first place 4 that are not bride and groom, then place bride in 1 of 5 places then the groom in 1 of 6 places
In how many ways can a photographer at a wedding arrange 6 people in a row from a group of 10 people, where the bride an d groom are among these 10 people if exactly one of the bride and the groom is in the picture
(8x7x6x5x4)x(2x6)Pick the other 5 people out of 8 then pick bride or groom then put it in one of the 6 possible places
How many bit strings of length 10 contain either 5 consecutive 0s or 5 consecutive 1s
6(2^6)6 possible locations for the string of 5, then possible choices for 5 other bits and if the string is 1 or 0
Show that among any group of five integers there are two with the same remainder when divided by 4
Since there are only 4 outcomes when divided by 4 {0,1,2,3} and there are 5 numbers, it must be the case via the pigeonhole principle that two have the same remainder
Show that any group of d+1 integers there are two with exactly the same remainder when they are divided by d
The possible remainders when divided by d are {0,1,2,…,d-1} which are d in total. since we check d+1 options it must be the case that two have the same remainder via the pigeonhole principle
Given a set of 5 distinct integer coordinates on the xy plane, show that the midpoint of the line joining at least one pair of these points has an integer coordinate
There are only 4 types of points that can occur {(even, odd),(even,even),(odd,odd),(odd,even)}. As we can see that the mid pint on any two of the same would be integers. Via the pigeonhole principle it must be the case that we have a midpoint that lies on integers
if there are 101 people of different heights standing in line it is possible to find 11 people that are in order of increasing or decreasing
theorem: every sequence of n^2+1 distinct real numbers contains a sub sequence of n+1 that is either strictly increasing or decreasing
How many bit strings of length 12 contain exactly three 1s
C(12,3)
How many bit strings of length 12 contain at most three 1s
C(12,0) + C(12,1) + C(12,2) + C(12,3)
How many bit strings of length 12 contain at least 3 1s
2^12 - (C(12,1) + C(12,2) + C(12,0))
How many bit strings of length 12 contain an equal number of 0s and 1s
C(12,6)
Coin flipped eight times, how many possible outcomes in total
2^8
Coin flipped eight times, how many possible outcomes contain three heads
C(8,3)
Coin flipped eight times, how many possible outcomes contain at least three heads
2^8 - (C(8,0) + C(8,1) + C(8,2))total - - 0 head -1 head - 2 head
Coin flipped eight times, how many possible outcomes contain the same number of heads and tails
C(8,4)
How many bit strings of length 10 have exactly three 0s
C(10,3)
How many bit strings of length 10 have more 0s than 1s
C(10,6) + C(10,7) + C(10,8) + C(10,9) + C(10,10)
How many bit strings of length 10 have at least seven 1s
C(10,7) + C(10,8) + C(10,9) + C(10,10)
How many bit strings of length 10 have at least three 1s
C(10,3) + C(10,4) + C(10,5) + C(10,6) + C(10,7) + C(10,8) + C(10,9) + C(10,10)
How many permutations of the letters ABCDEFGH contain the string ED?
7!
How many permutations of the letters ABCDEFGH contain the string CDE?
6!
How many permutations of the letters ABCDEFGH contain the string BA and FGH?
5!
How many permutations of the letters ABCDEFGH contain the string AB, DE and GH?
5!
How many permutations of the letters ABCDEFGH contain the string CAB and BED?
4!
How many permutations of the letters ABCDEFGH contain the string BCA and ABF?
none since the b would never line up
How many ways to order 10 women and six men
10! x C(11,6) x 6!