# approximation

Published articles for approximation.

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

## Remez and function approximations

DevFeed: [Remez and function approximations](<https://devfeed.tech/articles/remez-and-function-approximations-40500.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/shortform/2024-05-06-1018/>)

Published: 2024-05-06T17:18:29Z

Content type: article

Language: en

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

Topics: [FHE](<https://devfeed.tech/topics/fhe.md>), [homomorphic encryption](<https://devfeed.tech/topics/homomorphic-encryption.md>), [polynomials](<https://devfeed.tech/topics/polynomials.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Python](<https://devfeed.tech/topics/python.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [approximation](<https://devfeed.tech/tags/approximation.md>), [article](<https://devfeed.tech/tags/article.md>), [fhe](<https://devfeed.tech/tags/fhe.md>), [homomorphic-encryption](<https://devfeed.tech/tags/homomorphic-encryption.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [library](<https://devfeed.tech/tags/library.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [polynomials](<https://devfeed.tech/tags/polynomials.md>), [python](<https://devfeed.tech/tags/python.md>), [remez](<https://devfeed.tech/tags/remez.md>), [shortform](<https://devfeed.tech/tags/shortform.md>)

### AI overview

The article discusses approximating functions with low-degree polynomials for arithmetic fully homomorphic encryption. It examines lolremez, the Remez algorithm, Paterson-Stockmeyer evaluation, and a multi-interval Remez method for approximating discontinuous functions such as sign.

### Source excerpt

I've been learning recently about how to approximate functions by low-degree polynomials. This is useful in fully homomorphic encryption (FHE) in the context of "arithmetic FHE" (see my FHE overview article), where the computational model makes low-degree polynomials cheap to evaluate and non-polynomial functions expensive or impossible. In browsing the state of the art I came across two interesting things. The first is the software package lolremez that implements polynomial (and rational polynomial $f(x) / g(x)$) function approximation using the so-called Remez algorithm.

## The Čech Complex and the Vietoris-Rips Complex

DevFeed: [The Čech Complex and the Vietoris-Rips Complex](<https://devfeed.tech/articles/the-cech-complex-and-the-vietoris-rips-complex-40386.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2015/08/06/cech-vietoris-rips-complex/>)

Published: 2015-08-06T09:00:00Z

Content type: article

Language: en

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

Topics: [data](<https://devfeed.tech/topics/data.md>), [datasets](<https://devfeed.tech/topics/datasets.md>), [Point cloud](<https://devfeed.tech/topics/point-cloud.md>), [Computing](<https://devfeed.tech/topics/computing.md>)

Tags: [approximation](<https://devfeed.tech/tags/approximation.md>), [cech-complex](<https://devfeed.tech/tags/cech-complex.md>), [complex](<https://devfeed.tech/tags/complex.md>), [computational-topology](<https://devfeed.tech/tags/computational-topology.md>), [data-mining](<https://devfeed.tech/tags/data-mining.md>), [data-science](<https://devfeed.tech/tags/data-science.md>), [dataset](<https://devfeed.tech/tags/dataset.md>), [homology](<https://devfeed.tech/tags/homology.md>), [linear-algebra](<https://devfeed.tech/tags/linear-algebra.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [persistent-homology](<https://devfeed.tech/tags/persistent-homology.md>), [point](<https://devfeed.tech/tags/point.md>), [points](<https://devfeed.tech/tags/points.md>), [simplicial-complex](<https://devfeed.tech/tags/simplicial-complex.md>), [vietoris-rips-complex](<https://devfeed.tech/tags/vietoris-rips-complex.md>)

### AI overview

This article introduces computational topology for analyzing the shape of data. It explains how point clouds can be converted into simplicial complexes so homology and persistent homology can identify qualitative features such as connected components and holes, with some resistance to noise.

### Source excerpt

It's about time we got back to computational topology. Previously in this series we endured a lightning tour of the fundamental group and homology, then we saw how to compute the homology of a simplicial complex using linear algebra. What we really want to do is talk about the inherent shape of data. Homology allows us to compute some qualitative features of a given shape, i.e., find and count the number of connected components or a given shape, or the number of "2-dimensional holes" it has.

## When Greedy Algorithms are Good Enough: Submodularity and the (1--1/e)-Approximation

DevFeed: [When Greedy Algorithms are Good Enough: Submodularity and the (1--1/e)-Approximation](<https://devfeed.tech/articles/when-greedy-algorithms-are-good-enough-submodularity-and-the-1-1-e-approximation-40361.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2014/07/07/when-greedy-algorithms-are-good-enough-submodularity-and-the-1-1e-approximation/>)

Published: 2014-07-07T10:00:01Z

Content type: tutorial

Language: en

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

Topics: [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Computer science](<https://devfeed.tech/topics/computer-science.md>), [Mathematics](<https://devfeed.tech/topics/mathematics.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [algorithms](<https://devfeed.tech/tags/algorithms.md>), [approximation](<https://devfeed.tech/tags/approximation.md>), [approximation-algorithms](<https://devfeed.tech/tags/approximation-algorithms.md>), [computer-science](<https://devfeed.tech/tags/computer-science.md>), [coverage](<https://devfeed.tech/tags/coverage.md>), [greedy](<https://devfeed.tech/tags/greedy.md>), [greedy-algorithm](<https://devfeed.tech/tags/greedy-algorithm.md>), [matroids](<https://devfeed.tech/tags/matroids.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [submodularity](<https://devfeed.tech/tags/submodularity.md>), [theory](<https://devfeed.tech/tags/theory.md>)

### AI overview

This article explains when greedy algorithms can produce optimal or near-optimal solutions. It introduces submodularity as a diminishing-returns property and discusses how it can provide a reasonably good approximation to the optimal solution.

### Source excerpt

Greedy algorithms are among the simplest and most intuitive algorithms known to humans. Their name essentially gives their description: do the thing that looks best right now, and repeat until nothing looks good anymore or you're forced to stop. Some of the best situations in computer science are also when greedy algorithms are optimal or near-optimal. There is a beautiful theory of this situation, known as the theory of matroids. We haven't covered matroids on this blog (edit: we did), but in this post we will focus on the next best thing: when the greedy algorithm guarantees a reasonably good approximation to the optimal solution.

## Community Detection in Graphs -- a Casual Tour

DevFeed: [Community Detection in Graphs -- a Casual Tour](<https://devfeed.tech/articles/community-detection-in-graphs-a-casual-tour-40357.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2014/05/19/community-detection-in-graphs-a-casual-tour/>)

Published: 2014-05-19T10:00:32Z

Content type: article

Language: en

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

Topics: [Graphs](<https://devfeed.tech/topics/graphs.md>), [Mathematics](<https://devfeed.tech/topics/mathematics.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>)

Tags: [approximation](<https://devfeed.tech/tags/approximation.md>), [approximation-algorithms](<https://devfeed.tech/tags/approximation-algorithms.md>), [cliques](<https://devfeed.tech/tags/cliques.md>), [clustering](<https://devfeed.tech/tags/clustering.md>), [community-detection](<https://devfeed.tech/tags/community-detection.md>), [erdos-renyi](<https://devfeed.tech/tags/erdos-renyi.md>), [graph](<https://devfeed.tech/tags/graph.md>), [graphs](<https://devfeed.tech/tags/graphs.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [modularity](<https://devfeed.tech/tags/modularity.md>), [network](<https://devfeed.tech/tags/network.md>), [newman](<https://devfeed.tech/tags/newman.md>), [np-hard](<https://devfeed.tech/tags/np-hard.md>), [power-law-distribution](<https://devfeed.tech/tags/power-law-distribution.md>), [random-graph](<https://devfeed.tech/tags/random-graph.md>), [randomized-algorithm](<https://devfeed.tech/tags/randomized-algorithm.md>), [technical](<https://devfeed.tech/tags/technical.md>), [walktrap](<https://devfeed.tech/tags/walktrap.md>)

### AI overview

This introductory article examines community detection in graphs. It explains the informal idea of a community, why defining one precisely and usefully is difficult, and how the clique-based approach leads to computationally intractable problems, including the NP-hardness of finding the largest clique.

### Source excerpt

Graphs are among the most interesting and useful objects in mathematics. Any situation or idea that can be described by objects with connections is a graph, and one of the most prominent examples of a real-world graph that one can come up with is a social network. Recall, if you aren't already familiar with this blog's gentle introduction to graphs, that a graph $ G$ is defined by a set of vertices $ V$, and a set of edges $ E$, each of which connects two vertices.

## Streaming Median

DevFeed: [Streaming Median](<https://devfeed.tech/articles/streaming-median-40277.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2012/06/14/streaming-median/>)

Published: 2012-06-14T22:03:55Z

Content type: tutorial

Language: en

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

Topics: [Streaming](<https://devfeed.tech/topics/streaming.md>), [Python](<https://devfeed.tech/topics/python.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [generators](<https://devfeed.tech/topics/generators.md>), [iteration](<https://devfeed.tech/topics/iteration.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [approximation](<https://devfeed.tech/tags/approximation.md>), [big-data](<https://devfeed.tech/tags/big-data.md>), [data-analysis](<https://devfeed.tech/tags/data-analysis.md>), [element](<https://devfeed.tech/tags/element.md>), [generators](<https://devfeed.tech/tags/generators.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [infinite](<https://devfeed.tech/tags/infinite.md>), [input](<https://devfeed.tech/tags/input.md>), [iteration](<https://devfeed.tech/tags/iteration.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [median](<https://devfeed.tech/tags/median.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [sequence](<https://devfeed.tech/tags/sequence.md>), [streaming](<https://devfeed.tech/tags/streaming.md>), [streaming-data](<https://devfeed.tech/tags/streaming-data.md>), [yield](<https://devfeed.tech/tags/yield.md>)

### AI overview

This tutorial presents a Python generator that approximates the median of a potentially infinite integer sequence using constant space. The algorithm adjusts its current estimate by one for each input value that is above or below the estimate, and the article discusses how changing stream distributions affect the result.

### Source excerpt

Problem: Compute a reasonable approximation to a "streaming median" of a potentially infinite sequence of integers. Solution: (in Python) def streamingMedian(seq): seq = iter(seq) m = 0 for nextElt in seq: if m > nextElt: m -= 1 elif m < nextElt: m += 1 yield m Discussion: Before we discuss the details of the Python implementation above, we should note a few things. First, because the input sequence is potentially infinite, we can't store any amount of information that is increasing in the length of the sequence.