सभी किताबें

पेशेवर

1 Markets I: The Ecosystem and Exchange-Traded Marketsबाज़ार ऑनलाइन 2 Markets II: Rates, FX and Creditबाज़ार ऑनलाइन 3 Markets III: Commodities, Energy and Cryptoबाज़ार ऑनलाइन 4 Quantitative Methodsविधियाँ ऑनलाइन 5 Derivatives and Volatilityडेरिवेटिव्स ऑनलाइन 6 Rates, Credit, XVA and Riskब्याज दरें, क्रेडिट और जोखिम ऑनलाइन 7 Research Craft: Predictors, Backtests, Measurement, Portfoliosअनुसंधान ऑनलाइन 8 Strategies I: Equities and Futuresरणनीतियाँ ऑनलाइन 9 Strategies II: Volatility, Relative Value, Macro and the Bank Desksरणनीतियाँ ऑनलाइन 10 Microstructure and Executionनिष्पादन ऑनलाइन 11 Market Making and High-Frequency Tradingमार्केट मेकिंग ऑनलाइन 12 Machine Learning for Marketsमशीन लर्निंग ऑनलाइन 13 Low-Latency Softwareतकनीक ऑनलाइन 14 Networks, Hardware and Trading Infrastructureतकनीक ऑनलाइन 15 Research, Data and Risk Platformsतकनीक ऑनलाइन 16 The Desk and the Firmफ़र्म ऑनलाइन 17 The Industry: Firms, Roles and Careersकरियर ऑनलाइन 18 Interviews I: Maths, Probability and Speedकरियर ऑनलाइन 19 Interviews II: Markets, Trading Games and the Final Roundकरियर ऑनलाइन 20 Interviews III: Codeकरियर ऑनलाइन
ऐप्स परिचय Coach लॉग इन पढ़ना शुरू करें

Computer Science · शब्दावली

Recurrence relation, recursion tree क्या है?

अन्य नाम: recurrence relation · recursion tree

Definition 13.11 University Computer Science — Year 1 · अध्याय 13 — Asymptotic Analysis and Recurrences

A recurrence relation defines a cost function by its values on small sizes and an equation expressing T(n)T(n) in terms of values on smaller sizes. The recursion tree of such an equation has a node for each call, labelled with the cost spent in that call outside its recursive calls; its children are the calls it makes. T(n)T(n) is the sum of all the labels, which one often computes level by level.

The recursion tree of T(n) = 2T(n/2) + n: every level costs n, and there are _2 n levels above the leaves, hence T(n) = n _2 n + nT(1) for n a power of 2.
The recursion tree of T(n)=2T(n/2)+nT(n) = 2T(n/2) + n: every level costs nn, and there are log⁡2n\log_2 n levels above the leaves, hence T(n)=nlog⁡2n+nT(1)T(n) = n\log_2 n + nT(1) for nn a power of 2.
The three regimes of the master theorem, drawn as the cost of each level of the recursion tree (one bar per level, from the root down). The level costs form a geometric sequence of ratio a/bk: decreasing, the root’s term dominates; constant, the _b n levels add up; increasing, the leaves dominate.
The three regimes of the master theorem, drawn as the cost of each level of the recursion tree (one bar per level, from the root down). The level costs form a geometric sequence of ratio a/bka/b^k: decreasing, the root’s term dominates; constant, the log⁡bn\log_b n levels add up; increasing, the leaves dominate.
अध्याय में पढ़ें →