Kitonum

21435 Reputation

26 Badges

17 years, 24 days

MaplePrimes Activity


These are replies submitted by Kitonum

@Konstantin@  In fact, your joke has a profound meaning. As you know, any truth is concrete. You're not going to turn on the computer, for example, to count 25 * 15, and do this in your mind or on a calculator.

@Carl Love   print screen -> Paint -> cutting -> saving -> inserting (by fat green arrow)

@Markiyan Hirnyk  Quote "You demonstrate the double moral standards, not regarding my work".

I think your moralizing is inappropriate and unacceptable.

Preben  and  Alejandro, many thanks for the explanations!

@Markiyan Hirnyk   Thanks for the reply. The difference between the examples is clear. Yet why in the first case Maple returns  3, and in the second case does not return  sqrt(10)?

@Markiyan Hirnyk  Your links - the serious scientific articles devoted primarily to the estimations of the minimum number of dominant queens for the board  n  by  n. This is interesting, but the purpose of my message is different. I just suggest to all fans of Maple, especially those who are learning to program in Maple, a useful exercise for this. 

@Markiyan Hirnyk  Thank you for your interest. I only ask not to be confused  the problem of dominant queens with the problem of independent queens. Your last link is devoted to independent queens.

@toandhsp  Using the command  select,  this is easily from the list  L2  to select solutions that satisfy all your criteria:

 

T:=select(t->add(t[2][i]*t[3][i], i=1..3)<>0 and add(t[2][i]*(t[3]-t[2])[i], i=1..3)<>0 and add((t[2]-t[3])[i]*t[3][i], i=1..3)<>0 and product(t[2][i]*t[3][i], i=1..3)<>0 and nops({t[2][1],t[2][2],t[2][3],t[3][1],t[3][2],t[3][3]})=6 and igcd(t[2][1],t[2][2],t[2][3])=1 and igcd(t[3][1],t[3][2],t[3][3])=1, L2):

nops(T);

seq(T[1000*k], k=1..7);  #  7 solutions from 7536 ones

@Markiyan Hirnyk 

assume(x::realcons, y::realcons):

simplify(sqrt((x+y)^2));

                         abs(x+y)

@brian bovril   Give the text of your code, so I can check his work.

 

Here is my calculation in Maple 12 classic. It takes 6.5 minutes:

ts:=time():

NumbersGame(863, [25, 75, 1, 8, 5, 10], ["+","-","*"], "arbitrary order", yes):

nops(M);

seq(M[1+70*(i-1)], i = 1..10);

ListTools[Search](` ( ( 25 + ( 75 - 5 ) ) * ( 10 - 1 ) ) + 8 ` = `863`, M); # The number of your solution in the list M

time()-ts;

 

 

@Carl Love   You wrote "I find it most useful to remember that one should set the ranges in plot3d to be exactly the same as the ranges that one would use for a double integral of the surface over the region in question".

int(x*y, [y = 0 .. x, x = 0 .. 1]);  is the correct syntax for a double integral.

But if we write  plot3d(x*y, y = 0 .. x, x = 0 .. 1);   then we see a unaccustomed left-handed coordinate system.

 

@brian bovril   Thank you for your interest in my post!

My program differs from Dr. Khan's one in the following points:

1. In my program all the numbers from the declared list should be used.
2. My program returns all solutions.
3. My program has many options for its use.

When solving your example in the maximum version (all arithmetic operations, arbitrary order numbers and the use of parentheses) creates a very long list to iterate. This will require a lot of time or Maple may report insufficient memory, etc. See my comment above.

Here are two workarounds:

1. Reduce the number of permissible operations. If you remove the division, then Maple returns 712 solutions, among which will be your variant at number 633:

NumbersGame(863, [25, 75, 1, 8, 5, 10], ["+", "-", "*"], "arbitrary order", yes):  # All solutions

nops(M);  # Number of the all solutions

seq(M[1+70*(i-1)], i = 1 .. 10);  # For example, 10 solutions

M[633];  # Your solution

 

 

2.  Another way - first generate all permutations of the original list, and then solve separately for each permutation, using the parentheses and the all 4 arithmetic operations.  Obtain the same solutions. It follows that there are no solutions that use the division sign:

k:=0:

P := combinat[permute]([25, 75, 1, 8, 5, 10]):

for p in P do

NumbersGame(863, p, yes);

if M::list then k:=k+1; L[k] := op(M) end if;

end do:

L:=convert(L, list);

nops(L);

                              712

@Carl Love   Compare:

plot3d(x*y, x = y .. 1, y = 0 .. 1, axes = normal)  and  plot3d(x*y, x = 0 .. 1, y = 0 .. x, axes = normal)  are the same.

But  int(x*y, [x = y .. 1, y = 0 .. 1]);  and  int(x*y, [x = 0 .. 1, y = 0 .. x]);  are not the same. The second is incorrect syntax for calculating of an integral.

The implication is true only in one direction.

 

Good to know that this is a saddle-shaped surface like  z=x^2-y^2 :

plot3d(x*y, x=-1..1, y=abs(x)-1..1-abs(x), axes=normal, view=[-3/2..3/2,-3/2..3/2,-1/2..1/2]);

@Preben Alsholm   Vote up!  I believe that a combination of manual and programmatic approaches there is a better way to work, because it allows you to achieve the best results.

First 100 101 102 103 104 105 106 Last Page 102 of 132