14
$\begingroup$

This question inspired me to write the same puzzle but instead replace the "= 100" with "= 1" with similar requirements and restrictions.

What is the expression with the fewest number of operators inserted that evaluates to 1?

Restrictions:

  1. The numbers need to be in the order that's shown in the question.
  2. Only use the operators +,−,×,÷ and √ and ! (Implies that modulus "%", exponent "^", binomial coefficients, and other operators are not allowed).
  3. Parentheses will not be counted, so they can be used to change the order of operations.
  4. Rounding is not allowed, so it have to equal to 1.

Verify your calculations in that calculator application that comes with your PC, if it ever did came with your PC.

This is my first time writing a puzzle here so obviously I should have thought this out a lot more instead of adding rules when situation comes.

$\endgroup$
  • $\begingroup$ If you updated this so we could use the modulo operator (%), it could be beaten in one move ^_^: 1%23456789 = 1 $\endgroup$ – Mwr247 Apr 15 '15 at 20:47
  • 2
    $\begingroup$ What about the ceiling function? :) $\lceil1234/56789\rceil = 1$ $\endgroup$ – Ian MacDonald Apr 16 '15 at 1:28
  • 1
    $\begingroup$ OP, we need a ruling: Does rounding count or should it be exactly 1? If rounding is OK, how many digits are required? $\endgroup$ – Engineer Toast Apr 16 '15 at 12:30
  • 4
    $\begingroup$ How about $123456789 != 1$, as in not equal? $\endgroup$ – dmg Apr 16 '15 at 14:05
  • 1
    $\begingroup$ get all 69 answers here. $\endgroup$ – user12496 May 15 '15 at 23:04

12 Answers 12

39
$\begingroup$

If √ can mean nth root:

$$\sqrt[1234567]{-8+9}$$

3 operators. Obviously...

$\endgroup$
  • $\begingroup$ Too bad you can't re-arrange the numbers or else it would of been 2 operators, but nice answer! $\endgroup$ – John Odom Apr 16 '15 at 14:52
  • 21
    $\begingroup$ If reverse polish notation is allowed, you can pull this off with one operator $$1\sqrt[23456789]{}$$ :-P $\endgroup$ – Kyle Gullion Apr 16 '15 at 18:03
  • $\begingroup$ Congrats! I was hoping for someone to beat you with an even smaller one :P. $\endgroup$ – John Odom Apr 17 '15 at 21:52
22
$\begingroup$

$$1+23-45-67+89$$

uses four. (I wrote a Python script.)

$\endgroup$
  • $\begingroup$ This will also work 1.0 - 23.0 + 45.0 + 67.0 - 89.0 $\endgroup$ – sberry Apr 15 '15 at 23:24
  • 2
    $\begingroup$ Here is a list of all that I could come up with using only +, -, *, /. gist.github.com/schleppy/4bed5e5a668cf5393a3b $\endgroup$ – sberry Apr 15 '15 at 23:27
  • $\begingroup$ Can you please share with us your python script? $\endgroup$ – hytromo Apr 17 '15 at 6:52
  • $\begingroup$ bpaste.net/show/15f01879245f $\endgroup$ – Lynn Apr 17 '15 at 18:43
  • $\begingroup$ Ah @Mauris, nicely done with the space as an operator to deal with the number joining. My way was more complex as I generated the combinations of numbers and operators per. $\endgroup$ – sberry Apr 21 '15 at 4:56
10
$\begingroup$

How many significant digits matter here for rounding? Because if it's anything less than $3,456,789$ zeroes, I can solve it in three ;)

$1+2/3456789! = ~1$

Many programming languages will evaluate it as "1". Even Wolfram Alpha can't show me enough decimal digits to tell me I'm wrong ;P

EDIT: Yes, I know this is no longer valid as of the rule change that doesn't include rounding. I didn't expect it would be allowed anyways, just figured it would be worth submitting, since it comes so infinitesimally close to 1. Besides, kgull managed to get even closer using a similar method.

