From: Enrique Perez-Terron on
On Sat, 24 Sep 2005 22:55:39 +0200, Peter T. Breuer <ptb(a)oboe.it.uc3m.es>
wrote:

> Peter T. Breuer <ptb(a)oboe.it.uc3m.es> wrote:
>> Jean-David Beyer <jdbeyer(a)exit109.com> wrote:
>>> Peter T. Breuer wrote:
>>>> Michael Heiming <michael+USENET(a)www.heiming.de> wrote:
>>>>> In comp.os.linux.setup Peter T. Breuer <ptb(a)oboe.it.uc3m.es>:
>>>>>> Jean-David Beyer <jdbeyer(a)exit109.com> wrote:
>>>>>>> Peter T. Breuer wrote (in part):
>>>>>>>>
>>>>>>>> 1 2 4 6 10 12 ..

Add one and you get a prime.

f(n) = "the n'th prime, minus one"

Two operations if "the n'th prime" is a primitive operation.

-Enrique
From: Peter T. Breuer on
Enrique Perez-Terron <enrio(a)online.no> wrote:
> Perhaps another operation has to be included: choice. That is,
> e.g "if x is odd, y, else z". Then the condition should be expressible

Yes, that's right - the function is computable (i.e. arithmetic ops
over the integers, plus "if", and "loop" express it).

> The next simplest formula involes one operation:
> eg. (never mind if some of the examples do not make sense for the problem)
> 1a) f(n) = if n=1, 1, else 2
> 1b) f(n) = n + 1
> 1c) f(n) = n - 1
> 1d) f(n) = n * 1
> 1e) f(n) = n / 1
> 1f) f(n) = n mod 1
> 1g) f(n) = n ^ 1
> 1h) f(n) = f(1)

You have the idea :-).

> in five choice operations. (According to this solution, f(7) is 12.)

> f(n) = if n = 1, 1
> else if n < 5, n*2 - 2
> else n*2

Not bad!

> has two choices, two multiplications, and one substraction, that's five
> operations. Rearranging,

> f(n) = if n=1, 1
> else 2 * if n < 5, n - 1,
> else n

> has two choices, one multiplication, and one substraction, in all four.


> Any simpler?

Well, I'm not sure there is a simpler computer program to generate the
sequence seen so far. Maybe yes, maybe no. I'm not sure how short I can
get the program but it would have at least ONE (computed) loop in it!

(the loop has to be computed, rather than fixed, otherwise we wuld get
an algebraic function).


> But at this time, we have another restraint, it was revealed in another
> post that the number 22 must occur as a value of X when some value higher
> than 7 is substituted for "n" in X. Notice that the suggested 4-step
> solution above yields 22 for n=11.

Very clever, moriarty.

> It is also of course a question if the set of "primitive" operations
> should be different. Perhaps this IQ (or IQ + math) test here takes
> into consideration such knowledge as "7 is a prime", so that "if 'a'
> is a prime, 'b', else 'c'" should be a a member of S(n; k) whenever
> 'a', 'b', and 'c' are members of S(n; k-1). Perhaps even "The next
> prime after x" should be available in S(n; k) whenever 'x' is a
> member of S(n; k-1)

> It is perhaps reasonable to use a primitive form

> "Start with the sequence 1, 1, and then for n>2, f(n) = X"

No it isn't! I wouldn't give you a spline. It's just ONE formula.

> "Start with the sequence 1, 2, 4, 6, 10, 12, and then
> for n > 6, f(n) = 22"

> with a cost of one! That is not desirable. We should require
> that the members of the fixed start are referenced by the formula
> X for at least some values of n <= 7.

Sure. I might add that the difficulty of this problem comes from my
having written down the sequence, which is preventing you recognizing
it!

Peter
From: Peter T. Breuer on
Enrique Perez-Terron <enrio(a)online.no> wrote:
> On Sat, 24 Sep 2005 22:55:39 +0200, Peter T. Breuer <ptb(a)oboe.it.uc3m.es>
> wrote:

>> Peter T. Breuer <ptb(a)oboe.it.uc3m.es> wrote:
>>> Jean-David Beyer <jdbeyer(a)exit109.com> wrote:
>>>> Peter T. Breuer wrote:
>>>>> Michael Heiming <michael+USENET(a)www.heiming.de> wrote:
>>>>>> In comp.os.linux.setup Peter T. Breuer <ptb(a)oboe.it.uc3m.es>:
>>>>>>> Jean-David Beyer <jdbeyer(a)exit109.com> wrote:
>>>>>>>> Peter T. Breuer wrote (in part):
>>>>>>>>>
>>>>>>>>> 1 2 4 6 10 12 ..

> Add one and you get a prime.

> f(n) = "the n'th prime, minus one"

Very good. Correct.

Exactly how did you think of it? That's very hard to produce by
analytic resolution.

> Two operations if "the n'th prime" is a primitive operation.

Peter
From: Peter T. Breuer on
Michael Heiming <michael+USENET(a)www.heiming.de> wrote:
> In comp.os.linux.setup Unruh <unruh-spam(a)physics.ubc.ca>:
>> Michael Heiming <michael+USENET(a)www.heiming.de> writes:

>>>In comp.os.linux.setup Peter T. Breuer <ptb(a)oboe.it.uc3m.es>:
>>>> Michael Heiming <michael+USENET(a)www.heiming.de> wrote:
>>>>> In comp.os.linux.setup Peter T. Breuer <ptb(a)oboe.it.uc3m.es>:
>>>>>> Jean-David Beyer <jdbeyer(a)exit109.com> wrote:
>>>>>>> Peter T. Breuer wrote (in part):

>>>>>>>> Here. Here's a chance for you. Next number in this series, please:
>>>>>>>>
>>>>>>>> 1 2 4 6 10 12 ..
>>>>>>>>
>>>>>>>> Answers by next friday.

>>>>> 22

>>>> No, but that's not a bad attempt. It's a later member of the series all
>>>> right!

>>>So it's "18" (euler phi function or so), you used?

>> Or 14 (base 8)

> Exactly there are multiple possible answers. Peter was trying to
> "fool" us here. with this nice attempt. ;-)

No, I couldn't fool you lot! There was no trick!

Peter
From: Peter T. Breuer on
Michael Heiming <michael+USENET(a)www.heiming.de> wrote:
> In comp.os.linux.setup Peter T. Breuer <ptb(a)oboe.it.uc3m.es>:
>> Michael Heiming <michael+USENET(a)www.heiming.de> wrote:
>>> In comp.os.linux.setup Peter T. Breuer <ptb(a)oboe.it.uc3m.es>:
>>>> Jean-David Beyer <jdbeyer(a)exit109.com> wrote:
>>>>> Peter T. Breuer wrote (in part):

>>>>>> Here. Here's a chance for you. Next number in this series, please:
>>>>>>
>>>>>> 1 2 4 6 10 12 ..
>>>>>>
>>>>>> Answers by next friday.

>>> 22

>> No, but that's not a bad attempt. It's a later member of the series all
>> right!

> So it's "18" (euler phi function or so), you used?

18 is a later member of the series, but is not the next number.

Interesting.

Peter
First  |  Prev  |  Next  |  Last
Pages: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Prev: Building GLIBC-2.3.5
Next: Kodak DVC325 webcam driver?