Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
MAT251 Notes on 1.1 Some warmup questions
Important principles:
Precision,
Abstraction,
Standard terms and notation.
Logical thinking.
Abstraction: specific cases ± general problems
1) focus on core issues
2) solution fits a class of problems
3) greater mastery with less practice
Question: How many integers between m and n (inclusive)?
Say between 1 and 10? 1 # i # 10 [10]
Between 1 and n? [ n ]
Fact 1
Say between 10 and 100? [1 to 100] except for [1 to 9]
Between positive integers m and n (where m # n)? [ n ! (m !1)] or [ n !m + 1] Fact 2
If hypotheses then conclusion. (Consider the necessity of hypotheses.)
Between -10 and 100? [Same as between 10 and 120]
If m and n are integers, with m # n, then there are n!m+1 integers i with m # i # n. Fact 3
Question: How many even integers between m and n ?
[Use strategy of counting even integers to n and subtracting even integers to (m!1)]
Between 1 and n, there are s even integers: 2s # n and n < 2(s+1) Y s # n/2 < (s+1)
Notation: Floor of any real number x, written lxm , is largest integer # x
Between 1 and n, there are ln/2m even integers
Between 1 and n, there are ln/km integers that are multiples of k.
Fact 4
Theorem 1: Let m and n be integers with m # n, and let k be a positive integer, then the number of
multiples of k between m and n is
which differs from (n!m+1)/k by at most 1.
“Tough” question: How many prime integers are there between m and n? [See text pp 5 & 6.]
Prime number theorem: The fraction of numbers between 1 and (large enough) n that are prime is
approximately 1/ ln n.
Summary: What generally useful problem solving methods have we used? See page 6.
Ross & Wright Discrete Mathematics, 5th edition
EXERCISES 1.1, page 6
1. a) How many integers between 1 and 20 (inclusive of both endpoints) = 20
b)
between 2 and 21 = 21 – 2 + 1 = 20
c)
2 and 20 = 20 – 2 + 1 = 19
d)
17 and 72 = 72 – 17 + 1 = 56
e)
- 6 and 4 = 4 – (- 6) + 1 = 11
f)
0 and 40 = 40 – 0 + 1 = 41
g)
- 10 and - 1 = (- 1) – (- 10) + 1 = 10
h)
- 1E30 and 1E30 = 1E30 – (- 1E30) +1 = 2E30 + 1
i)
1E29 and 1E30 = 1E30 – 1E29 +1 = 9E29 + 1
2. a) How many 4-digit numbers [numerals between 1000 and 9999] = 9999 – 1000 + 1 = 9000
b)
5-digit numbers that end in 1 = 4-digit numerals preceding that 1 = 9000
c)
5-digit numbers that end in 0 [same as part b)] = 9000
d)
5-digit numbers are multiples of 10 [same as part c)] = 9000.
3. Floor function lxm = largest n such that n #lxm < n+1
a) l17/73m = 0
b) l1265m = 1265
c) l- 4.1m = - 5 d) l- 4m = - 4
4. Ceiling function jxk = smallest n such that n – 1 < jxk #n
a) j0.763k = 1
b) 2j0.6k – j1.2k = 2(1) – 2 = 0
c) j1.1k + j3.3k = 2 + 4 = 6
d) j/3k – l/3m = 2 – 1 = 1
e) j- 73k – l- 73m = (- 73) – (- 73) = 0
5. a) How many even integers are between 1 and 20 = l20/2m = l10m = 10
b)
between 21 and 100 = l100/2m – l20/2m = 50 – 10 = 40
c)
between 21 and 101 = l101/2m – l20/2m = 50 – 10 = 40
d)
between 0 and 1000 = l1000/2m – l- 1/2m = 500 – (- 1) = 501
e)
between - 6 and 100 = l100/2m – l- 7/2m = 50 – (- 4) = 54
f)
between - 1000 and - 72 = l- 72/2m – l- 1001/2m = (-36) – (- 501) = 465
6. a) How many odd integers are between 1 and 20 = 20 – 10 [from 5.a) ] = 10
b)
between 21 and 100 = (100 – 21 + 1) – 40 = 40.
c)
between 21 and 101 = (101 – 21 + 1) – 40 = 41.
d)
between 0 and 1000 = (1001) – 501 = 500.
7. a) How many multiples of 6 are between 0 and 100 = l100/6m – l- 1/6m = 16 – (- 1) = 17
b)
between 9 and 2967 = l2967/6m – l8/6m = 494 – 1 = 493
c)
between - 6 and 34 = l34/6m – l- 7/6m = 5 – (- 2) = 7
d)
between - 600 and 3400 = l3400/6m – l- 601/6m =566 – (- 101) = 667.
8. a) How many multiples of 10 are between 1 and 80 = l80/10m – l0/10m = 8 – 0 = 8
b)
between 0 and 100 = l100/10m – l- 1/10m = 10 – (- 1) = 11
c)
between 9 and 2967 = l2967/10m – l8/10m = 296 – (0) = 296
d)
between - 6 and 34 = l34/10m – l- 7/10m = 3 – (- 1) = 4
e)
between 1E4 and 1E5 = l100000/10m – l9999/10m = 10000 – (999) = 9001
f)
between - 600 and 3400 = l3400/10m – l- 601/10m = 340 – (- 61) = 401
Ross & Wright Discrete Mathematics, 5th edition
EXERCISES 1.1, page 7
9. A simple pocket calculator [NOTE: not today’s graphing calculator] could be used to calculate the floor
of n divided by k by
first doing the division: n/k
then If the result is positive, use the integer part of the quotient
else use the negative integer which is one less than the (negative) integer part.
Of course today’s graphing (direct entry) calculators would do this automatically
in the one-line expression
int(N/K)
13. a) How many numbers between 1 and 33 are prime = | {2,3,5,7,11,13,17,19,23,29,31) | = 11
b) which is a bit bigger than 33/ln(33) . 9.44
c) If the upper bound is 3333, the difference will be greater [ 470 versus 410.9], but the percentage
difference is only about 14%. Note that arbitrarily long gaps occur between certain primes, so the “prime
number formula” n/ln (n) is only asymptotically useful for “large” n.
15. a) The number of primes between 1 and 1E30 is about 1E30/ln(1E30) .1.45E28
b) The number of primes between 1 and 1E29 is about 1E29/ln(1E29) .1.50E27
c) The number of 30-digit primes is the number of primes between 1E29 and (1E30 – 1) which is
about 1.45E28 – 1.50E27 = 1.30E28
d) The percentage of 30-digit numbers that are prime is about 1.30E28/(1E30 – 1E29)*100 . 1.44%