$\endgroup$
  • 1
    $\begingroup$ Lol nice, this is bit of a gray area so I'm going to wait for a few days. $\endgroup$ – John Odom Apr 15 '15 at 21:12
  • 1
    $\begingroup$ If we're allowed to round, then allowing 6 zeros would allow just a single operator; ¹²³⁴⁵⁶⁷⁸√9 ≈ 1 after all. $\endgroup$ – Jon Hanna Apr 16 '15 at 11:23
  • 2
    $\begingroup$ This solution violates rule number 4 "Rounding is not allowed, so it have to equal to 1." $\endgroup$ – user902383 Apr 17 '15 at 8:59
  • $\begingroup$ @user902383 A rule which was not made until this answer was already posted, and which became the reason for the rule ;P But yes, it's no longer valid. $\endgroup$ – Mwr247 Apr 17 '15 at 15:26
4
$\begingroup$

Assuming the binomial coefficient is not an operator itself and parentheses are allowed and not counted, this requires only 1 operator.

$$1+{2345\choose6789}=1$$

Check the Pochhammer symbol too:

$$1+(-2)_{3456789}$$

Some useful information on Wolfram Alpha.

$\endgroup$
  • $\begingroup$ This is not valid, in the binomial coefficient k cannot be greater than n $\endgroup$ – leoll2 Apr 16 '15 at 15:28
  • $\begingroup$ Wrong, you can extend the definition from a combinatory point of view. $\endgroup$ – Francesco De Lisi Apr 16 '15 at 15:37
  • $\begingroup$ @leoll2 They are nonzero and even very useful when k>n and n is not a nonnegative integer. $\endgroup$ – user23013 Apr 16 '15 at 18:08
  • $\begingroup$ How do you define the factorial of a negative number? Check this: en.wikipedia.org/wiki/… $\endgroup$ – leoll2 Apr 16 '15 at 18:25
  • 1
    $\begingroup$ @leoll2 See here as an example: en.wikipedia.org/wiki/Binomial_series It works with any n, negative, real or complex. $\endgroup$ – user23013 Apr 16 '15 at 21:50
4
$\begingroup$

If parentheses will not be counted and if we could use it as multiply:

$12(34)-5(67)-8(9) = 1$

I used only 2 operators.

$\endgroup$
  • 1
    $\begingroup$ Clever way of finding a loophole lol. But I meant that parentheses can be used to change the order of operations. I should of mentioned that sooner but now the question is updated. $\endgroup$ – John Odom Apr 16 '15 at 21:20
  • 1
    $\begingroup$ @JohnOdom ah so I cannot use it as multiply now, dang! $\endgroup$ – Alex Apr 16 '15 at 21:21
  • 1
    $\begingroup$ * * * Puzzle poser (John Odom), if you do not have that explicitly changed in the instructions at present about the limitations of the parentheses, then Alex's solution stands as correct with only two operators. $\endgroup$ – Olive Stemforn Jun 20 '15 at 18:57
3
$\begingroup$

$$(1 + 23 + 45 + 6! - 789)! = 1$$

$$((1+2-3)\times456789)!=1$$

Everyone is trying with minimum operators.
I guess, with @user23013's solution, we can try with various possibilities :)

$\endgroup$
  • $\begingroup$ Any answer that cooperates with the rules is a good answer :). But I am hoping someone will be able to beat the top answer right now that has 3 operators. $\endgroup$ – John Odom Apr 17 '15 at 14:56
2
$\begingroup$

