47

On the Mathematics chat we were recently talking about the following problem @Chris'ssis had to solve during an interview :

$$3\times 4=8$$ $$4\times 5=50$$ $$5\times 6=30$$ $$6\times 7=49$$ $$7\times 8=?$$

We have not managed to solve it so far, all we know is the solution (which was given after we had given up) :

$224$

How do we find this solution ?

  • 4
    It's an ambiguous problem in the whole, though. – Balarka Sen Jul 14 '14 at 14:03
  • 113
    What kind of interview was this? I hate it when people use equals signs to describe relations that aren't equal. – NoName Jul 14 '14 at 14:05
  • 2
    @ZachGershkoff It depends on the definition of the operation $\times$ ... that is what this problem asks for: To find a reasonable definition of $\times$. – martini Jul 14 '14 at 14:06
  • 9
    @martini The problem is that we can't define "reasonable" =) – Balarka Sen Jul 14 '14 at 14:08
  • 1
    @BalarkaSen That's right. As for all these problems ... – martini Jul 14 '14 at 14:10
  • 17
    "interview" and "riddle" - unless you're Tom Riddle and you're interviewing somewhere, you should never hear those two words in the same sentence. =( – corsiKa Jul 14 '14 at 17:35
  • 74
    That interview question is good sign that it's time to walk out the door. – RQDQ Jul 14 '14 at 17:48
  • 2
    naa, its a common practice to through such questions at the job seeker. Trust me, I have seen these kind of question. The aim, which is still debatable, is to check the logical approach of the candidate. And yes, these questions cannot be supported by a proper mathematical proof of concepts. Sigh! – MonK Jul 14 '14 at 18:31
  • 2
    Did the interviewer give the answer? Or was the question 'the answer is 224, why?'. Could have been one of those questions where they just want to see what you try. Some more context would be nice! – john w. Jul 14 '14 at 18:58
  • To me, it would seem a better way to ask this question is to posit some function f(x,y) = z given the following examples ... determine the function. I don't see the point in using the standard multiplication symbol when determining how a candidate solves mathematical problems. – CramerTV Jul 14 '14 at 19:23
  • 51
    I would probably have taken this question as a challenge to convince the interviewer that the answer isn't 224. The question is arbitrary, so it really just comes down to a battle of wills. Bonus points if you make the interviewer cry while he concedes your answer. – DanielV Jul 14 '14 at 21:02
  • Btw, as a general riddle solving technique, when no pattern appears in a set of numbers, it probably involves some a posteriori information. Dates, Sports data, etc. It might be relevant what the company and job position are. – DanielV Jul 14 '14 at 21:10
  • 2
    @corsiKa, It's pretty common to give a riddle at an interview not to see if you can arrive at the answer, but to see how you attempt to find an answer. – Brian S Jul 14 '14 at 22:44
  • 28
    @DanielV: further bonus points if you can get the person you'll be negotiating salary with in on the discussion. "Your salary will be 56K", "excellent, and 56 = 7 * 8 = 224, so what's 224k after tax and what's the dental plan?" – Steve Jessop Jul 14 '14 at 23:32
  • 8
    This is almost as bad as $\sum \limits_{n=1}^{\infty} n = -\frac{1}{12}$. :) I really abhor bad notation choices. – Ryan Jul 15 '14 at 00:24
  • 1
    I think we should add the hint (even if as a spoiler) that what we need is to re-define $\times$. (I think an interviewer would answer "yes" to the question, "Does 4 still mean 4?" etc.) – Andrew Kelley Jul 15 '14 at 02:51
  • 2
    I would expect a problem like this to have something to do with meta-information about the numbers like the number of letters in their words in Esperanto or something. If an employer insisted on asking questions like these I'd probably take it to mean that I don't to work there anyway. – fluffy Jul 15 '14 at 06:22
  • 5
    I see a picture. What's the question? As far as I see, 7 x 8 = ?. By definition. – HostileFork says dont trust SE Jul 15 '14 at 07:22
  • Take the first one, which says 12 = 8. Subtract 8 and divide by 4. You have proven that 1 = 0, so any number is equal to any other. If the interviewer claims that 7 x 8 = 224, he is right. So are you, if you claim it is any other value. – CompuChip Jul 15 '14 at 09:18
  • On the one hand I am also inclined to be cynical about this question, but on the other hand, look at some of the answers it yields. It's interesting to see what patterns people discover in a seemingly irregular pattern like this one, and what (possibly arcane) methods/knowledge they apply in arriving at it. Moreover, some openly dislike the question but apparently still feel urged to act on the problem-solving itch. Speaks for them. – Roy Jul 15 '14 at 09:59
  • 1
    If you're going to redefine x, why not also redefine = and/or the digits? – keshlam Jul 15 '14 at 18:41
  • 4
    Simple approach: $7\times8$ is $56$. Just because the interviewer has supplied a lot of incorrect information does not mean you are obliged to supply, or consent to, an incorrect answer. – David Jul 16 '14 at 08:04
  • 1
    Might be worth seeing if this would be a good fit for http://puzzling.stackexchange.com/ (I don't know if it is since although I've popped over there occasionally I've never wanted to post so haven't read their guidelines). Should have people who might be up for the challenge from a less mathematical point of view (which might be appropriate here). – Chris Jul 16 '14 at 11:07
  • 2
    "There are uncountable many functions that match the given examples. Shall I enumerate them all?" – Cephalopod Jul 16 '14 at 11:40
  • 1
    Just working through it, noticing the sixths. 34=124/6=8 45=20(35)/6=50 56=306/6=30 67=427/6=49 78=56(38)/6 = 224 It's increasing sixths, multiplied by 3 when the first number is 3x+1. – please delete me Jul 16 '14 at 18:15
  • 2
    What job was the interview for ? So we could see if they were looking for a mathematical answer or for a "trick" based on some sort of logic answer – WizardLizard Jul 17 '14 at 11:43
  • 3
    This is not mathematics. This is numerology. – Potato Jul 20 '14 at 01:14
  • I think my answer below shows how to come to the "expected solution" 224. As it was shown here it is one of many solutions that would fit. However I think the expected solution has beauty and logic....and at the end is quite SIMPLE! I also added some more explanation to it. – user2477732 Jul 20 '14 at 09:34
  • I think there is a lot of negativity on this style. As long as no one said "times," I think we are O.K. We can (hopefully) all wrap our head around a well defined binary operation on $\mathbb Z$ that overloads notation that is not used elsewhere in the problem. It isn't nice, but it could be way worse. – Thoth19 Jul 21 '14 at 05:16
  • 1
    Interview questions such as this remind me that "communicating badly and then acting smug when you're misunderstood is not cleverness". They are also a good indicator that you don't want the job. – zzzzBov Jul 21 '14 at 05:43
  • @ZachGershkoff but $5\times 6=30$ so it is not that :) – Lost1 Jul 21 '14 at 14:06

