bugfree Icon
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course
interview-course

Data Interview Question

Zebras on the Move

bugfree Icon

Hello, I am bugfree Assistant. Feel free to ask me for any question related to this problem

Solution & Explanation

In this problem, we are dealing with three zebras, each located at the vertices of an equilateral triangle. When a lion approaches, each zebra runs along the perimeter of the triangle in a random direction, either clockwise or counterclockwise. The task is to find the probability that the zebras do not collide.

Analyzing the Problem:

  1. Zebra Positions and Directions:

    • Each zebra can run in two possible directions: clockwise (CW) or counterclockwise (CCW).
    • We label the zebras as Z1, Z2, and Z3, positioned at vertices A, B, and C of the triangle.
  2. Total Possible Outcomes:

    • Each zebra has 2 choices (CW or CCW), resulting in a total of 2×2×2=82 \times 2 \times 2 = 8 possible combinations of directions.
    • These combinations can be represented as tuples (Z1, Z2, Z3), where each element is either CW or CCW.
  3. Non-Collision Scenarios:

    • The zebras will not collide if they all move in the same direction around the triangle.
    • There are two non-collision scenarios:
      1. All zebras move clockwise (CW, CW, CW).
      2. All zebras move counterclockwise (CCW, CCW, CCW).
  4. Probability Calculation:

    • The probability of all zebras choosing to move clockwise is (12)3=18\left(\frac{1}{2}\right)^3 = \frac{1}{8}.

    • Similarly, the probability of all zebras choosing to move counterclockwise is also 18\frac{1}{8}.

    • Since these two scenarios are mutually exclusive, the total probability of the zebras not colliding is the sum of the probabilities of these two scenarios:

      P(No Collision)=P(All CW)+P(All CCW)=18+18=28=14=0.25P(\text{No Collision}) = P(\text{All CW}) + P(\text{All CCW}) = \frac{1}{8} + \frac{1}{8} = \frac{2}{8} = \frac{1}{4} = 0.25

Conclusion:

The probability that the three zebras will not collide as they run along the perimeter of the triangle is 0.250.25 or 25%25\%. This solution is derived from considering the independent choices of direction each zebra makes and calculating the favorable outcomes where all zebras move in the same direction, thereby avoiding collision.