## 70 Reputation

5 years, 187 days

## A request about the new post...

@Carl Love I would like to kindly request you to see my new post. I really need your help. Thanks in advance for your consideration of this request.

## @Carl Love When I changed data...

When I changed datatype= integer[8] to datatype= integer[4] then it made the following error

Error, (in Paar) unable to store 'HFloat(1.0)' when datatype=integer[4]

I installed the 64 bit version of Maple 15 on a computer with windows 7 (64 bit). My results was the same as you but in 242 seconds. Therefore I want to install the 64 bit version of Windows 7 and then install the 64-bit Maple 15.

With the best regards and wishes for you

## Hardware properties in order to run the ...

@Carl Love Excuse me, did you test the code for a 128x128 binary matrix.

When I run the code for a 128x128 binary matrix, then it makes an error as follows

Error, (in Paar) Maple was unable to allocate enough memory to complete this computation.  Please see ?alloc

I used 32 bit version of Windows 7 with 4GIG RAM.

## @Carl Love The time complexity of y...

@Carl Love The time complexity of your code in comparison with the original published Paar's algorithm is valuable and as you said this might be worth publishing. In continue I want to suggest an improvement for reduction of number of required XOR.

Consider the following 8x8 binary matrix

A:=

You can check that the number of required XOR for the  implementation of the matrix A is 10 XOR when you run the Paar algorithm.

Set X:=[x_1,x_2,.,.x_8]. Then the cost of implementation X.A is equal to the cost of the equation (1) in my question.

Based on my question the cost of f[i] with i=1..7 is equal to 9 XOR. Now the question is that why the Paar algorithm computed one XOR more than the required XOR.

One answer is that in the question I selected columns with the minimum number of 1's and the Paar algorithm starts with  columns with the maximum number of 1's.

I suggest you if you edit your code until that the output your edited code for the matrix A be 9 XOR, then your solution is a new improved heuristics for Short Linear Programs.

Although this types of improvement is recently done (you can see the following two papers), the time complexity of your code is amazing

https://eprint.iacr.org/2019/847.pdf

Thanks for everything.

## Request to delete some my  unnecessary c...

@Carl Love Please let me that I delete some my  unnecessary comments. Because I want to suggest an improvement for your nice code that is valuable in cryptography.Also I tested your excellent code with the binary matrices in the following link

https://github.com/rub-hgi/shorter_linear_slps_for_mds_matrices/tree/master/matrices_bp_format

and I checked the results with Table 3 in the following paper

https://eprint.iacr.org/2017/1151.pdf

All results were correct. Thanks for your effort Prof Car.Love. You are man of Maple.

I want to have a request about your code. Consider the C++ code of Parr algorithm that has been given in the following link (which is called "int paar_algorithm1(uint64_t *input_matrix)")

https://github.com/rub-hgi/shorter_linear_slps_for_mds_matrices/blob/master/paar.cpp

In the mentioned algorithm, first receives an nxn binary matrix A and then the algorithm computes the following integer number

xor_count=Occurrences(1, convert(A, list))-n

Also in each step, the algorithm obtains an integer number hw_max and then computes

xor_count -= (hw_max-1);

I wrote the Maple code of this algorithm as follows

 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 >
 (1)
 >

But it takes long times when n>=64.

I want to request you, please edit your code until that the edited code compute the parameter xor_count.

## @Carl Love Perfect. It works w...

@Carl Love Perfect. It works without error. Thanks for everything.

## Error invalid power...

@Carl Love Unfortunately because of some limitations I could not installed the new version of Maple and hence I should use Maple 15 again. When I run the new code retrofitted  in Maple 15, it made this error

Sorry due to my limitations and thanks for all your effort and codes.

## Thanks and a request...

@Carl Love First of all I want to appreciate you taking the time to write this procedure. I used Maple 15 and when I run the  procedure it made an error that I attached its maple file. Error.mw

## @Carl Love You right. I made a mist...

@Carl Love You right. I made a mistake. Thank you.

## @vv I appreciate you taking the tim...

@vv I appreciate you taking the time to respond to my comment. Your solution is nice and perfect and not only is useful for this question, but also can be used for other commands of generic package.

I would like to ask you to help me in the next question which is the my last question. I attached a new maple file. In the new Maple file, there is an 8x16 matrix over GF(2,4)  which is denoted with  H. I used the matrix H as a parity-check matrix of a code and observe that H produces the [16,8,7] code which means the minimum number of linearly dependent columns of H over G is 7. But when I test the matrix H with your given solution I got 8 for the rank of matrix. Where is my mistake. In other words, how to obtain the minimum number of linearly dependent columns of H with your given solution.

Excuse me that I ask too questions. I am a TA of coding and I would like to implement the concept of coding with Maple.

test.mw

## ReducedRowEchelon command makes an erro...

@vv Thanks for your answer.I tested your suggestion, but the ReducedRowEchelon  command makes an error when the matrix is not a square matrix.I attached the Maple file to see the example. As you know, my question is equivalent to obtain the minimum distance of a code when the matrix H is used as a parity-check matrix in the code. Thanks again.Maple-Error-Generic.mw

## @vv Yes the use of floats shou...

@vv Yes the use of floats should be enough. A million thanks to you.

## @vv First of all, I want to thank y...

@vv First of all, I want to thank you because of two useful notes that you mentioned. I have two questions.

First: what did you mean by "provided that the entries of C are < 2^53". Do you mean C[i,j]<2^53 for all i and j?

Second: Consider we defined the finite field G:=GF(2,n) for some n and we considered the matrix A over G by A:=G:-input~(A). Now the computation are done over  GF(2) and hence when by generic package we obtain C=A^k, then all even numbers in C are changed to zero and this is not acceptable. In fact we want to find the primitive order of matrix A over field of real numbers.