Download “No professor has been asked questions by all of his students

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Bra–ket notation wikipedia , lookup

Mathematical proof wikipedia , lookup

History of mathematical notation wikipedia , lookup

Large numbers wikipedia , lookup

Approximations of π wikipedia , lookup

Wiles's proof of Fermat's Last Theorem wikipedia , lookup

Theorem wikipedia , lookup

Location arithmetic wikipedia , lookup

Abuse of notation wikipedia , lookup

Fundamental theorem of algebra wikipedia , lookup

Collatz conjecture wikipedia , lookup

Factorization of polynomials over finite fields wikipedia , lookup

Big O notation wikipedia , lookup

Principia Mathematica wikipedia , lookup

Quadratic reciprocity wikipedia , lookup

Addition wikipedia , lookup

Arithmetic wikipedia , lookup

Order theory wikipedia , lookup

Elementary mathematics wikipedia , lookup

Positional notation wikipedia , lookup

Naive set theory wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Transcript
Section 2.6 Excursion: Representations of Numbers
Properties of numbers that are independent of the base:
Definition: Given a positive integer X, the decimal representation for
X is a string consisting of the digits from {0, 1, 2, …, 9} that looks
like dndn-1…d2d1d0 where dn•10n + dn-1•10n-1+ … + d1•101 + d0•100 = X.
Definition: The base two (binary representation) of a positive
integer X is a string consisting of digits from {0, 1} that looks like
bnbn-1…b2b1b0 where bn•2n + bn-1•2n-1+ … + b1•21 + b0•20 = X.
Proposition 4: A natural number is divisible by 9 iff the sum of its
(decimal) digits is divisible by 9.
Converting from one base to another
Convert 236 from base 10 to base 2
The numerals used in base k are {0, 1, …, k-1} if k  10.
For bases higher than ten,
Algorithm for converting a natural number to base k
input a natural number n
while n > 0 do
divide n by k and get a quotient q and remainder r
write r as the next digit in right to left order
replace the value of n with q and repeat
Converting a base k number to base 10
Example: Convert (3B6)hex to base 10
2.7 Excursion: Modular Arithmetic and Cryptography
Defn. If a and b are integers and n is a positive integer > 1 then a
is congruent to b modulo n iff
Notation: a  b (mod n) or a n b
Theorem 1: For integers a, b and n with n  2, a mod n = b mod n
iff n | (a-b). That is, a n b iff a mod n = b mod n.
Theorem 2: Consider an integer n  2. For all integers a, b, c and d,
if a n b and c n d then
1. (a•c) n (b•d)
2. (a + c) n (b + d)
GCD and related concepts
The greatest common divisor of two integers a and b
Example: gcd(18, 24)
If gcd(a, b) = 1, then a and b are relatively prime.
The least common multiple of integers a and b is
Example: lcm(18, 24)
Using prime factorization to find the gcd and the lcm:
The Euclidean Algorithm
Finding the greatest common divisor of a and b
Notation: gcd(a, b)
find gcd (662, 414)
662 =
find gcd(330, 156)
330 =
function gcd(a, b: positive integers)
xa
yb
while y  0
r  x mod y
xy
yr
return(x)
Chapter 3 Sets and Boolean Algebra
Special Sets (defined earlier): Z, N, Z+,Q,R
Methods of describing sets:
Notational conventions:
1. The notation x  A
2. A is a subset of B (written A  B)
2 ½. A is a proper subset of B written A  B
3. A = B if A  B and B  A
Proving sets equal
4. The empty set denoted { } or  is the set with no elements
Example: Let S be any set. Which of the following are true?
SS
SS
ØS
ØS
5. Universal set
Sets containing other sets. Let C = {a, b, Ø, {e, f} }.
Which of the following statements is or are true?
{e, f}  C
{e, f}  C
The power set of a set A is
Notation:
The cardinality or size of a set A
Notation:
A set is finite iff
Example: Find smallest set S such that {1, 2} is both an element
of S and a subset of S.
Set Operations
Complement of A
Alternate notations:
union:
Intersection:
Two sets A and B are disjoint if
set difference:
symmetric difference:
Set Identities
Union
Intersection
AB=BA
AB=BA
Name
Commutative
(A  B)  C = A  (B  C) (AB)  C = A  (B  C) Associative
A  (B  C) =
(A  B)  (A  C)
A   = A, A  U = U
A  A' = U
A  (B  C) =
(A  B)  (A  C)
A   = , A  U = A
A  A' = 
(A  B)' = A'  B'
(A  B)' = A'  B'
Distributive
Idempotent,
Domination
Laws
Complement
DeMorgan's
Laws
A'  B' if and only if B  A
A  B if and only if A  B = B
A  B if and only if A  B = A
Identities for Other Set Operations
A'' = A
A B = (A  B) - (A  B)
A A = 
' = U, U' = 
A A' = U
A B = (A - B)  (B - A)
(A B) C = A B C)
A  (A  B) = A
A  (A  B) = A
The Inclusion Exclusion Principle
Theorem 2 (Inclusion-Exclusion Principle) Let A, B, and C be sets
1. n(A  B) =
Let A = {1, 3, 5, 7, 9} and let B = {4, 5, 6, 7, 8}
Two special cases:
2. n(A  B  C) =
Example
The students in a class of size 50 were asked to tell which of three
kinds of pies they liked—apple, cherry or banana cream. The
following results were obtained:
20 liked apple
28 liked cherry
16 liked banana cream
13 liked both apple and cherry
6 liked both apple and banana cream
11 liked both cherry and banana cream
4 liked all three
How many liked none of the three kinds of pies?
How many liked exactly one kind?
How many liked two kinds?
How many liked cherry or banana cream?
How many liked apple but not banana?
Proving Set Identities
(Element-wise proofs)
Example: Proof of one of DeMorgan's Laws: (A  B)' = A'  B'
1st part: Prove (A  B)'  A' B'
Let x  (A  B)'
2nd part: Prove A'  B'  (A  B)'
Let y  A'  B'
Section 3.2 More Operations on Sets
Products and Tuples
Equality of tuples: (a1, a2, …, an) = (b1, b2, …, bn) iff
Cartesian product
Example: Let A = {1, #, $} and let B = {a, b}.
AB=
BA=
Cardinality of a Cartesian Product
Proof Example
Prove that for nonempty sets A and B, if A = B then A  B = B  A
Part 1: Prove A  B  B  A
Part 2: Prove B  A  A  B
Generalizing the Definitions
For n  3, the structure (x1, x2, …, xn) is called an n-tuple
The Cartesian product S1  S2  …  Sn is
Theorem 2: For finite sets S1, S2, …, Sn,
n(S1  S2  …  Sn ) =
A partition of a set S is a collection of disjoint nonempty subsets
of S whose union is S.
Example: Consider mod 5
Section 3.3 Proving Set Properties
Example 1: Prove A  B if and only if A  B = A
Example 2: Prove A - B = A  B′