Math Question - One of Those Silly Ones From Article - Page 1
Forum section: electronics / beginners

author: bostonman
author_rank: Super Contributor
timestamp: August 22, 2023, 02:39:11 am
content: Recently I saw another one of those silly math questions in a news article that emphasize the use of BODMAS in order to solve. Maybe some of you have seen the article, the title will state that adults can't solve this simple math problem.Having done multiple levels of math for my degree, I've wondered if those "trick" math problems are really ever used.One example would be something on the idea of 5+(2+3)/2-6.While this isn't an exact example from a recent news article, is "BODMAS" an actual method in the engineering world or just math playing?

author: ataradov
author_rank: Super Contributor
timestamp: August 22, 2023, 02:45:37 am
content: I don't get the need for acronyms. In Russia we were just told that multiplication and division have higher priority over addition and subtraction and parenthesis are the highest priority. This was enough for everyone to figure it out. It is not like it is so hard you need special mnemonics for that.Priority of powers was a bit more confusing, but that happens way later in the process and by that time it is not that hard to memorize.And articles are just stupid clickbait, completely unrelated to anything.

author: xrunner
author_rank: Super Contributor
timestamp: August 22, 2023, 02:45:59 am
content: I don't see how that is a "trick" problem. However, I suppose it might seem that way to some people who don't do math every day.

author: ataradov
author_rank: Super Contributor
timestamp: August 22, 2023, 02:49:43 am
content: A lot of those "trick" problems include confusing and inconsistent use of * and nothing for multiplication. It would something stupid like "1+3(5-6)*7" or some other combination.And the popular one is division without proper parenthesis, like "1*3/5*7". Where it can be interpreted as 1*(3/5)*7 and 1*3/(5*7).I would put things like this into the same category as EE problems with intentionally confusing resistor networks where the first thing you have to do is redraw the circuit as a sane person would.

author: EPAIII
author_rank: Super Contributor
timestamp: August 22, 2023, 03:21:38 am
content: I think what you need to remember here is that the authors/posters of videos on sites like YouTube are trying to attract viewers because they get PAID for that. So if they can generate a discussion and people view the video and post comments, those authors get PAID. It is all about the $s $s $s $s $s. Or whatever currency they use in their country.In college my minor was in math. I learned that real mathematicians go to great trouble to formulate their problems and mathematical expressions in a non ambiguous way. They are trying to convey one and only one meaning. That is why you see thing like brackets in their expressions.On the other hand, these tricksters are trying to formulate their TRICK problems in a manner so that there are two or more ways of evaluating the expression. And they do not tell the reader/viewer which way was intended. This is deliberate and it's purpose is to cause confusion and debate. They are NOT real mathematicians. And frankly, I think they should be ignored. Completely ignored.Quote from: ataradov on August 22, 2023, 02:45:37 am

author: CatalinaWOW
author_rank: Super Contributor
timestamp: August 22, 2023, 04:37:27 am
content: These problems are made up to create confusion and draw clicks and comments. And anyone who creates one in the real world is an idiot.We have pages of comments on how to make schematics more readable. We have entire languages (Latex) created to make math equations on paper in a legible format. Why in this context if you are really trying to communicate an arithmetic problem (or annotate your own work) would you not make every effort to make it clear and obvious? This is particularly important in an international forum like this because BODMAS does not rule in every location on the earth. Whitespace and parenthesis are cheap. Use them freely to make the intent clear to everyone, including your future self.This is not to say that BODMAS doesn't apply in engineering. If there is no other information available, and if the material you are trying to decipher was generated in an area where BODMAS is taught you should definitely assume that it applies. And in general when documenting your work (in regions where BODMAS is the standard) you should use BODMAS principals. But if there is any chance of confusion, clarify your intent as required with parenthesis and the other tools at hand. Such as breaking the calculation into parts and then combining the intermediate results.

author: IanB
author_rank: Super Contributor
timestamp: August 22, 2023, 04:57:59 am
content: Quote from: EPAIII on August 22, 2023, 03:21:38 amI was recently told the same thing by a mathematician. Mathematicians aim to be rigorous and unambiguous. However, engineers tend to be practical and assume others will know what they mean if they use shortcuts or abbreviations.For instance, engineers may write 1/xy and assume the reader will interpret it as \$\frac{1}{xy}\$ and not as \$\frac{1}{x}y\$On the other hand, a mathematician would always write 1/(xy) and leave no room for any doubt.

author: donlisms
author_rank: Frequent Contributor
timestamp: August 22, 2023, 07:17:40 am
content: In the stone ages, I learned the order of operation by... learning the order of operation. I learned the alphabet by learning the alphabet, though I was young enough that a little sing-song helped. I learned my multiplication tables by learning them, though I confess there are some (mathematically founded) tricks to help with 9, and 5 and 2, and so on. Guitar chords. My phone number. I learned to tie my shoes without a story about a rabbit.I think the best way is to just believe that if you make an effort, you can do hard things. I think that's being taken away from us.This reminds me of the recent thread in tricks to learn resistor color codes. It saddens me; my view of what people are capable of is higher than that, I guess. We're being dumbed down.

author: Haenk
author_rank: Super Contributor
timestamp: August 22, 2023, 08:47:50 am
content: It's just built on misleading notation.So while being funny, it's a pointless discussion, as there is no correct answer at all.That's also an issue with linguistic expressions. Like this example (in German):"Komm, wir essen, Opa!""Komm, wir essen Opa!"(roughly translates to "Come, dinner is ready, grandpa!" and "Come, let's eat Grandpa!")The comma should be a verbal "pause", but that pause is usually ignored.

author: wasedadoc
author_rank: Super Contributor
timestamp: August 22, 2023, 02:13:28 pm
content: Animal in nature documentary: Eats shoots and leaves.Cowboy in western movie: Eats, shoots and leaves.He was attacked by a man eating fish.He was attacked by a man-eating fish.

