#### Topic: Rational numbers

Let S is the least set of rational numbers containing number 0 and satisfying condition: * If numbers p and q belong S, and |p-q | <1 the number (p+q+1)/2 also belongs S. To write the program which accepts a rational number and defines, whether it belongs to set S.

#### Re: Rational numbers

Hello, nikov, you wrote: N> Let S is the least set of rational numbers containing number 0 and satisfying condition: N> * If numbers p and q belong S, and |p-q | <1 the number (p+q+1)/2 also belongs S. N> to Write the program which accepts a rational number and defines, whether it belongs to set S. I can begin a reasoning. For any positive l/m, l <m let l/m belongs S. Then, as 0 belongs S, k = (l/m+1)/2 too belongs S. It is visible that k = (l+m)/2m> 1/2. Further, the number k ', belonging S, can be received similarly from 0 and k. The number k ' too will be more 1/2. But then (k + k ' +1)/2 too should belong S that cannot be, as | (k + k ' +1)/2 |> 1. Therefore any positive rational l/m in S does not get. About negative to think laziness. About the negative: let l, m> 0; m> l. Then if-l/m . S and 0 . S and (1-l/m)/2 too belongs S. But (m-l)/2m> 0 also we come to reasonings from the first paragraph. The test for an accessory to S turns out simply comparing with 0.

#### Re: Rational numbers

Hello, nikov, you wrote: N> Let S is the least set of rational numbers containing number 0 and satisfying condition: N> * If numbers p and q belong S, and |p-q | <1 the number (p+q+1)/2 also belongs S. A hogwash any: If number  on twain levels p=sum (ai*2^i, i=-inf..inf) that it  S. q=p+2e+1 where e = [0. 1) = sum (ei*2^-i,i=1..inf) r = (p+q+1)/2 = p+e => p ' =p+k*e where k any whole . any numbers representable in the form of the total on twain levels belong S N> to Write the program which accepts a rational number and defines, whether it belongs to set S. And here an ambush since expansion infinite also can be spread out that with any accuracy rating for example 1/3, but it will belong here S or not from task setting does not follow.

#### Re: Rational numbers

Hello, nikov, you wrote: I understand, what it on-topic - but all the same is interesting - what for/whence such question?

#### Re: Rational numbers

Hello, andyp, you wrote: N>> Let S is the least set of rational numbers containing number 0 and satisfying condition: N>> * If numbers p and q belong S, and |p-q | <1 the number (p+q+1)/2 also belongs S. A> But then (k + k ' +1)/2 too should belong S that cannot be as | (k + k ' +1)/2 |> 1. Here I did not understand it. Why it cannot be? In a condition implication only in one side, instead of equivalence ("in only case when").

#### Re: Rational numbers

Hello, nikov, you wrote: N>>> Let S is the least set of rational numbers containing number 0 and satisfying condition: N>>> * If numbers p and q belong S, and |p-q | <1 the number (p+q+1)/2 also belongs S. A>> But then (k + k ' +1)/2 too should belong S that cannot be as | (k + k ' +1)/2 |> 1. N> Here I did not understand it. Why it cannot be? In a condition implication only in one side, instead of equivalence ("in only case when"). Numbers l/m, k, k ', 0 belong S, the condition on the unit for conjugate differences is fulfilled (all on the unit less than 1) => number k_1 = (k+k ' +1)/2 belongs S. But |k1 - 0 |> 1 and k1 we should not to include => came to the contradiction. Or I not so understand a condition?

#### Re: Rational numbers

Hello, andyp, you wrote: A> Numbers l/m, k, k ', 0 belong S, the condition on the unit for conjugate differences is fulfilled (all on the unit less than 1) => number k_1 = (k+k ' +1)/2 belongs S. But |k1 - 0 |> 1 and k1 we should not to include => came to the contradiction. Or I not so understand a condition? "But |k1 - 0 |> 1 and k1 we should not to include" - here it is justified by nothing. It seems that you make a logical mistake "denying the antecedent": from "if And B" you deduce "if not And, not B".

#### Re: Rational numbers

Hello, Mystic Artifact, you wrote: MA> I understand, what it on-topic - but all the same is interesting - what for/whence such question? Set S are so-called fusible numbers which arise from a known puzzle about exact  time intervals with the help nonuniformly burning down matches. These numbers have unexpected communication with ordinals in the theory of sets, and they connect a row of interesting mathematical theorems and unproved hypotheses.

#### Re: Rational numbers

