BrainDen.com - Brain Teasers
• 0

# Who is taller, A or B?

## Question

Two hundred students are positioned in 10 rows, each containing 20 students.  From each of the 20 columns thus formed the shortest student is selected and the tallest of these 20 show students is tagged A.  These students now return to their initial places.  Next the tallest student in each row is selected, and from these 10 tall students the shortest is tagged B.  Which of the two tagged students is the taller if they are different people?

## Recommended Posts

• 2

There are three cases:

1. A and B are in the same row. Since B is the tallest of their row, B > A.
2. A and B are in the same column. Since A is the shortest of their column, B > A.
3. A and B are in different rows and different columns. Let C be the student standing in A's column and B's row. Then B > C, and C > A. Hence B > A.

In any case, B is taller than A.

##### Share on other sites

• 0

You would need a column totally loaded with tall students in order to have any of the column minima compare with any of the row maxima. Let's see, if one column had the ten tallest students, then the max of the 20 column minima would be the 10th tallest overall. But then the ten tallest would show up as the tallest in their respective rows. And the shortest of those would also be the 10th tallest. In that strange case, A and B would be the same person. I can't think of another strange case that would make A taller than B. If A and B are different students, then B is taller.

##### Share on other sites

• 0

Here are my results:

I ran 10,000,000 simulations and found A > B 12 times. It's very very rare.

Here's my 10 lines of code. This problem is made for Python/numpy.

import numpy as np
import numpy.matlib

def A_or_B():
kids = np.matlib.rand(10, 20)
return np.amax(np.amin(kids, axis=0)) < np.amin(np.amax(kids, axis=1))
oddball = 0
for i in range(10000000):
if not A_or_B():
oddball += 1
print oddball

##### Share on other sites

• 0

Here are my results:

Hidden Content

Hmm:

I didn't find A > B, I just found A >= B.

Here are my results:

Hidden Content

Hmm:

Hidden Content

Re-ran the script with a couple of changes:

A > B zero times. And A = B 11 times.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account. ×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.