author: TimFox
author_rank: Super Contributor
timestamp: August 22, 2023, 03:55:19 pm
content: Quote from: IanB on August 22, 2023, 04:57:59 amMy education was in physics, with lots of mathematics on the side.I learned the conventional order of operations, but I saw no reason not to be careful and use parentheses to avoid possible confusion.I only needed to know the conventional order in order to read equations done by those less careful than I.Incidentally, "Polish notation" (well-known in reverse as RPN, found in good calculators) was invented by Łukasiewicz (whose name is hard to pronounce in reverse order, hence the abbreviation RPN) to avoid ambiguity without recourse to parentheses.I encountered Łukasiewicz' notation in the forward direction in a class on formal logic; compared with "infix" notation for logical formulae, it also avoids special characters, using only majuscules and miniscules found on a normal typewriter.https://plato.stanford.edu/entries/lukasiewicz/polish-notation.htmlThere is an example for a formula in propositional calculus half-way through that citation (which does not copy) that requires 43 characters, including 20 parentheses, in "normal" spelling, but only 23 characters in Łukasiewicz' notation, all of which are "active".

author: Nominal Animal
author_rank: Super Contributor
timestamp: August 22, 2023, 04:45:17 pm
content: I like to avoid ambiquities, and tend to use parentheses whenever useful, even when not required.It is somewhat like including units or dimensions when calculating something. Most people like to omit the units during calculation, but I find them useful, especially when I end up combining constants or substituting variables with their values; often acts like a "checksum" showing me if I forgot or miscalculated something. Plus, of course,dimensional analysisis always useful when examining a formula for sanity.Those "math" questions based on ambiquity of the expression, really annoy me. I find themdishonest: it is not amathproblem that humans do not agree on some corner case rule or another; it is ahumanproblem.

author: IanB
author_rank: Super Contributor
timestamp: August 22, 2023, 04:53:20 pm
content: Quote from: TimFox on August 22, 2023, 03:55:19 pmIn that example, we have this in infix notation:$$\big((p \Rightarrow r) \land (q \Rightarrow r)\big) \land \big((p \Rightarrow s) \land (q \Rightarrow s)\big) \Leftrightarrow \big((p \lor q) \Rightarrow (r \land s)\big)$$And this in prefix notation:$$EKKCprCqrKCpsCqsCApqKrs$$However, I would argue that the prefix notation is only readable by a computer. For a human to read it, it still needs parentheses:$$E \Big(K(K\:Cpr\:Cqr)(K\:Cps\:Cqs)\Big) \Big(C\:Apq\:Krs\Big)$$

author: Terry Bites
author_rank: Super Contributor
timestamp: August 22, 2023, 05:03:49 pm
content: Maths jokes never funny. Dont give them a second thought, fill your mind with finer things.

author: TimFox
author_rank: Super Contributor
timestamp: August 22, 2023, 05:08:57 pm
content: Quote from: IanB on August 22, 2023, 04:53:20 pmTo read the prefix notation, you need to read from the inside out.Since most natural language is not done that way (e.g., English prose), this notation is not popular, but I learned to read it in that college course.An advantage, discussed in the article, is that one can determine quickly if the equation is logically correct by counting symbols.I have used RPN calculators since the 1970s, after I learned that when approaching a problem in front of me that RPN was closer to my thought process than was algebraic.Algebraic is more popular when looking at an equation written out beforehand.

author: gnuarm
author_rank: Super Contributor
timestamp: August 22, 2023, 06:53:29 pm
content: Quote from: IanB on August 22, 2023, 04:53:20 pmI know prefix notation exists, but I've never seen it used. Postfix is very simple and clear.It looks to me like your prefix notation is just postfix written in reverse. So, it should be very simple for anyone to use prefix if they simply read it as postfix, starting from the right hand side.

author: TimFox
author_rank: Super Contributor
timestamp: August 22, 2023, 06:55:14 pm
content: Here, “prefix” is equivalent to “Polish” notation, and “postfix” is equivalent to the better-known reverse Polish notation (RPN).

author: Infraviolet
author_rank: Super Contributor
timestamp: August 22, 2023, 09:07:18 pm
content: "I've wondered if those "trick" math problems are really ever used"Usually only by accident, the person writing down an equation was in a rush and didn't think of the order of operations, and then the person reading it interprets it according to the proper rules.Also sometimes accidents in computer code if one doesn't bracket properly, some compilers use a different O of O to that which is used in written mathematics.The BODMAS (also BIDMAS with I being for Indices) acronym was used quite a lot in teaching in the UK at multiple levels as a reminder to help when people forgot the order.I also recall when young I had to remind a teacher of a non-mathematical subject at school about this. He was presenting a formula used in something like geography or sports scoring, "that needs brackets" I said, "you need brackets" came his response. I think he normally only thought of the formula as words describing how to do the calculation "subtract this then divide by that" and never realised how ambigous, or infact plain wrong, it could be when written mathematically left to right.

author: TimFox
author_rank: Super Contributor
timestamp: August 22, 2023, 09:18:55 pm
content: Besides "BODMAS", I also learned to nest bracket-like objects as { [ ( ) ] } as a convention for parenthetical statements.

author: ledtester
author_rank: Super Contributor
timestamp: August 22, 2023, 10:09:42 pm
content: Quote from: IanB on August 22, 2023, 04:53:20 pmThat prefix notation is used in the logic game WFF N'Proof:https://americanhistory.si.edu/collections/search/object/nmah_694594

author: TimFox
author_rank: Super Contributor
timestamp: August 22, 2023, 10:11:30 pm
content: And "WFF 'N Proof" was not a computer game."WFF" is an abbreviation for "well-formed formula" in predicate calculus.

author: Benta
author_rank: Super Contributor
timestamp: August 22, 2023, 11:06:39 pm
content: Those newspaper "puzzles" using incomplete notation to create MDAS obfuscation bore me. But they always get a rise from the public.This one's subtler, showing that 2=1 (I'm certain some of you know it already. Refrain from replying and let's see what happens):

author: TimFox
author_rank: Super Contributor
timestamp: August 22, 2023, 11:07:54 pm
content: I first encountered that proof in 1964, so I recuse myself from replying.

author: Benta
author_rank: Super Contributor
timestamp: August 22, 2023, 11:14:16 pm
content: Yeah, never said it's new.

author: TimFox
author_rank: Super Contributor
timestamp: August 22, 2023, 11:22:22 pm
content: It will still be new to some people younger than I.

