# Is there a strictly algebraic way of coding "whole number value of"?

1. Oct 6, 2014

### David Carroll

Greetings in the name of Jah-gonaut, ladies and gents. I have a question. Is there a strictly algebraic way of coding the notion "whole number value of", specifically for an irrational number?

I know that one way of coding the notion "absolute value of" some number is taking the square root of the square. Can something similar be done to code for "whole part" of some number, using only algebraic symbols or numbers? Namely, in my case, can some kind of manipulation of symbols be done with the irrational part of a solution to some polynomial equation {by which I mean the "sqrt(b2 + 4ab)" part of the solution)}, using ONLY the symbols a or b?

For example, let's take the two solutions to the polynomial equation x2 + 21x - 155 = 0:

-26.7864974749.... and 5.7864974749....

I want to separate the decimal expansion from the whole value 5 for the second solution. But I want to perform this step using only algebraic symbols, pretending - say - that I'm some machine that doesn't otherwise know the command "separate the whole part from the decimal expansion".

Can I perform some finite manipulation of the symbols a, b, or c (from the polynomial formula) to do this?

2. Oct 6, 2014

### David Carroll

Correction: "sqrt(b2 + 4ab)" should read "sqrt(b2 + 4ac)"

3. Oct 6, 2014

### David Carroll

Actually, correction again: that is "- 4ac", not "+ 4ab". And that is, quadratic formula, not polynomial formula.

4. Oct 6, 2014

### economicsnerd

Assume we're only dealing with real numbers.

Let $\Phi_0(z)\equiv$"$\exists a,b\in\mathbb R \text{ such that } z = a^2, \enspace 1-z = b^2 \text{ and } b\neq 0$." It's straightforward to check that $\Phi_0(z)$ is true if and only if $z\in[0,1)$.

For any $n\in \mathbb N$, let $\Phi_n(z)\equiv \Phi_{n-1}(z-1)$ and $\Phi_{-n}(z)\equiv \Phi_{-(n-1)}(z+1)$.

It's straightforward to check that $\Phi_n(z)$ is true if and only if $\lfloor z\rfloor=n$.

I would argue that the Boolean $\Phi_0$ is just as algebraic as $\sqrt{\enspace}$ is. Given that, you could get a computer to (recursively) check $\Phi_n, \Phi_{-n}$ for each $n$, and it will eventually terminate and find your integer part.

5. Oct 6, 2014

### David Carroll

How efficient is such an algorithm on a computer? Quicker than, say, shor's algorithm?

6. Oct 6, 2014

### David Carroll

I guess, since it's recursive, it would be just as efficient as taking the square root of a real number?

7. Oct 7, 2014

### jbriggs444

Every recursive algorithm can be transformed to an iterative algorithm. The recursive algorithm that has been proposed amounts to iteratively checking whether $i^2 > x >= 0$ for each non-negative integer i in order until one is found that satisfies the test. The floor of the square root of x is given by the first i that passes the test.

That algorithm takes approximately 10^5 steps to determine the floor of the square root of 10^10 - 1.

It is possible to compute the square root of 10^10 - 1 to 5 significant digits in WAY fewer steps than that.

8. Oct 7, 2014

### platetheduke

Suppose you can apply $+,-\times,\div$, and roots to some irrational $\alpha$ (and algebraic numbers) to get a whole number $n$. Then you get $R(x)-n$ is an algebraic function with $\alpha$ as a zero (where $R(x)$ was the closed formula used). Consequently, $\alpha$ is algebraic.
So it is not possible to have an algebraic closed formula (as opposed to recursive algorithm) that gives the whole number part of most numbers (since the algebraic numbers are barely any of the real numbers).

9. Oct 7, 2014

### David Carroll

This is disappointing news. But thank you.