0
$\begingroup$

Given an arbitrary rational number $p$, is there a way to find out the denominator of its simplest form? In other words, can we formulaically (non-algorithmically) find the lowest integer denominator of all the ways $p$ can be represented?

Suppose $p$ = $\frac{n}{d}$ is the lowest form. Then, I am looking for an $f(x)$ such that $f(p)$ would have produced $d$. As an extension, can there also be a $g$ such that $g(p)$ would have been $n$?

I played around with inverses, proportions, and integer division, but I can't seem to figure out [1] if this can be done and if so, [2] how.

$\endgroup$
10
  • 1
    $\begingroup$ Given an arbitrary rational number p How are you "given" $\,p\,$? If it's as a ratio of two integers, then just cancel out the $\,\gcd\,$. Otherwise you'll need to elaborate some more on what the question really means to ask. $\endgroup$
    – dxiv
    Feb 16, 2018 at 5:06
  • $\begingroup$ Assume that all you have is $p$ and the fact that $p\in\mathbb{Q}$. It's an attempt to generalize. The whole idea (hope) is that the lowest $n$ and $d$ should be expressible in terms of $p$, if they can have such an intuitive definition. $\endgroup$
    – axolotl
    Feb 16, 2018 at 5:08
  • $\begingroup$ the fact that p∈Q How is that "fact" established? What is $\,p\,$, and in what form do you "receive" it? $\endgroup$
    – dxiv
    Feb 16, 2018 at 5:10
  • $\begingroup$ As a parallel argument, do you feel a need to prove that an arbitrary $n$ is actually a natural number every time you deal with natural numbers? But to answer your question, $p$ is received as $p$ and the fact may be "told". Think of it as receiving a pointer (using computer science terms) to a variable which you may remotely manipulate. $\endgroup$
    – axolotl
    Feb 16, 2018 at 5:12
  • $\begingroup$ It's not about proving, it's about what the premises are. Your question appears to assume that $\,p\,$ is rational, which by definition means that it's the ratio of two integers, and in that case see my first comment - just cancel out the $\,\gcd\,$ between the numerator and the denominator. How else do you know that an arbitrary $\,p\,$ is rational, if you can't write it as the ratio of two integers, or don't know its decimal (repeating) representation, or ...? P.S. About the computer analogy, note that all computer numbers are rational, so the question doesn't make much sense as posed. $\endgroup$
    – dxiv
    Feb 16, 2018 at 5:16

2 Answers 2

1
$\begingroup$

There is no formula of the type that I think you want. There is a good algorithm. Namely, you let $a_0=[p]$, let $b_0=(p-a_0)^{-1}$, $a_i=[b_{i-1}]$, $b_i=(b_{i-1}-a_i)^{-1}$, continuing until $b_i$ blows up. You then have the continued fraction partial quotients $a_0,a_1,\dots,a_n$ for $p$, from which you reconstruct $p$ in lowest terms.

$\endgroup$
4
  • $\begingroup$ Easier: get the gcd and divide each part by that. $\endgroup$ Feb 16, 2018 at 6:24
  • 1
    $\begingroup$ Get the gcd of ... of what, exactly? As near as I can figure, you're not given $p$ in the form $n/d$; you're just, in some not-quite-explained way, given $p$. $\endgroup$ Feb 16, 2018 at 6:28
  • $\begingroup$ Ah. I see what you mean. What form would the rational number be given that does not have numerator or denominator? $\endgroup$ Feb 16, 2018 at 7:08
  • $\begingroup$ @marty, that's the information dxiv tried to get out of OP in the comments on the question, but without much success. In my answer, I assume you're given the rational as a decimal approximation. $\endgroup$ Feb 16, 2018 at 9:15
1
$\begingroup$

The short answer is "no" because the whole point of rationals is that they're equal regardless of common factors and there's no way for anything to distinguish between them on purpose because that's just what we mean by "equal". Any means of distinguishing them would have to be an "algorithm" which operates on their parts and not a "formula" which operates on the numbers.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .