MaplePrimes Announcement

 

The moment we've all been waiting for has arrived: Maple 2023 is here!

With this release we continue to pursue our mission to provide powerful technology to explore, derive, capture, solve and disseminate mathematical problems and their applications, and to make math easier to learn, understand, and use. Bearing this in mind, our team of mathematicians and developers have dedicated the last year to adding new features and enhancements that not only improve the math engine but make that math engine more easily accessible within a user-friendly interface.

And if you ever wonder where our team gets inspiration, you don't need to look further than Maple Primes. Many of the improvements that went into Maple 2023 came as a direct result of feedback from users. I’ll highlight a few of those user-requested features below, and you can learn more about these, and many, many other improvements, in What’s New in Maple 2023.

  • The Plot Builder in Maple 2023 now allows you to build interactive plot explorations where parameters are controlled by sliders or dials, and customize them as easily as you can other plots

Plot Builder Explore

 

  • In Maple 2023, 2-D contour and density plots now feature a color bar to show the values of the gradations.


  • For those who write a lot of code:  You can now open your .mpl Maple code files directly in Maple’s code editor, where you can  view and edit the file from inside Maple using the editor’s syntax highlighting, command completion, and automatic indenting.

Programming Improvements

  • Integration has been improved in many ways. Here’s one of them:  The definite integration method that works via MeijerG convolutions now does a better job of checking conditions on parameters so that they are only applied under proper assumptions. It also tells you the conditions under which the method could have produced an answer, so if your problem does meet those conditions, you can add the appropriate assumptions to get your result.
  • Many people have asked that we make it easier for them to create more complex interactive Math Apps and applications that require programming, such as interactive clickable plots, quizzes that provide feedback, examples that provide solution steps. And I’m pleased to announce that we’ve done that in Maple 2023 with the introduction of the Quiz Builder and the Canvas Scripting Gallery.
    • The new Quiz Builder comes loaded with sample quizzes and makes it easy to create your own custom quiz questions. Launch the quiz builder next time you want to author interactive quizzes with randomized questions, different response types, hints, feedback, and show the solution. It’s probably one of my favorite features in Maple 2023.

  • The Scripting Gallery in Maple 2023 provides 44 templates and modifiable examples that make it easier to create more complex Math Apps and interactive applications that require programming. The Maple code used to build each application in the scripting gallery can be easily viewed, copied and modified, so you can customize specific applications or use the code as a starting point for your own work

  • Finally, here’s one that is bound to make a lot of people happy: You can finally have more than one help page open at the same time!

For more information about all the new features and enhancements in Maple 2023, check out the What’s New in Maple 2023.

P.S. In case you weren’t aware - in addition to Maple, the Maplesoft Mathematics Suite includes a variety of other complementary software products, including online and mobile solutions, that help you teach and learn math and math-related courses.  Even avid Maple users may find something of interest!

Featured Post

The areas of statistics and probability are my favorite in mathematics. This is because I like to be able to draw conclusions from data and predict the future with past trends. Probability is also fascinating to me since it allows us to make more educated decisions about real-life events. Since we are supposed to get a big snow storm in Waterloo, I thought I would write a blog post discussing conditional probability using the Probability Tree Generator, created by Miles Simmons.

If the probability of snowfall on any given day during a Waterloo winter is 0.75, the probability that the schools are closed given that it has snowed is 0.6, and the probability that the schools are closed given that it has hasn’t snowed is 0.1, then we get the following probability tree, created by Miles’s learn document:

From this information we can come to some interesting conclusions:

What is the probability that the schools are closed on a given day?

From the Law of total probability, we get:

Thus, during a very snowy Waterloo winter, we could expect a 0.475 chance of schools being closed on any given day. 

One of the features of this document is that the node probabilities are calculated. You can see this by comparing the second last step to the number at the end of probability trees' nodes.

What is the probability that it has snowed given that the schools are closed?

From Bayes’ Theorem, we get:

Thus, during a very snowy Waterloo winter, we expect there to be a probability of 0.947 that it has snowed if the schools are closed. 

We can also add more events to the tree. For example, if the students are happy or sad given that the schools are open:

Even though we would all love schools to be closed 47.5% of the winter days in Waterloo, these numbers were just for fun. So, the next time you are hoping for a snow day, make sure to wear your pajamas inside out and sleep with a spoon under your pillow that night!

To explore more probability tree fun, be sure to check out Miles’s Probability Tree Generator, where you can create your own probability trees with automatically calculated node probabilities and export your tree to a blank Maple Learn document. Finally, if you are interested in seeing more of our probability collection, you can find it here!

Featured Post

4081

Recently Mapleprimes user @vs140580  asked here about finding the shortest returning walk in a graph (explained more below). I provided an answer using the labelled adjacency matrix. @Carl Love pointed out that the storage requirements are significant. They can be reduced by storing only the vertices in the walks and not the walks themselves. This can be done surprisingly easily by redefining how matrix multiplication is done using Maple's LinearAlgebra:-Generic package.

restart

with(GraphTheory)

Consider the following graph. We want to find, for a given vertex v, the shortest walk that visits all vertices and returns to v. A walk traverses the graph along the edges, and repeating an edge is allowed (as distinct from a path, in which an edge can be used only once).

