Questions tagged [approximation]

Approximation algorithms are algorithms used to find approximate solutions to optimization problems.

Approximation algorithms are algorithms which generate feasible solutions to optimizazion algorithms. Although permitted to generate solution which are not optimal, there is an algorithm-dependent bound for the ratio of the objective of an optimum and the objective of the generated solution; this ratio is termed the approximation ratio.


Useful links


Related tags

523 questions
0
votes
0 answers

Errors of approximation with Matlab

Can someone explain me why these code lines x = 0:0.001:1; find(x==0.9) return 901, while these code lines x = 0:0.001:1.4; find(x==0.9) return en empty matrix? I know Matlab can involve in some approximation errors, but in this case…
Alessandro
  • 764
  • 3
  • 8
  • 22
0
votes
2 answers

Neural Network Approximation Function

I'm trying to test the efficiency of the Neural Networks as approximation functions. The function I need to approximate has 5 inputs and 1 output, which structure should I use? I have no idea on what criteria should be applied in order to decide the…
Giuseppe
  • 91
  • 1
  • 2
  • 6
0
votes
1 answer

Series vector for approximating pi

I've been set a question about Madhava's approximation of pi. The first part of it is to create a vector which contains the first 20 terms in the series. I know I could just input the first 20 terms into a vector, however that seems like a really…
F. Wotton
  • 45
  • 1
  • 6
0
votes
2 answers

Leibniz function in c

I'm looking for a Leibniz approximation of PI in C. I've tested this function but it does not seem to work: float leibnizPi(float n){ double pi=1.0; int i; int N; for (i=3, N=2*n+1; i<=N; i+=2) pi += ((i&2) ? -1.0 : 1.0) /…
Unicone
  • 228
  • 2
  • 8
0
votes
1 answer

Maximizing Subgraph "value" given budget

The scenario at hand that I would like to solve is a maximization problem where each vertex in the connected un-directed graph has a value. However, each edge and vertex also has a cost. Given a starting vertex and a cost budget, is there a…
Keith Pham
  • 45
  • 1
  • 8
0
votes
1 answer

updates in mean-field variational inference

I'm wondering if ELBO should be increasing monotonically as every update of the variational parameter q_i? I understand that it should increase at every iteration, but is this also true within one iteration for each q_i?
Y. He
  • 33
  • 6
0
votes
2 answers

approximate proportions preserving sum (1 = 100%) in R

I have a big table in which I have calculated the number of counts by subcategory countsperc (subcategory names not shown) for every category (id), then the total of observations per category (id) in column sumofcounts, and the proportion of…
Ferroao
  • 3,042
  • 28
  • 53
0
votes
1 answer

Floor function is eliminating Integer scientific notation, Python

I will explain my problem by example: >>> #In this case, I get unwanted result >>> k = 20685671025767659927959422028 / 2580360422 >>> k 8.016582043889239e+18 >>> math.floor(k) 8016582043889239040 >>> #I dont want this to happen ^^, let it remain…
0
votes
1 answer

What are my options for interpolation of such data

Having dramatically different step sizes, and not much data. We have data like >--4-6----3-9----4-7----9-3----4-1----> ( - is step here ) and in real life this data is looped in a circle. What polynomials/formulas can help me with interpolation of…
Rella
  • 65,003
  • 109
  • 363
  • 636
0
votes
1 answer

Centered-Difference Approximations in C

I came across this question when studying for finals, and I can't seem to get it to work. The question itself is shown below. Any help regarding how to tackle this would be greatly appreciated. Below is the code from a similar question I tackled. I…
David
  • 1
0
votes
0 answers

Function approximation by ANN

So I have something like…
viceriel
  • 835
  • 12
  • 18
0
votes
1 answer

How to approximate a 3D shape to a grid?

Given a 3D object, how do I convert it into an approximated shape in which all the sides of the object are parallel to either of the co-ordinate planes, and all the vertices have integer co-ordinates? For example, a sphere with center at origin and…
alice_v3.0.4
  • 95
  • 2
  • 10
0
votes
0 answers

Highcharts: Custom dataGrouping approximation: dataGroups cropped by chart area

See this example custom approximation provided by Highcharts: http://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/stock/plotoptions/series-datagrouping-approximation dataGrouping: { approximation: function () { …
0
votes
2 answers

Find roots of a system of equations to an arbitrary decimal precision

Given an initial guess for an array of values x, I am trying to find the root of a system that is closest to x. If you are familiar with finding roots of a system, you will understand that finding a root for a system of equations f satisfies: 0 =…
Paul Terwilliger
  • 1,596
  • 1
  • 20
  • 45
0
votes
1 answer

Fast approximation for sin/cos in MATLAB

I am trying to create a fast approximation of sin and cos in MATLAB, which is the current bottleneck in my program. Is there a faster method than the in-built routine? Bottleneck: On each iteration, obtain angles from complex sparse matrix A (50,000…
FlyingTurbine
  • 323
  • 2
  • 9