Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ π -¹ ² ³ °

You are not logged in.

- Topics: Active | Unanswered

Pages: **1**

**krassi_holmz****Real Member**- Registered: 2005-12-02
- Posts: 1,908

I need a function dic(x) that gives 1 when x is rational and 0 when it's irrational.

Please give me some advice.

I think there will exist such.

IPBLE: Increasing Performance By Lowering Expectations.

Offline

**MathsIsFun****Administrator**- Registered: 2005-01-21
- Posts: 7,560

You could prove a number is rational by discovering the ratio (example: 1.5 is 3/2, hence rational)

And there are various proofs for irrational numbers.

But there are also "Open Questions", see Wikipedia Article (near end), so the best you could do (using current knowledge!) would be:

disc(x) = 1 when rational

disc(x) = -1 when irrational

disc(x) = 0 when unknown

Now, a computer program could run through thousands of decimal places looking for a repeating pattern and never discover it, but that would not prove anything - it could still be the ratio of two very large numbers!

"The physicists defer only to mathematicians, and the mathematicians defer only to God ..." - Leon M. Lederman

Offline

**krassi_holmz****Real Member**- Registered: 2005-12-02
- Posts: 1,908

I found something:

Number r is:

1.Rational, if the function

2.Irrational, when HS_r[x] is not a periodic function.

*Last edited by krassi_holmz (2006-01-01 05:23:42)*

IPBLE: Increasing Performance By Lowering Expectations.

Offline

**krassi_holmz****Real Member**- Registered: 2005-12-02
- Posts: 1,908

But it's useless, because I don't know non-trivial terms for a function to be periodic.

IPBLE: Increasing Performance By Lowering Expectations.

Offline

Pages: **1**