Christopher2222

5565 Reputation

24 Badges

14 years, 144 days

MaplePrimes Activity


These are Posts that have been published by Christopher2222

There is something wrong with the search in mapleprimes. 

I noted one users comment last week about using the search to find something being very difficult to find.  The results don't often match the search.  Only just this morning I was looking for something and the results were less than satisfying often pointing to a list of more results which didn't seem to help. 

This has been a problem for a long time, is this going to be looked at or fixed soon?

The search query in the new Maple Application center is broken.  There is no advanced search options and a search for mapleflow or maple flow brings up 0 results.  There should at least be one found, for example the search should have at least brought up The Liquid Volume in a Partially-Filled Horizontal Tank".

Maple, please fix.

 

Here's a procedure using GraphTheory by morphing one four letter word into another by changing only one letter at a time.  This is my initial working version.  I've commented out the DrawGraph portion as it takes a long time (5 minutes or so) to produce.  Using the Neighbors command from the GraphTheory package the graph can be shrunk to only include the relevant paths and will take a shorter time to draw.  It's an initial version so there is room for improvements.
 

a := readdata("c:/sowpods.txt", string)NULL

with(StringTools)NULL

b := [seq(`if`(length(a[i]) = 4, a[i], NULL), i = 1 .. nops(a))]

NULL

The word morph procedure for 4 letter words.

NULL

morph := proc (w1::string, w2::string) local c, i, q, d, r, j, k, g, gg, sp; c := {seq(`if`(HammingDistance(w1, b[i]) = 1, b[i], NULL), i = 1 .. nops(b))}; q := {seq(`if`(HammingDistance(w2, b[i]) = 1, b[i], NULL), i = 1 .. nops(b))}; for i to nops(c) do c || i := {seq(`if`(HammingDistance(c[i], b[j]) = 1, b[j], NULL), j = 1 .. nops(b))} end do; for i to nops(q) do q || i := {seq(`if`(HammingDistance(q[i], b[j]) = 1, b[j], NULL), j = 1 .. nops(b))} end do; d := map(proc (x) options operator, arrow; {x, w1} end proc, c); r := map(proc (x) options operator, arrow; {x, w2} end proc, q); for i to nops(c) do d || i := map(proc (x) options operator, arrow; {c[i], x} end proc, c || i) end do; for i to nops(q) do r || i := map(proc (x) options operator, arrow; {q[i], x} end proc, q || i) end do; for k to nops(c) do for j to nops(c || k) do c || k || _ || j := {seq(`if`(HammingDistance(c || k[j], b[i]) = 1, b[i], NULL), i = 1 .. nops(b))} end do end do; for k to nops(q) do for j to nops(q || k) do q || k || _ || j := {seq(`if`(HammingDistance(q || k[j], b[i]) = 1, b[i], NULL), i = 1 .. nops(b))} end do end do; for i to nops(c) do for j to nops(c || i) do d || i || _ || j := map(proc (x) options operator, arrow; {c || i[j], x} end proc, c || i || _ || j) end do end do; for i to nops(q) do for j to nops(q || i) do r || i || _ || j := map(proc (x) options operator, arrow; {q || i[j], x} end proc, q || i || _ || j) end do end do; g := {d[], r[], seq(d || i[], i = 1 .. nops(c)), seq(r || k[], k = 1 .. nops(q)), seq(seq(d || j || _ || i[], i = 1 .. nops(c || j)), j = 1 .. nops(c)), seq(seq(r || j || _ || i[], i = 1 .. nops(q || j)), j = 1 .. nops(q))}; gg := GraphTheory:-Graph(g); sp := GraphTheory:-ShortestPath(gg, w1, w2); print(sp) end proc
Today, June 6 is international yoyo day.  So I start off with, of course, the word yoyo.

NULL

morph("yoyo", "four")

["yoyo", "boyo", "boys", "foys", "fous", "four"]

(1)

morph("door", "yoyo")

["door", "boor", "boos", "boys", "boyo", "yoyo"]

(2)

morph("four", "yoyo")

["four", "fous", "foys", "boys", "boyo", "yoyo"]

(3)

morph("zane", "quit")

["zane", "cane", "cant", "cunt", "cuit", "quit"]

(4)

morph("lair", "jump")

["lair", "gair", "gaur", "gaup", "gamp", "gump", "jump"]

(5)

morph("jump", "lair")

["jump", "gump", "gamp", "gaup", "gaur", "gair", "lair"]

(6)

morph("quit", "jump")

["quit", "luit", "lunt", "luna", "luma", "lump", "jump"]

(7)

morph("xray", "jump")

Error, (in GraphTheory:-ShortestPath) no path from xray to jump exists

 

NULL

With no path another level of iteration word groups will be needed.  Otherwise you can use an intermediate word as below

NULL

morph("xray", "door")

["xray", "dray", "drab", "doab", "doob", "door"]

(8)

morph("door", "jump")

["door", "poor", "poop", "pomp", "pump", "jump"]

(9)

morph("lair", "door")

["lair", "loir", "loor", "door"]

(10)

NULL

NULL


 

Download Word_Morph_3.mw

Word_Morph.maple

Mapleprimes appears unfinished and is in need of some maintenance.

If you click on the products option page there are several products missing from the sort (MapleSim, MapleFlow, MapleLearn).  Also clicking on questions gives you only a maplesim and maple option.

Those are some of the things I would like mapleprimes to please update.

Auto paste last entry

So maple uses % as the last expression entry.  My suggestion is to use Crtl+Space on the % command to re-display the last expression.  Yes one could easily use the mouse to select the last entry then Crtl+c and Crtl+v. 

Or maybe the command Crtl+Shift+L to auto paste last entry. 

**edit** actually I would prefer the Crtl+Shift+L option to auto paste the last entry.

** Appears to be a suggestion I made earlier https://www.mapleprimes.com/questions/148867-Is-There-A-Way-To-Recallrepeat-Previous

1 2 3 4 5 6 7 Last Page 1 of 37