SOLUTION: Please help!! A math teacher writes the following expression on the blackboard and asks the students to evaluate it. 1111-11-11 (pretend they all love like straight lines and th

Algebra ->  Absolute-value -> SOLUTION: Please help!! A math teacher writes the following expression on the blackboard and asks the students to evaluate it. 1111-11-11 (pretend they all love like straight lines and th      Log On


   



Question 1105393: Please help!! A math teacher writes the following expression on the blackboard and asks the students to evaluate it.
1111-11-11 (pretend they all love like straight lines and there are no differences between absolute value sign and ones and they could be either)
The problem is that the math teacher is a bit sloppy and careless and does not distinguish between the symbols for "the number one" and "absolute value". Calculate and list every possible numerical value of the expression (Please help me find at between 25-30).
For full credit follow these guidelines:
1.) show each calculation clearly distinguishing between the different symbols. In an expression containing more than one set of absolute value bars, you will need to be particularly careful.
2.) sort your list of calculations from largest value to smallest value and number them starting with "(1)" (the largest value).
3.) If a value can be formed multiple ways list each separately.
4.) Consider only "well-formed" mathematical expressions

Found 2 solutions by jim_thompson5910, LLabc:
Answer by jim_thompson5910(35256) About Me  (Show Source):
You can put this solution on YOUR website!

Instead of writing |1|, I'm going to write abs(1)
abs = absolute value function
This function notation is much better than saying |1| as each vertical bar is indistinguishable from each other. Plus the vertical bars can be mistaken for 1. Here are some other examples
|8| = abs(8)
|-22| = abs(-22)
|12.789| = abs(12.789)
So again this function notation is much more clear

------------------------------------------------------------------------------------------------------------------------------------

This is one of those type of problems where it's done by trial and error. There is no single formula to get a fast easy answer.

The idea is to list out every single possible combination and then narrow that list down by tossing out any nonsense entries.

What I'll do is treat the opening pair of parenthesis, of the abs(X) function, as the letter M
The closing parenthesis will be represented by N
So instead of writing abs(8), we'd have M8N. This shorthand code will be useful for the calculator mentioned below.

I used this calculator to list out all the 6561 different ways to fill the 8 slots (3^8 = 6561. The 3 is from the fact we have 3 choices per slot: M, N or 1)

Then I used search and replace to get rid of entries that...

  • started with N. Recall that I made N a closing parenthesis. It makes no sense to have it start with a closing parenthesis

  • ended with M. Same idea is above just in reverse. It makes no sense to end with an opening parenthesis

  • had MN. This is an absolute value with nothing inside it.

  • had M-N. This is an absolute value with just a minus inside it.

  • any entries with more Ms than Ns, or vice versa. There must be the same number of M and N to keep things balanced. We must have the same number of opening parenthesis


The list is dramatically cut down. It starts off with 6561 entries and it drops to 187 entries after following those steps above. This is definitely a large improvement.

From here, I ran the 187 entries through a calculator that could understand the abs(X) function notation. This is after I replaced M with abs( and I replaced N with ).

Any entries that spit out an error were ignored. Otherwise, I recorded the results as shown below

1111-11-11 = 1089
1111-1*abs(-1) = 1110
1111-abs(1-1) = 1111
111*abs(-11-1) = 1332
111*abs(-1)-11 = 100
11*abs(1-11-1) = 121
11*abs(1-1)-11 = -11
11*abs(abs(-1)-1) = 0
1*abs(11-11-1) = 1
1*abs(11-1)-11 = -1
1*abs(1*abs(-1)-1) = 0
1*abs(1)-11-11 = -21
1*abs(1)-1*abs(-1) = 0
1*abs(1)-abs(1-1) = 1
1*abs(abs(1-1)-1) = 1
abs(111-11-1) = 99
abs(111-1)-11 = 99
abs(11*abs(-1)-1) = 10
abs(11)-11-11 = -11
abs(11)-1*abs(-1) = 10
abs(11)-abs(1-1) = 11
abs(1*abs(1-1)-1) = 1
abs(1)*1-11-11 = -21
abs(1)*1-1*abs(-1) = 0
abs(1)*1-abs(1-1) = 1
abs(1)*abs(-11-1) = 12
abs(1)*abs(-1)-11 = -10
abs(abs(11-1)-1) = 9
abs(abs(1)-11-1) = 11
abs(abs(1)-1)-11 = -11

If you want this list with the vertical bar notation instead of the abs(X) function notation, then it would look like this
1111-11-11 = 1089
1111-1*|-1| = 1110
1111-|1-1| = 1111
111*|-11-1| = 1332
111*|-1|-11 = 100
11*|1-11-1| = 121
11*|1-1|-11 = -11
11*||-1|-1| = 0
1*|11-11-1| = 1
1*|11-1|-11 = -1
1*|1*|-1|-1| = 0
1*|1|-11-11 = -21
1*|1|-1*|-1| = 0
1*|1|-|1-1| = 1
1*||1-1|-1| = 1
|111-11-1| = 99
|111-1|-11 = 99
|11*|-1|-1| = 10
|11|-11-11 = -11
|11|-1*|-1| = 10
|11|-|1-1| = 11
|1*|1-1|-1| = 1
|1|*1-11-11 = -21
|1|*1-1*|-1| = 0
|1|*1-|1-1| = 1
|1|*|-11-1| = 12
|1|*|-1|-11 = -10
||11-1|-1| = 9
||1|-11-1| = 11
||1|-1|-11 = -11
But again it's very easy to mistake the numeric digit one for a vertical bar symbol.

Here is that same list but without any asterisks (multiplication signs)
1111-11-11 = 1089
1111-1|-1| = 1110
1111-|1-1| = 1111
111|-11-1| = 1332
111|-1|-11 = 100
11|1-11-1| = 121
11|1-1|-11 = -11
11||-1|-1| = 0
1|11-11-1| = 1
1|11-1|-11 = -1
1|1|-1|-1| = 0
1|1|-11-11 = -21
1|1|-1|-1| = 0
1|1|-|1-1| = 1
1||1-1|-1| = 1
|111-11-1| = 99
|111-1|-11 = 99
|11|-1|-1| = 10
|11|-11-11 = -11
|11|-1|-1| = 10
|11|-|1-1| = 11
|1|1-1|-1| = 1
|1|1-11-11 = -21
|1|1-1|-1| = 0
|1|1-|1-1| = 1
|1||-11-1| = 12
|1||-1|-11 = -10
||11-1|-1| = 9
||1|-11-1| = 11
||1|-1|-11 = -11

I'll leave the sorting for you to do.

Note: There are 30 entries in the final list shown above.

Answer by LLabc(1) About Me  (Show Source):