17 Answers17

109

These interview problems are sometimes weird, where notations are bad, rules are arbitrary, and they expect only one answer where several could fit.

Here is one, which could be the expected one, but probably not:

To compute $a \times b$, take the numerator of $\dfrac{ab^2}{6}$ after simplification of the fraction.

I don't see how they could argue it is wrong.

Denis
  • 6,945
  • 1
  • 21
  • 22
96

Easy, just define

$$\begin{array}{rcl}a \times b &=& \hspace{10.5pt}(a-4)(b-5)(a-5)(b-6)(a-6)(b-7)(a-7)(b-8)/72 + \\&& 25(a-3)(b-4)(a-5)(b-6)(a-6)(b-7)(a-7)(b-8)/18 + \\&& 15(a-3)(b-4)(a-4)(b-5)(a-6)(b-7)(a-7)(b-8)/8 \hspace{5.25pt}+ \\&& 49(a-3)(b-4)(a-4)(b-5)(a-5)(b-6)(a-7)(b-8)/36 + \\&&\hspace{5.5pt}7(a-3)(b-4)(a-4)(b-5)(a-5)(b-6)(a-6)(b-7)/18\end{array}$$

  • 53
    You mean $\frac{181 a ^{4} b ^{4} - 4318 a ^{4} b ^{3} + 37880 a ^{4} b ^{2} - 144623 a ^{4} b + 202440 a ^{4} + -3594 a ^{3} b ^{4} + 85893 a ^{3} b ^{3} - 754833 a ^{3} b ^{2} + 2886774 a ^{3} b - 4047120 a ^{3} + 26012 a ^{2} b ^{4} - 622766 a ^{2} b ^{3} + 5482627 a ^{2} b ^{2} - 21003793 a ^{2} b + 29493240 a ^{2} + -81093 a b ^{4} + 1944783 a b ^{3} - 17150580 a b ^{2} + 65813730 a b - 92559600 a + 91560 b ^{4} - 2199120 b ^{3} + 19423320 b ^{2} - 74648280 b + 105134400}{36} $? – Axel Kemper Jul 15 '14 at 08:30
  • 19
    @AxelKemper Multiplication has never looked so epic! – CaptainCodeman Jul 15 '14 at 08:34
  • 9
    Holy Mother God! – MonK Jul 15 '14 at 18:09
  • 6
    Hilarous $\phantom{}$ – Newb Jul 15 '14 at 19:41
  • 3
    This is obviously the answer. How can it be anything else. – Lost1 Jul 21 '14 at 13:55
  • @CaptainCodeman how did you get that ? – ParaH2 Nov 05 '16 at 14:12
  • Did someone even check whether all the pairs give correct answers? – Truth-seek Jun 28 '17 at 17:34
  • 1
    @Hexacoordinate-C For every value of a,b all of the expressions evaluate to zero except one. Then you just need to change the coefficient for that expression to make it be whatever you want it to be. – CaptainCodeman Jul 02 '17 at 03:30
