brian bovril

914 Reputation

16 Badges

18 years, 162 days

MaplePrimes Activity


These are replies submitted by brian bovril

@Kitonum but same result...

X86 64 WINDOWS 7

@Kitonum 

In my version of M2017.0

Polynomial-Fragmentation.mw

 

@Rouben Rostamian  42=the answer to life, the universe and everything....

but how, pray,did you derive your expression?

I tried many

spline.mw

@Robert Israel 

A:=[100, 101, 97, 106, 90, 115, 79, 128]:
A1 := ([seq])((A[k]-A[k-1]), k = 2 .. nops(A))
A2 := map(ifactor, A1)
#so we can guess the recurrance relation....
a:=unapply(simplify(rsolve({a(n)= (-1)^(n+1)*n^2+a(n-1),
                             a(0)=100}, a(n))), n);  # General formula
seq(expand(a(n)), n=0..10);  # The first 11 terms
    
 

@Kitonum Is there a formula to count the number of subsets, where the length of subsets differs.

It looks the same as the total number of set partitions of n distinct items into e sets of length l, with n = (e*l)!/e!/(l !)^e.
https://www.mapleprimes.com/questions/200480-Product-Grouping

I don't know how this formula was derived, but there are 280 possible distinct partitions of a 9 member set into 3 subsets of 3.

This is the same as nops(SetPartition(L, p));
 

@vv 

I see you changed the line P= Iterator:-SetPartitions(n,[[len,num]],'transformer=permute').

What about this Carl code. It used to work, but not in M2017. Can you (or someone) get it to work?

restart:
S:=[3, 4, 5, 6, 8, 9, 28, 30, 35.1, 36, 37, 40];
SL:=[seq(A||i,i=1..12)];
assign(Labels ~ (S) =~ SL); #Create remember table.
AllP:= [seq(P, P= Iterator:-SetPartitions({op(S)},[[4,3]], compile= false))]:
lnp:= evalf(ln(`*`(S[])^(1/3))):
Var:= proc(P::list(set))
local r:= evalf(`+`(map(b-> abs(ln(`*`(b[]))-lnp), P)[]));
end proc:

ans:=sort(AllP, (x,y)-> Var(x) < Var(y))[1];
      
subsindets(ans, realcons, Labels);

 

EDIT: I'll answer my own question to a degree. I remembered I needed to install Joe Reils Iterator package into Maple 16.

https://www.maplesoft.com/applications/view.aspx?SID=141522

I need an equivalent command for AllP for it ro work in Maple 2017......

@acer

 Equal_products_16.mw

As far as I know this is the original file (archived in my Googledrive M16 folder) from 31/1/2014.

It would make me happy if you can fix it!

 

 

@tomleslie Your suggestion fixes the import problem with MS Visual Studio bat files. But according to Acer I didn't need to install it.

I get errors implimenting with the endemic compiler. its a pity Maple doesn't seem to have a feature like Mathematicas update when opening old files.

@acer 

I had archived an old copy of "EqualProducts16.mw. Without running it, it displayed the above (correct) output in M2017.So it used to work. (Joe's Code anyway, Carls doesn't seem to work anymore). But when I try to run it, it complains:


@Kitonum for your efforts with my problem.

I did have a look at your SetPartition  and  Partition procedures before posting. 

Happy New Year!

@Kitonum Genius.

@Axel Vogt Zipping the file and its associated images does the trick. Happy Festive Season!

@acer thankyou, that works!

May I bother you with a supplementary Q?

What I want is code (seq or loop) which automatically assigns

  Tab[A1] := Record(numwins=0,numlost=0,wins=table([]),losses=table([])):
  Tab[B1]:=Record(numwins=0,numlost=0,wins=table([]),losses=table([])):
   Tab[A2]:=Record(numwins=0,numlost=0,wins=table([]),losses=table([])):
   Tab[B2]:=Record(numwins=0,numlost=0,wins=table([]),losses=table([])):
where A1..B2 are hyperlinked as above.

I know my questions are considered by some to be trivial or even foolish, but I do appreciate your help and patience.

Happy Holidays!

@acer I repeated the process, this time adding the image files to my email. same problem.

I exported another sheet,  just normal worksheet with &+- input (sans table), and sent it to myself. Got the same problem....

garbled output.

@tomleslie thankyou Sir. Yes, I forgot to change V back to q[n]....

but how might the constraints be printed one line -one constraint as in the pdf:

 y1=1

x12+y2=1

x13+x23+y3=1

x14+x24+x34+y4=1

This doesn't solve the problem, but it might assist error tracking.

I changed instances of x[cat(i,",",j)] to index(x,i,j) and z[cat(k,",",i)] to  index(z,k,i).

"In the above formulation qk = 1 if bin k is chosen. This means that a bin is started with item k in the left bottom position. yi = 1 if item i initializes level i. xij = 1 if item j goes to the level initialized by item i. zki = 1 if item i initializes a level in bin k. "

 I suppose the statement in the paper would be difficult to program.

From pp4:" z13 = z27 = z2,10 = 1 means that item 3 initializes level 2 in bin 1 while items 7 and 10 initialize two levels in the second bin which is initialized by item 3. "

About as clear as mud.

 

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