Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

DS Lecture 10 Number T

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 32

Discrete Mathematics (MA 203)

Lecture 10
Today's Lecture
• Rational Number
• Properties of Rational Numbers
• Irrational numbers
• Absolute values
• Triangular inequality
• Floor and Ceiling functions
• Mod Functions
• Divisibility and Floor
• Mod Congruence
Rational Numbers
A real number r is rational if, and only if, r = a/b for some
integers a and b with b ≠ 0. A real number that is not
rational is irrational.
More formally, r is a rational number ↔ ∃ integers a and
b such that r = a/b, b ≠ 0.
Determine whether following numbers are rational?
a) 10/3
b) -(5/39)
c) 2/0
d) 0.121212121212………
Cont….
a) Yes, 10/3 is quotient of the integers 10 and 3.
b) Yes, -5/39, which is a quotient of the integers.
c) No, 2/0 is not a number (division by 0 is not
allowed)
d) Yes,

Let x=0.1212121212121, then 100x=12.12121212….


100x – x = 12.12121212….. - 0.1212121212…… = 12.
99∙x = 12 and so x=12/99.

Therefore 0.12121212….. = 12/99, which is a ratio of two non zero


integers and thus is a rational number.
Properties Of Rational Number
Theorem: The sum of any two rational Numbers is
rational.
Proof: Suppose r and s are rational numbers. Then by
definition of rational,
r = a/b and s = c/d
for some integers a, b, c, and d with b ≠ 0 and d ≠ 0. So
r + s = a/b + c/d
= (ad + bc)/b∙d.
Let p = ad + bc and q = bd. Then p and q are integers
because product and sum of integers are integers. Also q
≠ 0.
Thus r+s = p/q. so r+s is a rational number.
Properties Of Rational Number
Theorem: The double of a rational number is rational.

Proof: Suppose r is rational number. Then 2r = r + r is a


sum of two rational number and is a rational number.
Irrational Numbers
The number which is not rational is called irrational
number. i.e., a decimal representation which is neither
repeating and non recurring. For example

2 3 
2 =1.41421356237309……
Note: Product of two irrational is not irrational.

2* 2  2
Cont….
Visualizing some irrational numbers .
Absolute Number
For any real number x, the absolute value of x, denoted |
x|, is defined as follows:

x : x  0
| x | 
 x : x < 0

Examples
|5|= 5, |-4/7|= -(-4/7)=4/7, |0|=0
Absolute Number
Lemma: For all real numbers r, −| r | ≤ r ≤ | r |.
Proof: Suppose r is any real number. We divide into
cases according to whether r ≥ 0 or r < 0.
Case 1: (r ≥ 0): In this case, by definition of absolute
value, |r| = r . Also, since r is positive and −|r | is
negative, −|r | < r . Thus it is true that −|r| ≤ r ≤ |r |.
Case 2: (r<0): both sides by −1 gives that −|r| = r .
Also, since r is negative and |r | is positive ,r < |r |. Thus
it is also true in this case that −|r| ≤ r ≤ |r |.
Hence, in either case,
−|r| ≤ r ≤ |r |
Cont…..
Theorem: For any real number a.
a 2 | a |

Proof:
Since a 2  ( a) 2  ( a) 2 , the number +a and -a are square roots of a 2 .
if a  0, then +a is the non negative square root of a 2 , if a<0, then -a is
the non negative square root of a 2 . Since a 2 denotes the non negative
square root of a 2 , we have a 2   a, if a  0 Also a 2   a, if a < 0
that is a 2 | a |
Triangular Inequality
Theorem: For all real numbers x and y,
|x + y| ≤ |x| + |y|.
Proof: Suppose x and y, are any real numbers.
Case 1: (x + y ≥ 0):
In this case, |x + y| = x + y, x ≤ |x| and y ≤ |y|.
Hence, |x + y| = x + y ≤ |x| + |y|.
Case 2 (x + y<0):
In this case, |x + y| = −(x + y)
and also, −x ≤ |−x| = |x| and −y ≤ |− y| = |y|.
It follows, that
|x + y| = (−x) + (−y) ≤ |x| + |y|.
Hence in both cases |x + y| ≤ |x| + |y|
Floor and Ceiling
Given any real number x, the floor of x, denoted  x  , is
defined as follows:

 x  = that unique integer n such that n ≤ x < n + 1.


Symbolically, if x is a real number and n is an integer,
then
 x  = n ⇔ n ≤ x < n + 1.
Ceiling
Given any real number x, the ceiling of x, denoted  x  ,
is defined as follows:

 x  = that unique integer n such that n − 1 < x ≤ n.


Symbolically, if x is a real number and n is an integer,
then
 x  = n ⇔ n − 1 < x ≤ n.
Examples
Compute  x  and  x  for each of the following values of x:
a. 25/4
b. 0.999
c. −2.01
Solution:
d. 25/4 = 6.25 and 6 < 6.25 < 7; hence  25 / 4   6 and 25/4   7

b. 0 < 0.999 < 1; hence 0.999   0 and 0.999   1 .

c. −3 < −2.01 < −2; hence  2.01  3 and -2.01  2