Hello, nikov, you wrote: N> "But |k1 - 0 |> 1 and k1 we should not to include" - here it is justified by nothing. It seems that you make a logical mistake "denying the antecedent": from "if And B" you deduce "if not And, not B". It seems understood that you want to tell: in set S there can be such steams p, q that |p-q |> = 1, but they cannot generate new set members. Then my reasonings are incorrect. Means, all the same incorrectly understood a condition

#### Re: Rational numbers

Hello, kov_serg, you wrote: _> . any numbers representable in the form of the total on twain levels belong S In a condition was about minimality S. And time so it is exact not any. If p=q on a condition p+0.5 too belongs S. Therefore if the zero, both all whole and half-integer belongs. But here it is already more difficult further. As S belong p=0 and q=1/2 belongs and (p+q+1)/2 = 3/4, and all k/4 for natural k> =2. But here about 1/4 such like it is impossible to tell... Similarly, as p=0 and q=3/4 belong and (p+q+1)/2 = 7/8, and as p=1/2 and q=3/4, also 9/8. All means also k/8 at k> =7. And here 1/8 3/8, 5/8 - like is not present. Well etc. Like it turns out that S all numbers of a type k/2^n where k> =A (n), but type A (n) remains belong is not clear... I.e. an induction only upwards. And from minimality S follows that negative numbers in it are not present!

#### Re: Rational numbers

Hello, kov_serg, you wrote: _> the Hogwash any: _> If number  on twain levels p=sum (ai*2^i, i=-inf..inf) that it  S. If it thus rational the denominator will be a level of a twain after fraction abbreviation.

#### Re: Rational numbers

Hello, kfmn, you wrote: K> Hello, kov_serg, you wrote: _>> . any numbers representable in the form of the total on twain levels belong S K> In a condition was about minimality S. And time so it is exact not any.>> let S is the least set of rational numbers containing number 0 and satisfying condition:>> * If numbers p and q belong S, and |p-q | <1 the number (p+q+1)/2 also belongs S. (1) q=p: p ' =p+1/2, p=p '-1/2 => pk=p0 + k/2 q=p+1/2: p ' = (2p+1/2+1)/2=p+3/4 => pk=p0 + k * (1/2+1/4) q=p+1/2+1/4: p ' =p+1/2+1/4+1/8 => pk=p0 + k * (1/2+1/4+1/8)... q=p+z: p ' +1/2+z/2 => pk=p0+k * (1/2+z/2) 1/2+1/4+1/8 +... + 2 ^-m = 1-2 ^-m (2) p (k, m) =p0+k * (1-2 ^-m) from (1) pk=p0+r p ' (k, m) =p0+k * (1-2 ^-m)-k=p0-k*2 ^-m p ' =p+a*2 ^-m p ' (0) =0+a*2 ^-m at any whole an and as much as big m give binary representation of number. K> if p=q on a condition p+0.5 too belongs S. Therefore if the zero, both all whole and half-integer belongs. K> but here it is already more difficult further. As S belong p=0 and q=1/2 belongs and (p+q+1)/2 = 3/4, and all k/4 for natural k> =2. But here about 1/4 such like it is impossible to tell... Why? q=p+2*e-1 => 0 <e <1, r = (p+q+1)/2 => r=p+e => p=r-e => pk = p + k*e where any k-whole K> is similar, as p=0 and q=3/4 belong and (p+q+1)/2 = 7/8, and as p=1/2 and q=3/4, also 9/8. All means also k/8 at k> =7. And here 1/8 3/8, 5/8 - like is not present. K> Well etc. Like it turns out that S all numbers of a type k/2^n where k> =A (n), but type A (n) remains belong is not clear... K> I.e. an induction only upwards. And from minimality S follows that negative numbers in it are not present! Why o_O?

#### Re: Rational numbers

Hello, vdimas, you wrote: V> From task setting follows that exist such e i for which the system of equations is fulfilled: V> (for only positive values, therefore without the unit) V> e x=e y+2e z+1 V>... This equation is, seemingly, incorrect. In a condition it is told: "If numbers p and q belong S, and |p-q | <1 the number (p+q+1)/2 also belongs S."  ., should be e x =-e y + 2e z - 1.

#### Re: Rational numbers

Hello, kov_serg, you wrote: K>> I.e. an induction only upwards. And from minimality S follows that negative numbers in it are not present! _> why o_O? If in any S there are negative numbers let's construct S' which will consist only of the nonnegative numbers entering in S. S' will satisfy too to a statement of the problem. And still it will be less, than S. And it means that S cannot be the answer in any way.

