90 likes | 150 Views
Quotient-Remainder Theorem. Stav Maitland ThienAnh. Theorem 3.4.1. Quotient-Remainder Theorem. Given any integer n and positive integer d , there exist unique integers q and r such that. n=d ·q+r and 0≤r<d. Proof that q and r exist. Suppose n is a nonnegative integer
E N D
Quotient-Remainder Theorem Stav Maitland ThienAnh
Theorem 3.4.1 Quotient-Remainder Theorem Given any integer n and positive integer d, there exist unique integers q and r such that n=d·q+r and 0≤r<d.
Proofthat q and r exist • Suppose n is a nonnegative integer • [ particular but arbitrarily chosen] • And d is a positive integer. • [ particular but arbitrarily chosen] • By definition of div for some integer q, q= n div d [ q is the quotient obtained when n is divided by d]
Proofcontinued: then The remainder when n is divide by d is (n-qd) The remainder = n - qd, is an integer [ Product of 2 integers (q*d) is an inter, and the difference between any two integer ( n- qd) is also an integer]
Proofcontinued: The remainder = n - qd • By definition of div for some integer r, • r= n div d[where r is the remainder when n is divided by d]. Therefore, n=dq + r where q = n div d [an integer] and r = n mod d [an integer]
Proof that0 < r <d • Suppose, for a proof by contradiction, • that r>d • then r =d + x for some positive integer x, • so n=dq +r =dq + (d+x) [by substitution] • n=d(q+1) +x • This contradicts the fact that • q and r are unique integers, therefore r<d
Proof continuethat0 < r <d • Now suppose, for a proof by contradiction, that r<0, • Then r = d-y for some positive integer y • So n= dq+r = dq + (d-y) • n= d(q-1) - y • This again contradict the fact that • q and r are unique integers, therefore r>0 It follows by the Quotient- Remainder Theorem that n=dq+r and 0 < r <d[ This is what we needed to show]
Exam question If Susan’s birthday was on Sunday, February 29 2004. What day will be her next birthday?
Related Homework Problems • 1,7,9,11,12,14,16,17,20,27