This post has been edited by C++LVR: 10 April 2009 - 06:53 AM
Calculate this~!MUST be solved in your head!
155 Replies - 13364 Views - Last Post: 04 May 2009 - 08:17 PM
#153
Re: Calculate this~!
Posted 10 April 2009 - 06:51 AM
I have no idea what you're talking about...
#154
Re: Calculate this~!
Posted 10 April 2009 - 07:00 AM
The answer to your question before you edited it away was 200112. But I'd prefer if we took the questions in order.
The answer to my question is an expression on the form x(2) = x(1) + x(0) but the indexes can be different.
But to give a meaning to that expression you also need to include the shortest bitstring that can be used to initialize the infinite bitstring.
As in the very simple example,
Bitstring: 1101 where [x(0) = 1, x(1) = 1, x(2) = 0, x(3) = 1]
The recursive function: x(2) = x(1) + x(0) gives
x(0) = 1
x(1) = 1
x(2) = (x(0) + x(1)) % 2 = (1 + 1) % 2 = 0
x(3) = (x(1) + x(2)) % 2 = (1 + 0) % 2 = 1
x(4) = (x(2) + x(3)) % 2 = (0 + 1) % 2 = 1
x(5) = (x(3) + x(4)) % 2 = (1 + 1) % 2 = 0
x(6) = (x(4) + x(5)) % 2 = (1 + 0) % 2 = 1
x(7) = (x(5) + x(6)) % 2 = (0 + 1) % 2 = 1
x(8) = (x(6) + x(7)) % 2 = (1 + 1) % 2 = 0
Which would produce the bitstring: 110 110 110 110 ...
The answer to my question is an expression on the form x(2) = x(1) + x(0) but the indexes can be different.
But to give a meaning to that expression you also need to include the shortest bitstring that can be used to initialize the infinite bitstring.
As in the very simple example,
Bitstring: 1101 where [x(0) = 1, x(1) = 1, x(2) = 0, x(3) = 1]
The recursive function: x(2) = x(1) + x(0) gives
x(0) = 1
x(1) = 1
x(2) = (x(0) + x(1)) % 2 = (1 + 1) % 2 = 0
x(3) = (x(1) + x(2)) % 2 = (1 + 0) % 2 = 1
x(4) = (x(2) + x(3)) % 2 = (0 + 1) % 2 = 1
x(5) = (x(3) + x(4)) % 2 = (1 + 1) % 2 = 0
x(6) = (x(4) + x(5)) % 2 = (1 + 0) % 2 = 1
x(7) = (x(5) + x(6)) % 2 = (0 + 1) % 2 = 1
x(8) = (x(6) + x(7)) % 2 = (1 + 1) % 2 = 0
Which would produce the bitstring: 110 110 110 110 ...
This post has been edited by Gloin: 11 April 2009 - 05:49 PM
#155
Re: Calculate this~!
Posted 10 April 2009 - 11:23 PM
@gloin correct
i told you it was easy
i told you it was easy
#156
Re: Calculate this~!
Posted 04 May 2009 - 08:17 PM
Kind of to easy
7 wives * 7 sacks * 7 cats * 7 kittens =....
but if you crossed them their paths wheren't them coming out of St-Yes ?
My old days in CDC... saw that, for real, on the CDC Fortran compiler code
ok Syntax is XOR reg1,reg2 perform an XOR of register reg1 with reg2 and store result in reg2
Code:
XOR X5,X6
XOR X6,X5
XOR X5,X6
Hint: these old CDC dynosaurs didn't have stack... but may be I told you too much
7 wives * 7 sacks * 7 cats * 7 kittens =....
but if you crossed them their paths wheren't them coming out of St-Yes ?
My old days in CDC... saw that, for real, on the CDC Fortran compiler code
ok Syntax is XOR reg1,reg2 perform an XOR of register reg1 with reg2 and store result in reg2
Code:
XOR X5,X6
XOR X6,X5
XOR X5,X6
Hint: these old CDC dynosaurs didn't have stack... but may be I told you too much
This post has been edited by pbl: 04 May 2009 - 08:19 PM

New Topic/Question


MultiQuote



|