69

This might be a possible solution. For a positive integer $n$, let $\nu_2(n)$ be the largest $k$ such that $2^k|n$, and similarly, let $\nu_3(n)$ be the largest $k$ such that $3^k|n$. Finally let $$h(n)=\frac{n}{3^{\nu_3(n)}2^{1+4\lfloor \nu_2(n)/4\rfloor}}$$ If we consider $$ a\times ~ b {\buildrel \rm def\over =}~b h(ab) $$ then $(k-1)\times k$ coincides with the proposed results for $k=4,5,6,7$ and yields $224$ for $k=8$.

Omran Kouba
  • 28,772
36

The left-hand-side input and the right-hand-side output can be imagined as binary numbers in a kind of truth table:

enter image description here

All eight output bits can be calculated from the seven input bits evaluating simple Boolean expressions.

Axel Kemper
  • 4,943
  • 21
    I figured binary boolean logic was involved. However, without knowing the final answer to the question, you wouldn't come up with the right answer, because without knowing from 7x8=224 that h=i=d, and also not knowing that results larger than 6 bits exist, your method would give you an answer of just 100000 (32). – KeithS Jul 14 '14 at 20:59
  • +1 for the analysis though. – KeithS Jul 14 '14 at 21:04
  • 2
    All the operations are very arbitrary, though. Given just the first 4 and no solution, you could do many distinct operations for each digit and get many different solutions. You could make the "answers" to the "equations" just about any 5 numbers and come up with binary operations – Khan Jul 15 '14 at 16:56
  • 1
    where is 'L' and 'O' ? – user3459110 Jul 16 '14 at 05:25
  • 2
    @Awal: Developers often skip l and o to avoid confusions. Now, I seem to have confused you? – Axel Kemper Jul 16 '14 at 06:34
  • Awesome. Bits h, i, and j are completely arbitrary. So, you could set h = 0, i = 0, and j = g and still be consistent with the four given clues. Then, insist that $7 \times 8 = 0$ until you get the job. – 200_success Jul 20 '14 at 05:54
