+ All Categories
Home > Documents > September1999 October 1999 TEST OF FUNDAMENTALS all the concepts/vocabulary…

September1999 October 1999 TEST OF FUNDAMENTALS all the concepts/vocabulary…

Date post: 25-Dec-2015
Category:
Upload: camron-reynolds
View: 216 times
Download: 0 times
Share this document with a friend
60
September1999 October 1999 October 1999 TEST OF FUNDAMENTALS all the concepts/vocabulary…
Transcript
Page 1: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

TEST OF FUNDAMENTALS

all the concepts/vocabulary…

Page 2: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

WEEK 1 TOPICS

Course overview Propositional logic LaTeX

Page 3: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

CONCEPTS / VOCABULARY

Propositions Boolean variables Bit strings Truth value Truth table Operators: Negation, conjunction, disjunction,

exclusive or, implication, XOR, biconditional Converse, inverse, contrapositive

Page 4: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 5: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

WEEK 2 TOPICS

Predicate logic and quantifiers Sets and set operations

Page 6: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 7: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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.

Page 8: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 9: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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)

Page 10: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

WEEK 3 TOPICS

Functions Sequences and summations Growth of functions; big-O notation

Page 11: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 12: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 13: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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)

Page 14: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

WEEK 4 TOPICS

Algorithms Algorithmic complexity

Integers

Page 15: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 16: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 17: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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.

Page 18: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

WEEK 5 TOPICS

Integers and algorithms Applications of number theory Matrices

Page 19: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

CONCEPTS / VOCABULARY

Euclidean algorithm Base b expansions of integers (especially binary,

hexadecimal) Binary addition, binary multiplication, bit shifting

Page 20: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 21: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

CONCEPTS / VOCABULARY

mxn matrices, rows, columns, equality Matrix arithmetic, products Identity matrix Transpose At, symmetric matrices Zero-one matrix, join (), meet (), Boolean product

Page 22: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

WEEK 6 TOPICS

Proof methods Mathematical induction

Page 23: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 24: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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)

Page 25: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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.

Page 26: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

WEEK 7 TOPICS

Recursion Recursive and iterative algorithms Program correctness

Page 27: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 28: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

Concepts / Vocabulary

Recursive algorithm Iterative algorithm

Page 29: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 30: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

WEEK 8 TOPICS

Counting Inclusion-exclusion Tree diagrams Pigeonhole principle

Page 31: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

Concepts/Vocabulary

Counting Sum rule |A1 A2 … Am| = |A1| + … + |Am| for

disjoint Ai

Product rule |A1 x A2 x … x Am| = |A1| |A2| … |Am|

Inclusion-exclusion |A1 A2| = |A1| + |A2| - |A1 A2|

Tree diagrams

Page 32: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 33: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

WEEK 9 TOPICS

Permutations Combinations Binomial theorem Discrete probability Probability theory

Page 34: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 35: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 36: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 37: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

WEEK 10 TOPICS

Recurrence relations and solutions Divide-and-conquer recurrences

Page 38: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

Concepts/Vocabulary

Recurrence relations Solution / solution sequence Initial conditions

Useful examples: compound interest, bunny rabbits / Fibonacci, Tower of Hanoi, Catalan numbers

Page 39: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

Concepts / Vocabulary

Divide-and-conquer recurrence relations f(n) = a f(n/b) + g(n)

Page 40: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

WEEK 11 TOPICS (Probability theory cont.) Generalized combinations and permutations

Page 41: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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!)

Page 42: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 43: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

WEEK 12 TOPICS

Page 44: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 45: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 46: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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)

Page 47: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

WEEK 13 TOPICS

Page 48: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 49: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 50: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

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

Page 51: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

Concepts/Vocabulary

Adjacency list, adjacency matrix, incidence matrix Isomorphism, invariant properties Paths, path length, circuits/cycles, simple paths/circuits Connected graphs, connected components

Strong connectivity, weak connectivity

Cut vertices, cut edges Euler circuit, Euler path Hamilton path, Hamilton circuit

For this section (7.5), need to know terminology but not proofs

Page 52: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

WEEK 14 TOPICS

Page 53: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

Concepts/Vocabulary

Formal language, syntax, semantics Vocabulary (alphabet) V, word (sentence) V*,

language V*

Phrase-structure grammar G=(V,T,S,P) Alphabet V; terminal symbols TV; nonterminal

elements N=V-T; start symbol SN; productions P: {xy: x, y V*}

Derivation * (sequence of productions) Derivation tree / parse tree L(G): {wT*: S* w}

Page 54: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

Concepts/Vocabulary cont.

Types of grammars: Type 0: no restrictions Type 1 (context-sensitive): productions must be w1 or

w1w2 where w2 has length w1

Type 2 (context-free): All productions must have w1N (single symbol)

Type 3 (regular): All productions must have w1N and w2N or w2=aB where B N

(Top-down parsing, bottom-up parsing) (Backus-Naur form)

Page 55: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

Concepts/Vocabulary

Finite-state machine M=(S,I,O,f,g,s0): States S, input alphabet I, output alphabet O, transition

function f: SIS, output function g SIg, initial state s0S

State table, state diagram (Mealy machines, Moore machines)

Page 56: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

WEEK 15 TOPICS

Page 57: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

Concepts/Vocabulary

Language concatenation Kleene closure A*: concatenation of 0 or more strings from A

Finite-state automaton (FSA) M=(S,I,f,s0,F): states S, input alphabet I, transition function f: SIS, initial state s0, final states F “Recognize” a string (series of inputs) that results in a series of

transitions starting at s0 and ending in any sF Nondeterministic FSA M=(S,I,f,s0,F): transition function f:

SIP(S) [power set of S] “Recognizes” a string that can result in some series of transitions

starting at s0 and ending in any sF For any language recognized by a nondeterministic FSA,

there is a deterministic FSA that recognizes the same language

Page 58: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

Concepts/Vocabulary

Regular expressions: , = {}, xI = {x}, (AB) [concatenation], (AB) [union], and A* [Kleene closure]

Regular set: Any set that can be represented by a regular expression Can be recognized using (deterministic) finite-state automata

(Kleene’s Theorem) “if” part proved by “constructive induction” “only if” part left as **exercise 20 Regular set = regular (type 3) grammar!

(More powerful automata: Pushdown automaton, linear bounded automata)

Page 59: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

Concepts/Vocabulary

Turing machine: general model of computation Inventor Alan Turing T=(S,I,f,s0): states S, alphabet I that includes blank

symbol B, partial function f: SI SI{R,L}, and start state s0S

Control unit has states S; read/write tape is infinite in both directions; single read/write head takes input from the tape, writes to the tape, and moves left or right

Specify as 5-tuples (s, x, s’, x’, d): in state s, if you read x, transition to state s’, output x’, and then move one step in direction d

Page 60: September1999 October 1999 TEST OF FUNDAMENTALS  all the concepts/vocabulary…

September1999October 1999October 1999

Concepts/Vocabulary II

Halting and language recognition T halts if f is undefined (i.e., no 5-tuple) for (s, x) A final state is a state that no 5-tuple begins with (i.e., no transitions

are defined from the state) A string is recognized if T halts in a final state A string is not recognized if T doesn’t halt, or halts in a state that

isn’t final

Any problem that can be solved, or algorithm that can be written, with a digital computer, can also be solved with a Turing machine, despite its simplicity! Church-Turing thesis: Any problem that can be solved with an

effective algorithm can be solved with a Turing machine


Recommended