Example
The 1,370 students at a college are given the opportunity
to take buses to an out-of-town game. Each bus holds
a maximum of 40 passengers.
a. For reasons of economy, the athletic director will send
only full buses. What is the maximum number of buses
the athletic director will send?
b. If the athletic director is willing to send one partially
filled bus, how many buses will be needed to allow all
the students to take the trip?

a ). 1370 / 40   34.25  34
b). 1370/40   34.25   35
General Values of Floor
If k is an integer, what are  k  and  k  1/ 2  ? Why?
Solution:

Suppose k is an integer. Then


 k   k becuase k is an integer and k  k  k  1
and
 1
k+
 2   k becuase k is an integer and k  k  2  k 1
1
Cont…
Is the following statement true or false? For all real
Numbers x and y,  x  y    x    y 

Solution: The statement is false, take x = y = 1/2, then


1 1
 x  y       1  1
2 2
where as
1 1
 x    y         0  0  0
2 2
Hence
 x  y    x    y 
Properties of Floor
Theorem: For all numbers x and all integers m,
 x  m    x   m
Proof: Suppose a real number x and an integer m are
given. Let n=  x  that unique integer n such that,
n ≤ x < n + 1. Add m to all sides to obtain n + m ≤ x + m <
n + m + 1. Now n + m is an integer and so, by definition of
floor,  x  m   n  m
But n =  x  . Hence by substitution
 x  m    x   m
Cont….
Theorem: For any integer n
n
 ; if n is even
n 2
  
2  n  1 ; if n is odd

 2

Proof: Suppose n is a integer. Then either n is odd or n is even.


Case 1: in this case n = 2k+1 for some integers k.
 n   2k  1   2k 1 
 2    2    2  2 
 1
 k  k
2 
because k is an integer and k  k  1/ 2  k  1. But since
n 1
n  2k  1  n  1  2k  k 
2
Cont…
also. Since both the left-hand and right-hand sides equal k,
n
they are equal to each other. That is,  2   k
 
Case 2: In this case, n = 2k for some integer k.

 n   2k 
 2    2    k   k

Since k=n/2 by the definition of even number. So


n n
 2   k 
2
Examples
Compute  x  and  x  for each of the following values of x:
a. 25/4
b. 0.999
c. −2.01
Solution:
d. 25/4 = 6.25 and 6 < 6.25 < 7; hence  25 / 4   6 and 25/4   7

b. 0 < 0.999 < 1; hence 0.999   0 and 0.999   1 .

c. −3 < −2.01 < −2; hence  2.01  3 and -2.01  2


Mod Functions
Compute following
1. 113 mod 24
2. -29 mod 7
4
3. 113 mod 24:
24 113 113 div 24
96
17
4. -29 mod 7: 5
7  29 -29 div 7
 35
6
Mod and div
Definitions
Divisibility and Floor
Theorem
Cont…
Computing div and mod
Use the floor notation to compute 3850 div 17

and 3850 mod 17.

Sol:
Mod Congruence's
Let a, b be integers and n be a positive integer. We say
that a is congruent to b modulo n (i.e. a  b(mod n) )
iff n | (b-a), implies that there exist some integer k such
that b-a = n·k.
Note: a mod n = b mod n
Which of the following are true?
1. 3  3 (mod 17)
2. 3  -3 (mod 17)
3. 172  177 (mod 5)
4. -13  13 (mod 26)
Cont…
1. 3  3 (mod 17) True: any number is congruent to
itself (3-3 = 0, divisible by all)
2. 3  -3 (mod 17) False: (-3-3) = 6 isn’t divisible by
17.
3. 172  177 (mod 5) True: 177-172 = 5 is a multiple
of 5
4. -13  13 (mod 26) True: 13-(-13) = 26 divisible by
26.
Congruence's Identities
Let n > 1 be fixed and a, b, c, d be arbitrary integers.
Then the following properties holds:
a) (Reflexive Property ) a  a (mod n).
b) (Symmetric Property) If a b(mod n) then b a(mod
n).
c) ( Transitive Property) If a  b(mod n) and b  c (mod
n) then a c(mod n).
d) If a  b(mod n) and c d (mod n) then a + c  (b
+ d ) (mod n) and a·c  b·d(mod n).
e) If a  b(mod n) then a + c b+c(mod n) and a·c 
b·c(mod n).
f) If a  b(mod n) then a k  b k (mod n) for any positive
integer k.
Theorem
If k is any integer such that k  1 (mod 3),
then k3  1 (mod 9).
Proof: k  Z, k 1(mod 3)  k 31(mod 9)
k 1(mod 3)
  n, k-1 = 3n   n, k = 3n + 1
  n, k 3 = (3n + 1)3
  n, k 3 = 27n 3 + 27n 2 + 9n + 1
  n, k 3-1 = 27n 3 + 27n 2 + 9n
  n, k 3-1 = (3n 3 + 3n 2 + n)·9
  m, k 3-1 = m·9 where m = 3n 3 + 3n 2 + n
 k 31(mod 9)
Lecture Summary
• Rational Number
• Properties of Rational Numbers
• Irrational numbers
• Absolute values
• Triangular inequality
• Floor and Ceiling

• Mod Functions

• Divisibility and Floor

You might also like