# induction

Published articles for induction.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Reservoir Sampling

DevFeed: [Reservoir Sampling](<https://devfeed.tech/articles/reservoir-sampling-40325.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2013/07/05/reservoir-sampling/>)

Published: 2013-07-05T10:00:49Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Python](<https://devfeed.tech/topics/python.md>), [data](<https://devfeed.tech/topics/data.md>), [datasets](<https://devfeed.tech/topics/datasets.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [big-data](<https://devfeed.tech/tags/big-data.md>), [generator](<https://devfeed.tech/tags/generator.md>), [induction](<https://devfeed.tech/tags/induction.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [random](<https://devfeed.tech/tags/random.md>), [randomized-algorithm](<https://devfeed.tech/tags/randomized-algorithm.md>), [reservoir-sampling](<https://devfeed.tech/tags/reservoir-sampling.md>), [sample](<https://devfeed.tech/tags/sample.md>), [streaming-algorithms](<https://devfeed.tech/tags/streaming-algorithms.md>), [streaming-data](<https://devfeed.tech/tags/streaming-data.md>), [streams](<https://devfeed.tech/tags/streams.md>)

### AI overview

This tutorial explains reservoir sampling for selecting an item uniformly at random from a data stream whose size is unknown or too large to store in memory. Its Python algorithm keeps one item and replaces it at step k with probability 1/k, with an induction-based proof of uniform selection.

### Source excerpt

Problem: Given a data stream of unknown size $ n$, pick an entry uniformly at random. That is, each entry has a $ 1/n$ chance of being chosen. Solution: (in Python) import random def reservoirSample(stream): for k,x in enumerate(stream, start=1): if random.random() < 1.0 / k: chosen = x return chosen Discussion: This is one of many techniques used to solve a problem called reservoir sampling. We often encounter data sets that we'd like to sample elements from at random.

## Methods of Proof -- Direct Implication

DevFeed: [Methods of Proof -- Direct Implication](<https://devfeed.tech/articles/methods-of-proof-direct-implication-40303.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2013/02/16/methods-of-proof-direct-implication/>)

Published: 2013-02-16T12:56:53Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>), [Mathematics](<https://devfeed.tech/topics/mathematics.md>), [Learning](<https://devfeed.tech/topics/learning.md>)

Tags: [contrapositive](<https://devfeed.tech/tags/contrapositive.md>), [direct-implication](<https://devfeed.tech/tags/direct-implication.md>), [induction](<https://devfeed.tech/tags/induction.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [methods-of-proof](<https://devfeed.tech/tags/methods-of-proof.md>), [set-theory](<https://devfeed.tech/tags/set-theory.md>), [syntax](<https://devfeed.tech/tags/syntax.md>), [techniques](<https://devfeed.tech/tags/techniques.md>)

### AI overview

This tutorial introduces a series on mathematical proof techniques for programmers and begins with direct implication. It presents four basic methods--direct implication, contradiction, contrapositive, and induction--and uses set theory to introduce notation and practice.

### Source excerpt

I recently posted an exploratory piece on why programmers who are genuinely interested in improving their mathematical skills can quickly lose stamina or be deterred. My argument was essentially that they don't focus enough on mastering the basic methods of proof before attempting to read research papers that assume such knowledge. Also, there are a number of confusing (but in the end helpful) idiosyncrasies in mathematical culture that are often unexplained.

## Theorem Proving in Mathematics

DevFeed: [Theorem Proving in Mathematics](<https://devfeed.tech/articles/theorem-proving-in-mathematics-40755.md>)

Original publisher: [Read original article](<https://radek.io/posts/theorem-proving-in-mathematics/>)

Published: 2011-10-24T00:00:00Z

Content type: tutorial

Language: en

Sources: [Radek Pazdera](<https://devfeed.tech/sources/radek-pazdera.md>)

Topics: [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>), [Mathematics](<https://devfeed.tech/topics/mathematics.md>), [math](<https://devfeed.tech/topics/math.md>)

Tags: [induction](<https://devfeed.tech/tags/induction.md>), [logic](<https://devfeed.tech/tags/logic.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [predicate](<https://devfeed.tech/tags/predicate.md>), [reasoning](<https://devfeed.tech/tags/reasoning.md>), [sequence](<https://devfeed.tech/tags/sequence.md>), [statement](<https://devfeed.tech/tags/statement.md>)

### AI overview

This tutorial introduces mathematical proof as deductive reasoning from axioms and previously established theorems. It explains direct proof with a worked equation example and begins discussing proof by mathematical induction and its connection to predicate logic.

### Source excerpt

The most common methods of proving you're explained

## Sums of k Powers

DevFeed: [Sums of k Powers](<https://devfeed.tech/articles/sums-of-k-powers-40216.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2011/07/01/sums-of-k-powers/>)

Published: 2011-07-01T12:52:29Z

Content type: article

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [polynomials](<https://devfeed.tech/topics/polynomials.md>), [context](<https://devfeed.tech/topics/context.md>)

Tags: [complex-numbers](<https://devfeed.tech/tags/complex-numbers.md>), [factoring](<https://devfeed.tech/tags/factoring.md>), [finite-fields](<https://devfeed.tech/tags/finite-fields.md>), [induction](<https://devfeed.tech/tags/induction.md>), [polynomial-ring](<https://devfeed.tech/tags/polynomial-ring.md>), [polynomials](<https://devfeed.tech/tags/polynomials.md>)

### AI overview

The article proves the geometric-series identity for sums of powers using base-k notation, polynomial factorization, and mathematical induction. It also explains extensions of the identity to fields such as the complex numbers and finite fields.

### Source excerpt

Problem: Prove that for all $ n,k \in \mathbb{N}, k > 1$, we have $$\sum \limits_{i=0}^{n} k^i = \frac{k^{n+1}-1}{k-1}$$ Solution: Representing the numbers in base $ k$, we have that each term of the sum is all 0's except for a 1 in the $ i$th place. Hence, the sum of all terms is the $ n$-digit number comprised of all 1's. Multiplying by $ k-1$ gives us the $ n$-digit number where every digit is $ k-1$.