Can you solve 8÷2(2+2)

The #1 community for Gun Owners in Indiana

Member Benefits:

  • Fewer Ads!
  • Discuss all aspects of firearm ownership
  • Discuss anti-gun legislation
  • Buy, sell, and trade in the classified section
  • Chat with Local gun shops, ranges, trainers & other businesses
  • Discover free outdoor shooting areas
  • View up to date on firearm-related events
  • Share photos & video with other members
  • ...and so much more!
  • jamil

    code ho
    Site Supporter
    Rating - 0%
    0   0   0
    Jul 17, 2011
    60,696
    113
    Gtown-ish
    I'm not picking what part of the number gets distributed, the division operator does.
    The division operator has ownership of 2 parts of a statement, something that exists before it (the numerator), and something that exists after it (the denominator).
    Everything before the / is "8"
    Everything after it is "2(2+2)"
    Is there anything in the before that has rules or properties that supersede the division operator? No, so the numerator is 8.
    Is there anything in the after part that has rules or properties that supersede the division operator? Yes, so the denominator requires evaluation before proceeding with the division calculation.
    What in the denominator requires evaluation? We have parenthesis and the distributive property. So you must evaluate "2(2+2)" and use it as the denominator.

    Yeah? Try to code that in Java and see what happens. What comes after is not all implied to be the denominator.
     

    Dead Duck

    Grandmaster
    Rating - 100%
    53   0   0
    Apr 1, 2011
    14,062
    113
    .
    It's no FORTRAN 77, sir! No, sir! It is NOT.

    GDifhO1.gif
     

    DoggyDaddy

    Grandmaster
    Site Supporter
    Rating - 100%
    73   0   1
    Aug 18, 2011
    104,272
    149
    Southside Indy
    You are old if you remember what the acronyms COBOL and FORTRAN represent.

    You are very old if you remember doing bubble sorts on your 80 column card decks.
    I remember what COBOL stands for. FORTRAN was the first language I was exposed to though, and I don't remember what it stood for. I just remember being confused a lot. We had dumb terminals for FORTRAN, so we didn't do the actual card punching ourselves. I remember having to wait until the next day to find out the compile results though.
     

    2A_Tom

    Crotchety old member!
    Site Supporter
    Rating - 100%
    3   0   0
    Sep 27, 2010
    26,078
    113
    NWI
    The last 19 seconds.

    [video=youtube;CAzl6-547J0]https://www.youtube.com/watch?v=CAzl6-547J0[/video]
     

    Alpo

    Grandmaster
    Rating - 100%
    2   0   0
    Sep 23, 2014
    13,877
    113
    Indy Metro Area
    I remember what COBOL stands for. FORTRAN was the first language I was exposed to though, and I don't remember what it stood for. I just remember being confused a lot. We had dumb terminals for FORTRAN, so we didn't do the actual card punching ourselves. I remember having to wait until the next day to find out the compile results though.

    Formula Translation.
     

    danimal

    Marksman
    Rating - 0%
    0   0   0
    Jan 12, 2011
    217
    18
    Unincorporated Lake County
    Yeah? Try to code that in Java and see what happens. What comes after is not all implied to be the denominator.

    Of course not, 2 is not a legitimate function name. The same as (8/2)(2+2) wouldn't be valid syntax. The question isn't if a multiplication operator is required somewhere, the question is where exactly it takes place.

    If I have a statement of "(2X+2X)" and need to factor out the X, what are you going to write
    • X(2+2)
    • X*(2+2)

    If I have a statement of "(2X+2Y)" and need to factor out the 2, what are you going to write
    • 2(X+Y)
    • 2*(X+Y)

    If I have a statement of "(X/2 + Y/2)" and factor out the 1/2, which one are you most likely going to write
    1. (X+Y)/2
    2. 1/2*(X+Y)
    3. (1/2)(X+Y)
    4. 1/2(X+Y)

    I would hope no one would say #4. If the original statement was written like any of the first 3, I'd agree the answer is 16. The issue is that in the original statement, there isn't a multiplication operator or a 2nd set of parenthesis. Lacking those, we know that a number preceding parenthesis is a value that has been factored out and has to be reapplied to the contents of the parenthesis by the distribution property. We can shortcut it any way that makes it as simpler for us (solve contents first, then distribute, distribute then solve contents), but the issue is what is the factor to distribute, "8/2", or "2"? For people who say 16 is the answer, then they believe that the equation is one of
    1. 8(2+2)/2
      • (2*8 + 2*8)/2
    2. 8/2*(2+2)
      • (2*8/2 + 2*8/2)
    3. (8/2)(2+2)
      • (2(8/2) + 2(8/2))

    But why are we assuming that it is the whole fraction that must be distributed? Why wouldn't you just take the number immediately preceding the grouping?

    Let's add more to the statement, what if it was

    9/3/8/2(2+2)

    Would you be using 3/16ths as the factor for the grouping?

    This is why I only see the 2 as the factor to the grouping, you can't go gobbling up operators preceding the parenthesis to use as the factor, because where does the fraction stop? The 8? The 3? All the way to the 9? Maybe it's just me, but it doesn't make much sense to go grabbing more than the number.
     

    jamil

    code ho
    Site Supporter
    Rating - 0%
    0   0   0
    Jul 17, 2011
    60,696
    113
    Gtown-ish
    Of course not, 2 is not a legitimate function name. The same as (8/2)(2+2) wouldn't be valid syntax. The question isn't if a multiplication operator is required somewhere, the question is where exactly it takes place.

    If I have a statement of "(2X+2X)" and need to factor out the X, what are you going to write
    • X(2+2)
    • X*(2+2)

    If I have a statement of "(2X+2Y)" and need to factor out the 2, what are you going to write
    • 2(X+Y)
    • 2*(X+Y)

    If I have a statement of "(X/2 + Y/2)" and factor out the 1/2, which one are you most likely going to write
    1. (X+Y)/2
    2. 1/2*(X+Y)
    3. (1/2)(X+Y)
    4. 1/2(X+Y)

    I would hope no one would say #4. If the original statement was written like any of the first 3, I'd agree the answer is 16. The issue is that in the original statement, there isn't a multiplication operator or a 2nd set of parenthesis. Lacking those, we know that a number preceding parenthesis is a value that has been factored out and has to be reapplied to the contents of the parenthesis by the distribution property. We can shortcut it any way that makes it as simpler for us (solve contents first, then distribute, distribute then solve contents), but the issue is what is the factor to distribute, "8/2", or "2"? For people who say 16 is the answer, then they believe that the equation is one of
    1. 8(2+2)/2
      • (2*8 + 2*8)/2
    2. 8/2*(2+2)
      • (2*8/2 + 2*8/2)
    3. (8/2)(2+2)
      • (2(8/2) + 2(8/2))

    But why are we assuming that it is the whole fraction that must be distributed? Why wouldn't you just take the number immediately preceding the grouping?

    Let's add more to the statement, what if it was

    9/3/8/2(2+2)

    Would you be using 3/16ths as the factor for the grouping?

    This is why I only see the 2 as the factor to the grouping, you can't go gobbling up operators preceding the parenthesis to use as the factor, because where does the fraction stop? The 8? The 3? All the way to the 9? Maybe it's just me, but it doesn't make much sense to go grabbing more than the number.

    Where does the fraction stop? If you’re writing it inline like that it stops after the first number. When I calculate that by hand I get 0.75. In excel the same. In java I might write the above as the following snipet:
    ...
    final float x = 9f/3/8/2*(2+2);
    assert x==.75;
    ...
    If you run that it won’t throw an assertion error because x == .75. So java agrees with me and excel.

    You wouldn’t distribute the 2 because it’s all one term after the contents of the parentheses are evaluated. It doesn’t matter if you leave off the * when writing it, because it’s implied. In java you have to include it explicitly. Also, in java, you have to specify float here or it will assume integers, hence the 9f.
     

    danimal

    Marksman
    Rating - 0%
    0   0   0
    Jan 12, 2011
    217
    18
    Unincorporated Lake County
    Where does the fraction stop? If youÂ’re writing it inline like that it stops after the first number. When I calculate that by hand I get 0.75. In excel the same. In java I might write the above as the following snipet:
    ...
    final float x = 9f/3/8/2*(2+2);
    assert x==.75;
    ...
    If you run that it wonÂ’t throw an assertion error because x == .75. So java agrees with me and excel.

    You wouldnÂ’t distribute the 2 because itÂ’s all one term after the contents of the parentheses are evaluated. It doesnÂ’t matter if you leave off the * when writing it, because itÂ’s implied. In java you have to include it explicitly. Also, in java, you have to specify float here or it will assume integers, hence the 9f.

    I understand what you're doing in code to make it work. The problem is you keep trying to code it and inserting an operator that doesn't exist to make it compile. Stop and write it out.

    9/3/8/2(2+2)

    Parenthesis aren't just replaced with a multiplication symbol.
    X(A+B) = (X*A+X*B)
    is the correct way to use it when there is no symbol preceding it. Right? There's no multiplication operator between the 2 and the '(' of the original statement?

    You're shortcutting the property in a way that is attempting to drop the parenthesis, or remove the distribution, just to make the code compile. Which is not inherently wrong 99% of the time. If you were to distribute the full fraction, it'd look like

    (2*9/3/8/2 + 2*9/3/8/2)
    right? or if you want to solve 2+2 before distribution
    (4*9/3/8/2)

    Then you can eliminate the parenthesis as there's nothing left to perform on them. And I don't know about you, but that seems unnatural and definitely doesn't look right. I've never seen someone distribute a fraction into a grouping like that.

    You can copy and paste the below into the Javascript console in your browser to test if you want. I also get 3/4 using your method, but 3/64 by hand when distributing only what I think is supposed to be, which is everything before the parenthesis excluding any operators.

    Code:
    (function() {
    function jamil() {
        // evaluate 9 / 3 / 8 / 2 ( 2 + 2 )
        // compute left to right just using multiply
        var x = 9;
        x /= 3;
        x /= 8;
        x /= 2;
        x *= (2 + 2);
        console.log("Jamil says the answer is " + x);
        return x;
    }
    
    function danimal() {
        // evaluate 9 / 3 / 8 / 2 ( 2 + 2 )
        // distribute 1st available number pre-parenthesis, then compute
        var x = (2*2 + 2*2);
        var y = 9;
        y /= 3;
        y /= 8;
        y /= x;
        console.log("Danimal says the answer is " + y);
        return y;
    }
    
    jamil();
    danimal();
    })();
     
    Top Bottom