author: bostonman
author_rank: Super Contributor
timestamp: August 23, 2023, 03:40:08 am
content: I guess it basically comes down to the question of:Would an engineer/mathematician/etc... or anyone with a decent understanding of math, write a problem like that?I would think it would come down to the actual problem trying to be solved. As an example, if I wanted to calculate the square footage of my house (and let's say for whatever reason I wanted only half the square footage of one room), I may write (all units in feet): (10x12) + (15x20) + ((20x20)/2)In this case, I guess BODMAS would apply, but the format clearly separates the steps rather than: 10x12+15x20+20x20/2

author: TimFox
author_rank: Super Contributor
timestamp: August 23, 2023, 01:44:31 pm
content: That calculation can be made a bit clearer by using brackets as well as parentheses:(10x12) + (15x20) + [(20x20)/2]

author: coppice
author_rank: Super Contributor
timestamp: August 23, 2023, 01:53:39 pm
content: Quote from: CatalinaWOW on August 22, 2023, 04:37:27 amBut BODMAS doesn't apply in engineering. Its based on the use of a divide symbol, which nobody sane would ever use. Its hopelessly confusing. We always use a horizontal line or a slash character to approximate one. That's why these "puzzles" based on BODMAS fool mathematically literate people. The order it sets out makes no sense, unless your experience of maths is confined to the very simplest of arithmetic expressions.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: August 23, 2023, 01:54:56 pm
content: Quote from: TimFox on August 23, 2023, 01:44:31 pmI do not see how those brackets and braces make anything clearer. As long as it's just addtition, substraction, multiplication and division the normal rules are perfectly simple and straightforward. but when I see those brackets and parentheses, these have precedence, and I start searching for the difference from what it would have been otherwise. They do not add meaning as long as they do not change the order. A bit of whitespace helps sometimes. When I'm programming in C or C++ then I tend to put spaces around plusses, but not around multiplications and divisions (if they are on the same line). These do not change anything significant for the compiler, but it adds some extra suggestions to people reading the code.In C / C++ precedence of operators is nicely defined, including pointer redirection, log and bitwise operations and more (I think there are about 12 levels of precedence in total). However, relying on those would make most normal humans go crazy. As a result, most programmers use the precedence rules for the simple things, and use parentheses for the more complicated rules. I also prefer to cut difficult formulas into pieces. First calculate some intermediate results and assign those to temporary variables, and then use the temporary variables to calculate the end result. Doing this makes code much easier to read. (For me that is, but I am of course also used to my own codestyle).========================================Time flies like an arrow.Fruit flies like a banana.

author: dietert1
author_rank: Super Contributor
timestamp: August 23, 2023, 01:59:07 pm
content: The result is 42.

author: TimFox
author_rank: Super Contributor
timestamp: August 23, 2023, 02:36:55 pm
content: Quote from: Doctorandus_P on August 23, 2023, 01:54:56 pmIn most programming languages (including Excel), there is no hierarchy of bracket symbols.That is a relatively new thing in mathematical history: the equation under discussion is not complicated, but the [ ] brackets (and { }, the next step up) are common in type-set mathematics to make the groupings clear.

author: tggzzz
author_rank: Super Contributor
timestamp: August 23, 2023, 03:59:30 pm
content: Quote from: coppice on August 23, 2023, 01:53:39 pmStandard school algebra and algebraic manipulations are based around commutativity, associativity, and distributivity properties. Those go hand-in-hand with BEDMAS.If you don't believe that engineering uses of such manipulations require the same properties, then you had better justify why not.After succeeding at that, you could proceed to claiming BEDMAS doesn't apply in engineering.That's not to say that different properties aren't used; in one pioneering computer language "7 - 7 - 7" is numerically identical to "7 - 7 - 7 -7 -7". In anotherabsolutely seminalcomputer language, "5 + 3 * 2" is 16, not 11 i.e. just like those office calculators you were forbidden to use in maths and science classes (and exams!)Of course not all maths has the same notation and rules, e.g. topology.But none of that changes where and why BEDMAS is (or ought to be) used.https://www.mathsisfun.com/associative-commutative-distributive.html

author: coppice
author_rank: Super Contributor
timestamp: August 23, 2023, 04:14:11 pm
content: Quote from: tggzzz on August 23, 2023, 03:59:30 pmThanks for cutting off the more relevant part of what I wrote. Real scumbag move, that. Try watching some of the many videos of school teachers applying those rules to some of the funky looking equations you'll find on Youtube as puzzles for adults. The confusing ones revolve around the use of ÷ rather than /. What engineer writes equations with ÷ in them? Engineers and mathematians use rules similar to BEDMAS, but the exact procedure they are teaching in schools as BEDMAS, using ÷, is just weird.

author: tggzzz
author_rank: Super Contributor
timestamp: August 23, 2023, 04:30:14 pm
content: Quote from: coppice on August 23, 2023, 04:14:11 pmMy apologies. if you had written that out as fully in the first place, I might have understood the point you were trying to make.I don't understand the difference between ÷ and /.I certainly will not watch 99.99999% of yootoob vids, because they will simply waste my remaining life. It won't be long before I can add an extra trailing "9" to that

author: Nominal Animal
author_rank: Super Contributor
timestamp: August 23, 2023, 06:34:10 pm
content: Most common ambiquity is the order of precedence for implicit multiplication operation, for example as in 18/3(1+5).If it is written as 18/3×(1+5), the most commonly accepted rules state it is equivalent to (18/3)×(1+5), as multiplication and division have the same precedence and are applied from left to right. Many people disagree about the precedence of the implicit multiplication operation, because they may associate it as part of the parentheses. Thisisambiguous, because there is no universally agreed upon interpretation of this notation.The ambiquity is more pronounced when the 3 is replaced by a variable, sayy, and moved immediately after the parentheses, as in 18/(1+5)y.I myself always treat implicit multiplication as explicit multiplication; or rather, essentially inserting all implicit operators first into the equation, before examining it. This does avoid any precedence issues, but it is not –– as far as I know –– universally accepted interpretation of the notation.I do not claim it is the correct one, either; it is just thesimplest one that makes sense, among many.This is why I feel questions that rely on this are dishonest. Their authors definitely know this is a notation interpretation issue, and nothing to do with math per se. For example, if we instead usedRPN or postfix notation, no such ambiquity would be possible. (Instead, each valid expression could implement more than one sequence of operations, yielding more than one scalar result, sootherambiquities would be possible then. Simply put, any notation we choose, we need to define and agree the rules for. If we miss details or disagree on some rule, that's our fault, and nothing to do with the actual math the notation is supposed to express.)

author: IanB
author_rank: Super Contributor
timestamp: August 23, 2023, 07:11:17 pm
content: I think all ways of writing down expressions in some linear manner are forms ofencodingused for brevity and convenience. Such encodings are a relatively modern innovation. In previous eras, mathematicians wrote everything down longhand in words and sentences. Brevity didn't happen until algebra was introduced. Algebra was like a Big Bang in the history of mathematics.Nevertheless, encodings present their own challenges for human readers.In a previous post, this expression was presented: EKKCprCqrKCpsCqsCApqKrsNow, obviously as a human I know how to interpret this when told what the rules are, but at the same time, I cannot readily tell which two sub-expressions the leading "E" applies to without breaking it down into its elements. I have to say it is opaque if I need to visualize what it means.On the other hand, if we graph it out, like this, then the structure becomes much clearer:

author: gnuarm
author_rank: Super Contributor
timestamp: August 23, 2023, 07:59:52 pm
content: Prefix: EKKCprCqrKCpsCqsCApqKrsPostfix: srKqpACsqCspCKrqCrpCKKETo perform the prefix calculation, I need a stack for the operators, with the actions triggered when there are sufficient operands. My mind bends when I try to keep track of that.To perform the postfix calculation, I only need a stack for the data. Actions are triggered by the presence of the operators. No need for a diagram. The above postfix notation can be easily created from the typical equations.Why would anyone want to use prefix notation?

author: tggzzz
author_rank: Super Contributor
timestamp: August 23, 2023, 09:08:05 pm
content: Quote from: IanB on August 23, 2023, 07:11:17 pmMore than that. It enables manipulation and transformation.

author: TimFox
author_rank: Super Contributor
timestamp: August 23, 2023, 09:31:27 pm
content: The two expressions shown in "postfix" and "prefix" notation look strange to those used to parenthetical notation, but are not impossible.Again, I encountered this in symbolic logic class as an undergraduate, and learned to use the "prefix" version for predicate calculus, along with the rules for evaluating "WFFs".That was over 50 years ago, so I am no longer an expert.

author: Nominal Animal
author_rank: Super Contributor
timestamp: August 23, 2023, 09:33:45 pm
content: Quote from: gnuarm on August 23, 2023, 07:59:52 pmWhy would anyone want to speak any other language but English?Quote from: tggzzz on August 23, 2023, 09:08:05 pmThat's why it is callednotationand not just encoding.

author: IanB
author_rank: Super Contributor
timestamp: August 23, 2023, 09:47:20 pm
content: I think there is a considerable overlap between the meanings of notation and encoding.Notation has a strong sense of human reading and manipulation, whereas encoding has a sense of machine reading and manipulation.The overlap occurs because machines can obviously read human notations, and humans can read machine encodings. However, each of these takes more than minimal effort to accomplish (compare handwriting recognition by machines on the one hand, and reading hex dumps of machine code by humans on the other).

author: tggzzz
author_rank: Super Contributor
timestamp: August 23, 2023, 09:48:55 pm
content: Quote from: Nominal Animal on August 23, 2023, 09:33:45 pmThe difference between a notation and an encoding is indeed significant and importantI thinkhttps://en.wikipedia.org/wiki/Mathematical_notationis beneficially less terse. The first sentence is, with myemphasis, "Mathematical notation consists of using symbols for representingoperations, unspecified numbers,relations, and any other mathematical objects and assembling them into expressions and formulas"

author: IanB
author_rank: Super Contributor
timestamp: August 23, 2023, 09:54:31 pm
content: Quote from: tggzzz on August 23, 2023, 09:48:55 pmSo does an APL program contain notation or encoding?

author: tggzzz
author_rank: Super Contributor
timestamp: August 23, 2023, 09:57:39 pm
content: Quote from: IanB on August 23, 2023, 09:47:20 pmEncodings have existed for millenia, and have nothing to do with machines.In general encodings do not enableoperationson the encoded information and do not allow the information to betransformedinto something different. Notations do enable such operations and transformations.

author: tggzzz
author_rank: Super Contributor
timestamp: August 23, 2023, 09:59:20 pm
content: Quote from: IanB on August 23, 2023, 09:54:31 pmYes, repeat no.Can a submarine swim?

author: gnuarm
author_rank: Super Contributor
timestamp: August 23, 2023, 10:11:51 pm
content: Quote from: Nominal Animal on August 23, 2023, 09:33:45 pmYour question does not answer my question.

author: gnuarm
author_rank: Super Contributor
timestamp: August 23, 2023, 10:13:19 pm
content: Quote from: TimFox on August 23, 2023, 09:31:27 pmI use postfix virtually every day. It is simple to understand and apply. Prefix, not so much.

author: TimFox
author_rank: Super Contributor
timestamp: August 23, 2023, 10:24:26 pm
content: In college, I was adept at prefix for symbolic logic.I still am adept in RPN, a form of postfix, for calculators.

author: Mechatrommer
author_rank: Super Contributor
timestamp: August 23, 2023, 11:25:48 pm
content: Quote from: bostonman on August 22, 2023, 02:39:11 am"BODMAS" is an actual method in mathematics and hence whatever field (subsets) using it including engineering.. its a protocol (or precedence) laid out by experience people to avoid confusion/ambiguity/different semantics outcome. unaware of BODMAS protocol, one can use left to right precedence and get different answer. this is where the fool try to exploit/trick/fool others in their stupid math puzzles, between who knows and who dont the BODMAS is. how do write in math...a) add 2 apples to 6 apples in a bin and then divide them between 2 personb) add 2 apples to each person after dividing 6 apples in a bin to 2 of themhow much apples each person get?its a simple problem but it will get messy when there are long chains of problems. long story short, anybody who thinks protocol synchronization such as BODMAS is not applicable in one field using math problem, means he havent shoot his own feet yet... good luck! i shot mine when entering a simple formula in a code that caused semantically incorrect program. btw there are "subjective" kind of person who dont care about the rest, the truth or the fact, what they know is they always right. they havent look big or deep enough, fwiw...

