Counting representations and values

A program generates every permitted pair of integers (p,q)(p,q) and stores the rational value p/qp/q. Two pairs are different if either entry differs, but equal rational values are counted only once in the collection of distinct values.


The program runs with three settings:

  • Setting A: p∈{1,2,3}p\in\{1,2,3\} and q∈{1,2,3}q\in\{1,2,3\}.
  • Setting B: p∈{−2,−1,0,1,2}p\in\{-2,-1,0,1,2\} and q∈{−2,−1,1,2}q\in\{-2,-1,1,2\}.
  • Setting C: p∈{−3,−2,−1,0,1,2,3}p\in\{-3,-2,-1,0,1,2,3\} and q∈{−3,−2,−1,1,2,3}q\in\{-3,-2,-1,1,2,3\}.

For each setting, enter the exact integer number of permitted pairs and the exact integer number of distinct rational values.

SettingPermitted pairsDistinct rational values
A
B
C

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Introduction to Rational Numbers Questions: