Carl Love

Carl Love

28015 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

Or perhaps you mean something like this: Let be a graph with n vertices and 0 edges. Then G^k = G for any >= 1. Any permutation of G's vertices is isomorphic to G^k, and all of these permutations are trivially edge disjoint. So, in this case we could say "There are n! edge-disjoint isomorphisms of in G^k." Is that what you have in mind? Then, extending that idea, I see that perhaps there are some cases of a very sparse being multiply embeddable in G^k.

I think that I must have the wrong idea about this because I don't see how there could possibly be more than 1 copy of G in G^k. Would you please give an example?

Yes, I know. But the OP said that they do  have a tridiagonal system, so the trivial solver will work for them. The OP seems to be ignoring this Answer. 

@Ronan That's the only thing that I pointed out because that's the only thing that you need to change to solve your entire problem of multi-line descriptions.

I was able to download the worksheet, no problem.

@mehdibgh If I recall correctly, there was once a time when garbage collected memory was not deallocated and returned to the O/S. However, that memory was still available to Maple. But for at least several years now, it is deallocated and that number you see on the status bar can go down. I don't think that the deallocation is done after every single garbage collection, but it's done often enough. 

@ijuptilk You can remove 0, or any other specific value, from a list soln by

remove(`=`, soln, 0)

@Alger Don't use storage= sparse. For what I showed to work, you must use shape= band[1,1]. That will also automatically set storage= band[1,1]. If you add storage= sparse to that, it'll override the storage= band[1,1], and the wrong compiled solver will be used. It'll use SparseIterative (NAG procedures hw_f11zaf, hw_f11daf, hw_f11dcf). The direct band matrix solver is CLAPACK procedures hw_dgbtrf_ and hw_dgbtrs_.

@FDS Note that inside the procedure MyProc, all of the parameters are scalars, and all of the arithmetic is scalar. And if you were to call it via MyProc(...), then all of the arguments would need to be scalars also. But if you simply change the call to MyProc~(...), then any subset of the arguments can be vectors as long as they're the same length and orientation (column or row). If you do it this way, then there's no need for loops or seq; that's all done behind the scenes by using the little ~. The same can be done using lists instead of vectors, though there's no benefit to doing that.  

Does your coefficient matrix have a special sparsity pattern, such as banded or tridiagonal? 

@vs140580 My guess is that you're trying to change the vertex labels in a graph produced by my procedure for the lexicographic product of graphs, which you very recently asked about in another thread. That procedure can be easily modified to produce string vertex labels. You just need to change

(nprintf, "%a:%a")

to

(sprintf, "%A:%A")

It's in the line after the line with GT:-Graph.

@acer You're right; my mistake. But this'll produce row vectors, (FWIW):

<1 | A>[1];
<A | 1>[1];

@moh111 Here it is:

PowerOfT:= proc(e)
    evalindets(
        e, 
        specfunc(T)^{-2, -1, 2},
        proc(e) local T, p;
            (T,p):= op(e);
            if p = 2 then (applyop(`*`, 2, T, 2) + applyop(0, 2, T))/2
            elif p = -2 then -2/(applyop(`*`, 2, T, 2) + applyop(0, 2, T))
            else -1/e
            fi
        end proc
    )
end proc
:           
ProductOfTs:= proc(t) 
local Ts, NotTs, n, a, b, x;
    (Ts, NotTs):= selectremove(type, [op](t), specfunc(T));
    n:= nops(Ts);
    if n < 2 then t
    elif n=2 then 
       (a,b):= op~(2, Ts)[];
       x:= op([1,1], Ts);
       mul(NotTs)*(T(x, a+b) + T(x, abs(a-b)))/2
    else error "product of 3 or more Ts not handled"
    fi
end proc
:
Ttrans:= proc(e)
    evalindets(
        PowerOfT(frontend(expand, [e])),
        `*`,
        ProductOfTs
    )
end proc
:
p := 8*T(x, 7)*T(x, 2)+4*T(x, 5)*T(x, 1)+6*T(x, 3)*T(x, 3)+7*T(x, 1)*T(x, 4);
                                                          2
    p := 8 T(x, 7) T(x, 2) + 4 T(x, 5) T(x, 1) + 6 T(x, 3)  + 7 T(x, 1) T(x, 4)

Ttrans(p);
               15                                            
   4 T(x, 9) + -- T(x, 5) + 5 T(x, 6) + 2 T(x, 4) + 3 T(x, 0)
               2                                             

        7        
      + - T(x, 3)
        2        


 

@acer Or, either of

<1 | A>;
<A | 1>;

 

@FDS The return is optional when it's the last statement before end proc.

First 79 80 81 82 83 84 85 Last Page 81 of 708