0

If I have a three digit number like 293 Is there a method to compress it into one digit. Can any three digit number be rewritten into a single digit with some formula and then back to its original form?

1 Answers1

3

No, assuming by three digit number you mean $100\leq n\leq 999$, then there are $999-100+1=900$ three digit numbers. But there are only $10$ single digit numbers (the integers $0$ through $9$). Since sets with different cardinalities can not have a bijection between them, there is no invertible function which maps three digit numbers to single digit numbers.

Of course, if you do not need the map to be invertible, then there are any number of functions you can use. For example

$$f(x)=\left\lfloor\frac{x}{100}\right\rfloor$$

simply maps every three digit number to its first digit (i.e. $f(293)=2$).

QC_QAOA
  • 11,796