author: IanB
author_rank: Super Contributor
timestamp: August 23, 2023, 11:47:08 pm
content: Quote from: tggzzz on August 23, 2023, 09:57:39 pmYeah, I'm just gonna have to say bullshit.Computer programs are an encoding of information, and tools like compilers readily transform them by translations and optimizations into quite different outputs.Image files and audio files are an encoding of information, and they also are transformed into compressed forms and different formats.This was made real to me years ago when I compared the source code and the compiled output of a benchmark program I wrote on a DEC Alpha machine. The compiled output was cryptic and bore no resemblance to the program I wrote. It was transformed beyond recognition. Yet it gave the correct results.

author: Nominal Animal
author_rank: Super Contributor
timestamp: August 23, 2023, 11:49:10 pm
content: Quote from: tggzzz on August 23, 2023, 09:57:39 pmAgreed. Encoding maps symbols, but notation maps entire systems: symbols and operators/operations/mappings.The difference between "notation" and "program code" is interesting, as "notation" tends to be used exclusively when humans do the interpretation (music, math, rally route marking, etc.), and "program code" when a machine does the interpretation. I can definitely see why both are considered "languages" (by some/many).The difference between encoding and notation is very vague, of course. For example, Unicode is an encoding between visual glyphs and their numerical representation in digital systems. RPN is notation and not encoding because it defines not only the symbols but also the operations the symbols refer to.I suggest encoding is contained within notation; with whether operations or mappings that affect other symbols are included, and whether it is self-contained or relies on other rules for full utility, being the separator between 'notation' and 'encoding'.This is, of course, only my current understanding based on the observed effective use (in mostly technical and scientific contexts) and the dictionary definitions.Quote from: gnuarm on August 23, 2023, 10:11:51 pmIt is a rhetorical question, whose answer also answers your own question:Because they find it useful.Just because you find something natural and obvious and comfortable, does not mean it is so for everyone else too.For example, my native language is Finnish, which has plenty of grammatical cases; is typologically agglutinative; uses suffixal affixation; and just about everything is inflected. Something like "Can you see my car?" is just two words in Finnish, "Näetkö autoni?", and not because the expression is simpler: "Can you see your car?" is "Näetkö autosi?", and "Can they see my car?" is "Näkevätkö he autoni?". I'm pretty good (but nowhere near perfect) in Finnish grammar, even with possessive suffix ("autoni" instead of "minun auto" for "my car") which seems very difficult for even those who write Finnish as a job.Nevertheless, gendered nouns in Swedish and German completely throw me in a loop. And no, it is not a matter of "not learning enough": I've gotyearsof Swedish studies completed with good grades, but still the only way to get the noun genders right, is for me to memorize every damn noun and their inflection and gender.To expand a bit: As explained by Łukasiewicz, the principle of his (prefix) notation was to write the functors before the arguments to avoid brackets, and that he had employed his notation in his logical papers since 1929. The postfix notation, on the other hand, came decades later; in 1941 in Germany, gaining some traction in the 1950s and much more in 1960s.To explore the reasons why others might find prefix notation easier than postfix notation, we'd need to delve into language, and especially the differences in word ordering. For example, although many do not realize it at all, English adheres strictly to adjective order, with opinion, size, age, shape, colour, origin, material, and purpose in that order. Saying 'red large old box' will feel unnatural or as if emphasizing one of the adjectives to native English speakers; they will always prefer to 'large old red box'.

