Connecting Tech Pros Worldwide Forums | Help | Site Map

file stream 1's 0's ?

cnoe
Guest
 
Posts: n/a
#1: Nov 20 '08
I need to program this.
I'm not asking any code, but an idea from you would be helpful.
Thanks.

I open a binary file stream,
which has millions or trillions of 1's & 0's
some thing like this 1100100011101110111..........


for easy understanding lets take this

1 1 0 0 0 0 1 =X

assume there is an idle case like this

1 1 1 1 1 1 1 = Y

now Y has 7 cases, each case has 2 chances
either 1 or 0

'Z' is particular case

first position is changed to 0
1 1 1 1 1 1 0
and matched with X
not as a number[whether x is y, or not], but from left to right
checking 'individual' digits

If one digit is not matching, then the case is failed

if true, then checking Y's 2nd digit with X's ,so on

if all the cases are failed


Now Y's second case is

1 1 1 1 1 0 1
1 1 1 1 1 0 0

and again repeating the same procedure


if x & y has trillions of 1's and 0's

what is the complexity of the program

can I take Z count,

so that

If I change the 1 1 1 1 1 1 1=Y

for Z count times,

I can get X.



Thanks.

Nick Keighley
Guest
 
Posts: n/a
#2: Nov 20 '08

re: file stream 1's 0's ?


On 20 Nov, 09:49, cnoe <azeez...@gmail.comwrote:

I'm guessing your first language isn't english.
I'm left struggling to understand what you mean.
Could you provide a sample input and its corresponding
output.

input string: "1100001"
output string: "1111110"

or whatever
Quote:
I need to program this.
The first step is to clearly define what you are trying to do
Quote:
I'm not asking any code, but an idea from you would be helpful.
Thanks.
>
I open a binary file stream,
which has millions or trillions of 1's & 0's
some thing like this 1100100011101110111..........
those are actual bits? Or characters?
Quote:
for easy understanding lets take this
>
1 1 0 0 0 0 1 =X
why are there seven of them? Why not 8?

Quote:
assume there is an idle case like this
>
1 1 1 1 1 1 1 = Y
why is this an "idle case"? Assume we have no idea what
your problem domain is.

Quote:
now Y has 7 cases, each case has 2 chances
either 1 or 0
>
'Z' is particular case
a particular 1 or 0?
Quote:
first position is changed to 0
1 1 1 1 1 1 0
and matched with X
how can you compare a position (a single bit?) with
7 bits?

Quote:
not as a number[whether x is y, or not],
what are x and y?
Quote:
but from left to right checking 'individual' digits
nope you completly lost me here. Could you give an example?
Quote:
If one digit is not matching, then the case is failed
why can't you just load the bits into a byte and compare the bytes?

Quote:
if true,
does "true" mean "matching"?

Quote:
then checking Y's 2nd digit with X's ,so on
what?
Quote:
if all the cases are failed
what?
Quote:
Now Y's second case * is
I thought a "case" was a bit (or a bit position)
Quote:
1 1 1 1 1 0 1
1 1 1 1 1 0 0
>
and again repeating the same procedure
>
if x & y has trillions of 1's and 0's
>
what is the complexity of the program
do you mean as in big-O?

Quote:
can I take Z count,
Z?

Quote:
*so that
>
If I change the 1 1 1 1 *1 1 1=Y
you change the value of Y?
Quote:
for Z count times,
what does "Z count" mean?
Quote:
I can get * * X.
>
Thanks.
no problem...

--
Nick Keighley

cnoe
Guest
 
Posts: n/a
#3: Nov 20 '08

re: file stream 1's 0's ?


