2022 IMC OA

1.Throw balls among players

Four friends are playing a game of catch. Each time a player throws the ball they have an equal probability of throwing it to one of the other three players. Let's call the players Player A, Player B, Player C, and Player D.

If Player A starts with the ball and four throws are completed what is the probability Player $B$ has received the ball at least twice.

2.Problem

Let $x=101 ! *(1 / 2 !+2 / 3 !+3 / 4 ! \ldots 99 / 100 !)$. Find $101!-x$

3.Problem

Consider a positive real number $\mathrm{x}$ such that $\mathrm{x}+\frac{1}{\mathrm{x}}=5$. What is the value of $x^{4}+\frac{1}{x^{4}}$ ?

4.Problem

You are planning to place a bet on your local sports team, the Red Sparrows. The Sparrow's have a past record of $4-5$ ( 4 wins, 5 losses) at this venue.

However you also know that their record is 2-7 in games where it rains and it has rained at $60 \%$ of their games this season.

If the Red Sparrows win their game what is the probability that it rained at that game?

5.Problem

Imagine you were given a standard deck of 52 cards. You are dealt four cards face-down and one card face-up. The face-up card is the ace of clubs.

Given this partial information that you have about your hand, how many different five card hands could you have been dealt such that you now have four cards of the same rank?

(Note: A standard deck of cards is made of 13 sets of 4 cards of each rank)

6.Hamming Distance

Consider strings of $\mathrm{n}$ bits. Recall that the hamming distance between strings is equal to the number of bits that differ in value between the two strings.

Relative to an arbitrary string, how many different strings have a hamming distance of $d$ from it?

7.Possible Codes

A bank vault is unlocked with a five digit code where each digit is equal to or greater than the previous digit. All numbers $0-9$ are allowed in any position as long as this restriction is followed. How many possible codes to unlock the vault are there?
def validCodes(n):
    res = []
    def backtrack(digit, comb):
        if len(comb) == n:
            res.append(comb)
        else:
            for i in range(digit, 10):
                backtrack(i, comb+[i])
    
    for j in range(10):
        backtrack(j, [j])
    return len(res)

8.Problem

Let $\mathrm{X}_{1}, \mathrm{X}_{2}, \ldots, \mathrm{X}_{\mathrm{N}}$ denote a set of independent and identically distributed random variables drawn from a Pareto distribution with $0<\alpha \leq 1$ and $\mathbf{x}_{\mathrm{m}}>0$

(Note: A Pareto distribution has a probability distribution function given by $\mathrm{p}(\mathrm{x})=\frac{\alpha \mathrm{x}_{\mathrm{m}}^{\alpha}}{\mathrm{x}^{\alpha+1}}$ for $\mathrm{x} \geq \mathrm{x}_{\mathrm{m}}$ ).

In the limit as $\mathrm{N}$ tends towards infinity which of the following statements about the sample average of the $\mathrm{X}_{\mathrm{i}}, 1 \leq \mathrm{i} \leq \mathrm{N}$, is true?

When $\alpha \in (0,1)$, the pareto variable doesn't have a finite mean.

9.Same digits arranged differently

$\mathrm{N}_{\mathrm{x}}$ and $\mathrm{N}_{\mathrm{y}}$ are two unknown numbers who share the same digits but the digits are arranged in a different order with $\mathrm{N}_{\mathrm{x}}>\mathrm{N}_{\mathrm{y}}$.

You also know that $\mathrm{N}_{\mathrm{x}}-\mathrm{N}_{\mathrm{y}}=24567 \mathrm{~d}$ with $\mathrm{d}$ being an unknown last digit.

What is d?
$d=3$. The difference has to be divisible by $9$

10.Algo for Linear Regression

Consider the following cases:

A. Small system (i.e. $\mathrm{n}$ is small) with good conditioning

B. Small or medium-sized system with poor conditioning

C. Very large system with unknown conditioning

What are the most suitable techniques for each case? You have gradient descent, SVD and QR.

A - SVD; B - QR; C - GD

11.Colors Fulfill Grids

Consider a $4 \times 4$ grid; Each square in the grid must be colored in while obeying the following property:

For each neighborhood of $2 \times 2$ adjacent squares, the arrangements of colored squares is unique throughout the entire grid.

What is the minimum number of colors required in order to color a grid that fulfills this condition?

Written Solution

If you could not view the embeded pdf file here, it is likely due to the network block in company. In that case, please refer to the attachment here.
Previous
Next