Items tagged with integer integer Tagged Items Feed

Hi,

 

I was reading the manual for Maple 13 and playing with some commands.

There is an equation: sin(x)=cos(x) and you can solve it by the solve command.

If you want all solutions, you just put there AllSolutions attribute and you get

 

(1/4)*Pi+Pi*_Z1~

 

I wonder why there is a tilde (~) behind "_Z1", because each integer satisfies

the equation (there is no need for an assumption).

 

Is it possible to compute possible addition chains for an integer in maple ??

If not, is there ANY software that will do it ??

It looks like, choosing a public key exponent with a smaller addition chain makes  RSA decryption more efficient .. but how to know whether or not your exponent has a small addition chain!

Call me stupid but I still wasn't able to run the simple example in the maple help (see http://www.maplesoft.com/support/help/view.aspx?path=Define_external ) regarding calling external, precompiled Code (in my Case: c++).

How can I write a Maple program (using if..else) to find the first positive integer n (between 1 and 355)such that 355 can divide n*m (m is an integer, say 199) ? Thanks for your help. 

I am trying to do the following sum

with(numtheory):
sum(bigomega(j),j=1..n)

But I get this error message

"Error, invalid input: numtheory:-bigomega expects its 1st argument, x, to be of type integer, but received j."

I have tried

assume(j,'integer');

but this has no effect. I'm a bit puzzled why Bigomega doesn't work in summations as  other Numtheory functions I've used have all worked.

I have an Nx3 Matrix A and each row looks like [integer,integer,*]. Matrix A acts like a function of two variables in the sense that the ordered pairs that you get be selecting the first two entries of each row are all distinct.

I would like a slick way to convert A to a Matrix B for which B[i,j]=* where * is the third entry in the unique row of A that looks like [i,j,*]. We can insert 0 for "blanks."

For example, if

A:=Matrix([[1,3,a],[1,4,d],[1,1,b],[3,3,c],[3,4,a]]) 

1 3 a
1 4 d
1 1 b

Hello,

 

I have a problem in maple with conversion to the binary writing system.  I would like to convert integers into a binary string of fixed length.

 

So 7 should become [0,0,0,1,1,1] while 22 should become [0,1,0,1,1,0].

Is that possible? (it would save me quite some time).  I know there are methods to do binary conversion in maple but it's not really what I want.

 

Many thanks!
fredbel6

Is there a way to specify a user-supplied routine when using the define_external command?

Here is a simple Fortran program to show what I want.


Hello,

This question comes from a math forum, somebody wanted to solve the following system with maple, but he didn't find a way for it:

eqs:={20<=a,a<=60, 20<=b,b<=60, 20<=c,c<=60, 20<=d,d<=60, a+b+c+d=160, 4*a+6*b+8*c+12*d=1200};

where a,b,c,d are integers.

A possible workaround to try each a,b,c,d, numbers in the given ranges to find the solutions, but it would be good from maple to solve it directly.


Can Maple solve these kinds of problems directly?

Hello everybody,

 

I have a list of 8 integers and I want to extract all the possible sublists of this list.

For example if the list is L:=[1,2,3,4,5,6,7,8] I want to extract

[1,3,5]

[7]

[2,3,7,8]

etc.

Is there a simple way to do that? Since there are 2^8=256 of such sublists, my idea was to

write a for i  from 1 to 256 and convert i to a binary number on each iteration, e.g, i =123

is the binary number 1111011, which would correspond to sub list

Hi

I'm currently doing some proof of concept implementation of what comes closest to be described as "network flow" problem inside Maple. The current applicability is limited to one source and one sink, flows are not interesting, meaning the edge-costs are all equally set to 1. The chosen vector-based representation for a simple network (adjacency matrix)

 

  S 1 2 E
S 0 1 1 0
1 0 0 0 1
2 0 0 0 1
E 0 0 0 0

is as follows:

MM := [[2], S, [[1, 2], [[], 1], [[], 2]], E]

Hello

I'd like to perform following operation as gracefully and computationally inexpensive as possible:

b := [[2, 3], 1, 2, 3, 4, 5]
c := b[2 .. nops(b)]
c[b[1, 1]] := c[b[1, 2]]
c := ListTools:-MakeUnique(c)
c[b[1, 1]] := max(c) + 1;

b[1] always contains a list of two consecutive indices which should be combined into one element of the list and having assigned the largest integer in the list. In the about example:

Somebody named Alec have gave me this programme after he modified my old programme.

Good Night all:


Anybody could tell me how can I obtain this integral with maple?

int(x^s*exp(-1/2*(x*(1+k)+exp(-x))), x = -infinity .. infinity)

5 6 7 8 9 10 11 Last Page 7 of 22