30

Spoiler Alert: (I use the answer given above in the response below. If you don't want to see it, you may want to skip this answer...)

I'm replacing $\times$ by $\circ$, as the latter is more commonly used with unknown operations. I hate it when people redefine a common symbol, then "$=$" to describe a relationship.

Note that $$\begin{align}3\circ4 &= 4\cdot 2\\ 4\circ 5 &= 5\cdot 10\\ 5\circ 6 &= 6\cdot 5\\ 6\circ 7 &= 7\cdot 7 \\ 7\circ 8 &= 8\cdot 28 \\ \end{align}$$

Thus, we can define: $$a\circ b\quad{\buildrel \rm def\over =}\quad b\cdot x_a$$ Where $x_n$ is some sequence. OEIS yields three possible sequences: $$x_n = \frac{\binom{n+2}{2}\gcd(n,3)}{3},\quad n \ge 0$$ (A234041) $$x_n = \text{denominatorOf}\left(\frac{(n-2)(n+3)}{(n)(n+1)}\right)\quad n \ge 3$$ (A027626: GCD of $n$-th and $(n+1)$st tetrahedral numbers, offset by me for this problem)

The last sequence from OEIS is A145911 which is not promising at all. (It's a combination of, what appears to be, $3$ other sequences.)

apnorton
  • 17,706
  • Note: I may have goofed up in how I offset the sequence, but I think I did it right... – apnorton Jul 14 '14 at 18:21
  • 64
    To me, this confirms that the interviewer is smoking crack. – heropup Jul 14 '14 at 18:24
  • I agree with @heropup, although it does depend what the job is for. I mean, if this is a job ad for some mathematics specialist, then ... maaaybe ... – GreenAsJade Jul 17 '14 at 01:05
  • If you search the first 4 terms of $x_a$ on OEIS, the 5th term in the first few results is 28, so that's a way this could plausibly be "solved". – Jakob Weisblat Jul 20 '14 at 15:36
21

The answer is $42$.

$69$ is also the answer.

"Purple feelings" is also an answer.

The truth of each of these is, of course, vacuous. :)


If the question is posed as something other than multiplication, then it is the fault of the questioner for miscommunicating.

Although, one could arguably blame the person trying to solve this problem for not doing enough to extract enough requirements from the 'customer' to be able to provide a solution. In some settings, this is an extremely important skill.

16

56 Did the question explicitly say there was a pattern to be found or is it just like you've presented it here? The symbols for multiplication(x) and equality(=) have well defined mathematical meaning and therefore 7 x 8 = 56 regardless of what misleading noise was written before. It may just be a test of the ability to avoid presumption.

maddog2k
  • 177
  • 1
    That is one approach, but there are a large class of problems like this (although I hate them all) that redefine either $=$ or $\times$. This is, most likely, one of these problems. – apnorton Jul 15 '14 at 03:24
  • 3
    +1. If you want to redefine standard mathematical operations, you should say so. Otherwise, stick to mathematical convention. If you want me to solve a "mathematics" puzzle and can't manage to bring it across properly, I don't expect we'll be able to communicate very well and this is probably not a person I want to work for :) – CompuChip Jul 15 '14 at 09:20
14

$$p(x)=$$

$$-\frac{1486263915627335609976345925580307452480}{198824918770116952269605821139049374259}-\frac{23535858736574459335924875719051524464677 x}{1789424268931052570426452390251444368331}+\frac{1532186339457747628597246965489647712097745599 x^2}{742539494635629574624160683858739355082631760}-\frac{5300973178829466500668773673899060773511329723 x^3}{62373317549392884268429497444134105826941067840}+\frac{425139989729581169917246837619141657974952401 x^4}{374239905296357305610576984664804634961646407040}-\frac{15160892592292573821061148160317799661783 x^5}{7128379148502043916391942565043897808793264896}+\frac{2379833487879115598578638026951579913181 x^6}{1496959621185429222442307938659218539846585628160}-\frac{133849478325585275186149006837381343 x^7}{249493270197571537073717989776536423307764271360}+\frac{9291465647310545015926219743101 x^8}{136087238289584474767482539878110776349689602560}$$

Then
$$\begin{array}{|c|c|c|c|c|c|c|c|c|} \hline x & 12\color{grey}{(3\times 4)} & 20\color{grey}{(4\times 5)} & 30\color{grey}{(5\times 6)} &42\color{grey}{(6\times 7)}&56\color{grey}{(7\times 8)}& \color{grey}{1729}&\color{grey}{2014}&\color{grey}{2015}&\color{grey}{2016}\\ \hline p(x)& 8 & 50 & 30 &49&\color{red}{224}& \color{grey}{1729}&\color{grey}{2014}&\color{grey}{2015}&\color{grey}{2016} \\ \hline \end{array}$$

To learn to play this 'game', read me.

hrkrshnn
  • 6,287
9

Here is something I did which lead me to an incorrect result, but it is still pretty close.

Since all the values we are given are of the form $a\times (a+1)$, I decided to make the function $f(a)=a\times (a+1)$. Assuming $f$ is a polynomial of grade $4$ or less we obtain $f$ is equal to $\frac{101 x^3}{6}-233 x^2+\frac{6301 x}{6}-1500$ using interpolation.

This function gives us $f(7)=208$, which comes close, but is still not correct.

Asinomás
  • 105,651
  • The f function in not incorrect, although it may yield defferent result from that in the "supposed" answer. – Cthulhu Jul 16 '14 at 07:50
  • Haha, well I guess you are right, I don't think anyone would have arrived at the "correct" solution if they hadn't provided it. – Asinomás Jul 16 '14 at 13:22
  • 1
    "Correct" in the context of this interview question seems to mean someone thinking the same way they do. My alternative answer is (101 b^3)/6 - (567 b^2)/2 + (4700 b)/3 - 280, which gives the same answer as yours. Therefore, our answers are correct because we think the same way – Daniel Gibson Aug 26 '23 at 12:43
4

This is what I have so far, it seems a bit more intuitive than Omran's solution.

Based on the flip-flopping numbers, I figured the answer has to rely on the prime factorization of the numbers in question. So in particular, we see:

$$3 \times 2^2 \Rightarrow 2$$ $$2^2 \times 5 \Rightarrow 2*5$$ $$5 \times 2 * 3 \Rightarrow 5$$ $$2 * 3 \times 7 \Rightarrow 7$$ $$7 \times 2^3 \Rightarrow 2^2*7$$

So my initial hypothesis, which is that you took the highest prime and any primes with power greater than $1$ fails for the first equation. But it does look like a promising lead.

Kevin
  • 736
  • I reached the same conclusion (and honestly reached it, unlike my comment to boywholived where I clearly lied through my teeth). Prime factorization plays a role somehow. – corsiKa Jul 16 '14 at 17:57
4

One solution is to define the operation $\times$ between two integers as

$m \times n = n \cdot \left\{ \begin{array}{ll} \frac{1}{3}\sum_{k=1}^m k &\mbox{if } 3 \mid \sum_{k=1}^m k \\ \sum_{k=1}^m k &\mbox{otherwise.} \end{array} \right.$

The point is, that what remains of the RHS after dividing by $n$ can be recognized as the sum of the first $m$ integers, divided by $3$ should that be possible.

vuur
  • 1,262
4

numbers sequence

3 . 4 = 4 X 2 = 8

4 . 5 = 5 X 10 = 50

5 . 6 = 6 X 5 = 30

6 . 7 = 7 X 7 = 49

7 . 8 = 8 X 28 = 224

8 . 9 = 9 X 4 = 36

9 . 10 = 10 X 5 = 50

10 . 11 = 11 X 55 = 605

11 . 12 = 12 X 11 = 132

12 . 13 = 13 X 13 = 169

13 . 14 = 14 X 91 = 1274

14 . 15 = 15 X 7 = 105

15 . 16 = 16 X 8 = 128

16 . 17 = 17 X 136 = 2312

17 . 18 = 18 X 17 = 306

18 . 19 = 19 X 19 = 361

19 . 20 = 20 X 190 = 3800

20 . 21 = 21 X 10 = 210


a.(a+1) = (a+1)x((a+1)/2) - even number/2

b.( b+1) = (b+1)x(((a+1)/2 )xc)) - middle of the sandwich

c.(c+1) = (c+1)xc


d.(d+1) = (d+1)x(d+1) - odd number - copy

e.(e+1) = (e+1)x((d+1)x(f/2))

f.(f+1) = (f+1)x(f/2)


a+1=b, b+1=c,…



The problem is more about finding the patterns and relations between numbers and given equations.

3×4=8
4×5=50
5×6=30
6×7=49
7×8=?

There are some assumptions that have to be made:
1) look at the given equations as a sequences of numbers (sequences is plural - not just one sequence)
2) results on the right side can always by divided by the second number on the left side 8:4=2, 50:5=10, 30:6=5, 49:7=7 => the result of the last equations is therefore multiple of 8 => 7x8=8x?=???
(Note: Why did they use "x" when multiplication is clearly not what is done with those numbers? Why not better use symbol ∘ for unknown operations? My guess is - it's also a hint.... multiplication is necessary in the answer. ....so don't try to come up with solutions that are more complex than that ;-) But that's just my guess)
3) we can write down what we assume so far:
3 ∘4 = 4 X 2 = 8
4 ∘ 5 = 5 X 10 = 50
5 ∘ 6 = 6 X 5 = 30
6 ∘ 7 = 7 X 7 = 49
7 ∘8 = 8 X ?=???

  1. we can also say that after 7∘8=8x???

