Re: Arrange them [ updated ]
- From: Matt <matt271829-news@xxxxxxxxxxx>
- Date: Fri, 21 Nov 2008 10:39:46 -0800 (PST)
On Nov 21, 5:08 pm, Nimo <azeez...@xxxxxxxxx> wrote:
On Nov 21, 8:22 pm, dan73 <fasttrac...@xxxxxxx> wrote:
Cobra wrote:
Thanks for the 'algorithm'
want to know one thing here,
can we again get the 'original sequence' back ? by this >procedure.
A lot less code than I thought!
I still can not understand your logic but here is the
new program that destroys A$ after it is retrieved by an
array in the first "I" loop on line 40.
This I loop also gives the two variables X and X1 there
values.
If A$ is destroyed in line 100 without rebuilding it first
the integrity of the original A$ is lost it cannot be
rebuilt from just the pairing values of X and X1.
Please enlighten me on your logic in all of this?
Are you investigating some sort of encryption method?
10 CLS
20 DIM B1$(34)
30 A$="1101100101101110010001000011110101":PRINT A$
40 FOR I=1 TO 34
50 REM I value at it's greatest equals the length of the string.
60 B$=MID$(A$,I,1)
70 IF B$="1" THEN X=X+1:B1$(I)="1":GOTO 90
80 X1=X1+1:B1$(I)="0"
90 NEXT I
100 PRINT "The pairing of this string is --":PRINT " ":A$=""
110 FOR I = 1 TO 18
120 REM (18) represents the total count of pairs and singles added together
140 IF X>0 AND X1>0 THEN PRINT "10 ";:X=X-1:X1=X1-1
150 IF X>0 AND X1=0 THEN PRINT "1 ";:X=X-1
160 IF X1>0 AND X=0 THEN PRINT "0 ";:Y=Y-1
170 NEXT I
190 PRINT " ":PRINT "New string values from array built
from first I loop on line 40 ="
200 FOR I=1 TO 34
210 PRINT B1$(I);
220 NEXT I
230 PRINT "": PRINT "Print A$";A$;" ---A$ was destroyed
on line 100 therefore now empty"
240 REM The only way to retrieve the original A$ before
its' destruction on line 100 is rebuild it in
the first I loop on line 40.
No, not encryption methods, but compression technique.
Wow, your algorithm is great,
now lets see you arranged some thing
like this 11000011110111 into
10 10 10 .....
its fine, now we can write it as n(10)
say,if n = 5
i.e 10 10 10
with this again "trying" to 'reproduce'
original 11000011110111
some of the members are saying it's impossible
and waste of time.
I have no idea what you are going on about. The paired string gives
you a little information about the original string (specifically, how
many 0's and 1's). If you save sufficient additional information about
the original string (in whatever form) then obviously you can
reconstruct it. If you don't then obviously you can't.
.
- Follow-Ups:
- Re: Arrange them [ updated ]
- From: Matt
- Re: Arrange them [ updated ]
- References:
- Arrange them [ updated ]
- From: Nimo
- Re: Arrange them [ updated ]
- From: dan73
- Re: Arrange them [ updated ]
- From: Nimo
- Arrange them [ updated ]
- Prev by Date: Re: Relationship between polynomial of Galois group "[2^4]E(4)" and a polynomial of degree 16.
- Next by Date: Re: Arrange them [ updated ]
- Previous by thread: Re: Arrange them [ updated ]
- Next by thread: Re: Arrange them [ updated ]
- Index(es):
Relevant Pages
|