Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
38 Cards in this Set
- Front
- Back
Injective Function (one-to-one) |
f(a) = f(b) -> (a=b) for all a & b in domain f Never more than one incoming arrow, but not always an arrow from left to all of right values if A ->B then |A| <= |B| |
|
Surjective (onto) |
For all b in B, there exists an a in A such that f(a) = b Multiple arrows can go to an answer on the right, and every value on right will have an arrow going to it. if A->B then |A|>=|B| |
|
Bijective |
Both injective and Surjective. One-to-one and only functions to have inverses if A->B then |A|=|B| |
|
What value is in every set |
Null |
|
A = {1} B = {2} AUB = ? |
{1,2} |
|
A = {1} B = {2} AnB = ? |
{NULL} |
|
Assume: p p->q Then q |
Modus Ponens |
|
Assume: p->q q->r Then p->r |
law of syllogism |
|
Assume: p->q -p Then -q |
Modus Tollens |
|
A|B means |
A divides B so A is a factor of B |
|
A|B and A|C implies? |
A|(B+C) |
|
What are the three parts of Inductions |
Base Case, Inductive Hypothesis, Inductive Step |
|
A = R(mod B) is equivalent to |
A = Bn + R |
|
Reflexive |
aRa for every element a in A |
|
Irreflexive |
a does not Ra for every element a in A |
|
Symmetric |
if aRb -> bRa for all a, b in A |
|
Antisymmetric |
if aRb and bRa -> a=b for all a,b in A |
|
Transitive |
if aRb & bRc -> aRc for all a,b,c in A |
|
[x] = {a|a is an element of A ^ aRx} is an example of |
Equivalence classes |
|
Big O best and worst case of Insert of linked list |
Best: O(1) Average: O(n) Worst: O(n) |
|
Big O best and worst case of Quick sort |
Best: O(nlogn) Average: O(nlogn) Worst: O(n^2) |
|
Big O best and worst of hash table access of value |
Best: O(1) Worst: O(n) |
|
Big O best, average, worst of binary tree search |
Best: O(1) Average: O(lgn) Worst: O(n) |
|
Big O of Bubble sort |
Best: O(n) Average & Worst: O(n^2) |
|
Big O of Merge sort |
O(nlgn) |
|
Definition of set difference |
n(negC U negB) becomes - (CnB) |
|
Definition of implication |
(q->r) == (-q v r) |
|
Equivalence relation |
reflexive, symmetric, and transitive |
|
Partial Ordering Relation |
Reflexive, Anti-symmetric, and transitive |
|
Binary Search on sorted list Average and worst case, Space time complexity |
Avg: O(logn) Worst: O(logn) Space complexityO(1) |
|
Quicksort |
Best: O(n log(n)) Avg: O(n log(n)) Worst: O(n^2) Space complex. worst: O(n) |
|
Mergesort |
Best: O(n log(n)) Avg: O(n log(n)) Worst: O(n log(n)) Space worst: O(n) |
|
Heapsort |
Best: O(n log(n)) Avg: O(n log(n)) Worst: O(n log(n)) Space worst: O(1) |
|
Bubble Sort |
Best: O(n) Avg: O(n^2) Worst: O(n^2) Space: O(1) |
|
Insertion Sort |
Best: O(n) Avg: O(n^2) Worst: O(n^2) Space: O(1) |
|
Selection Sort |
Best: O(n^2) Avg: O(n^2) Worst: O(n^2) Space: O(nk) |
|
Bucket Sort |
Best: O(n+k) Avg: O(n+k) Worst: O(n^2) Space: O(nk) |
|
Radix Sort |
Best: O(nk) Avg: O(nk) Worst: O(nk) Space: O(n+k) |