some other equations should follow and the patter we know so far is is:

8 ∘9 = 9 X ?=???
9 ∘10 = 10 X ?=???


5) now look at the numbers sequence (fourth number in each equation): 2, 10, 5, 7, ... there are of course many things we can do (2+8=10, 10-5=5, 5+2=7,etc.)... but we also have a possible relation to 3.4, 4.5, 5.6,6.7
6) the easy patter would be "sandwich"- second number = first*third
7) how to define first and third number? - check the relation with 3.4 and 5.6 and first number also has a relation to 7.7
..the rest I already explained in the comment section below ;-)
  • (fourth number) in the sequence is 7 (from 7X7=49), (fifth number) must be 7*(sixth number)….
  • – user2477732 Jul 15 '14 at 18:12
  • I think I see what you're saying...it's kind of a weird guess, but I guess they all are. – Beska Jul 16 '14 at 11:59
  • This is definitely on the right track, there's some sandwich rule logic going on. – Kyle Hale Jul 16 '14 at 16:08
  • No it is definitely made up. (fourth number) in the sequence is 7 (from 7X7=49), (fifth number) must be 7*(sixth number) and where did you take the sixth number then? – Cthulhu Jul 17 '14 at 05:05
  • 3)sixth number must be in relation to third row: 5 . 6 = 6 X 5 = 30, my first thought was 8 . 9 = 9 X 8 = 56 -> where 7.8=8x56=448 – user2477732 Jul 17 '14 at 07:13
  • the decision to divide (sixth number)/2 - better relation to the first row 3 . 4 = 4 X 2 = 8 (/2) and forth row 6 . 7 = 7 X 7 = 49
  • – user2477732 Jul 17 '14 at 07:27