author: switchabl
author_rank: Frequent Contributor
timestamp: August 23, 2023, 11:50:06 pm
content: Quote from: Mechatrommer on August 23, 2023, 11:13:50 pmIt's not, it's just one of several common conventions and relying on it is a possible cause of confusion and ambiguity.It is in fact very common to find e.g. 1/(2x) written as 1/2x in scientific publications and blindly applying "BODMAS" would lead you to the wrong interpretation. And this is not just carelessness, it is actually in the Physical Review style guide (https://cdn.journals.aps.org/files/styleguide-pr.pdf) and it used to be in the AMS one as well (https://web.archive.org/web/19980212112429/http://www.ams.org/authors/guide-reviewers.html).In my experience, mathematicians in particular are not usually sticklers for these kind of "rules" and use whatever notation and shorthands they find most convenient.

author: IanB
author_rank: Super Contributor
timestamp: August 24, 2023, 12:01:17 am
content: Quote from: Nominal Animal on August 23, 2023, 11:49:10 pmI think your definition of encoding is too narrow. It can be that narrow for you if you wish it to be, but I don't see it. Operators, operations and mappings are also represented by symbols.Why are computer programs called "code" (from encoding) and not called "notes" (from notation)? Computer programs contain operations and operators, or they would do nothing useful.In language, why is switching fluently between languages called "code switching"? Human languages are the archetype of complex systems of expression.

author: IanB
author_rank: Super Contributor
timestamp: August 24, 2023, 12:05:01 am
content: Quote from: Nominal Animal on August 23, 2023, 11:49:10 pmPersonally, I would much prefer a nice large old rectangular red Chinese wooden puzzle box

author: tggzzz
author_rank: Super Contributor
timestamp: August 24, 2023, 12:06:40 am
content: Quote from: IanB on August 23, 2023, 11:47:08 pmYou are an encoding of information, both directly in biochemical ways and also indirectly in emergent phenomena that nobody understands.QuoteAnybody that thinks there is more that a vague relationship between computers and mathematics is living in a state of sin. Ask any mathematician!

author: Nominal Animal
author_rank: Super Contributor
timestamp: August 24, 2023, 12:20:49 am
content: Quote from: switchabl on August 23, 2023, 11:50:06 pmPhysics too, even more so. Many a physicist have developed their own notation to express their ideas better; just consider Dirac's bra-ket notation now commonly used in quantum mechanics. The purpose is to convey the underlying idea/discovery/formula, and if that takes some fiddling with the notation, so be it: just describe the notation first (preferably via an otherwise ambiguous or complicated expression), and get on with it.Language is hard, because the mapping isn'tconcept↔word, it is something likeemotion and experience↔term cluster↔expression, with all parts in constant flux. You do not really describe anything exactly; you more like sketch things out with terms and expressions that somehow delineate/circumscribe/limit the concept you're trying to convey, with each one being interpreted or understood slightly differently by each reader/listener.Quote from: IanB on August 24, 2023, 12:01:17 amWell, start by reviewing the definitions ofencodingandnotationin some dictionary you consider authoritative/reliable/trustworthy, and go on from there.My definition may be narrow, but it does conform to how I understand their English dictionary definitions, and matches the real world technical/scientific use I've encountered. It is not just my "opinion" based on a gut feeling; it is the most useful/effective/reasonable definition I can find.Quote from: IanB on August 24, 2023, 12:01:17 amWhy isn't English written phonetically, like Finnish and Latin are? For historical reasons.I suspect the reason for "code"/"coding" can be found by investigating thepunched cardera, and how the word "programming" was used among the laypeople (including university administration).For the same reason as we Finns call an electron microscope "elektronimikroskooppi" instead of the much more descriptive and logical "sähkälehitutähystin", I refuse to assume there is actual logic or rational thought behind exactly which words or terms are used for which thing. (This includes the fact that popularity is no guarantee of quality or fitness for a purpose; only of popularity.)Quote from: IanB on August 24, 2023, 12:01:17 amThat is the first time I have ever heard that term used for that. I also find using "code" for language (except for spy cipher stuff) really uncommon and odd.Could this – gasp! – be culturally dependent? Oh noes.

author: Mechatrommer
author_rank: Super Contributor
timestamp: August 24, 2023, 12:33:45 am
content: Quote from: switchabl on August 23, 2023, 11:50:06 pmwe can say that to other conventions too. confusion occurs when sender/receiver use different convention/encoding/decoding/grammar/protocol scheme... so convention A is just as confusing as convention B, or C or whatever... they are all are possible cause of confusion and ambiguity.Quote from: switchabl on August 23, 2023, 11:50:06 pmi'm not sure at which part you are referring to in the pdf, all i see are formulas following BODMAS convention. anyway how they are going to write if what they meant is (1/2)x without bracket? are ncl and the rest wrong?https://www.ncl.ac.uk/webtemplate/ask-assets/external/maths-resources/numeracy/order-of-operations-bodmas.htmlQuote from: switchabl on August 23, 2023, 11:50:06 pmused to be?Quote from: switchabl on August 23, 2023, 11:50:06 pmyou havent seen them, or they havent shoot each other's foot yet... when ambiguity occurs, they will try to find a way to correct their laziness.... we wouldnt call us lazy if everybody of us are lazy...cheers.

author: Nominal Animal
author_rank: Super Contributor
timestamp: August 24, 2023, 01:28:01 am
content: Quote from: Mechatrommer on August 24, 2023, 12:33:45 amPage 21, 2. Fractions; Apply the following guidelines; (e) When slashing fractions, respect the following conventions. In mathematical formulas this is the accepted order of operations: (1) raising to a power, (2) multiplication, (3) division, (4) addition and subtraction.It means that in Physical Review style notation, in a subexpression containing a slashed fraction, multiplication has higher precedence than division.Quote from: Mechatrommer on August 24, 2023, 12:33:45 am\$\frac{1}{2} x\$ or \$\frac{x}{2}\$, according to the style guide.Quote from: Mechatrommer on August 24, 2023, 12:33:45 amNo, they just specify a different set of rules for the notation, i.e. a different notation.There is no "right" or "wrong" notation; they're just different.Quote from: Mechatrommer on August 24, 2023, 12:33:45 amMany, many different notations are used in math and in particular its subfields. Ambiguity is not "allowed"; they are one thing that reviewers are supposed to note and ask the author to clarify. In reference books, the exact notation used in the book is almost always described; if not, it is considered a bad choice or poor form, generally speaking. Often the notation is defined just in passing: "The mathematical expressions use the same notation asMathematical Methods for Physicistsby G. B. Arfken, H. J. Weber, and F. E. Harris."

author: TimFox
author_rank: Super Contributor
timestamp: August 24, 2023, 02:14:43 am
content: Joke:A student goes into a mathematics professor.He says "when I write the equation in this manner, it is ambiguous".The professor answers, "don't write it that way".

author: CatalinaWOW
author_rank: Super Contributor
timestamp: August 24, 2023, 04:56:41 am
content: Quote from: Nominal Animal on August 24, 2023, 01:28:01 amThe hidden subtext here is that BODMAS and similar rules are most useful when an expression is written in a single line of text where all characters are the same size. As soon as you can write equations using multiple fonts with superscripts, subscripts and other typesetting tools a whole new toolbox of clarification opens up. And it is a world where BODMAS frequently hurts more than it helps.What a terrible legacy the punch card and typewriter left for us.

author: ledtester
author_rank: Super Contributor
timestamp: August 24, 2023, 07:45:19 am
content: I can see the reasonableness of allowing 1/2x to stand for 1/(2x). After all, any expression (a/b)c may be written as ac/b. I.e. if you want "one-half x" you can just write x/2.

author: coppice
author_rank: Super Contributor
timestamp: August 24, 2023, 10:49:16 am
content: Quote from: CatalinaWOW on August 24, 2023, 04:56:41 amYep. That's it in a nutshell. Who would have thought that an algorithm worked out for trivial cases could be problematic as soon as you add a little complexity?

author: tggzzz
author_rank: Super Contributor
timestamp: August 24, 2023, 11:25:06 am
content: Quote from: CatalinaWOW on August 24, 2023, 04:56:41 amBEDMAS has nothing to do with typeface, human language, machine language, nachine tooling or anything like that. It is a pure mathematics concept concerning mathematical operations.Other mathematical concepts include planes, lines, points. Or maybe you would like to claim that planes are screwed up because of machining tolerances, and lines because of pen widths?You are, of course, free to invent your own rules for evaluating expressions - and many have. But the onus is then on you to state and explain (and preferably justify) your rules before using them.

author: coppice
author_rank: Super Contributor
timestamp: August 24, 2023, 11:34:43 am
content: Quote from: tggzzz on August 24, 2023, 11:25:06 amEr, no. The principles behind BEDMAS are abstract and universal. BEDMAS itself is an in class scheme being taught within a notational framework. Two very different things. Its the split that causes so many stupid arguments about "maths is universal" versus "maths is a social construct". Practical maths is both. The foundation underlying it is universal, and we will see the same things at play with any race we might encounter roaming the universe. Notation is needed to communicate those universal concepts, and that's the socially constructed part. BEDMAS merges the two.

author: tggzzz
author_rank: Super Contributor
timestamp: August 24, 2023, 12:17:31 pm
content: Quote from: coppice on August 24, 2023, 11:34:43 amI really don't understand the validity of "BEDMAS is a social construct".But then I don't understand the validity of PoMoLitCrit either, e.g.https://www.info.ucl.ac.be/~pvr/decon.html

author: coppice
author_rank: Super Contributor
timestamp: August 24, 2023, 12:39:23 pm
content: Quote from: tggzzz on August 24, 2023, 12:17:31 pmThe sum of product underpinnings of BEDMAS come from nature. The rest of the package (i.e. the notation on the page) was created by humans, multiple times, in different parts of the world, with a very different look on the page. Whilst we still have many human languages, the whole world has largely focussed around just one of the socially constructed notations for maths in modern times. So, it can be confused with being universal. It isn't.Quote from: tggzzz on August 24, 2023, 12:17:31 pmIt has no validity. Its designed to be like the can of worms any science or engineering discipline tries hard to move itself away from.

author: Nominal Animal
author_rank: Super Contributor
timestamp: August 24, 2023, 03:13:30 pm
content: Quote from: CatalinaWOW on August 24, 2023, 04:56:41 amAlso consider what effect our writing styles (not just Latin/Western, but also ideographic like Chinese) has had.Consider what effect it would have on phonetic writing, if we were to just design a single vowel glyph with features matching how the vowel is generated in the human vocal apparatus? (IPA vowel classification is two-dimensional: front/central/back, and close/close-mid/open-mid/open; so one possibility would be a rectangle with a diagonal stroke, the two intersection points defining the vowel.) Any generally physically possible vowel could be represented by continuously variant glyph directly. Length and gliding into another vowel type could be described using a merging glyph, for example sharing one edge of the rectangle, and tone with umlauts (as in Pinyin for Chinese).Languages – including mathematical notation – are full of history, and have very little to no intentional design. We could do better, but we choose not to.We humans really do have a long way ahead, before we can consider ourselves a rational species, when one looks at what wedoinstead of what we claim we are.

author: TimFox
author_rank: Super Contributor
timestamp: August 24, 2023, 03:57:48 pm
content: As I understand it (not being fluent in Latin), the Latin or Roman alphabet is a reasonably efficient encoding of pronunciation in the classic Latin language.As Romance languages evolved from Latin, the alphabet was used for Spanish, French, Italian, etc. and sort-of worked.It was then applied to Germanic, Slavic, etc. languages and became a problem requiring lots of diacritics to work at all.English then mixed all of the above together to result in chaotic orthography.

author: IanB
author_rank: Super Contributor
timestamp: August 24, 2023, 04:05:58 pm
content: Quote from: Nominal Animal on August 24, 2023, 03:13:30 pmBut do we want phonetic writing?Consider, for example, the Norwegian word "ikke". Some people pronounce it with a hard "k" sound, while others pronounce it with a soft "ch" sound (as in German ich). Should the spelling change according to the speaker?

author: TimFox
author_rank: Super Contributor
timestamp: August 24, 2023, 04:20:57 pm
content: In the lyrics of Ira Gershwin: "Let's call the whole thing off."

author: Nominal Animal
author_rank: Super Contributor
timestamp: August 24, 2023, 04:22:18 pm
content: Quote from: TimFox on August 24, 2023, 03:57:48 pmFinnish, too. There are a few diphtongs (ae, oe) that meld together, as do ng and nk, but otherwise Finnish is written phonetically using the Latin alphabet. We do use two additional vowels ä and ö, with ä corresponding to the a in 'back' (whereas a corresponds to the a in 'dark'), ö to the i in 'bird'. Doubled vowels are long, and doubled consonants refer to a delay/long consonant.Even so, compare to e.g.Hangul, which is written in syllabic blocks, making correct pronunciation (rhythm-wise) much easier. Even though I cannot read Korean (or know Hangul alphabet), I do believe it is superior notation compared to the Latin alphabet.I was mostly thinking about languages like English (especially because of its British/American/Australian variants), French, German, and Swedish. I know how to pronouncesmåhagel(Ikea USB charger BigClive did a teardown on a month or two ago) orblåkläder, but it seems to pose difficulties to English speakers.Quote from: IanB on August 24, 2023, 04:05:58 pmThe use of Pinyin when learning Chinese indicates it might make learning a language easier. I am not suggesting it would be forced on everybody in all languages (that shitneverworks), but as another tool: another notation, if you will. (Except in this case it would be just another encoding of the pronunciation, really.)It would be useful for foreign names, for example, if it was standardized and widely used. Consider a name badge, with your name on it using your own orthography, with the standard phonetic form below.IPA is too esoteric and complicated to be actually useful for this. I've looked at it a couple of times, but every detail needs to be memorized because there is no logical variation, only separate glyphs for each thing that cannot be predicted or extrapolated from the others.

author: TimFox
author_rank: Super Contributor
timestamp: August 24, 2023, 04:31:11 pm
content: Hangulwas invented by the scholarly king Sejong the Great in AD 1443, and is an efficient encoding of the Korean language.I encountered theRomajispelling rules for using the Latin alphabet for the Japanese language, which originated with a missionary.A problem for Americans first encountering this very reasonable set of rules is pronouncing vowels; I learned to pronounce all vowels in that spelling as in Italian.(Only an idiot would say "as in English", since that is ill-determined.)There is a wonderful Japanese dairy-based soft drink (tastes something like yogurt) spelled "Calpis", which is often pronounced "Karupisu".If you ask for it at a vendor, and pronounce the "a" is in "Calvin" and the "i" as in "if", the Japanese vendor will not recognize the word.Try "a" and "i" as in "adagio", and it works.

author: helius
author_rank: Super Contributor
timestamp: August 24, 2023, 04:35:25 pm
content: Quote from: Nominal Animal on August 24, 2023, 03:13:30 pmAs an example, the notations forrisingandfalling powersare ambiguous: some authors use opposite notations for the two concepts.

author: IanB
author_rank: Super Contributor
timestamp: August 24, 2023, 05:01:57 pm
content: Quote from: TimFox on August 24, 2023, 04:31:11 pmI thought you were going to mention Pocari Sweat, of which I am always pondering, "What is a Pocari?"Now you also have me wondering, "What is a Cal?"[Edit: add missing grin]

author: TimFox
author_rank: Super Contributor
timestamp: August 24, 2023, 05:09:45 pm
content: "Pocari" is a trademark; the manufacturer says "Pocari" was named for its light nuance and bright sound, and it has no particular meaning.(Like "Kodak".)"Sweat" refers to the electrolytes lost in perspiration that need to be replenished in bodily fluids.Another popular "sports drink" in Japan is "NCAA".Of course, Gatorade is the popular US beverage, where "Gator" refers to the University of Florida football team.The "cal" in Calpis means "calcium", found in dairy products.

author: Mechatrommer
author_rank: Super Contributor
timestamp: August 24, 2023, 05:56:58 pm
content: Quote from: CatalinaWOW on August 24, 2023, 04:56:41 amits not just about that... you are looking at the subset of the dilemma.. it can be as simple as 2 + 6 x 2.. or as in my first post for 2 + 6 / 2, which one the sender meant? (a) or (b)? (2 + 6) / 2? or 2 + (6 / 2)? refer to my 1st post here.. heck i checked my casio calculator for that to follow bodmas... not left to right precedence...

author: tggzzz
author_rank: Super Contributor
timestamp: August 24, 2023, 06:06:43 pm
content: Quote from: Mechatrommer on August 24, 2023, 05:56:58 pmI've had two Casio calculators. One followed BEDMAS, one did not.

author: CatalinaWOW
author_rank: Super Contributor
timestamp: August 24, 2023, 06:23:53 pm
content: Quote from: tggzzz on August 24, 2023, 11:25:06 amYou are right. BEDMAS has nothing to do with typefaces. It is a tool for describing mathematical operations. Without such tools you would have to write these equations in some form like: First multiply two times six. Then add one and multiply the resulting sum by 3.14. If you have ever looked at the math problems written by folks in ancient times written originally in cuneiform the usefulness of such tools is obvious. Latex is another tool. Both have their place. I was describing where I have found the tool most useful. Your mileage may vary.

author: TimFox
author_rank: Super Contributor
timestamp: August 26, 2023, 02:09:10 pm
content: Pronunciation encoding:https://xkcd.com/2819/

author: ledtester
author_rank: Super Contributor
timestamp: August 27, 2023, 03:49:54 am
content: I found this video an interesting overview of the history of the precedence rules for multiplication and division starting from the early 1900's through today:

author: gnuarm
author_rank: Super Contributor
timestamp: August 27, 2023, 11:15:22 am
content: Quote from: ledtester on August 27, 2023, 03:49:54 amIt seems silly to rely on unreliable conventions when it is so simple to explicitly describe your equation using parentheses.

author: bostonman
author_rank: Super Contributor
timestamp: August 27, 2023, 01:51:02 pm
content: Lots of interesting feedback, but it seems this topic remains opinion rather than stating a standard procedure.Let's use the example of adding weights. Maybe shipping items from my house and needed to get a total weight, but also note individual weight of each box. My computer desk is 100lbs, book shelf 50lbs, and books are a total weight of 300lbs, however, my books will not all fit in one box, they need to be divided into 5 boxes.Doing the math quickly and easily in my head, I would do the division first because I can add 60lbs along with 100 and 50 easier than retaining 150, doing the division, and then adding it into the number I had to remember.Writing the "equation" would be simply: 100 + 50 + 300 / 5.BEDMOS or however it's spelled would apply to this equation also, but per my original question, would engineers and mathematicians actually write the equation in hopes the reader(s) would apply grade school rules to it; and is the grade school rule actually the common practice to decipher such an equation (although this is a simple equation, let's assume it's much longer with more dividing and multiplication)?The way I'd write this would be: 100 + 50 + (300/5). This seems quite obvious the 300/5 is its own section.The other way someone may read it left to right and get 90, or they may think it's 100 + ((50 + 300) / 5)As it's been pointed out, those articles are clickbait (and I knew this before), and the writer isn't a mathematician, but still, the question is interesting.If this was a five equation with five unknowns, comprised of A, B, C, D, E, several brackets and parenthesis would be used, such as: [((A+2) / B) + (C^2) - (SQRT D) ] /EWith the above, assuming all five equations and unknowns were found, now you have more freedom. I can add A+2 first without worrying about C^2 until after, or take the SQRT of D first, but know I can't divide by E until the end. With BEDMOS I'd have to divide by E before adding A+2 and so on.Let's assume A - E is 1-5 after solving for all five unknowns.The equation would then look like 1 + 2 / 2 + 3^2 - SQRT 4 / 5With BEDMAS 2/2, 3^2, and the SQRT of 4/5 would all be done first; obviously giving a completely different answer.

author: IanB
author_rank: Super Contributor
timestamp: August 27, 2023, 02:00:01 pm
content: Quote from: bostonman on August 27, 2023, 01:51:02 pmNo, it wouldn't. I would look like [((1+2) / 2) + (3^2) - (SQRT 4) ] / 5Equations and formulas a not games. You have to write down what you mean, and be consistent about it.

author: TimFox
author_rank: Super Contributor
timestamp: August 27, 2023, 02:01:22 pm
content: This is an example of a calculation, to be donein situ, not first on paper, which I would do in RPN on a calculator.