Discrete Mathematics and Its Applications, Seventh Edition

Published by McGraw-Hill Education
ISBN 10: 0073383090
ISBN 13: 978-0-07338-309-5

Chapter 6 - Section 6.1 - The Basics of Counting - Exercises - Page 398: 62

Answer

$n-\left \lfloor{\frac{n}{q}}\right \rfloor$-$\left \lfloor{\frac{n}{p}}\right \rfloor+1$.

Work Step by Step

Given n=pq where p and q are primes. A number x is relatively prime to n if it x and n have no common factor other than . Since n has three factors p, q and n itself. Therefore, for a number x to be relatively prime to n, must not be divisible by p, q and n. By inclusion-exclusion principle such numbers = n -(Numbers less than n that are divisible by p + numbers less than n that are divisible by q-1 ). Minus 1 because n is counted twice as it is both divisible by p and q. Now, Numbers less than n that are divisible by p =$\left \lfloor{\frac{n}{p}}\right \rfloor$ Numbers less than n that are divisible by q =$\left \lfloor{\frac{n}{q}}\right \rfloor$. Hence, the number of positive integers not exceeding n that are relatively prime to n are $n-\left \lfloor{\frac{n}{q}}\right \rfloor$-$\left \lfloor{\frac{n}{p}}\right \rfloor+1$.
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.