file stream 1's 0's ? 
November 20th, 2008, 09:56 AM
| | | |
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. | 
November 20th, 2008, 10:25 AM
| | | | 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 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? 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? 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? Z? Quote:
*so that
>
If I change the 1 1 1 1 *1 1 1=Y
| you change the value of Y? what does "Z count" mean? Quote:
I can get * * X.
>
Thanks.
| no problem...
--
Nick Keighley | 
November 20th, 2008, 10:25 AM
| | | | 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
>>
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
| >>
why are there seven of them? Why not 8?
> Quote: |
assume there is an idle case like this
| >>
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
| >>
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?
>>
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?
>>
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?
>>
Z?
>> Quote: |
If I change the 1 1 1 1 *1 1 1=Y
| >
you change the value of Y?
>>
what does "Z count" mean?
>>>
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. | 
November 20th, 2008, 10:35 AM
| | | | 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 | 
November 20th, 2008, 11:35 AM
| | | | 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: |
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: |
why are there seven of them? Why not 8?
| > Quote: Quote: |
assume there is an idle case like this
| | >> 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:
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: 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: |
does "true" mean "matching"?
| > Quote: Quote: |
then checking Y's 2nd digit with X's ,so on
| | >> Quote: Quote: |
if all the cases are failed
| | >>> 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: Quote: |
If I change the 1 1 1 1 *1 1 1=Y
| | > Quote: |
you change the value of Y?
| >> Quote: |
what does "Z count" mean?
| >>>> | don't quote sigs 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 | 
November 20th, 2008, 01:05 PM
| | | | 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 |  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 225,689 network members.
|