#### Re: Rational numbers

Hello, Eugene Sh, you wrote: K>>> I.e. an induction only upwards. And from minimality S follows that negative numbers in it are not present! _>> why o_O? ES> If in any S there are negative numbers let's construct S' which will consist only of the nonnegative numbers entering in S. ES> S' will satisfy too to a statement of the problem. And still it will be less, than S. And it means that S cannot be the answer in any way. If in any S there are the positive numbers let's construct S' which will consist only of negative numbers, further under the text.)) actually both statements are not true, according to a condition.

#### Re: Rational numbers

Hello, vdimas, you wrote: V> Hello, Eugene Sh, you wrote: K>>>> I.e. an induction only upwards. And from minimality S follows that negative numbers in it are not present! _>>> why o_O? ES>> If in any S there are negative numbers let's construct S' which will consist only of the nonnegative numbers entering in S. ES>> S' will satisfy too to a statement of the problem. And still it will be less, than S. And it means that S cannot be the answer in any way. V> if in any S there are the positive numbers let's construct S' which will consist only of negative numbers, further under the text.)) if any p the number belongs S also all numbers of a type p+k/2 - too belong for any natural k. Therefore only to negative to be restricted it does not turn out. Besides on a condition the zero contains in S. And here only nonnegative - quite. Because (p+q+1)/2 it is more than p and q, and an induction to the right on an axis is possible, and here to the left - is not present.

#### Re: Rational numbers

Hello, kfmn, you wrote: V>> If in any S there are the positive numbers let's construct S' which will consist only of negative numbers, further under the text. K> if any p the number belongs S also all numbers of a type p+k/2 - too belong for any natural k. There an inaccuracy of a condition that in the formula (p+q+1)/2 should make a reservation that p and q are unique set members. Otherwise the task has no decision. K> therefore only to negative to be restricted it does not turn out. I was not restricted to negative specially, it turned out as a result of calculations. K> besides on a condition the zero contains in S. Under condition of uniqueness p and q - yes. The contradiction to unwinding since 1/2 is not an element mn-va otherwise turned out. K> And here only nonnegative - quite. Because (p+q+1)/2 it is more than p and q, It only for positive p and q is true. For negative - depends from (p+q+1). For example, to receive an element mn-va 0, (p+q+1) it should be equal 0-lju, i.e. negative numbers should enter in mn-in. K> and an induction to the right on an axis is possible, and here to the left - is not present. Hence, the further reasonings incorrect.

#### Re: Rational numbers

Hello, vdimas, you wrote: V> There an inaccuracy of a condition that in the formula (p+q+1)/2 should make a reservation that p and q are unique set members. Unique, means the various? nikov about it in a condition did not write, and any determination fusible numbers open - there it is not present. V> Differently the task has no decision. Explain, why. K>> Besides on a condition the zero contains in S. V> Under condition of uniqueness p and q - yes. V> the contradiction to unwinding since 1/2 is not an element mn-va Differently turned out. Whence it?

#### Re: Rational numbers

Hello, kfmn, you wrote: V>> the contradiction to unwinding since 1/2 is not an element mn-va Differently turned out. K> Whence it? From a condition. Growing to the right infinite otherwise turns out mn-in, i.e. speech about its minimality cannot be. I.e., mn-in fusible numbers it is infinite. Then the accessory to it is defined elementarily (answered at once): If it thus rational the denominator will be a level of a twain after fraction abbreviation. Total, the decision: UPD (to compare with 0-lem): bool isFusible (uint numerator, uint denominator) {assert (denominator); if (! numerator) return true; uint a = numerator, b = denominator; while (a! =b) if (a> b) a - = b; else b - = a; denominator / = a; return! (denominator& (denominator-1));}

#### Re: Rational numbers

Hello, vdimas, you wrote: K>> and any determination fusible numbers open - there it is not present. V> Opened - is: V> http://googology.wikia.com/wiki/Fusible_number V> On a condition given under the link, there is no sense to lead identical manipulations with different matches since on a condition they are identical and burn down completely for the same time. (Everything, what you open, read without investigating) Formally, a real number xx is fusible if and only if x=0 or x = (a+b+1)/2, with an and b fusible numbers and |a-b | <1 So if to take initially x=0 where to take unique an and b from set? With the unique approach the set fusible is one-element.

#### Re: Rational numbers

