26

Re: The compact notation of binary number designation

mayton wrote:

it is passed...
You actually refuted operations of Levenshtejna and Eliasa.
And as the author yet  a range

I refute nothing. Read more attentively. I accurately wrote, when the universal code choice is justified. Do not forget that universal codes on determination are not intended for cases when allocation of probabilities is known.
The HARDWARE, by the way, initially considered number 255. If it is a question of numbers of such order precisely it is better to it to encode words.

27

Re: The compact notation of binary number designation

File. In it there is how many a bit of everything, and the part from them can be spared for the account more or less correct coding of the First. It is however great? If it always is located in no more than 256 byte that - structure - byte are long - number bytes. If it is not located in 256 bytes then it is necessary to select two bytes for a prefix....
So, what percent of saving gives the supercorrect megamethod of coding in comparison with less correct? On total length of a file (((well so, thoughts aloud ((((

28

Re: The compact notation of binary number designation

ASN.1 .

29

Re: The compact notation of binary number designation

Vladimir Baskakov;
One number before line is the simplified setting of the task. And if it is necessary not to allocate there one number, and 100500?

30

Re: The compact notation of binary number designation

FXS wrote:

Vladimir Baskakov;
One number before line is the simplified setting of the task. And if it is necessary not to allocate there one number, and 100500?

And then it is necessary to ask at once a question, that which it is necessary, instead of another. With  restrictions. That answering into error not to enter ((((

31

Re: The compact notation of binary number designation

Vladimir Baskakov;
Excuse, and what difference: "the arbitrary content" file after the first can quite be other number.

32

Re: The compact notation of binary number designation

FXS wrote:

one number before line is the simplified setting of the task. And if it is necessary not to allocate there one number, and 100500?

Declare number 0 the file end, and further so:

1, 1, 2, 2... N, N, 0

33

Re: The compact notation of binary number designation

FXS wrote:

Vladimir Baskakov;
Excuse, and what difference: "the arbitrary content" file after the first can quite be other number.

Difference big. In how to optimize, as on how many, and what price. And whether it is necessary generally. It  strongly depends from allocations of probability small and big are long numbers.
The optimal method of package by a miscellaneous will be.....
Whether it is necessary to select quickly from == sequences packed == under number. I.e. to understand package, it is necessary to understand and data array life cycle.....
So that in any sense == all files consist of numbers ==....

34

Re: The compact notation of binary number designation

Vladimir Baskakov;
Files consist of numbers, yes not from those (from bits). We consider compact representation of a natural number by bit record in a situation, when address first bit of this record is known by the time of the beginning of reading of this record (that is this address can be described as "the first bit after something there", for example, "the first bit in the file beginning"; but can be and "the first bit after the termination of reading of the previous number").

35

Re: The compact notation of binary number designation

Dima T wrote:

Declare number 0 the file end, and further so:

1, 1, 2, 2... N, N, 0

And what bit expression for "comma" suggest to use?
And I after all did not tell that after 100500 numbers there will be a file end.

36

Re: The compact notation of binary number designation

FXS wrote:

it is passed...
And what bit expression for "comma" suggest to use?

It is not necessary to any "comma".
It is the standard approach: to write data size, then the data. How to write down the size I already offered

FXS wrote:

And I after all did not tell that after 100500 numbers there will be a file end.

Name 0 block end of numbers.
What's the problem?

37

Re: The compact notation of binary number designation

Dima T;
Problem in that you, apparently, do not care at all of compactness of a format. Whether while the question sounded "more compact notation Is possible?"
In that notation which is described in a root post, for record of numbers 0 and 1 it is required 2 bits , for 2 and 3 it is required 4 bits , for 4-7 it is required 6 bits etc.
_____________________
And it is visible, what even within the limits of this approach it is possible to spend bits more economically: as 0 and 1 register in the 2-bit notation in 4-bit 0 and 1 do not appear any more, and it is possible to push into it 2, 3, 4 and 5.
That is:
"0 0" it is 0
"0 1" it is 1
"10 00" it is 2
"10 01" it is 3
"10 10" it is 4
"10 11" it is 5
"110 NNN" it c 6 to 13 (under the formula 6+NNN)
"1110 NNNN" it c 14 to 29 (under the formula 14+NNN)
Etc.

38

Re: The compact notation of binary number designation

It is curious that if to follow Haffmanu it is necessary to invert the prefixes declaring length of bit record of "body" of number. That is, for example:
"1111110 0" it is 0
"1111110 1" it is 1
"111110 00" it is 2
"111110 01" it is 3
"111110 10" it is 4
"111110 11" it is 5
"11110 NNN" it c 6 to 13 (under the formula 6+NNN)
"1110 NNNN" it c 14 to 29 (under the formula 14+NNNN)
"110 NNNNN" it c 30 to 61 (under the formula 14+NNNNN)
"10 NNNNNN" it c 62 to 125 (under the formula 61+NNNNNN)
"0 NNNNNNN" it c 126 to 253 (under the formula 125+NNNNNNN)

39

Re: The compact notation of binary number designation

FXS wrote:

a problem that you, apparently, do not care at all of compactness of a format. Whether while the question sounded "more compact notation Is possible?"

The question sounded so

FXS wrote:

And if it is necessary not to allocate there one number, and 100500?

And you will decide to use what notation - has no value.

FXS wrote:

In that notation which is described in a root post, for record of numbers 0 and 1 it is required 2 bits , for 2 and 3 it is required 4 bits , for 4-7 it is required 6 bits etc.
_____________________
And it is visible, what even within the limits of this approach it is possible to spend bits more economically: as 0 and 1 register in the 2-bit notation in 4-bit 0 and 1 do not appear any more, and it is possible to push into it 2, 3, 4 and 5.
That is:
"0 0" it is 0
"0 1" it is 1
"10 00" it is 2
"10 01" it is 3
"10 10" it is 4
"10 11" it is 5
"110 NNN" it c 6 to 13 (under the formula 6+NNN)
"1110 NNNN" it c 14 to 29 (under the formula 14+NNN)
Etc.

That you is better depend on that what numbers will write more often.
For example number 100500 (17 bits) in your variant occupies 34 bits, in mine 26 if to add rejection high 1

000101 0001 1000100010010100

40

Re: The compact notation of binary number designation

In your notation number designation N occupies 2 * log [sub] 2 [/sub] (N) bit
And in mine 6 + log [sub] 2 [/sub] (log [sub] 2 [/sub] (N)) + log [sub] 2 [/sub] (N)
Therefore on numbers of the order of thousand they will be made even and further I will be more compact.

41

Re: The compact notation of binary number designation

In dry residual: in the record beginning (before a number body) there is "a range name", designating simultaneously and number of bits in a number body, and "basis of a range" - a constant, to which it is necessary to add a binary number expressed in these bits of a body of number to receive final output.
That is:
" 0" and " 1" is a record of two numbers: Basis (1 +0 and Basis (1 +1;
" NN" is a record of four numbers: Basis (2 +0, Basis (2 +1, Basis (2 +2 and Basis (2 +3;
" NNN" is a record of 8 numbers - Basis (3 +0 on Basis (3 +7;
" NNNN" is a record of 16 numbers of type Basis (4) +NNN;
And so on.
The dictionary {"", "", "", ""... "M-bitnyjdiapazon"} should possess properties  and an optimality (for our task), that is, for example, bit values
0, 10, 110, 1110... (___) 0
-- Should be arranged on it according to our aprioristic waitings of frequencies of record of different numbers by us.
Thus for "tail" very much the great numbers which appearance we represent absolutely rare, should work additional (to the dictionary) the formal notation of record of names of ranges:
(_) 0
-- Meaning "bit bodies" the numbers, containing +1 bit. Well and bases to which it is necessary to add the binary numbers presented by these bit bodies, will settle up too under the uniform formula...

42

Re: The compact notation of binary number designation

As it is possible to answer request of the most compact notation:

Dima T wrote:

And you will decide to use what notation - has no value

?
Your customers accept such answers?
____________________________

Dima T wrote:

if to add rejection high 1

That is your notation how it has been described, already ?

43

Re: The compact notation of binary number designation

FXS wrote:

That is:
" 0" and " 1" is a record of two numbers: Basis (1 +0 and Basis (1 +1;
" NN" is a record of four numbers: Basis (2 +0, Basis (2 +1, Basis (2 +2 and Basis (2 +3;
" NNN" is a record of 8 numbers - Basis (3 +0 on Basis (3 +7;
...

That to you to consider it was easier:

Basis (M) = 2 ^ (M+1) - 2
Width of a range of M = 2^M

44

Re: The compact notation of binary number designation

Dima T;
Similar on that. There shift will depend on, whether it is necessary for us - on a statement of the problem - sometimes to write down number 0, or only natural numbers.

45

Re: The compact notation of binary number designation

FXS wrote:

As it is possible to answer request of the most compact notation:
it is passed...
?
Your customers accept such answers?

... Try to esteem once again a question on which I there answered.
There I answered absolutely other question, which arose during arguing. The question quoted.

FXS wrote:

it is passed...
That is your notation how it has been described, already ?

That too the worker, but it can be refined: 2 bits to spare.
It is possible not to write the first unit, since the high order always 1.
For example number 17 (10001 [sub] 2 [/sub]) can be written down as 0001 [sub] 2 [/sub]
Remains question how to write 0 as variant to specify the size of the size 000000.

46

Re: The compact notation of binary number designation

Dima T wrote:

the Question sounded so
it is passed...

it was not how to write down one number "hundred thousand five hundred", and that, probably, it will be necessary to allocate "" numbers.

47

Re: The compact notation of binary number designation

Dima T wrote:

That too working

as your notation copes with the number designation task
127213652436512428173512214698378623721714738352374?

48

Re: The compact notation of binary number designation

FXS wrote:

it is passed...
It was not how to write down one number "hundred thousand five hundred", and that, probably, it will be necessary to allocate "" numbers.

.? What of two terminations you did not add:
1. I want to make it as much as possible compactly.
2. I do not know as to write down some numbers.
I thought about the second since the first repeatedly considered above. Though I will not be surprised if there will be the third.

49

Re: The compact notation of binary number designation

I just know how to write down some numbers: at first the first, then closely to it (without any commas) the second etc.

50

Re: The compact notation of binary number designation

FXS wrote:

it is passed...
As your notation copes with the number designation task
127213652436512428173512214698378623721714738352374?

In any way. My format implies the maximum value. I wrote that to 2^64.
It is possible to add 1 bit in the size of the size and there will be a maximum 2^128 etc.
If it is necessary such numbers in considerable quantities, that is the sense to think about a variant, in that type it to 2^256 (approximately 75 + decimal positions) if 1 bit begins to add to 2^65536.
Though not such and the joke there turned out, here number 100500 in that format:

011 01 0001 1000100010010100

25 bits, on 1 bit are shorter, i.e. than it is more than number that will be even shorter in comparison with other methods of record.
PS the Ideal decision of this task does not exist, therefore it is necessary to sharpen the decision under the expected data. As a variant separately to set type of coding of numbers and to use what appears more shortly in the given specific case.