5
$\begingroup$

Instructions

You have a bag containing infinite number of matchsticks all having the same cuboidal shape and size. Digits can be made using these matchsticks:

DIGITS

  • $0$ takes 6 matchsticks
  • $1$ takes 2 matchsticks
  • $2$ takes 5 matchsticks
  • $3$ takes 5 matchsticks
  • $4$ takes 4 matchsticks
  • $5$ takes 5 matchsticks
  • $6$ takes 6 matchsticks
  • $7$ takes 3 matchsticks
  • $8$ takes 7 matchsticks
  • $9$ takes 6 matchsticks

And the operators which you can use are

  • '$+$' takes 2 matchsticks
  • '$-$' takes a matchsticks
  • '$\times$' takes 2 matchsticks

Requirement

You are required to create expressions by creating numbers and operators together using the matchsticks provided to you. The expressions that you create must have at least one operator and must have the result which will be provided to you.

Example

Question: Create an expression having result 1000 using matchsticks

Answer

$10 \times 10 \times 10$ takes 28 matchsticks

Question

Create an expression using the minimum number of matchsticks having results

  1. 10
  2. 45
  3. 50
  4. 99
  5. 125


I will accept the answer which uses the least number of matches in all the five expressions combined.
The current accepted answer by @Jabe uses a total of 55 matchsticks.
Have fun trying to beat the highscore!

$\endgroup$
  • $\begingroup$ How long do you think it will be before someone writes a program to optimize it? $\endgroup$ – mdc32 Jan 27 '15 at 13:29
  • $\begingroup$ @mdc32 , Making a program to answer this question is tiresome. You have to manually implement number of matches for each digit and then test the possibilites for all combinations! I don't think anyone will make a program for this question... $\endgroup$ – Spikatrix Jan 28 '15 at 13:36
  • 1
    $\begingroup$ If you're used to programming, and your language of choice has an eval(string) function, then it should take ~5 minutes to write a program to solve this. $\endgroup$ – Lopsy Jan 28 '15 at 17:32
  • $\begingroup$ @CoolGuy: I actually think "write a program to solve this" might be an interesting problem over at PPCG. Would you have any objections to it being posted there? $\endgroup$ – ais523 Mar 27 '17 at 20:51
  • $\begingroup$ @ais523 No. Not at all. You may do whatever you want with this. I don't mind even if you don't provide any attribution. You can do whatever you like. $\endgroup$ – Spikatrix Mar 28 '17 at 14:55
7
$\begingroup$
  1. (10) 7 matchsticks: $11-1$
  2. (45) 12 matchsticks: $44 + 1$
  3. (50) 10 matchsticks: $51-1$
  4. (99) 12 matchsticks: $11\times9$
  5. (125) 14 matchsticks: $114+11$

Total: 55 matchsticks

$\endgroup$
  • 1
    $\begingroup$ I can do one better for 45. Namely, "+45" uses 11 matchsticks. Hey, it has at least one operator! $\endgroup$ – Lopsy Jan 28 '15 at 16:13
  • $\begingroup$ (10), (45), (50) are optimal though not necessarily exclusively so. Still checking the others. $\endgroup$ – Nij Jun 30 '16 at 1:44
  • 1
    $\begingroup$ As are (99) and (125). Well done. It can't get better, though alternatives can... match that score ;) yeeaaah! $\endgroup$ – Nij Jun 30 '16 at 1:52
1
$\begingroup$
  1. $11 - 1$ takes 7 sticks.
  2. $9 \times 5$ takes 13 sticks.
  3. $51 - 1$ takes 10 sticks.
  4. $11 \times 9$ takes 12 sticks.
  5. $5^3$ would take 10, but if not, then $121 + 4$ takes 15, I think.

Still working on a program to optimize it, but that could take a bit.

$\endgroup$
  • $\begingroup$ How about $71+71-17$. It isn't optimal, but it is interesting. It takes 18 sticks I think. $\endgroup$ – Trenin Jan 27 '15 at 14:23
  • $\begingroup$ And $71+54$ takes 16 as well. $\endgroup$ – Trenin Jan 27 '15 at 14:25
  • $\begingroup$ @Trenin $71\times2-17$ as well. $\endgroup$ – Jabe Jan 27 '15 at 14:46
  • $\begingroup$ You can only use the operators which are mentioned in the question. So the ^ operator is not allowed. $\endgroup$ – Spikatrix Jan 28 '15 at 13:53
0
$\begingroup$

First off, in your example, you used $10\times10\times10$ which seems to me that we can make numbers with multiple digits.

Usually, the definition of an expression doesn't require the use of an operator, so I would make the following trivial initial guesses:

  1. 10: 8 matchsticks - "$10$"
  2. 45: 9 matchsticks - "$45$"
  3. 50: 11 matchsticks - "$50$"
  4. 99: 12 matchsticks - "$99$"
  5. 125: 12 matchsticks - "$125$"

But none of these answers is very interesting. In fact, some of them aren't even optimal! So I will assume that we need to include operators.

  1. 10: 7 matchsticks - "$11-1$"
  2. 45: 13 matchsticks - "$5 \times 9$"
  3. 50: 10 matchsticks - "$51 - 1$"
  4. 99: 12 matchsticks - "$11 \times 9$"
  5. 125: 16 matchsticks - "$11 \times 11 + 4$"
$\endgroup$
  • $\begingroup$ Correct, except 16 isn't optimal for the last. See my answer, you can get down to at least 15. $\endgroup$ – mdc32 Jan 27 '15 at 13:28
  • $\begingroup$ @mdc32 Good one! $\endgroup$ – Trenin Jan 27 '15 at 13:31
  • 1
    $\begingroup$ Yes. You have to use at least one operator in each expression. $\endgroup$ – Spikatrix Jan 28 '15 at 13:54
  • $\begingroup$ @mbomb007 If you look at the edit history of the question, that requirement was added after I posted my answer. I even noted in this answer that doing so without an operator results in trivial answers, which is why I included answers for them also with operators. $\endgroup$ – Trenin Mar 29 '17 at 16:37
  • $\begingroup$ The requirements changing isn't really an excuse to not change your answer to fit them. Just get rid of the ones that don't fit, I'd say. $\endgroup$ – mbomb007 Mar 29 '17 at 17:38
-2
$\begingroup$

54.

11-1

5×9

51-1

11×9

112+4

The sum's 54. He didn't say exponentiation assumed with using ^ operator. QED

$\endgroup$
  • $\begingroup$ The question says, “the operators which you can use are +, −, and ×”.  Since it doesn’t mention exponentiation, that means that exponentiation is not allowed. QED $\endgroup$ – Peregrine Rook Aug 23 '17 at 17:57

protected by Rand al'Thor Aug 23 '17 at 18:59

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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