600 likes | 857 Views
TEST OF FUNDAMENTALS. all the concepts/vocabulary…. WEEK 1 TOPICS. Course overview Propositional logic LaTeX. CONCEPTS / VOCABULARY. Propositions Boolean variables Bit strings Truth value Truth table
E N D
TEST OF FUNDAMENTALS • all the concepts/vocabulary…
WEEK 1 TOPICS • Course overview • Propositional logic • LaTeX
CONCEPTS / VOCABULARY • Propositions • Boolean variables • Bit strings • Truth value • Truth table • Operators: Negation, conjunction, disjunction, exclusive or, implication, XOR, biconditional • Converse, inverse, contrapositive
CONCEPTS / VOCABULARY • Tautology, contradiction • Table 1.2.5 (p. 17) of logical equivalences: • Identity laws • Domination laws • Idempotent laws • Double negation law • Commutative laws • Associative laws • Distributive laws • De Morgan’s laws
WEEK 2 TOPICS • Predicate logic and quantifiers • Sets and set operations
CONCEPTS / VOCABULARY • Predicate (a.k.a. propositional function) • Arguments (n-tuple) • Universe of discourse, syntax vs. semantics • Universal quantification • Existential quantification • Nesting of quantifiers • Binding variables, propositions • Negated quantifiers / equivalences
Definition of consistency: A set of propositions is consistent if there is an assignment of truth values to the variables that makes each expression true.
CONCEPTS / VOCABULARY • Sets, elements, members • N, Z, Z+, R • Set equality • Intensional (set builder) vs. extensional (enumerated) set definitions • Universal set • Empty/null set (), subset, proper subset, power set • Infinite sets, finite sets, cardinality • Ordered n-tuples, Cartesian product
CONCEPTS / VOCABULARY • Venn diagram • Union, intersection, difference (complement), symmetric difference • Disjoint sets • Principle of inclusion-exclusion • Set identities (Table 1.5.1: identity, domination, idempotent, complementation, commutative, associative, distributive, and De Morgan’s laws)
WEEK 3 TOPICS • Functions • Sequences and summations • Growth of functions; big-O notation
CONCEPTS / VOCABULARY • Function/mapping • Domain, codomain, image, pre-image, range • One-to-one/injective, onto/surjective, one-to-one correspondence/bijective • Inverse/invertible functions, compositions, graphs • Floor, ceiling
CONCEPTS / VOCABULARY • Sequences, terms, strings • Arithmetic progressions, geometric progressions, geometric series • Summation , index of summation, lower and upper limit • Standard summation formulas: Table 1.6.2 • Cardinality, countability
CONCEPTS / VOCABULARY • Big-O notation (upper bound on growth of f(x)) • f(x) is O(g(x)) if there exist constants C and k such that |f(x)| C |g(x)|whenever x k • Triangle inequality • Growth of (f1 + f2)(x), (f1 f2)(x) • Big-Omega (lower bound on growth of f(x)) • Big-Theta (upper and lower bound)
WEEK 4 TOPICS • Algorithms • Algorithmic complexity • Integers
CONCEPTS / VOCABULARY • Algorithm: “Finite set of precise instructions” • Properties: Input, output, definiteness (preciseness), correctness, finiteness, effectiveness, generality • Pseudocode • Searching algorithms • Linear (sequential) search • Binary search
CONCEPTS / VOCABULARY • Computational complexity, time complexity, (space complexity) • Worst-case, average-case, best-case • Exponential complexity, polynomial complexity, linear complexity, logarithmic complexity • Tractability, intractability, unsolvability (halting problem, Alan Turing), NP vs. P, NP-complete
CONCEPTS / VOCABULARY • Fundamental Theorem of Arithmetic • Primes, composite numbers • Factoring • Division (quotient, remainder) • a | b • Greatest common divisor, least common multiple, relative primes • Modular arithmetic, congruence • “The Division Algorithm” • Note: We’ll revisit pp. 120-125 when we get to Section 2.5.
WEEK 5 TOPICS • Integers and algorithms • Applications of number theory • Matrices
CONCEPTS / VOCABULARY • Euclidean algorithm • Base b expansions of integers (especially binary, hexadecimal) • Binary addition, binary multiplication, bit shifting
CONCEPTS / VOCABULARY • gcd as linear combination • Linear congruence • Fermat’s Little Theorem • Applications: • From Section 2.3: Hashing, pseudorandom numbers, cryptology • From Section 2.5: Chinese remainder theorem, computer arithmetic, pseudoprimes / Fermat’s Little Theorem, public key cryptography, RSA encryption/decryption
CONCEPTS / VOCABULARY • mxn matrices, rows, columns, equality • Matrix arithmetic, products • Identity matrix • Transpose At, symmetric matrices • Zero-one matrix, join (), meet (), Boolean product
WEEK 6 TOPICS • Proof methods • Mathematical induction
CONCEPTS / VOCABULARY • Theorems • Axioms / postulates / premises • Hypothesis / conclusion • Lemma, corollary, conjecture • Rules of inference • Modus ponens (law of detachment) • Modus tollens • Syllogism (hypothetical, disjunctive) • Universal instantiation, universal generalization, existential instantiation (skolemization or Everybody Loves Raymond), existential generalization
CONCEPTS / VOCABULARY II • Fallacies • Affirming the conclusion [abductive reasoning] • Denying the hypothesis • Begging the question (circular reasoning) • Proof methods • Direct proof • Indirect proof, proof by contradiction • Trivial proof • Proof by cases • Existence proofs (constructive, nonconstructive)
CONCEPTS/VOCABULARY • Proof by mathematical induction • Inductive hypothesis • Basis step: P(1) is true (or sometimes P(0) is true). • Inductive step: Show that P(n) P(n+1) is true for every integer n > 1 (or n > 0). • Strong mathematical induction (“second principle of mathematical induction”) • Inductive step: Show that [P(1) … P(n)] P(n+1) is true for every positive integer n.
WEEK 7 TOPICS • Recursion • Recursive and iterative algorithms • Program correctness
Concepts/Vocabulary • Recursive (a.k.a. inductive) function definitions • Recursively defined sets • Special sequences: • Factorial F(0)=1, F(n) = F(n-1)(n) = n! • Fibonacci numbers f0 = 0, f1 = 1, fn = fn-1 + fn-2 • Strings • *: Strings over alphabet • Empty string • String length l(s) • String concatenation
Concepts / Vocabulary • Recursive algorithm • Iterative algorithm
Concepts / Vocabulary • Initial assertion, final assertion • Correctness, partial correctness, termination • “Partially correct with respect to initial assertion p and final assertion q” • Rules of inference • Composition rule • Conditional rules • Loop invariants
WEEK 8 TOPICS • Counting • Inclusion-exclusion • Tree diagrams • Pigeonhole principle
Concepts/Vocabulary • Counting • Sum rule |A1 A2 … Am| = |A1| + … + |Am| for disjoint Ai • Product rule |A1x A2 x … x Am| = |A1| |A2| … |Am| • Inclusion-exclusion |A1 A2| = |A1| + |A2| - |A1 A2| • Tree diagrams
Concepts / Vocabulary • Pigeonhole Principle • If k+1 or more objects are in k boxes, at least one box has two or more objects • Generalized pigeonhole principle • If N objects are in k boxes, one box has at least N/k objects
WEEK 9 TOPICS • Permutations • Combinations • Binomial theorem • Discrete probability • Probability theory
Concepts/Vocabulary • Permutation, r-permutation • P(n, r) = n! / (n-r)! • r-combination • C(n, r) = (n choose r) = n! / (r! (n-r)!) • Pascal’s identity • (n+1 choose k) = (n choose k-1) + (n choose k) • Pascal’s triangle • Binomial theorem / binomial coefficients • (x+y)n = j=0n (n choose j) xn-j yj
Concepts / Vocabulary • Experiment, sample space, event • Laplace’s probability – p(E) = |E| / |S| • OK for finitely many equally likely outcomes • p(~E) = 1 – P(E) • p(E1 E2) = p(E1) + p(E2) when E1, E2 are disjoint
Concepts and Vocabulary • Axioms of probability: for a set of mutually exclusive outcomes sS, • 0 p(s) 1 • sS p(s) = 1 • Event: set of outcomes • Conditional probability p(E|F) = p(EF) / p(F) • Independence p(EF) = p(E) p(F), or p(E|F) = p(E) • Bernoulli trials (2 outcomes) • Binomial distribution b(k:n, p) = (n choose k) pk qn-k • Random variables, expected values • Independent random variables, variance
WEEK 10 TOPICS • Recurrence relations and solutions • Divide-and-conquer recurrences
Concepts/Vocabulary • Recurrence relations • Solution / solution sequence • Initial conditions • Useful examples: compound interest, bunny rabbits / Fibonacci, Tower of Hanoi, Catalan numbers
Concepts / Vocabulary • Divide-and-conquer recurrence relations • f(n) = a f(n/b) + g(n)
WEEK 11 TOPICS • (Probability theory cont.) • Generalized combinations and permutations
Concepts / Vocabulary • Permutations and combinations with repetition • “sampling with replacement” • Number of r-permutations of n objects with repetition = nr • Number of r-combinations of n objects with repetition = C(n+r-1, r) [D’Alembert’s method / bars and stars] • Table 4.6.1 gives formulas • Permutations with indistinguishable objecs • Theorem 3: Number of n-permutations of n objects, where there are ni objects of type i (i=1, …, k) = n! / (n1! n2! … nk!)
Concepts / Vocabulary • Inclusion-exclusion revisited… • |AB| = |A| + |B| - |AB| • Inclusion-exclusion generalized… • |ABC| = |A| + |B| + |C| - |AB| - |AC| - |BC| + |ABC| • Principle of Inclusion-Exclusion • |A1A2…An| = 1in|Ai| - 1i<jn|AiAj| - … + (-1)n+1 |A1A2…An| • Proof by mathematical induction… • Derangements
Concepts/Vocabulary • Binary relation R A x B (also written “a R b” or R(a,b)) • Relations on a set: R A x A • Properties of relations • Reflexivity: (a, a) R • Symmetry: (a, b) R (b, a) R • Antisymmetry: (a, b) R a=b • Transitivity: (a, b) R (b, c) R (a, c) R • Composite relation: • (a, c) SR bB: (a, b)R (b, c) S • Powers of a relation: R1 = R, Rn+1 = Rn R • Inverse relation: (b,a) R-1 (a,b) R • Complementary relation: (a,b) R (a,b) R
Concepts/Vocabulary II • n-ary relation: R A1 x A2 x … x An • Ai are the domain of R; n is its degree (or arity) • In a database, the n-tuples in a relation are called records; the entries in each record (i.e., elements of the ith set in that n-tuple) are the fields • In a database, a primary key is a domain (set Ai) whose value completely determines which n-tuple (record) is indicated – i.e., there is only one n-tuple for a given value of that domain • A composite key is the Cartesian product of a set of domains whose values completely determine which n-tuple is indicated • Projection: delete certain fields in every record • Join: merge (union) two relations using common fields
Concepts / Vocabulary • Zero-one matrix representation of [binary] relations • Matrix interpretations of properties of relations on a set: reflexivity, symmetry, antisymmetry, and transitivity • Digraph representation of [binary] relations • Pictorial interpretations of properties of relations on a set • Closure of R with respect to property P • smallest relation containing R that satisfies P • Transitive closure, reflexive closure, … • Path analogy for transitive closures; connectivity relation R*; Algorithm 6.4.1 for computing transitive closure (briefly); Warshall’s algorithm (briefly)
Concepts/Vocabulary • Equivalence relation: Relation that is reflexive, symmetric, and transitive (e.g., people born on the same day, strings that are the same length) • Equivalence class: Set of all elements “equivalent to” a given element x (i.e., [x] = {y: (x,y) R}). • Partition: disjoint nonempty subsets of S that have S as their union • The equivalence classes of a set form a partition of the set
Concepts / Vocabulary [7.1] • Simple graph G = (V, E) – vertices V, edges E • A multigraph can have multiple edges between the same pair of vertices • A pseudograph can also have loops (from a vertex to itself) • In an undirected graph, the edges are unordered pairs • In a directed graph, the edges are ordered pairs • You should be familiar with all of these types of graphs, but for problem solving, you will only be using simple directed and undirected graphs
Concepts/Vocabulary [6.2] • Adjacent, neighbors, connected, endpoints, incident • Degree of a vertex (number of edges), in-degree, out-degree; isolated, pendant vertices • Complete graph Kn • Cycle Cn (can also say that a graph contains a cycle) • Bipartite graphs, complete bipartite graphs Km, n • Wheels, n-Cubes (don’t need to know these) • Subgraph, union