Message Boards Message Boards

0
|
5281 Views
|
3 Replies
|
2 Total Likes
View groups...
Share
Share this post:
GROUPS:

How does one represent a hypothetical operation in Wolfram Alpha?

Posted 4 years ago

My son - who is a freshman in high school - was given this list of Problems to Ponder by his math teacher: https://pubs.nctm.org/view/journals/mtlt/113/3/article-p253.xml?tab_body=fullHtml

One of the problems - #10 - is rudimentary- involving a hypothetical operation - but it has a typo - which makes it extremely hard if not impossible. I would like to see what answer Wolfram Alpha comes up with for the typo version. Is it solvable? But I don't know how to ask this question in Wolfram Alpha. How does one represent a hypothetical operation in Wolfram Alpha?
I will be very interested to know how to do this - and what answer it will come up with! Here is the problem - with the typo: (the last equation should be 1 @ 10 = 12)

Imagine there is a new operation @
5 @ 6 = 16
6 @ 4 = 16
10 @ 1 = 21
1 @ 10 = 21

Find the value of each question mark:
(a)  6 @ 10 = ?
(b)  7 @ ? = 14
(c)  ? @ 3 = 23

(I replaced the original symbol with @ - which - according to this wikipedia page of mathematical symbols is not used at all in mathematics - surprisingly to me https://en.wikipedia.org/wiki/Listofmathematical_symbols )

POSTED BY: Dave Weaver
3 Replies

Ok, this actually works. You first have to load the Notation paclet and then, using Marco's circle plus idea, you can create the operational notation. Skipping the typo, even the Solve function works perfectly. Please see my homework - hope it is not late.

POSTED BY: Nathan Shpritz

Thank you Marco!! So glad to see your response and to continue this discussion.

Isn't it interesting that to a human it's easy to conceive of a hypothetical new operation and solve for it - but in these systems there's not a simple way to express that. I suppose it could be coded if there were a need for it.

I will experiment with your method to see what happens with the typo version...

POSTED BY: Dave Weaver

Dear Dave,

this is probably not the solution you are looking for, and it is neither the shortest nor the most elegant one. It is also a Mathematica solution and not a WolframAlpha one.

In Mathematica there are symbols with no built-in meaning. One of these is CirclePlus. You can type it in as Esc + c+ + Esc. Your equations then look like this:

ClearAll["Global`*"]; Clear[CirclePlus]
eqns = {5 \[CirclePlus]6 == 16, 6 \[CirclePlus] 4 == 16, 10 \[CirclePlus]1 == 21, 1\[CirclePlus]10 == 12} 

The typesetting in the notebook is nicer:

TableForm[eqns]

enter image description here

To solve it we can look at all the numbers in the equations:

data = Transpose[{eqns[[All, 1, 1]], eqns[[All, 1, 2]], eqns[[All, 2]]}]
    (*{{5, 6, 16}, {6, 4, 16}, {10, 1, 21}, {1, 10, 12}}*)

Then you can fit a linear model:

Chop[Normal[LinearModelFit[data, {x, y}, {x, y}]]]
   (*2. x + 1. y*)

This suggest that your solution is the function:

CirclePlus[x_, y_] := 2 x + y

With that if you evaluate eqns again you get:

{True, True, True, True}

The symbol @ that you use is in fact used in Mathematica all the time for something else.

Best wishes, Marco

POSTED BY: Marco Thiel
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract