You have three cakes, with diameters 15cm, 20cm and 25cm (same width). You want to share the cakes equally among your four customers. How do you do it? What if you want the cakes sliced into the minimum total number of pieces?To get equal "triangular" pieces, 1st cut divides cake in two. 2nd cut at right angles to 1st. 3rd and 4th cut at 180/4=45 deg to centre line...1 cut, 2 cuts, 4 cuts .....producing 2^1, 2^2, 2^3 pieces.restart:with(combinat):
P := [S/2,M/2,L/2]:A := choose(P);S := evalf(subs(D = 15, Pi*((1/2)*D)^2))M := evalf(subs(D = 20, Pi*((1/2)*D)^2))L := evalf(subs(D = 25, Pi*((1/2)*D)^2))Obj := round((S+M+L)*(1/4))P := [S/2,M/2,L/2,S/4,M/4,L/4]:A := combinat:-choose(P):B:=select(a->is(round(convert(a,`+`))=Obj), A);S/2,M/2,L/2inferring from that.....persons 1 and 2 has half S + half M each = 245 sq cm eachperson 3 and 4 has half L each = 245 sq cm eachDon't know how they get 5 pieces.S/4,M/4,L/4LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYjLUkjbWlHRiQ2I1EhRic=JSFH