Math ∪ Code

by Sahand Saba

  • Blog
  • GitHub
  • About
  1. Expected Running Time of Two Randomized Sort Algorithms (ACM ICPC 2013 PACNW Regional)

    Nov 11, 2013
    , by Sahand Saba

    Computing the expected running time of two randomized sort algorithms for a given input array. This problem appeared in ACM ICPC 2013 PACNW regional competition.

    Tags:
    • algorithms
    • acm-icpc
    • probability
    • problem-solving
    • randomized-algorithms
  2. Hundred Prisonors and a Room With a Light Switch

    Aug 12, 2013
    , by Sahand Saba

    A hundred prisoners are given a challenge that might set them free. See if you can solve the puzzle involving a light switch and help them gain their freedom.

    Tags:
    • problem-solving
    • interview-questions
    • probability
    • math
    • randomized-algorithms
  3. Interview Question: Fair and Unfair Coins and Bayes' Theorem

    Jul 26, 2013
    , by Sahand Saba

    Interview question to infer the probability of an fair and unfair coins after a certain number of coin tosses using Bayes' theorem.

    Tags:
    • math
    • probability
    • problem-solving
    • interview-questions
  4. Interview Question: Fairness from Unfairness and Randomness Extraction

    Jul 11, 2013
    , by Sahand Saba

    Interview question to use an unfair coin to simulate a fair one. The question is the same as extracting randomness from an unfair Bernoulli process. A Python implementation is given.

    Tags:
    • algorithms
    • math
    • problem-solving
    • probability
    • interview-questions
    • randomized-algorithms
Copyright © 2023 Sahand Saba