GLOBAL SEARCH

搜索课程、模块、题目与收藏题单

搜索在服务端完成,题目解析与答案不会进入搜索结果。登录后可搜索自己的收藏题单。

找到 30 个结果

中文题目
题目449 · 概率

Memoryless Message Relay Chain

A message must traverse a chain of relay nodes to reach its destination. Each node independently takes $\operatorname{Geom}(1/3)$ attempts to successfully forward the message to the next node. However, on each attempt, there is an independent probability $1/5$ that the node perma

打开 →
题目445 · 概率

Memorylessness Breaks for Exponential Mixtures

Let $X$ have the mixture density $f(x) = \frac{1}{2}e^{-x} + \frac{5}{2}e^{-5x}$ for $x \geq 0$ (a $50{-}50$ mixture of $\operatorname{Exp}(1)$ and $\operatorname{Exp}(5)$). (a) Compute $P(X > s + t \mid X > s)$ as a function of $s$ and $t$, and show it depends on $s$ (i.e., the

打开 →
题目206 · 概率

Memorylessness of the Geometric Distribution

Let $X \sim \text{Geometric}(p)$ count the number of independent Bernoulli($p$) trials until the first success (so $P(X = k) = (1-p)^{k-1} p$ for $k = 1, 2, \ldots$). (a) Derive a closed-form expression for $P(X > n)$. (b) Prove the memorylessness property: for all positive int

打开 →
题目442 · 概率

Constant Hazard Rate from Memorylessness

A device's lifetime $X$ has survival function $\bar{F}(t) = P(X > t)$ and hazard rate $h(t) = f(t)/\bar{F}(t)$. Show that the memoryless property $P(X > s + t \mid X > s) = P(X > t)$ implies $h(t) = \lambda$ (a constant) for all $t \geq 0$, and conversely that a constant hazard r

打开 →
题目438 · 概率

Machine Replacements via Memoryless Minimum

A factory runs 3 identical machines with independent lifetimes $\operatorname{Exp}(1)$. When any machine fails, it is instantly replaced with a new identical machine. All non-failed machines continue running (their residual lifetimes remain $\operatorname{Exp}(1)$ by memorylessne

打开 →
题目434 · 概率

Second Failure in a Memoryless Component Array

A system has 4 independent components, each with lifetime $\operatorname{Exp}(2)$. When a component fails, it is removed and the remaining components continue operating. By memorylessness, surviving components' residual lifetimes are still $\operatorname{Exp}(2)$. Find the expect

打开 →
题目430 · 概率

Characterization of Memorylessness and the Residual Life Paradox

Part (a): Let $X$ be a continuous, positive random variable satisfying $P(X > s + t \mid X > s) = P(X > t)$ for all $s, t \geq 0$. Prove that $X$ must be exponentially distributed. Part (b): A lightbulb's lifetime $L$ has CDF $F(t) = 1 - \frac{1}{2}e^{-t} - \frac{1}{2}e^{-3t}$ f

打开 →
题目447 · 概率

The Memoryless Bus

A bus arrives at a stop at an $\operatorname{Exp}(1/10)$ random time (mean 10 minutes). You have already been waiting for 5 minutes. What is the expected additional waiting time?

打开 →
题目435 · 概率

Uniqueness of Geometric Memorylessness

Part (a): Let $N$ be a positive-integer-valued random variable satisfying $P(N > m + n \mid N > m) = P(N > n)$ for all $m, n \in \mathbb{Z}_{\geq 0}$. Prove that $N$ must follow a geometric distribution. Part (b): For $N \sim \operatorname{Geom}(p)$, compute $E[N^2 \mid N > k]$

打开 →
题目4320 · 机器学习

Attention Memory Footprint

A full-attention model uses L=1024 tokens and stores one attention score matrix per head in float16. Roughly how much memory does one head's score matrix use?

打开 →
题目432 · 概率

Asymmetric Penalties in an Exponential Race

Two independent alarms go off at $\operatorname{Exp}(4)$ and $\operatorname{Exp}(6)$ times respectively. If alarm 1 fires first you pay $\$3$; if alarm 2 fires first you pay $\$5$. After the first alarm fires, the remaining alarm is reset (memoryless restart) and you pay an addit

打开 →
题目433 · 概率

Conditional Variance of a Surviving Exponential

Let $X \sim \operatorname{Exp}(\lambda)$. Using the memoryless property, find $\operatorname{Var}(X \mid X > t)$ for $t > 0$. Does conditioning on survival change the variance compared to $\operatorname{Var}(X)$? Evaluate numerically for $\lambda = 5$ and $t = 2$.

打开 →
题目444 · 概率

Full Ordering Probability for Four Competing Exponentials

Four independent exponential random variables $X_1 \sim \operatorname{Exp}(1)$, $X_2 \sim \operatorname{Exp}(2)$, $X_3 \sim \operatorname{Exp}(3)$, $X_4 \sim \operatorname{Exp}(6)$ represent task completion times. Using iterated applications of the memoryless property, find $P(X_

打开 →
题目431 · 概率

Geometric Survival Past a Threshold

Let $X \sim \operatorname{Geom}(1/4)$ (number of trials until first success). Using the memoryless property of the geometric distribution, compute (i) $E[X \mid X > 5]$ and (ii) $P(X > 8 \mid X > 5)$.

打开 →
题目441 · 概率

Minimum of Three Identical Exponentials

Let $X_1, X_2, X_3$ be independent, each $\operatorname{Exp}(4)$. Find the distribution of $M = \min(X_1, X_2, X_3)$ and compute $E[M]$. Then verify: given that $M > 2$, use memorylessness to find $E[M \mid M > 2]$.

打开 →
题目439 · 概率

Sequential Elimination Race

Three players with independent lifetimes $X_1 \sim \operatorname{Exp}(1)$, $X_2 \sim \operatorname{Exp}(2)$, $X_3 \sim \operatorname{Exp}(4)$ compete. The first to "die" is eliminated, then the two survivors continue (by memorylessness, their residual lifetimes are fresh exponent

打开 →
模块3.4.3 · 编程 · C++ 与低延迟

内存与性能

cpp · cpp17 · performance · cache · memory-hierarchy · stack · heap · profiling

打开 →
模块3.3.1 · 编程 · 高级 Python

并发与性能

python · performance · profiling · cprofile · line-profiler · tracemalloc · memory · timeit

打开 →
题目429 · 概率

Geometric Number of Geometric Trials

A gambler plays a sequence of rounds. In each round, he flips a biased coin with $P(\text{heads}) = p$ repeatedly until he gets heads; the number of flips in that round is $\operatorname{Geom}(p)$. The number of rounds he plays is itself $\operatorname{Geom}(q)$ (independent of t

打开 →
课程并发与性能 · 高级 Python

GIL、多线程与多进程

Hook 周一下午四点收盘后,私募研究服务器上挂着两份待跑的任务:先把 100 只沪深300 成分股最近 30 个交易日的日线从米筐风格接口同步下来,再用 100 万条蒙特卡洛路径给一张 510300.SH 看涨期权定价。一颗八核 CPU 跑了二十多分钟,T+1 风控报表迟迟出不来。问题不在算法,在于代码全程单线程。这两份任务该交给的并发原语其实不同:线程池...

打开 →
课程Rust 低延迟交易 · Rust 系统编程

Rust 低延迟之缓存布局、SIMD 与测量

周二上午,你坐在 CFFEX 张江 COLO 机房旁边的运维台前。你是一家头部私募 Rust 团队的开发,负责沪深300 ETF (510300.SH) 的做市策略,代码已经过编译、单元测试通过、回测看起来正常,但 profiler 显示热点循环把 70% 的周期花在了两个 AtomicU64::fetch add 调用上 —— 这两个调用按理每次只应消耗一...

打开 →
题目443 · 概率

Series System Replacement Costs via Competing Exponentials

A machine has two critical components in series: component A with lifetime $\operatorname{Exp}(3)$ and component B with lifetime $\operatorname{Exp}(5)$, independent of each other. When either fails, the entire machine stops, the failed component is replaced (cost $\$20$ for A, $

打开 →
课程行情数据的消息与流式处理 · 量化开发的软件工程

低延迟消息:ZeroMQ、多播与共享内存

上海一家 私募 的电子交易主管把一名资深工程师拉到一边:「期权做市新策略要求 沪深300 ETF 的 top of book 在策略线程内到达延迟不超过 50 微秒。我们现在跑 Kafka 是 3 毫秒——差了三个数量级。怎么办?」诚实的答案是「先量,再按 rung 一级一级往下挪」。L2 把你留在 Kafka 这一级—— acks='all' 端到端毫秒级...

打开 →
课程Rust 并发 · Rust 系统编程

原子操作、内存序与无锁基础

国内某头部私募的低延迟交易团队把 510300.SH (沪深300 ETF) 的行情接入和 50ETF 策略引擎之间的那一跳从 crossbeam::channel 换成手写 SPSC 环形缓冲后, P99.9 的延迟从 25 μs 掉到 6 μs——单跳省了 20 μs, 是策略整体延迟预算 ( 50 μs) 的 40%。这就是这一节课的全部出发点: Mu...

打开 →
课程并发与网络 · C++ 与低延迟

原子操作与 C++ 内存模型

国内某头部 quant 在 CFFEX 数据中心做股指期货 colo 部署的基础架构 lead,正在 review 一名 junior engineer 的一行 patch。这行改动把策略事件计数器上的 std::mutex 删了——这个计数器是 dashboard 每秒读一次的指标。Engineer 的理由:「计数只增不减,热点路径上也从不读它。」PR 描...

打开 →
课程并发与性能 · 高级 Python

性能剖析与内存分析

周二上午十点的滚动均值 某私募研究台周二上午十点。你刚把 3.2.2 收尾那条 8 步管道交给量化团队,篮子是沪深300 ETF(510300.SH)和三只 A 股票面 ,日收益矩阵 (252, 4) 。PM 把它拉到全市场场景版本——篮子扩到 100 只票、回溯 100 个交易日——结果纯 Python 嵌套循环算出来的 20 日滚动均值跑了 11 秒,下...

打开 →
课程C++ 基础 · C++ 与低延迟

指针、引用、数组与动态内存

某国内头部私募(类似幻方量化)的初级 quant 第一次用 C++ 写了一个五日滚动 VWAP 函数。它加载 510300.SH 收盘价、用 new double[5] 申一段 buffer、算滚动均值、返回结果。单元测试过。集成测试过。两周后,同一个函数被一段每秒跑一万次的热路径调用,交易进程在一天之内常驻内存悄悄涨到 80 GB,直到内核 OOM kil...

打开 →