vv

13837 Reputation

20 Badges

9 years, 320 days

MaplePrimes Activity


These are replies submitted by vv

@Markiyan Hirnyk 

OK, so you are sure that I have just modified Maxim's code.
Anyway, until now you have two pieces of bad code.

@Markiyan Hirnyk 
Probably you prefer:

Area1:=proc(rel::set(relation))  # Maxim's
local x,y, xy:=indets(rel,name),cad,f,g, xmax, xmin, ymax, ymin;
if nops(xy)<>2 then error "Two vars only!" else x,y:=xy[] fi;
cad := solve(rel, [x, y]):
f := (a,b) -> if a = y then ymax = b elif b = y then ymin = a elif a = x then xmax = b else xmin = a end if:
g := s -> if subs(s, {xmax, xmin, ymax, ymin})::freeof({xmax, xmin, ymax, ymin}) then
    int(subs(s, ymax-ymin), x = subs(s, xmin) .. subs(s, xmax)) else 0 end if:
(simplify@add@curry(map, g))(applyrule(
  ['`<`(a::anything, b::anything) = f(a, b)', '`<=`(a::anything, b::anything) = f(a, b)'],
  cad)):
end:

BTW, I really like it!

@tomleslie 

The intention was not to write efficiently, but to exhibit a bug.

@williamdiao 

There are only 2 possibilities:
1. You did something wrong.
2. It is a bug.

This is all that can be said without seeing the worksheet.

@Carl Love 

Nice solution, vote up!

I think that the module should also contain a function to remove the "noise".
Compare:

P:=plot(sin(x)*sin(40*x),x=0..5*Pi);
and
P:=plot(sin(x)*sin(40*x)+sin(1000*x)/100,x=0..5*Pi);

 

 

1. See  https://en.wikipedia.org/wiki/Extreme_point

2. By the definition of the extreme points

 

@Carl Love 

Yes, I know this. What I meant is that the result would be HUGE or impossible to compute (think at the degree of the denominator).

@Carl Love 

I don't think that the extension is viable. Try:

A:= LinearAlgebra:-RandomMatrix((n$2), generator= (()-> randpoly(x, degree= 2)/randpoly(x, degree= 2)));

 

But as I can see, it is not possible to obtain the "singular" value c=3  just using infolevel.
You will have to use the suggested method in the answer.

@codell 

The variables having xk=true or xk=false  are fixed. They were determined in the first step because BooleanSimplify cannot simplify the whole expression (being too large).
The rest of the variables appear in `simp`; this is the simplified version of your expression (after fixing the previous variables). From here you can imediately see for what values of the remaining variables the expression (ee) is true.

@roubeur 

@Preben Alsholm 

What I meant is that it seems that Basis does not call primpart any more, so the infolevel method does not work.

Nice problem and solution. Unfortunately the worksheet cannot be executed: you forgot to initialize L.

Remarks.
- It would be interesting to have a unique solution. It seems that a 90 degree rotation invariance of the carpet is enough for this. [A central symmetry gives 2 solutions it seems].
- The isometry can be tested easier because there are only 3 possible rotations.

@Ramakrishnan 

1. Q.E.D. (quod erat demonstrandum) means "what was to be demonstrated" (and marks the end of the proof).
2. In Maple assume(s>0) means that s is assumed to be real and positive. You may check this via about(s);
3. The question asked by coulditbe is correct. It is the answer which has "problems".

@Carl Love 

Indeed, xxx:=eval(varsx,Satisfy(ex))  would have been enough, but it was only a few lines of simple code.

@roubeur 

Probably you did not execute the initialization part; it is better to upload the worksheet in such situations.
Here is a slight modification of the worksheet; just change ee and execute it.

boolean-n.mw

First 106 107 108 109 110 111 112 Last Page 108 of 176