Hello, samius, you wrote: V>> On a condition given under the link, there is no sense to lead identical manipulations with different matches since on a condition they are identical and burn down completely for the same time. S> (everything that you open, you read without investigating) Who would speak.) ) S> S> Formally, a real number xx is fusible if and only if x=0 or x = (a+b+1)/2, with an and b fusible numbers and |a-b | <1 S> So if to take initially x=0 where to take unique an and b from set? On a condition on the link initially a row was under construction under other formula: x i=x i-1 + (1-x i-1)/2 = (x i-1+1)/2 where x 0=0 And number 1 is included too into it a row on-condition (time of burning of 1st match). Total, a row turns out: x i=0 x 1=1/2 x 2=3/4 x 3=7/8 x i=1-1/2 ix oo=1 As on a condition we can add and subtract these numbers to receive from them new. Considering that a difference x i-x i-1=1/2 i, it is possible to receive any number of a type 1/2 i through which total to present arbitrary fusible number. Total: Formally, a rational number x is fusible if and only if x=a*2-b, with an and b natural numbers.

#### Re: Rational numbers

Hello, Kodt, you wrote: it is clear that S - a certain subset of finite binary fractions. Fusible numbers it is possible to subtract: You are allowed to light one or more unlit ends of any fuse, but only at time \(t = 0 \) or when a fuse burns out completely. I.e., one match burned down, set fire to another or digitized time / combustion of two . Total, it is possible to receive the arbitrary number 2-n. So S is a set of all binary fractions. I.e., any integer number or a floating-point number, representable in a binary type, - it certainly fusible.)) Therefore, the program can be such (for representation of a rational number in the form of fraction): http://www.rsdn.org/forum/etude/6746954.1 Or such: bool isFusible (float a) {return a> =0;} bool isFusible (double a) {return a> =0;} bool isFusible (int a) {return a> =0;} bool isFusible (long a) {return a> =0;} bool isFusible (unsigned a) {return true;} bool isFusible (unsigned long a) {return true;}

#### Re: Rational numbers

Hello, vdimas, you wrote: V> Hello, samius, you wrote: V>>> On a condition given under the link, there is no sense to lead identical manipulations with different matches since on a condition they are identical and burn down completely for the same time. S>> (everything that you open, you read without investigating) V> Who would speak.) ) S>> S>> Formally, a real number xx is fusible if and only if x=0 or x = (a+b+1)/2, with an and b fusible numbers and |a-b | <1 S>> So if to take initially x=0 where to take unique an and b from set? V> on a condition on the link initially a row was under construction under other formula: There is under the link no row V> x i=x i-1 + (1-x i-1)/2 = (x i-1+1)/2 where x 0=0 V> And number 1 is included too into it a row on-condition (time of burning of 1st match). About, quits, "inaccuracy" in determination nikov, i.e. the uniqueness requirement p and q you took from the row. V> total, a row turns out: V> x i=0 V> x 1=1/2 V> x 2=3/4 V> x 3=7/8 V> x i=1-1/2 i V> x oo=1 V> As on a condition we can add and subtract these numbers to receive from them new. And even to subtract? I.e.-1/2 your way too fusible. V> Considering that a difference x i-x i-1=1/2 i, it is possible to receive any number of a type 1/2 i through which total to present arbitrary fusible number. V> Total: V> V> Formally, a rational number x is fusible if and only if x=a*2-b, with an and b natural numbers. And at what natural an and b quits fusible-1/2, 5/8?

#### Re: Rational numbers

Hello, Kodt, you wrote: V>> Fusible numbers it is possible to subtract: V>> So S is a set of all binary fractions. No. At us a set subset fusible numbers. It is told: "minimum set" E-e-e... Well then for any number presented in a binary type for a basis mn-va it is possible to take items 2 e-n i, where n i - numbers of nonzero discharges of a mantissa (since seniors) and e= for floating representation or shift of a point for fixed. Then to add it mn-in derivative members under the formula (a+b+1)/2 for all pairs of items, at which |a-b | <1. To lead such addition in a cycle until in mn-ve there will be new members. It?

#### Re: Rational numbers

Hello, samius, you wrote: V>> On a condition on the link initially a row was under construction under other formula: S> There is under the link no row Badly read, means. Pay attention to how received 45 seconds. V>> as on a condition we can add and subtract these numbers to receive from them new. S> and even to subtract? Yes. Light two different chains " events", and measure time / their termination. S> I.e.-1/2 your way too fusible. Only if "interval of time" can be negative.)) V>> V>> Formally, a rational number x is fusible if and only if x=a*2-b, with an and b natural numbers. S> And at what natural an and b quits fusible-1/2, 5/8? 5/8 => a=5, b=3