A simple expression that is exact, and only uses four operations without bending the rules (if exponentiation isn't permitted, I assume that neither is using the numbers to create n-th roots) while using at least one non-basic operation, is $$ ((1+2-3)\times456789)! $$ That's one addition, one subtraction, one multiplication, and one factorial (actually, zero factorial, but you know what I mean). Another similar option is $$ ((12/3-4)\times56789)! $$ A slightly more bendy solution using the fact that negative integer factorials can be considered to be infinite is $$ 1+2/(3-456789)! $$

$\endgroup$
1
$\begingroup$

Three Operators

Similar idea to Mwr247's solution, but even more significant figures:

$$\left(\frac1{23456789!}\right)! = 1$$

Wolfram Alpha seems to think it is exactly 1. Good enough for me >_>

$\endgroup$
  • $\begingroup$ Very clever... =P $\endgroup$ – Mwr247 Apr 16 '15 at 13:38
  • 1
    $\begingroup$ That is very clever, but I'm going to have to say that rounding is not allowed. Nice try though :) $\endgroup$ – John Odom Apr 16 '15 at 14:47
  • $\begingroup$ How does this work? $\endgroup$ – QuyNguyen2013 Apr 16 '15 at 22:50
  • 1
    $\begingroup$ The factorial of a fractional number is defined by the Gamma function. Since 1/23456789!=~10^-162695685 is really close to zero and 0!=1 then (1/23456789!)! is so ridiculously close to one, even WolframAlpha says 'yep, that's a one'. I'm honestly curious what it actually looks like in scientific notation. $\endgroup$ – Kyle Gullion Apr 16 '15 at 23:39
  • 1
    $\begingroup$ @kgull You can use the series expansion: $x!\approx 1 - \gamma x + O(x^2)$ ($\gamma$ is the Euler-Mascheroni constant). So, the expression is around $1-10^{-10^{8.211}}$. $\endgroup$ – 2012rcampion Feb 13 '16 at 8:19
0
$\begingroup$

$$1-23+45+67-89$$ uses only 4 operators.

$\endgroup$
  • $\begingroup$ This is the same as Maurius Van Hauwe with transposed operators. $\endgroup$ – Engineer Toast Apr 16 '15 at 12:40
0
$\begingroup$

Edit: I realized Alex did it using 2 operations using this loophole so this is nothing special. I'd delete this normally but I think this solution is still kinda cool.


I got three operations without using an nth root:

$(12)(3)(4)(.5)(-6+7)/((8)(9))=1$

Taking advantage of parentheses not counting. (Yes I know the rule wasn't meant for them to be used this way but I spent a long time thinking of how to exploit this loophole so cut me some slack.)

$\endgroup$
-3
$\begingroup$

In languages like C# and Java dividing two integers will always result in an integer (decimals will be omitted). Therefore only one operation is required to solve this problem:

12345/6789

Which will result in 1.

$\endgroup$
  • 4
    $\begingroup$ Welcome to Puzzling SE! This puzzle isn't about the behaviour of programming languages/computers, it's just a matter of math. 12345/6789 is a rational number in math! $\endgroup$ – leoll2 Apr 16 '15 at 12:34
  • $\begingroup$ And yet this solution evaluates to 1 while complying with the rules. $\endgroup$ – Mike. Apr 16 '15 at 12:43
  • $\begingroup$ It did comply with the rules but since I updated it to not allow rounding this answer will no longer be valid, unless you store the answer as a float and it does return 1. Sucking up with my coding languages will not work lol :P. $\endgroup$ – John Odom Apr 16 '15 at 14:50
  • $\begingroup$ @leoll2 "in math" What does that mean? When the "/" operator is defined as integer division, it's perfectly logical. $\endgroup$ – bjb568 Apr 16 '15 at 23:56
  • $\begingroup$ @bjb568 It's logical but the integer division is considered rounding the answer which will break rule #4. $\endgroup$ – John Odom Apr 17 '15 at 15:17
-4
$\begingroup$

One operator.

Taking advantage of user23013 's loop hole.

If √ can mean nth root:

$$\sqrt[23456789]{1}$$

$\endgroup$
  • 5
    $\begingroup$ Rule 1: The numbers need to be in the order that's shown in the question. $\endgroup$ – Engineer Toast Apr 16 '15 at 12:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.