1. ## License Plate number problem

Hi,

I am trying to solve a problem with 4 numbers on a license plate or rather 4 numbers.

Let's say there's a license plate with 4 numbers 3420

I need an output of 10 from these numbers. i.e. 3X4 - 2 = 10
Assumptions: All 4 numbers cannot be same and not all can be zero

You can sum the numbers. You can multiply two numbers and divide by one of the other numbers and subtract from the remaining 4th number.

I want to know what all permutations and combination can I use in my approach. Please let me know.

Thanks

2. ## Re: License Plate number problem

Originally Posted by pkrish
You can sum the numbers. You can multiply two numbers and divide by one of the other numbers and subtract from the remaining 4th number.
The first thing to do is to get a formula for how you can use the numbers. For a number like ABCD or DBAC in this description you described $\frac{AB}{C}-D=10$ but in your example you just used $AB-C=10$
Decide exactly what is and is not allowed. If you can add, subtract, multiply and divide in any order then you have a ridiculous number of combinations.

3. ## Re: License Plate number problem

Originally Posted by pkrish
Assumptions: All 4 numbers cannot be same and not all can be zero
Well, if they can't all be the same then of course they can't all be 0.

Originally Posted by pkrish
You can sum the numbers. You can multiply two numbers and divide by one of the other numbers and subtract from the remaining 4th number
So the only allowed operations are A+B+C+D, AB/C-D, and AB/D-C? But you use AB-C+D (I'm assuming yuo left the +0 term off your example).
Please clarify exactly what operations are allowed, or not allowed.

4. ## Re: License Plate number problem

Also, are you allowed to add parentheses? Assuming this is one of those problems where you may use any of the four arithmetic operators of addition, subtraction, multiplication, and division, and you can choose any order of operations you like, the problem is extremely complex. One way to do this is to first choose the placement of parentheses:

1. ((A op1 B) op2 C) op3 D
2. (A op1 (B op2 C)) op3 D
3. A op1 ((B op2 C) op3 D)
4. A op1 (B op2 (C op3 D))
5. (A op1 B) op2 (C op3 D)

That is all possible placements of parentheses. So, given any four numbers in a particular order, there are $5\cdot 4^3 = 320$ ways of evaluating them (ignoring division by zero). Next, you limit the possible values for $A,B,C,D$ so that each must be a digit from 0 to 9, and you cannot use the same digit for all four numbers. Still ignoring division by zero, that is a total of $(10^4-10)\cdot 320 = 3,196,800$ calculations that you are checking to see when you get 10. That is a pretty complex problem...

I would recommend writing a computer program to find all possible solutions.

Edit: Using Excel, I found that there are 5939 sequences of four numbers where there exists a way to place binary operators between each number and choose an order of operations so that you get 10.