On Nov 20, 3:18*pm, Nick Keighley <nick_keighley_nos...@hotmail.com>
wrote:
Quote:
On 20 Nov, 09:49, cnoe <azeez...@gmail.comwrote:
>
I'm guessing your first language isn't english.
I'm left struggling to understand what you mean.
Could you provide a sample input and its corresponding
output.
>
input string: *"1100001"
output string: "1111110"
>
or whatever
>
Quote:
I need to program this.
>
The first step is to clearly define what you are trying to do
>
Quote:
I'm not asking any code, but an idea from you would be helpful.
Thanks.
>
Quote:
I open a binary file stream,
which has millions or trillions of 1's & 0's
some thing like this 1100100011101110111..........
>
those are actual bits? Or characters?
>
Quote:
for easy understanding lets take this
>
Quote:
1 1 0 0 0 0 1 =X
>
why are there seven of them? Why not 8?
>
Quote:
assume there is an idle case like this
>
Quote:
1 1 1 1 1 1 1 = Y
>
why is this an "idle case"? Assume we have no idea what
your problem domain is.
>
Quote:
now Y has 7 cases, each case has 2 chances
either 1 or 0
>
Quote:
'Z' is particular case
>
a particular 1 or 0?
>
Quote:
first position is changed to 0
1 1 1 1 1 1 0
and matched with X
>
how can you compare a position (a single bit?) with
7 bits?
>
Quote:
not as a number[whether x is y, or not],
>
what are x and y?
>
Quote:
but from left to right checking 'individual' digits
>
nope you completly lost me here. Could you give an example?
>
Quote:
If one digit is not matching, then the case is failed
>
why can't you just load the bits into a byte and compare the bytes?
>
Quote:
if true,
>
does "true" mean "matching"?
>
Quote:
then checking Y's 2nd digit with X's ,so on
>
what?
>
Quote:
if all the cases are failed
>
what?
>
Quote:
Now Y's second case * is
>
I thought a "case" was a bit (or a bit position)
>
Quote:
1 1 1 1 1 0 1
1 1 1 1 1 0 0
>
Quote:
and again repeating the same procedure
>
Quote:
if x & y has trillions of 1's and 0's
>
Quote:
what is the complexity of the program
>
do you mean as in big-O?
>
Quote:
can I take Z count,
>
Z?
>
Quote:
*so that
>
Quote:
If I change the 1 1 1 1 *1 1 1=Y
>
you change the value of Y?
>
Quote:
for Z count times,
>
what does "Z count" mean?
>
Quote:
I can get * * X.
>
Quote:
Thanks.
>
no problem...
>
--
Nick Keighley

here it is

take a sequence some thing like this

1 0 1 0 1 1 1 1 0 1 1 1 [total 12 here]


