Lecture 3 Flashcards
What is weak induction?
Weak math induction assumes P(k) is true and uses that and only that to show P(k+1) is true
What is Strong induction
assumes P(1), P(2),…P(k) are all true and uses that to show that P(k+1) is true
What is the definition of Divisors
Let a,b and c be integers such that a= bc
Then b and c are said to divide (or are factors) of a while a is said to be a multiple of b (as well as of c).
b|a ^ c|a
What is the formula for number of multiples up to Given n
In general: the number of d-multiples less than N is given by:
|(m in a set of Z+ | d|m and m <= N)| = N/d
What are the 2 equations related to ‘a congruent b (mod n)
a = kn+b n|(a-b) Ex. 10 congruent 14 (mod 4) 4 divides 10 with a remainder of 2 Same for 14
What is the definition of Mod N
a and b have the same remainder when they are divided by n.
How do you find 1’s compliment?
Invert all the 1s and 0s in a binary value
How do you find 2’s compliment?
Find 1s compliment and then add 1
When dealing with signed numbers what bit is the signed bit?
The leftmost bit. A 0 indicates a positive magnitude and a 1 indicates a negative magnitude.
What is the range of values for 2’s complement form?
The equation is : -(2^n-1) to + (2^n-1 (-1))
What is the range for an 8 bit number using 2’s complement
n=8
-(2^8-1) = -128
(2^8-1)-1 = 2^7-1= 127
Total combination of numbers would be 256
What are the 3 parts to the divisor theorem?
Let a, b, and c be integers. Then:
- a | b ^ a | c then a | (b+c)
- a | b then a | bc
- a | b ^ b | c then a | c
What is the definition of a Prime Number
A number n >= 2 is prime if it is only divisble by 1 and itself. Numbers that aren’t prime are called composite
What is the fundamental Theorem of Arithmetic?
Any number n >= 2 is expressible asa a unique product of 1 or more prime numbers