Carl Love

Carl Love

28050 Reputation

25 Badges

12 years, 336 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Magma Thanks, all is clear now.

@Magma What is the upper limit of m? Obviously m <= n^2 - 2*n + 1. But it's trivial to find solutions for m <= (n^2 - n)/2.

@Magma I'm confused by your Reply immediately above. Can the r x matrices be indentified with a field embedding, i.e., an injective function phi: GF(2,r) -> GF(2,1)^(r x r) that preserves field operations? And, if so, can a formula for phi be given? Is the image of phi simply the diagonal matrices?

 

@Magma It is surprising that Maple 2019 shows a substantial speedup of my code, but not much change for VV's. I can't believe that RowReduce has been substantially improved, because it was already extremely efficient. Using the 80x80 matrix that you just posted, I get

CodeTools:-Usage(VVMDS(A,8)): #VV's procedure
memory used=3.82GiB, alloc change=0 bytes,
cpu time=39.83s, real time=39.52s, gc time=5.38s

CodeTools:-Usage(IsMDS(A,8)): #Carl's procedure
memory used=2.65GiB, alloc change=-4.00MiB, 
cpu time=18.56s, real time=17.56s, gc time=5.59s

 

@Kitonum Thanks for the shorter syntax. I see now that that syntax is mentioned on the page ?Line, but I missed it before.

You say "curve", but I wonder if you actually mean surface. Do you want a function z ~ f(x,y)? That's a surface. Or do you want functions x ~ f(t), y ~ g(t), z ~ h(t)? That's a curve.

@Kitonum Like this:

SMC:= Student:-MultivariateCalculus:
L1:= <2-4*t, 5+6*t>:  L2:= <-6-12*t, 17+18*t>: 
SMC:-Equal((SMC:-Line@`[]`@seq)~([L1,L2])[]);
                              true

 

@Magma 

All commands in LinearAlgebra:-Modular work substantially faster if the input matrices are converted to one of the package's native formats via its Mod command. Here's a comparison:

restart:
randomize(23): #arbitrary key number for repeatability
LA:= LinearAlgebra:  LAM:= LA:-Modular:
A:= LA:-RandomMatrix(64$2, generator= rand(0..1)):
n:= rand(2^63..2^64-1)();
                   n := 15162085668718581745
AP1:= CodeTools:-Usage( #Compute A^n in a native format:
    LAM:-Mod(2, LAM:-MatrixPower(2, LAM:-Mod(2,A,float[8]), n), integer[kernelopts(wordsize)/8])
): 
memory used=0.91MiB, alloc change=0 bytes, cpu time=63.00ms, real time=56.00ms, gc time=0ns

AP2:= CodeTools:-Usage(LAM:-MatrixPower(2, A, n)): #naive method, without conversion
memory used=86.39MiB, alloc change=28.99MiB, cpu time=8.02s, real time=8.00s, gc time=62.50ms

LA:-Equal(AP1, AP2); #accuracy check
                              true
8.02/.063; #cpu time ratio
                          127.3015873

 

@Magma According to the paper that you linked at the bottom of this Question, the problem being discussed in this thread is known to be NP-hard. That means that there can be no practical solution that doesn't use heuristics that possibly produce suboptimal solutions. For example, Paar's algorithm uses such heuristics, and in another thread its output was shown to be slightly suboptimal for the specific case being discussed there. 

On the other hand, your algorithm posted above and also my Maple implementation of it both search the entire space and are guaranteed to produce an optimal solution. By the concept of NP-hardness, there's no possibility that this code could be improved to run in a reasonable or practical amount of space and memory for a 64 x 64 case.

@Magma Thanks, I read it, and I made two responses so far, albeit tangential to your Question.

I'm no more likely to see a Reply where my name is tagged than I am to see a new Question. This is because I pay no attention to the automatic notifications because I just read all of MaplePrimes. Thus, there's no need to tag me in another thread.

@vv By M_r(Z2) do you mean the ring of r x matrices over GF(2,1)?

So, a commutative subring of this consisting only of invertible matrices (other than 0) would be an image of an embedding GF(2,r) -> M_r(Z2), right?

@Magma Maple can derive that formula for counting submatrices that you used, binomial(2*n, n) - 1, and that Maple can do that can be used to promote understanding of the concept, because it's more clear precisely what the below formula counts:

sum(binomial(n, k)^2, k= 1..n);
                     
binomial(2*n, n) - 1

since the number of k submatrices of an  matrix is easily seen to be binomial(n,k)^2.

Thanks, Rouben, and a Vote Up. The motion does look realistic.

I assume that there's no friction between the red ball and the container?

I think that a marketable toy could be based on this design.

@Jjjones98 Cramer's rule gives us an estimate of the size of the solution. For a 6x6 system, each of the 6 variables is a rational function whose numerator and denominator each have 6! = 720 terms, each term being a product of 6 coefficients. Now, some of your coefficients are 0, but not many. The 6 denominators are the same.

@tomleslie I figured that it had something to do with workbooks. Clicking on a variable and bringing up context, I see "Save", presumably to save that one variable in the workbook, but not "Save variables". Do you see that?

First 232 233 234 235 236 237 238 Last Page 234 of 709