1 1 1 1 1 1 1 1 1 1 1 1 1 [create an idle case with 12 1's]



if I keep changing the idle sequence with 1's and 0's


in which case I can get the original given

sequence.

thanks.
Joachim Schmitz
Guest
 
Posts: n/a
#4: Nov 20 '08

re: file stream 1's 0's ?


cnoe wrote:
<snip>
Quote:
1 1 1 1 1 1 1 1 1 1 1 1 1 [create an idle case with 12 1's]
s/idle/ideal/ ??

Bye, Jojo
Nick Keighley
Guest
 
Posts: n/a
#5: Nov 20 '08

re: file stream 1's 0's ?


On 20 Nov, 10:24, cnoe <azeez...@gmail.comwrote:
Quote:
On Nov 20, 3:18*pm, Nick Keighley <nick_keighley_nos...@hotmail.com>
wrote:
Quote:
On 20 Nov, 09:49, cnoe <azeez...@gmail.comwrote:
Quote:
Quote:
I'm guessing your first language isn't english.
I'm left struggling to understand what you mean.
Could you provide a sample input and its corresponding
output.
>
Quote:
input string: *"1100001"
output string: "1111110"
>
Quote:
or whatever
>
Quote:
Quote:
I need to program this.
>
Quote:
The first step is to clearly define what you are trying to do
>
Quote:
Quote:
I'm not asking any code, but an idea from you would be helpful.
Thanks.
>
Quote:
Quote:
I open a binary file stream,
which has millions or trillions of 1's & 0's
some thing like this 1100100011101110111..........
>
Quote:
those are actual bits? Or characters?
>
Quote:
Quote:
for easy understanding lets take this
>
Quote:
Quote:
1 1 0 0 0 0 1 =X
>
Quote:
why are there seven of them? Why not 8?
>
Quote:
Quote:
assume there is an idle case like this
>
Quote:
Quote:
1 1 1 1 1 1 1 = Y
>
Quote:
why is this an "idle case"? Assume we have no idea what
your problem domain is.
>
Quote:
Quote:
now Y has 7 cases, each case has 2 chances
either 1 or 0
>
Quote:
Quote:
'Z' is particular case
>
Quote:
a particular 1 or 0?
>
Quote:
Quote:
first position is changed to 0
1 1 1 1 1 1 0
and matched with X
>
Quote:
how can you compare a position (a single bit?) with
7 bits?
>
Quote:
Quote:
not as a number[whether x is y, or not],
>
Quote:
what are x and y?
>
Quote:
Quote:
but from left to right checking 'individual' digits
>
Quote:
nope you completly lost me here. Could you give an example?
>
Quote:
Quote:
If one digit is not matching, then the case is failed
>
Quote:
why can't you just load the bits into a byte and compare the bytes?
>
Quote:
Quote:
if true,
>
Quote:
does "true" mean "matching"?
>
Quote:
Quote:
then checking Y's 2nd digit with X's ,so on
>
Quote:
what?
>
Quote:
Quote:
if all the cases are failed
>
Quote:
what?
>
Quote:
Quote:
Now Y's second case * is
>
Quote:
I thought a "case" was a bit (or a bit position)
>
Quote:
Quote:
1 1 1 1 1 0 1
1 1 1 1 1 0 0
>
Quote:
Quote:
and again repeating the same procedure
>
Quote:
Quote:
if x & y has trillions of 1's and 0's
>
Quote:
Quote:
what is the complexity of the program
>
Quote:
do you mean as in big-O?
>
Quote:
Quote:
can I take Z count,
>
Quote:
Z?
>
Quote:
Quote:
*so that
>
Quote:
Quote:
If I change the 1 1 1 1 *1 1 1=Y
>
Quote:
you change the value of Y?
>
Quote:
Quote:
for Z count times,
>
Quote:
what does "Z count" mean?
>
Quote:
Quote:
I can get * * X.
>
Quote:
Quote:
Thanks.
>
Quote:
no problem...
>
Quote:
--
Nick Keighley
don't quote sigs
Quote:
here it is
here *what* is?
Quote:
take a sequence some thing like this
>
1 0 1 0 1 1 1 1 0 1 1 1 *[total 12 here]
>
1 1 1 1 1 1 1 1 1 1 1 1 1 [create an idle case with 12 1's]
that's 13 1's. I asked you to give an example of both
input and output. You have not provided the output.

f("101011110111","111111111111) -??

you have a mapping that's takes two sequences of bits as
an input and produces... what exactly?
Quote:
if I keep changing the idle sequence with 1's and 0's
what does this mean?
Quote:
in which case I can get the original given
sequence.
I've no idea what this means.

If you can't state your problem then I don't see how
you can expect to write a program to solve it.
I probably won't reply to you again.
You seem like a time waster.

--
Nick Keighley
pete
Guest
 
Posts: n/a
#6: Nov 20 '08

re: file stream 1's 0's ?


cnoe wrote:
Quote:
I need to program this.
I'm not asking any code, but an idea from you would be helpful.
Thanks.
>
I open a binary file stream,
which has millions or trillions of 1's & 0's
some thing like this 1100100011101110111..........
Are you talking about bits or bytes?

What do you think
"binary file stream"
means in C?

--
pete
Closed Thread