# linear programming

Published articles for linear programming.

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

## Earthmover Distance

DevFeed: [Earthmover Distance](<https://devfeed.tech/articles/earthmover-distance-40419.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2018/03/05/earthmover-distance/>)

Published: 2018-03-05T08:00:15Z

Content type: tutorial

Language: en

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

Topics: [Code](<https://devfeed.tech/topics/code.md>), [Python](<https://devfeed.tech/topics/python.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [earthmover-distance](<https://devfeed.tech/tags/earthmover-distance.md>), [gerrymandering](<https://devfeed.tech/tags/gerrymandering.md>), [library](<https://devfeed.tech/tags/library.md>), [linear-programming](<https://devfeed.tech/tags/linear-programming.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [optimal-transport](<https://devfeed.tech/tags/optimal-transport.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [probability-theory](<https://devfeed.tech/tags/probability-theory.md>), [python](<https://devfeed.tech/tags/python.md>), [wasserstein-metric](<https://devfeed.tech/tags/wasserstein-metric.md>)

### AI overview

This tutorial explains how to measure distance between point sets with uncertain locations by treating each sample set as a discrete probability distribution. It formulates Earthmover distance as a linear program that minimizes the cost of moving probability mass between points.

### Source excerpt

Problem: Compute distance between points with uncertain locations (given by samples, or differing observations, or clusters). For example, if I have the following three "points" in the plane, as indicated by their colors, which is closer, blue to green, or blue to red? It's not obvious, and there are multiple factors at work: the red points have fewer samples, but we can be more certain about the position; the blue points are less certain, but the closest non-blue point to a blue point is green; and the green points are equally plausibly "close to red" and "close to blue.

## Linear Programming and Healthy Diets -- Part 2

DevFeed: [Linear Programming and Healthy Diets -- Part 2](<https://devfeed.tech/articles/linear-programming-and-healthy-diets-part-2-40416.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2017/09/24/linear-programming-and-healthy-diets-part-2/>)

Published: 2017-09-24T08:00:46Z

Content type: tutorial

Language: en

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

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [Data Science](<https://devfeed.tech/topics/data-science.md>), [Python](<https://devfeed.tech/topics/python.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [linear-programming](<https://devfeed.tech/tags/linear-programming.md>), [math](<https://devfeed.tech/tags/math.md>), [optimize](<https://devfeed.tech/tags/optimize.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

This tutorial presents a diet-planning problem as a linear program: minimizing daily calories while meeting minimum nutrient requirements. It introduces a Python solution using Google's open-source operations research tools and frames the example as a practical use case for linear programming.

### Source excerpt

Previously in this series: Linear programming and healthy diets -- Part 1 Linear programing and the simplex algorithm Foods of the Father My dad's an interesting guy. Every so often he picks up a health trend and/or weight loss goal that would make many people's jaw drop. For example, we once went on a 5-day, 50-mile backpacking trip in the Grand Tetons, and my dad brought one packet of Lipton's Side Dishes noodle soup per day for dinner, and had vitamin tablets for the rest of his sustenance.

## Duality for the SVM

DevFeed: [Duality for the SVM](<https://devfeed.tech/articles/duality-for-the-svm-40412.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2017/06/12/duality-for-the-svm/>)

Published: 2017-06-12T08:00:50Z

Content type: tutorial

Language: en

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

Topics: [Optimization](<https://devfeed.tech/topics/optimization.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [lagrange-multipliers](<https://devfeed.tech/tags/lagrange-multipliers.md>), [linear-programming](<https://devfeed.tech/tags/linear-programming.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [programming](<https://devfeed.tech/tags/programming.md>), [simplex-algorithm](<https://devfeed.tech/tags/simplex-algorithm.md>)

### AI overview

This tutorial explains how the Karush-Kuhn-Tucker theorem applies to the support vector machine optimization problem. It introduces the structure of convex quadratic optimization and states the conditions involving gradients, primal and dual constraints, and complementary slackness.

### Source excerpt

This post is a sequel to Formulating the Support Vector Machine Optimization Problem. The Karush-Kuhn-Tucker theorem Generic optimization problems are hard to solve efficiently. However, optimization problems whose objective and constraints have special structure often succumb to analytic simplifications. For example, if you want to optimize a linear function subject to linear equality constraints, one can compute the Lagrangian of the system and find the zeros of its gradient. More generally, optimizing a linear function subject to linear equality and inequality constraints can be solved using various so-called "linear programming" techniques, such as the simplex algorithm.

## The Reasonable Effectiveness of the Multiplicative Weights Update Algorithm

DevFeed: [The Reasonable Effectiveness of the Multiplicative Weights Update Algorithm](<https://devfeed.tech/articles/the-reasonable-effectiveness-of-the-multiplicative-weights-update-algorithm-40407.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2017/02/27/the-reasonable-effectiveness-of-the-multiplicative-weights-update-algorithm/>)

Published: 2017-02-27T08:00:42Z

Content type: tutorial

Language: en

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

Topics: [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [game-theory](<https://devfeed.tech/tags/game-theory.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [linear-programming](<https://devfeed.tech/tags/linear-programming.md>), [machine-learning](<https://devfeed.tech/tags/machine-learning.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [multiplicative-weights-update-algorithm](<https://devfeed.tech/tags/multiplicative-weights-update-algorithm.md>), [mwua](<https://devfeed.tech/tags/mwua.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [programming](<https://devfeed.tech/tags/programming.md>), [python](<https://devfeed.tech/tags/python.md>)

### AI overview

This tutorial explains the Multiplicative Weights Update Algorithm (MWUA), including its weight-update rule, an investment-expert example, and the algorithm's theoretical guarantee for identifying a strong expert over repeated rounds. It also introduces an interactive demonstration.

### Source excerpt

papad Hard to believe Sanjeev Arora and his coauthors consider it "a basic tool [that should be] taught to all algorithms students together with divide-and-conquer, dynamic programming, and random sampling." Christos Papadimitriou calls it "so hard to believe that it has been discovered five times and forgotten." It has formed the basis of algorithms in machine learning, optimization, game theory, economics, biology, and more. What mystical algorithm has such broad applications?

## Linear Programming and the Simplex Algorithm

DevFeed: [Linear Programming and the Simplex Algorithm](<https://devfeed.tech/articles/linear-programming-and-the-simplex-algorithm-40371.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2014/12/01/linear-programming-and-the-simplex-algorithm/>)

Published: 2014-12-01T10:00:59Z

Content type: tutorial

Language: en

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

Topics: [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [code](<https://devfeed.tech/tags/code.md>), [exponential-time-algorithms](<https://devfeed.tech/tags/exponential-time-algorithms.md>), [integer-programming](<https://devfeed.tech/tags/integer-programming.md>), [linear-algebra](<https://devfeed.tech/tags/linear-algebra.md>), [linear-programming](<https://devfeed.tech/tags/linear-programming.md>), [lp-relaxation](<https://devfeed.tech/tags/lp-relaxation.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [programming](<https://devfeed.tech/tags/programming.md>), [row-reduction](<https://devfeed.tech/tags/row-reduction.md>), [simplex-algorithm](<https://devfeed.tech/tags/simplex-algorithm.md>)

### AI overview

This tutorial explains how to implement the simplex algorithm for solving linear programs. It introduces standard form and shows how slack variables convert inequality constraints into equality constraints.

### Source excerpt

In the last post in this series we saw some simple examples of linear programs, derived the concept of a dual linear program, and saw the duality theorem and the complementary slackness conditions which give a rough sketch of the stopping criterion for an algorithm. This time we'll go ahead and write this algorithm for solving linear programs, and next time we'll apply the algorithm to an industry-strength version of the nutrition problem we saw last time.

## Linear Programming and Healthy Diets -- Part 1

DevFeed: [Linear Programming and Healthy Diets -- Part 1](<https://devfeed.tech/articles/linear-programming-and-healthy-diets-part-1-40359.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2014/06/02/linear-programming-and-the-most-affordable-healthy-diet-part-1/>)

Published: 2014-06-02T09:00:27Z

Content type: tutorial

Language: en

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

Topics: [Optimization](<https://devfeed.tech/topics/optimization.md>), [Combinatorial optimization](<https://devfeed.tech/topics/combinatorial-optimization.md>), [Mathematics](<https://devfeed.tech/topics/mathematics.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Computer science](<https://devfeed.tech/topics/computer-science.md>)

Tags: [combinatorial-optimization](<https://devfeed.tech/tags/combinatorial-optimization.md>), [duality](<https://devfeed.tech/tags/duality.md>), [linear-programming](<https://devfeed.tech/tags/linear-programming.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [nutrition](<https://devfeed.tech/tags/nutrition.md>), [operations-research](<https://devfeed.tech/tags/operations-research.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [primal](<https://devfeed.tech/tags/primal.md>), [programming](<https://devfeed.tech/tags/programming.md>), [real-world](<https://devfeed.tech/tags/real-world.md>)

### AI overview

This introductory tutorial explains linear programming as a central problem in combinatorial optimization. It models choosing quantities of oranges, milk, and broccoli to minimize food costs while meeting nutritional constraints, including recommended levels of water, calcium, and vitamin C.

### Source excerpt

Optimization is by far one of the richest ways to apply computer science and mathematics to the real world. Everybody is looking to optimize something: companies want to maximize profits, factories want to maximize efficiency, investors want to minimize risk, the list just goes on and on. The mathematical tools for optimization are also some of the richest mathematical techniques. They form the cornerstone of an entire industry known as operations research, and advances in this field literally change the world.