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$
7
  • $\begingroup$ How long do you think it will be before someone writes a program to optimize it? $\endgroup$
    – mdc32
    Commented Jan 27, 2015 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
    Commented Jan 28, 2015 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
    Commented Jan 28, 2015 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
    Commented Mar 27, 2017 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
    Commented Mar 28, 2017 at 14:55

4 Answers 4

8
$\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$
3
  • 1
    $\begingroup$ I can do one better for 45. Namely, "+45" uses 11 matchsticks. Hey, it has at least one operator! $\endgroup$
    – Lopsy
    Commented Jan 28, 2015 at 16:13
  • $\begingroup$ (10), (45), (50) are optimal though not necessarily exclusively so. Still checking the others. $\endgroup$
    – Nij
    Commented Jun 30, 2016 at 1:44
  • 2
    $\begingroup$ As are (99) and (125). Well done. It can't get better, though alternatives can... match that score ;) yeeaaah! $\endgroup$
    – Nij
    Commented Jun 30, 2016 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$
4
  • $\begingroup$ How about $71+71-17$. It isn't optimal, but it is interesting. It takes 18 sticks I think. $\endgroup$
    – Trenin
    Commented Jan 27, 2015 at 14:23
  • $\begingroup$ And $71+54$ takes 16 as well. $\endgroup$
    – Trenin
    Commented Jan 27, 2015 at 14:25
  • $\begingroup$ @Trenin $71\times2-17$ as well. $\endgroup$
    – Jabe
    Commented Jan 27, 2015 at 14:46
  • $\begingroup$ You can only use the operators which are mentioned in the question. So the ^ operator is not allowed. $\endgroup$
    – Spikatrix
    Commented Jan 28, 2015 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$
5
  • $\begingroup$ Correct, except 16 isn't optimal for the last. See my answer, you can get down to at least 15. $\endgroup$
    – mdc32
    Commented Jan 27, 2015 at 13:28
  • $\begingroup$ @mdc32 Good one! $\endgroup$
    – Trenin
    Commented Jan 27, 2015 at 13:31
  • 1
    $\begingroup$ Yes. You have to use at least one operator in each expression. $\endgroup$
    – Spikatrix
    Commented Jan 28, 2015 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
    Commented Mar 29, 2017 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
    Commented Mar 29, 2017 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$
1
  • $\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$ Commented Aug 23, 2017 at 17:57

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