DJJerome1976

540 Reputation

12 Badges

17 years, 281 days

MaplePrimes Activity


These are questions asked by DJJerome1976

Is Prüfer's algorithm available in Maple (given a tree, produce the code, and vice versa)? If not, has anyone written the code for it?

I am trying to apply assumptions to the solution set of an equation. I've tried assume and assuming (see attached) to no avail. What am I missing? How can I achieve this?assume.mw
 

`assuming`([solve(x^2-x-2 = 0, x)], [x > 0])

2, -1

(1)

assume(x > 0)

solve(x^2-x-2 = 0, x)

2, -1

(2)

``


 

Download assume.mw

 

I am generating splines using CurveFitting[Spline] command, which produces piecewise functions. I would like to extract the different "pieces" of the spline for use elsewhere. How do I do that? In the attached worksheet, for example, I would like to extract (59*x^2)/756, -1/84*x^2 + 17/63*x - 17/84, and -19/504*x^2 + 19/36*x - 61/72. There has to be a way to do this, but I'm coming up short.

spline.mw
 

with(CurveFitting)

f := Spline([[0, 0], [3, 1/2], [7, 1]], x, degree = 2)

piecewise(x < 3/2, (59/756)*x^2, x < 5, -(1/84)*x^2+(17/63)*x-17/84, -(19/504)*x^2+(19/36)*x-61/72)

(1)

``


 

Download spline.mw

 

I am trying to generate all non-isomorphic graphs of a certain order and size that have the same degree sequence (not necessarily regular). I assume I would have to use the select option in GraphTheory[NonIsomorphicGraphs] command, however, there are no examples (that I could find) of how to use the option. Any idea how this could be done?

I have an n x n matrix. I am trying to write a procedure that will randomly choose a row (column) in the matrix, and replace another row (column) with the entries of the chosen row (column). So, the end result will be another n x n matrix that has two identical rows (columns). How could one do this?

2 3 4 5 6 7 8 Last Page 4 of 16