INTERVIEW PREP

数学与非代码面试题

覆盖数学、概率、统计、脑筋急转弯、机器学习和金融。这里负责筛选和进入单题;编程题使用独立的 LeetCode 式 coding lab。

题目
4169
领域
8
当前筛选
811

3 / 41

非代码面试题

显示 20 / 811 道匹配题目

答题状态:未尝试未正确已正确
492Hitting Time on a Six-State Chain with Paired CoordinatesA Markov chain lives on S = \ 0, 1, 2\ \ 0, 1\ . The state (0, y) for any y is absorbing. From state (i, j) with i \ge 1, the transitions are: - Move to (i-1, j) with probability \tfrac 1 3 . - Move to (i, 1-j) with probability \tfrac 1 3 (flip the second coordinate). - Move to (i+1, j) with probability \tfrac 1 3 , provided i+1 \le 2; if i = 2, this probability is redistributed equally to the other two moves. Let A = \ (0, 0), (0, 1)\ and T = \inf\ n \ge 0 : X n \in A\ . Compute E[T \mid X 0 = (1, 1)].概率中等derivation未尝试免费493Expected Absorption Time with Increasing DriftA Markov chain on \ 0, 1, 2, 3, 4\ has absorbing states 0 and 4. The transition probabilities for transient states are: p(1,0) = \tfrac 1 5 , \quad p(1,2) = \tfrac 4 5 , \quad p(2,1) = \tfrac 2 5 , \quad p(2,3) = \tfrac 3 5 , \quad p(3,2) = \tfrac 3 5 , \quad p(3,4) = \tfrac 2 5 . Compute E[T \mid X 0 = 1] and E[T \mid X 0 = 3], where T = \inf\ n \ge 0 : X n \in \ 0, 4\ \ .概率中等derivation未尝试免费494Expected Time to Visit All States in an Ergodic ChainA Markov chain on \ 1, 2, 3, 4\ has transition matrix P = \begin pmatrix 0 & 1 & 0 & 0 \\ \tfrac 1 3 & 0 & \tfrac 2 3 & 0 \\ 0 & \tfrac 1 2 & 0 & \tfrac 1 2 \\ 0 & 0 & \tfrac 1 2 & \tfrac 1 2 \end pmatrix . Starting from state 1, let T cover = \inf\ n \ge 0 : \ 1,2,3,4\ \subseteq \ X 0, X 1, \ldots, X n\ \ be the first time all four states have been visited. Compute E[T cover \mid X 0 = 1]. *Hint:* Decompose the cover time by tracking which states remain unvisited. Since the chain starts at state 1 and must go to 2, then eventually reach 3 and 4, compute the expected time to reach each new state sequentially.概率困难derivation未尝试免费495Finite Hitting Time Between Communicating ComponentsConsider a Markov chain on \ 1, 2, 3, 4, 5\ with transition matrix P = \begin pmatrix \tfrac 1 2 & \tfrac 1 2 & 0 & 0 & 0 \\ \tfrac 1 3 & 0 & \tfrac 2 3 & 0 & 0 \\ 0 & \tfrac 1 4 & 0 & \tfrac 1 2 & \tfrac 1 4 \\ 0 & 0 & 0 & \tfrac 1 2 & \tfrac 1 2 \\ 0 & 0 & 0 & \tfrac 1 3 & \tfrac 2 3 \end pmatrix . Let B = \ 4, 5\ and T B = \inf\ n \ge 0 : X n \in B\ . **(a)** Show that E[T B \mid X 0 = i] < for all i \in \ 1, 2, 3\ . **(b)** Compute E[T B \mid X 0 = 1].概率困难derivation未尝试免费496First Passage in a Three-State Chain with Self-LoopA Markov chain on \ 0, 1, 2\ has transition matrix P = \begin pmatrix 1 & 0 & 0 \\ \tfrac 1 5 & \tfrac 2 5 & \tfrac 2 5 \\ 0 & \tfrac 3 4 & \tfrac 1 4 \end pmatrix . State 0 is absorbing. Compute E[T 0 \mid X 0 = 1], where T 0 = \inf\ n \ge 1 : X n = 0\ .概率简单数值题未尝试免费497Hitting Time with Harmonically Increasing Forward ProbabilityA Markov chain on \ 0, 1, 2, 3\ has transitions: from state i (0 \le i \le 2), move to i+1 with probability i+1 i+2 and stay at i with probability 1 i+2 . State 3 is absorbing. Compute E[T 3 \mid X 0 = 0].概率简单derivation未尝试免费498Hitting Time with Interior Reflecting BarrierA Markov chain on \ 0, 1, 2, 3, 4\ has the following transitions: - State 0 is absorbing. - From state 1: p(1, 0) = \tfrac 1 2 , p(1, 2) = \tfrac 1 2 . - From state 2: p(2, 1) = \tfrac 1 3 , p(2, 3) = \tfrac 2 3 . - From state 3: p(3, 2) = \tfrac 1 2 , p(3, 4) = \tfrac 1 2 . - From state 4: p(4, 3) = 1 (reflecting barrier). Compute E[T 0 \mid X 0 = 3].概率中等derivation未尝试免费499First Passage with Periodically Varying DriftA Markov chain on \ 0, 1, 2, 3, 4, 5, 6\ has absorbing state 0 and reflecting state 6 (i.e., p(6, 5) = 1). For transient states 1 \le i \le 5, the transition probabilities depend on i \bmod 3: - If i \equiv 0 \pmod 3 (i.e., i = 3): p(i, i-1) = \tfrac 2 3 , p(i, i+1) = \tfrac 1 3 . - If i \equiv 1 \pmod 3 (i.e., i \in \ 1, 4\ ): p(i, i-1) = \tfrac 1 2 , p(i, i+1) = \tfrac 1 2 . - If i \equiv 2 \pmod 3 (i.e., i \in \ 2, 5\ ): p(i, i-1) = \tfrac 1 3 , p(i, i+1) = \tfrac 2 3 . Compute E[T 0 \mid X 0 = 3].概率中等derivation未尝试免费500Harmonic Function Method for Splitting Probability and Hitting TimeA Markov chain on \ 0, 1, 2, 3, 4, 5\ has absorbing states 0 and 5. For interior states: p(1,0) = \tfrac 1 4 , \quad p(1,2) = \tfrac 3 4 , p(2,1) = \tfrac 1 3 , \quad p(2,3) = \tfrac 2 3 , p(3,2) = \tfrac 1 2 , \quad p(3,4) = \tfrac 1 2 , p(4,3) = \tfrac 2 3 , \quad p(4,5) = \tfrac 1 3 . Let T = \inf\ n \ge 0 : X n \in \ 0, 5\ \ . **(a)** A function f on \ 0,\ldots,5\ is *harmonic* on \ 1,2,3,4\ if f(i) = \sum j p(i,j) f(j) for i \in \ 1,2,3,4\ . Find the harmonic function with f(0) = 0, f(5) = 1, and use it to compute P(X T = 5 \mid X 0 = 2). **(b)** Compute E[T \mid X 0 = 2].概率困难derivation未尝试免费501Biased Gambler's Ruin ProbabilityA gambler starts with \3 and plays a sequence of independent rounds. Each round she wins \1 with probability p = 0.4 and loses \1 with probability q = 0.6. She stops when her fortune reaches \0 (ruin) or \8. What is the probability that she is ruined?概率简单数值题未尝试免费503Asymmetric Step-Size Gambler's RuinA gambler starts with \3. Each round she wins \1 with probability \tfrac 2 3 or loses \2 with probability \tfrac 1 3 . She stops when her fortune first hits \0 or below (ruin) or reaches \5 or above (victory). Note that if her fortune is \1 and she loses, she goes to -\1, which counts as ruin. What is the probability that she achieves victory?概率中等数值题未尝试免费504Three-Player Elimination GameThree players A, B, C hold tokens: A has 2, B has 1, C has 1 (total 4). Each round, two players are chosen uniformly at random (from the \binom 3 2 = 3 pairs) and they play a fair game: each of the two has probability \tfrac 1 2 of winning one token from the other. A player with 0 tokens is eliminated. Play continues until one player holds all 4 tokens. What is the probability that player A (who starts with 2 tokens) ends up with all 4?概率中等数值题未尝试免费505Gambler's Ruin with a Partially Reflecting BarrierConsider a Markov chain on \ 0, 1, 2, \ldots\ with absorbing state 0. From state k \ge 1, the chain moves to k+1 with probability p and to k-1 with probability q = 1 - p, where 0 < p < 1. However, there is a **reflecting barrier** at state N: from state N, the chain moves to N-1 with probability 1 (it is always pushed back). Starting from state k with 1 \le k \le N: **(a)** Find the probability r k of eventual absorption at 0. **(b)** For p = q = \tfrac 1 2 and N = 4, compute r 2 and the expected absorption time E[T \mid X 0 = 2].概率困难derivation未尝试免费506Martingale Approach to Biased Ruin ProbabilityA gambler starts with \4 and repeatedly bets \1 on a biased coin that lands heads with probability p = 0.55. She gains \1 on heads and loses \1 on tails. The game ends when her fortune reaches \0 or \10. Using the martingale (q/p) X n and the optional stopping theorem, find the exact probability that she reaches \10 before going broke.概率中等数值题未尝试免费507Gambler's Ruin with State-Dependent Win ProbabilityA gambler's fortune evolves on \ 0, 1, 2, 3, 4\ with absorbing barriers at 0 and 4. At state k (1 \le k \le 3), she wins \1 with probability p k = k 2k+1 and loses \1 with probability q k = k+1 2k+1 . Starting from state 2, find the probability of ruin (absorption at 0).概率中等数值题未尝试免费508Three-Outcome Random Walk to AbsorptionA particle moves on \ -5, -4, \ldots, 4, 5\ with absorbing barriers at -5 and 5. At each step, the particle moves +1 with probability p = 0.3, stays put with probability s = 0.2, and moves -1 with probability q = 0.5. Starting from position 1, what is the probability that the particle is absorbed at +5?概率中等数值题未尝试免费512Asymmetric Jump Ruin with Upward LeapA gambler on \ 0, 1, \ldots, 6\ starts at position 3. Each round, she jumps +2 with probability 1/3 and -1 with probability 2/3. Positions 0 and 6 are absorbing (but a jump from 5 that would land at 7 is truncated to 6, i.e., from state 5 the gambler moves to 6 with probability 1/3 and to 4 with probability 2/3). What is the probability that the gambler is absorbed at 0?概率中等数值题未尝试免费514Gambler's Ruin with Alternating BiasA gambler moves on \ 0, 1, 2, 3, 4, 5, 6\ with absorbing barriers at 0 and 6. The win probability depends on the current position: at odd states (k = 1, 3, 5), p = 0.6; at even states (k = 2, 4), p = 0.4. (Win means +1, loss means -1.) Starting from state 3, find the probability of reaching 6 before 0, and the expected number of steps until absorption.概率困难数值题未尝试面试订阅515Ruin Probability Under a Martingale Betting StrategyA gambler uses a doubling strategy (Martingale system): she bets \1 on a fair coin, and after each loss she doubles her bet, resetting to \1 after any win. Her initial capital is \31 and the table maximum bet is \16 (so she can lose at most 4 consecutive times before hitting the cap, since 1 + 2 + 4 + 8 + 16 = 31). If the bet would exceed \16, she bets her remaining capital instead. Her target is \42 (a net gain of \11). What is the probability she reaches \42 before going broke?概率困难数值题未尝试面试订阅516Absorption in a Three-State Chain with Two TrapsA Markov chain has three states: A, B, and C. States A and B are absorbing. From state C, the chain moves to A with probability 1/5, to B with probability 1/5, and stays at C with probability 3/5. Starting from C, what is the probability of being absorbed at A? What is the expected number of steps until absorption?概率简单数值题未尝试免费