Baron Aloha said:Hmm...
Maybe its like programming?
(2++) + (2++) + (2/2) = 7 ??
huh?Mister Zimbu said:2() - /() - 2 - (2/2)
I win!
Just nod your head slowly and pat him on the back.Poody said:huh?
GaimeGuy said:There is no solution for 7.
shattyboombatty said:Well someone had to do it... Here's the output of a C program I trew together. It's every combination of 4 2's and 4 operators. You'll see no 7's as an answer. I left it as float answers so as to show fractional answers like .5 if they came up. I'm assuming that since '(' ')' just determine order of operations, all the operations have the same presedence (in this program) and I've got all the combinations that I can leave out the parenthesation of all the terms. (let me know if that's wrong) Plus I didn't want to program the grouping logic. =)
Also, the combining (22 222) logic may have bugs but I think these are correct =)
1) 2 + 2 + 2 + 2 = 8.0
2) 2 + 2 + 2 - 2 = 4.0
3) 2 + 2 + 2 * 2 = 12.0
4) 2 + 2 + 2 / 2 = 3.0
5) 2 + 2 + 22 = 26.0
6) 2 + 2 - 2 + 2 = 4.0
7) 2 + 2 - 2 - 2 = 0.0
8) 2 + 2 - 2 * 2 = 4.0
9) 2 + 2 - 2 / 2 = 1.0
10) 2 + 2 - 22 = -18.0
11) 2 + 2 * 2 + 2 = 10.0
12) 2 + 2 * 2 - 2 = 6.0
13) 2 + 2 * 2 * 2 = 16.0
14) 2 + 2 * 2 / 2 = 4.0
15) 2 + 2 * 22 = 88.0
16) 2 + 2 / 2 + 2 = 4.0
17) 2 + 2 / 2 - 2 = 0.0
18) 2 + 2 / 2 * 2 = 4.0
19) 2 + 2 / 2 / 2 = 1.0
20) 2 + 2 / 22 = 0.1
21) 2 + 22 + 2 = 26.0
22) 2 + 22 - 2 = 22.0
23) 2 + 22 * 2 = 48.0
24) 2 + 22 / 2 = 12.0
25) 2 + 222 = 224.0
26) 2 - 2 + 2 + 2 = 4.0
27) 2 - 2 + 2 - 2 = 0.0
28) 2 - 2 + 2 * 2 = 4.0
29) 2 - 2 + 2 / 2 = 1.0
30) 2 - 2 + 22 = 22.0
31) 2 - 2 - 2 + 2 = 0.0
32) 2 - 2 - 2 - 2 = -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23.0
81) 2 / 2 - 2 + 2 = 1.0
82) 2 / 2 - 2 - 2 = -3.0
83) 2 / 2 - 2 * 2 = -2.0
84) 2 / 2 - 2 / 2 = -0.5
85) 2 / 2 - 22 = -21.0
86) 2 / 2 * 2 + 2 = 4.0
87) 2 / 2 * 2 - 2 = 0.0
88) 2 / 2 * 2 * 2 = 4.0
89) 2 / 2 * 2 / 2 = 1.0
90) 2 / 2 * 22 = 22.0
91) 2 / 2 / 2 + 2 = 2.5
92) 2 / 2 / 2 - 2 = -1.5
93) 2 / 2 / 2 * 2 = 1.0
94) 2 / 2 / 2 / 2 = 0.3
95) 2 / 2 / 22 = 0.0
96) 2 / 22 + 2 = 2.0
97) 2 / 22 - 2 = -1.9
98) 2 / 22 * 2 = 0.1
99) 2 / 22 / 2 = 0.0
100) 2 / 222 = 0.0
101) 22 + 2 + 2 = 26.0
102) 22 + 2 - 2 = 22.0
103) 22 + 2 * 2 = 48.0
104) 22 + 2 / 2 = 12.0
105) 22 + 22 = 44.0
106) 22 - 2 + 2 = 22.0
107) 22 - 2 - 2 = 18.0
108) 22 - 2 * 2 = 40.0
109) 22 - 2 / 2 = 10.0
110) 22 - 22 = 0.0
111) 22 * 2 + 2 = 46.0
112) 22 * 2 - 2 = 42.0
113) 22 * 2 * 2 = 88.0
114) 22 * 2 / 2 = 22.0
115) 22 * 22 = 484.0
116) 22 / 2 + 2 = 13.0
117) 22 / 2 - 2 = 9.0
118) 22 / 2 * 2 = 22.0
119) 22 / 2 / 2 = 5.5
120) 22 / 22 = 1.0
121) 222 + 2 = 224.0
122) 222 - 2 = 220.0
123) 222 * 2 = 444.0
124) 222 / 2 = 111.0
125) 2222 = 2222.0
Press any key to continue
Onix said:Unfortunately, parenthesis are needed since the available operators do not have the same precedence. Also, the lack of parenthesis removes non-subtraction negation, which should be available.
One other thing - I don't there is anything against exponentiation (whether positive of negative), though I don't know if that will help with the missing 7 issue. It does allow for a number of alternative solutions for the other numbers however.
The algorithm is actually somewhat complicated when including the above possibilities.
shattyboombatty said:I think exponentiation has an operator of essentially ^ which is implied by the exponents' position... but it'd be pretty sneaky to put it in there. =)
DavidDayton said:However, in standard written equations, there is no "operator" being used when writing exponential values. Heh.
DavidDayton said:There are two options...
1) The daughter didn't reveal all of the puzzle requirements.
2) The daughter made a mistake.
3) The daughter made up the challenge.
4) There is some incredibly evil twist we aren't getting... I was pondering using Roman numerals to do this, or dots on paper...
7 is pretty much impossible.
7+2 = 9, 7-2 = 5, 7*2 = 14, 7/2 = 3.5.
Since none of those numbers can be generated with three 2s, 7 can't be generated with four -- unless you "cheat;" 2/(.2*2) = 5.
no, you can't just take out the "1" from the parenthesis. furthermore i dont think breaking down a 2 into sum of 1s is within the rules.NotMSRP said:Alternative method to 7:
2+2+2+2
2*(1+1+1+1)
2*(1+1+1)+1
2*3+1
7
NotMSRP said:2+2+2+2
1+1+1+1+1+1+1+1
6+(1*1)
6+1
7
--------------------
2+2+2+2
(1+1)+(1+1)+(1+1)+(1+1)
(1+1+1)+(1+1+1)+(1+1)
(3)+(3)+(1*1)
3*3*(1)
9*1
9
-------------------------
2+2+2+2
1+1+1+1+1+1+1+1
((5)*2)+1
10+1
11
--------------------------
2+2+2+2
(1+1+1)+(1+1+1+1)+1
3+4+1
(3*4)+1
13
---------------------------
2+2+2+2
1+1+1+1+1+1+1+1
3*5
15
These are all done with valid steps according to what the OP described.
Alternative method to 7:
2+2+2+2
2*(1+1+1+1)
2*(1+1+1)+1
2*3+1
7
Apple Jax said:Check this out:
2^() + (2+2+2) = 7
I forgot what () means tho... is that just a null set? or does it' respresent 0?
Edit: Actually.. {} represents a null set... but... does () represent anything? I'm too far gone from algebra to remember. If ()=0 then the above is your answer.
Onix said:We have a winner imo.
This works in a calculator ... so why the fuck not?
Shompola said:Well ^ is an operator and it isnt allowed to be used here.
Btw I checked similiar problems at mathforum and it seemed that the people who answered this kind of problems assumed that you could either use 22 as two twos or use .2 as a single 2...
Shompola said:Well ^ is an operator and it isnt allowed to be used here.
Btw I checked similiar problems at mathforum and it seemed that the people who answered this kind of problems assumed that you could either use 22 as two twos or use .2 as a single 2...
Onix said:Did you read the rest of my statement? The '^' is not needed, I just can't display superscripts.
Your logic fails you. How can you argue the '^' is not allowed, but then the '.' is?
Some other solutions based on the same premise:
-(2^()) + (2 * 2 * 2)
-(2^()) + (2 * (2^2))
Prost said:Because .2 is the last simplification. anything with a "^" means it can be simplified more.
Shompola said:notmsrp, I think it is fascinating.. but I have no idea what you are doing sorry...
It reminds me of modulo calculation and that would actually be a good start to see if you can factorize your number to prime numbers. Is that what you are doing here?
for example 7 modulo 2 = 1
i.e. 7 = 2*3+1
And if we transform it to only prime numbers 7 = 2 + 2 + 2 + 1 = 2 + 2+ 2 + 2/2
five twos.. failure.
Onix said:Did you read the rest of my statement? The '^' is not needed, I just can't display superscripts.
Your logic fails you. How can you argue the '^' is not allowed, but then the '.' is? Neither were represented in the initial list of operators. However, since the '^' is not actually needed, there is at least some merit to the use of exponentiation. In reality, whether the '^' is implied or not, it isn't even conventionally used (outside of programmatic syntax) for diagraming exponentiation - superscripting is.
Some other solutions based on the same premise:
-(2^()) + (2 * 2 * 2)
-(2^()) + (2 * (2^2))
Shompola said:Yah I did. But as said ^ is an operator.
'.' is not an operator, it is a decimal sign. and what does () mean? the empty set? doing operations on an empty set would not give an output. And if its just parentesis then it is just wrong. I have never seen 2^() in math.
And what is super scripting?