G := AddVertex(PathGraph(5), [6, 7]); AddEdge(G, {{3, 7}, {4, 6}, {6, 7}}); DrawGraph(G, layout = circle, size = [250, 250])

GRAPHLN(undirected, unweighted, [1, 2, 3, 4, 5, 6, 7], Array(1..7, {(1) = {2}, (2) = {1, 3}, (3) = {2, 4}, (4) = {3, 5}, (5) = {4}, (6) = {}, (7) = {}}), `GRAPHLN/table/2`, 0)

n := NumberOfVertices(G)

7

A := AdjacencyMatrix(G)

As is well known, the (i, j) entry of A^k gives the number of walks of length k between vertices i and j. The labelled adjacency matrix shows the actual walks.

Alab := `~`[`*`](A, Matrix(n, n, symbol = omega))

Matrix(%id = 36893490483304803132)

For example, the (3,3) entry of Alab^2 has 3 terms, one for each walk of length 2 that starts and ends at vertex 3.. The `ω__i,j` factors in a term give the edges visited.

So the algorithm to find the shortest walk is to raise Alab to successively higher powers until one of the terms in the diagonal entry for the vertex of interest has indices for all the vertices.

Alab^2

Matrix(%id = 36893490483361984628)

The expressions for higher powers get very large quickly, so an algorithm that only retains the sets of vertices in each term as a set of sets will use less storage space. So we can consider the following modified labelled adjacency matrix.

B := Matrix(n, n, proc (i, j) options operator, arrow; if A[i, j] = 1 then {{i, j}} else {} end if end proc)

Matrix(%id = 36893490483356597532)

Now we need to modify how we do matrix multiplication, but Maple has the LinearAlgebra:-Generic package to do this. We can redefine addition and multiplication to operate correctly on the sets of sets.

Consider two set of sets of vertices for walks.

a := {{7}, {1, 2}, {2, 6, 7}}; b := {{1, 2}, {1, 3, 5}, {3, 7, 8}}

{{7}, {1, 2}, {2, 6, 7}}

{{1, 2}, {1, 3, 5}, {3, 7, 8}}

Addition is just combining the possibilities. And addition of "zero" should add no possibilities, so we take {} as zero.

`union`(a, b); `union`(a, {})

{{7}, {1, 2}, {1, 3, 5}, {2, 6, 7}, {3, 7, 8}}

{{7}, {1, 2}, {2, 6, 7}}

Multiplication is just combining all pairs by union. Notice here that {7} union {1,2} and {1,2} union {7} give the same result, but that we do not get duplicates in the set.

{seq(seq(`union`(i, j), `in`(i, a)), `in`(j, b))}

{{1, 2}, {1, 2, 7}, {3, 7, 8}, {1, 2, 3, 5}, {1, 2, 6, 7}, {1, 3, 5, 7}, {1, 2, 3, 7, 8}, {2, 3, 6, 7, 8}, {1, 2, 3, 5, 6, 7}}

The unit for multiplication should leave the set of sets unchanged, so {{}} can be used

{seq(seq(`union`(i, j), `in`(i, a)), `in`(j, {{}}))}

{{7}, {1, 2}, {2, 6, 7}}

Define these operations for the LinearAlgebraGeneric package:

F[`=`] := `=`; F[`/`] := `/`; F[`0`] := {}; F[`1`] := {{}}; F[`+`] := `union`; F[`*`] := proc (x, y) options operator, arrow; {seq(seq(`union`(i, j), `in`(i, x)), `in`(j, y))} end proc

Warning, (in F[*]) `j` is implicitly declared local

Warning, (in F[*]) `i` is implicitly declared local

`union`

proc (x, y) local j, i; options operator, arrow; {seq(seq(`union`(i, j), `in`(i, x)), `in`(j, y))} end proc

Compare B^2 with Alab^2. We have lost information about the details of the walks except for the vertices visited.

LinearAlgebra:-Generic:-MatrixMatrixMultiply[F](B, B)

Matrix(%id = 36893490483304861316)

So here is a procedure for finding the length of the shortest returning walk.

WalkLength:=proc(G::Graph,v)
  uses GraphTheory;
  local x,y,i,j,vv,A,B,F,n,vertset;
  if IsDirected(G) then error "graph must be undirected" end if;
  if not member(v,Vertices(G),'vv') then error "vertex not in graph" end if;
  if not IsConnected(G) then return infinity end if;
  F[`=`]:=`=`:F[`/`]:=`/`: # not required but have to be specified
  F[`0`]:={}:
  F[`1`]:={{}}:
  F[`+`]:=`union`;
  F[`*`]:=(x,y)->{seq(seq(i union j, i in x), j in y)};
  n:=NumberOfVertices(G);
  vertset:={$(1..n)};
  A:=Matrix(n,n, (i, j)-> if AdjacencyMatrix(G)[i, j] = 1 then {{i, j}} else {} end if);
  B:=copy(A);
  for i from 2 do
    B:=LinearAlgebra:-Generic:-MatrixMatrixMultiply[F](B,A);
  until vertset in B[vv,vv];
  i;
end proc:

WalkLength(G, 1)

10

NULL

Download WalksGenericSetOfSets.mw



Shortest self returning walk

Maple asked by vs140580 465 March 19

Is this fun?

Maple asked by Christian... 1295 March 18

Maple on-line help

Maple 2023 asked by QM 125 Yesterday