Items tagged with list list Tagged Items Feed

Hallo, I have a list with derrivatives. I'd like to choose elements with highest derrivative.

Is there any procedure in Maple to determine order of derrivative?

I have two lists with differential monomials, like this: [y'y'', y''', (y'')^2].

List is rather big, i want to check if one such a list contains in other.

Seems to be that there is some internal procedure for this operation.

But I don't know what it is...

hello, I have a list of numbers, for example [1.2,5.6,7.2,0.5,-0.25,-4,6]. I would like to find the position of it in the list where the number is closest to zero. May I know if there is a function for this please? Thanks.

[x+p*y, x+y, y+z] would like to filter with indets([x+y,y+z])

so that that the list remove polynomials which contain variable p

So I'm trying to make a procedure to tell is a sequence is graphical or not.
seqgraph:= proc (L::list)

local k::integer, i::integer, n::integer, a::integer, S;

n := numelems(L);

S := convert(L, `+`);

a := 0;

if type(S, odd) then print("not graphical")

else for k to n do

if add(L[i], i = 1 .. k) <= k(k-1)+add(min(k, L[i]), i = k+1 .. n) then a := a+1

else a := a+2

end if;

end do;

end if;
if n = a then print(graphical)

else print("not graphical")

end if;

end proc;

 

 I'm trying to say that if that equality (which is part of the erdos gallai theorem) holds for that value of k then we'll add one to a value (a). Thus, if a=n at the end then the ineuqality was true for each k and thus it would it should print "graphical" but every list I test it one prints 'not graphical'. Where is my mistake? I get an error saying it can't execute add?

If I have a list, how can I write a program to see is that list is graphical? So far I have

graphicalseq := proc (L::list)

local i::integer, N;

N := convert(L, `+`);


if type(N, odd) then print("Sequence is not graphical")


else if numelems(L)-1 < L[1] then print("Sequence is not graphical")
end if;


end if;

end proc;

I know I still have to keep going to determine whether the sequence is graphical, but I'm not sure how.

 I was thinking of trying to somehow use Havel-Hakimi's theorem, but again I'm not sure how. Any hints would be appreciated.  I can't use the is Graph Sequence function

a := [x+1, x+2, x+3, x+4];

which command can remove polynomial x+2 from the list a;

to become

a := [x+1, x+3, x+4];

i want to use dictionary or hashtable in maple

the key are a function, value are a list of things

 

how to do?

a:=Vector([2,3,4,5]);

select[flatten](x->x>=3,a);

This returns a Vector that satisfies the above condition. What's the most efficient way to get the indices of those entries?

For example, a list l:=[2,3,4] that correspond to the a[l] entries that satisfies the above condition.

l:=[2,3,4];

a[l]; # gives the same answer

 

Thanks,

 

casper

restart;

Vector([a, b]);  <a, b>;  # Identical results

a:=[1, 2]:  b:=[3, 4]:

Vector([a, b]), <a, b>;   # Different results. Why?

 

 

 

The problem is when initializing a Matrix with a list of strings. The worksheet excerpt below shows the normal behavior using a list of integers to initialize a square matrix: the successive list elements fill the matrix by rows.

Then trying the exact same thing with a list of strings instead of integers gives an error message!
This is not right. While it is an odd and likely rare problem, it would be better fixed.

x := [i $ i=1..25];
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]
Matrix(5,5,x);
Matrix(5,5,[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25]) 

y := map(convert,x,string);
["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25"]
Matrix(5,5,y);
Error, (in Matrix) initializer defines more columns (25) than column dimension parameter specifies (5)

My problem is i am working with a very large randomly generated output, generated using maple's builtin in random generating functions. I have the output which i want to investigate but i want to be able to reproduce this result when i save and close the worksheet. Since the list of generators is very long copy pasting is not very nice and i donot know the seed of these generaters. I want to ask if i can store the values in variable in the worksheet so that when i open the worksheet i can get the same random generates stored in the variable.

Hi,

I would like to compute the elements of the permutation group, let us say S10 or S20.

Is there any method to compute all the elements.

And can we make a list of the tranposition and cycles.

Many thinks.

 

Is it possible to generate a list of values for a function in the form of an ordered pair, like

a cartesian plane, i.e. ( x, f(x) )? And how can I plot a graph with this output?

thanks in advance.

the sequence is non-decreasing up to some point after which it is non-increasing. Note that i can be 1 or n. A constant sequence is considered to be unimodal.

Examples of unimodal lists:

[1, 1, 1, 1, 1],
[1, 2, 2, 3, 4, 5, 5, 5],
[5, 5, 4, 4, 3, 3, 1],
[1, 1, 1, 2, 2, 2, 2, 2, 2, 1, 1, 1],
[1, 2, 2, 3, 3, 3, 4, 4, 2, 2, 1, 1, 1]

 

Examples of lists that are not unimodal:

[1, 0, 1, 0],
[1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1],
[1, 1, 2, 2, 3, 4, 5, 2, 2, 6, 4, 2, 2, 1, 0]

 

i don't have a clue

1 2 3 4 5 6 7 Last Page 1 of 45