Tag Info

Hot answers tagged

88

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 ...


67

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 + ...


56

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 ...


37

The book contains $p$ sheets (leafs) and has therefore pagenumbers from $1$ to $2p$. The sum of all the pagenumbers is then given by $$ \sum_{i=1}^{2p}i =p \Big( 2p + 1 \Big). $$ The father holds the page with page number $n$ in his hand, so we need to solve $$ 81,707 = p \Big( 2p + 1 \Big) - n. $$ As $81,707 \le p \Big( 2p + 1 \Big)$, we obtain $$ p ...


36

We can describe this walk in the complex plane. Starting at $z=0$ we add in sequence $$a,-i r a, -r^2 a, ir^3 a,\ldots (-i r)^k a,\ldots.$$ This is simply the geometric series $\sum_{k=0}^\infty (-i r)^k a = a/(1+I r)$ which is at a distance of $|a/(1+I r)|=a/\sqrt(1+r^2)$ from the origin. Additionally: An immediate generalization is that if we turn an ...


33

The left-hand-side input and the right-hand-side output can be imagined as binary numbers in a kind of truth table: All eight output bits can be calculated from the seven input bits evaluating simple Boolean expressions.


30

The horizontal displacement will be $$L_x=a-r^2a+r^4a-\ldots\;=\frac{a}{1+r^2},$$ and the vertical one $$\;L_y=ra-r^3a+r^5a-\ldots=\frac{ra}{1+r^2}.$$ The result then follows from the Pythagorean theorem: $$L=\sqrt{L_x^2+L_y^2}=\frac{a}{\sqrt{1+r^2}}$$


25

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 ...


23

The sum of the numbers on all of the hats must be congruent to one of $0, 1, 2 \pmod{3}$. If a gnome knows the sum of all the hats $\pmod{3}$ and the sum of the other gnomes' hats $\pmod{3}$, he can subtract to get the number on his hat $\pmod{3}$, and thus, the number on his hat. Since the gnomes don't know the sum of all the hats $\pmod{3}$, they do the ...


15

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 ...


14

Let $p,p+1$ be the pagenumbers of the pages he is holding. Assume the book has $n$ pages. Then: $$81707=\sum_{i=1}^ni-(p+p+1)=\frac{n(n+1)}{2}-2p-1.$$ It is clear that $\frac{n(n+1)}{2}$ must be an even number, say $2m.$ So $$81707=2m-2p-1=2(m-p)-1\implies m-p=40854.$$ That is $$\frac{n(n+1)}{4}=p+40854,$$ from where ...


14

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.


13

It is immediately obvious that a transformation consisting of a clockwise rotation of $\pi/2$ radians and a contraction by a factor of $r$ about the limiting endpoint of the path will map the black path to a proper subset of itself; therefore, if we enumerate the vertices starting from the outermost vertex, the red line segment is a subset of a single line ...


11

$$p(x)=$$ $$-\frac{1486263915627335609976345925580307452480}{198824918770116952269605821139049374259}-\frac{23535858736574459335924875719051524464677 x}{1789424268931052570426452390251444368331}+\frac{1532186339457747628597246965489647712097745599 x^2}{742539494635629574624160683858739355082631760}-\frac{5300973178829466500668773673899060773511329723 ...


9

The reason your intuition deceives you is because we often like to forget strategies which depend on the numbering of the coins, and instead think about it in terms of abstract coins, so at each step the devil takes back one coin, and puts in two new ones instead. The problem is that this description of the problem has different possible outcomes, which ...


9

If we have only pirates $D,E$, then $D$ may suggest that he gets all the coins, a suggestion supported by the required 50% (himself). Consequently, with three pirates $C,D,E$, pirate $E$ will support any suggestion that gives him more than $0$ coins, $D$ will object to any suggestion (including the suggestion to give him all as this results in some killing ...


7

If it gets as far as $P_4$, then $P_4$ will suggest a division of $(0,0,0,100,0)$, and successfully vote in favour of it. So $P_5$ can't allow this. Hence if it gets as far as $P_3$, then $P_3$ will suggest $(0,0,99,0,1)$, which wil be approved by $P_3$ and $P_5$. So $P_4$ can't allow this. Hence if it gets as far as $P_2$, then $P_2$ will suggest ...


7

$f(x_1,x_2,x_3,x_4,x_5)$ = the number of positive numbers amongst the $x_i$ is a perfectly reasonable description of a math function that returns the number of positive numbers amongst the five parameters. If I define $$ g(x) = \begin{cases} 0 & x \leq 0 \\ 1 & x > 0 \end{cases} $$ then $$f(x_1, x_2, x_3, x_4, x_5) = \sum_{i=1}^5 g(x_i) ...


7

This is actually a well known problem called the Ross–Littlewood paradox. The paradox typically, however, does not say anything about the numbering of the coins or which coins are added/removed. In this case it is impossible to say how many coins are left due to what Asaf Karagila said. In your version, however, it is true that there will be no coins left. ...


7

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. ...


6

A symmetry argument not requiring any geometric/infinite series summation. Consider just one "turnaround": just after he makes an "up" move of $r^3 a$. He will next make a step of $r^4 a$ to the right, parallel to the first right, as part of the second "turnaround". He is now at a distance $D_1 = \sqrt{(a-r^2a)^2 + (ra - r^3a)^2} = a(1-r^2)\sqrt{1+r^2}$ ...


6

$$f(x_{1}, ..., x_{5}) = \sum_{i=1}^{5} g(x_{i})$$ where we defined $g(x) = \frac{|x| + x}{2x}$ if $x \neq 0$, 0 otherwise. The function $g$ takes the value $1$ if and only if $x$ is stricly greater than 0, for in this case $x+|x| = 2x$. When $x\leq 0$, $|x| -x$ =0. Hence, $f$ counts the number of positive numbers among the $x_{i}$'s. edit : did I get ...


5

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 = ...


5

Let there be $n$ pages, and suppose your father is on page $k$. Then you want $$\sum_{i=k+1}^ni=81707$$ Do you know how to calculate this sum?


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 ...


4

I think you need an unbounded number of coin tosses, however the expected number of tosses to settle the issue will be finite: Toss twice. If it comes up heads, then tails, A wins. If it comes up tails, then heads, B wins. If the two tosses come up the same, start over. If the coin is extremely unfair, this will probably take a long time, but if it is only a ...


4

Here's a simple solution to the problem using a bit of programming. Let remainingPageSum equal 81707. Let a page number counter pageNumber equal 1. Let totalPageSum equal pageNumber. While totalPageSum is less than remainingPageSum: Increment pageNumber by 1, and Increment totalPageSum by pageNumber. Now you have totalPageSum equal to 81810. Subtract ...


4

I commented on the previous post as well! There is a good reason you couldn't find an example by hand: the smallest example of what's called a perfect squared square is a $112\times 112$ (link). There is much more research here.


4

I would calculate horizontal and vertical distances separately and then use Pythagoras theorem to calculate the total distance from the start. The horizontal distance is $a-r^2a+r^4a-...=\frac{a}{1+r^2}$ and the vertical distance is $ra-r^3a+r^5a-...=\frac{ar}{1+r^2} $. The total distance is ...


4

For the general question there is a simple method: The $k$th gnome assumes that the sum of the numbers is $k$ modulo $n$, that is, the sum of the numbers minus $k$ is divisible by $n$. With that assumption, he knows what his number is if he assumed correctly. Because one of the gnomes has to have the right assumption, one of them makes the correct guess.



Only top voted, non community-wiki answers of a minimum length are eligible