## Unknown Digits

A forum for good logic/math puzzles.

Moderators: jestingrabbit, Moderators General, Prelates

newbie11
Posts: 12
Joined: Fri Oct 05, 2012 1:09 am UTC

### Unknown Digits

Below is a simple logic problem with 2 x options, you will know you are right because both should give you the same answers. Let the first digit be D1, the second digit be D2 etc.

OPTION 1
Q = D2 + D4
R = D5 + D2 + 1
S = D1 - D3 + D2
T = D4 + D5 + 1
U = D1 - D5
V = D3 - D5 + D2
W = D4 + 1
X = D3 + D5

OPTION 2
Q = D5 - D4 - D3
R = D3 + D4
S = D3 x 2
T = D1 + D4
U = D5 - D3 - D2
V = (D2 x D4) + D2
W = D2 + D1
X = (D3 x D4) + D2

newbie11
Posts: 12
Joined: Fri Oct 05, 2012 1:09 am UTC

### Re: Unknown Digits

I should have mentioned that the digits D1, D2, D3, D4, D5 have to be a unique digit between 0-9.

mfb
Posts: 948
Joined: Thu Jan 08, 2009 7:48 pm UTC

### Re: Unknown Digits

Are there any constraints on the values of Q, R and so on?

ConMan
Shepherd's Pie?
Posts: 1683
Joined: Tue Jan 01, 2008 11:56 am UTC
Location: Beacon Alpha

### Re: Unknown Digits

For that matter, are Q, R, etc the same in the two options? Because I'm not sure there's a consistent solution if they are.
pollywog wrote:
Wikihow wrote:* Smile a lot! Give a gay girl a knowing "Hey, I'm a lesbian too!" smile.
I want to learn this smile, perfect it, and then go around smiling at lesbians and freaking them out.

emlightened
Posts: 42
Joined: Sat Sep 26, 2015 9:35 pm UTC
Location: Somewhere cosy.

### Re: Unknown Digits

Spoiler:

Code: Select all

`for k in map(lambda s: '{:0>5}'.format(s), range(10**5)):   D1,D2,D3,D4,D5=map(int,k)   if all([   D5 - D4 - D3 == D2 + D4,   D3 + D4 == D5 + D2 + 1,   D3 * 2 == D1 - D3 + D2,   D1 + D4 == D4 + D5 + 1,   D5 - D3 - D2 == D1 - D5,   (D2 * D4) + D2 == D3 - D5 + D2,   D2 + D1 == D4 + 1,   (D3 * D4) + D2 == D3 + D5   ]): print(k)`

Returns nothing.

ConMan's right.

"Therefore it is in the interests not only of public safety but also public sanity if the buttered toast on cats idea is scrapped, to be replaced by a monorail powered by cats smeared with chicken tikka masala floating above a rail made from white shag pile carpet."

curiosityspoon
Posts: 35
Joined: Wed Sep 24, 2014 5:01 pm UTC

### Re: Unknown Digits

Since apparently there's supposed to be some kind of logic (?) from which actual deductions can be drawn, it's rather easy to show that the letters can't have any kind of consistency to them across options, without appealing to a brute force printout.

The two expressions that each represent T are "D4 + D5 + 1" and "D1 + D4". By the transitivity of equality, those expressions are equal to each other, and so D5 + 1 = D1. (Coincidentally, it's immediately apparent that U = 1 from this and its first expression, but we don't need to use that fact for anything.)

The two expressions that each represent W are "D4 + 1" and "D2 + D1". These are likewise equal, and D1, D2, and D4 (as well as D5) are distinct single digits.
If D2 = 0, then D4 + 1 = D1...but D5 + 1 is also equal to D1, so D4 is clearly equal to D5 in this case, violating the uniqueness of the D-variables.
If D2 = 1, then D4 will be equal to D1, again violating uniqueness of digits.
With those two values ruled out, no matter what digit D2 takes on, it will necessarily be the case that D4 > D1, and of course D4 > D5 as well.

The two expressions that each represent Q are "D2 + D4" and "D5 - D4 - D3", and are equal.
The first expression, as the sum of two distinct single digits, is clearly positive.
The second expression begins with D5 - D4, but since we've established that D4 must be greater than D5, that difference is negative. Further subtracting another single digit in D3 can only drive the expression further into the negatives, so the two expressions for Q cannot, in fact, be equal. Q.....ED, I guess.

Cauchy
Posts: 602
Joined: Wed Mar 28, 2007 1:43 pm UTC

### Re: Unknown Digits

curiosityspoon wrote:(Coincidentally, it's immediately apparent that U = 1 from this and its first expression, but we don't need to use that fact for anything.)

We can get to a faster contradiction using it. Since U = 1, D5 - D3 - D2 = 1, and so D5 = D2 + D3 + 1. Setting the two expressions for Q equal to each other, we get D2 + D4 = D5 - D4 - D3, or D2 + D4 = (D2 + D3 + 1) - D4 - D3, which simplifies to D4 = 1/2. This isn't a digit, obviously.

Dropping the requirement that the D's be digits, we find that setting the expressions for Q, R, S, T, and U equal to each other gives a unique solution for the D's:
D1 = 3/2
D2 = -3/4
D3 = 1/4
D4 = 1/2
D5 = 1/2

This isn't consistent with the expressions for V being equal to each other though.
(∫|p|2)(∫|q|2) ≥ (∫|pq|)2
Thanks, skeptical scientist, for knowing symbols and giving them to me.