

InterviewSolution
Saved Bookmarks
1. |
Let S be a set of all distinct numbers of the form `p/q`, where p, `q in{1, 2, 3, 4, 5, 6}`. What is the cardinality of the set S |
Answer» As `1/2,2/4, 3/6 ` are same and `1/1,2/2,3/3,...` are same. We will find only co-prime numbers. So, when `p = 1,q = {1,2,3,4,5,6}` So, total elements in `S` in this case ` = 6` When `p = 2, q = {1,3,5}` So, total elements in `S` in this case `= 3` When `p = 3, q = {1,2,4,5}` So, total elements in `S` in this case `= 4` When `p = 4, q = {1,3,5}` So, total elements in `S` in this case `= 3` When `p = 5, q = {1,2,3,4,6}` So, total elements in `S` in this case `= 5` When `p = 6, q = {1,5}` So, total elements in `S` in this case `= 2` So, cardinality of set `S = 6+3+4+3+5+2 = 23` |
|