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

Integral sum of double and comparison in C++

For an odd prime p between 3 and 19, I consider an integral sum as follows I want to check in C++ if x is smaller or greater than 0. So far, I have two ideas: make a double approximation and check that get a rational approximation a/b <…
rgugliel
  • 43
  • 6
0
votes
1 answer

Surface approximation based on RBF

I am looking for a way of approximating a surface based on a set of 3D data points. For this purpose I would like to use a method based on radial basis functions but I cannot find a free implementation in C++. I looked in ITK, VTK and open CV but I…
Marie
  • 31
  • 1
  • 4
0
votes
0 answers

absolute error #part2 - matlab related

In the first scenario link the solution provided was excellent and it did work. However I tried to make it work with another function and I ended up with nothing close to what is expected. My code so far: yn = [-1.20449 -1.14398 -1.02273 -0.962285…
sayid jetzenden
  • 153
  • 1
  • 11
0
votes
2 answers

Matlab - approximation issue

I'm trying to approximate several points with a curve. My script looks like this: T = [ 0 5.67 13.28 20.18 26.84 37.74]; T = T'; eta = [0 54.33 70.91 73.56 73.29 76.]; eta = eta' f4 = fit(eta, T, 'poly2'); f5 = fit(eta, T, 'poly3'); The plot looks…
sayid jetzenden
  • 153
  • 1
  • 11
0
votes
0 answers

Bailey-Borwein-Plouffe in php trouble

I am trying to implement the BBP algorithm in php. My code is returning a decimal which i thought was odd as it should be in hex. I was told to convert to decimal from hex by multiplying by 16 also but now its all just wrong. Here is a…
user4889168
0
votes
1 answer

Approximate position on circle for n points

I am struggling with the following problem: I am given n points and a radius and I have to place them on a circle as symmetrical as possible. Currently, I used something like this: float theta = 360.0f / n; int i = 0; for (Word w : e.getValue()) { …
Alexandr
  • 708
  • 9
  • 29
0
votes
1 answer

Approximation Algorithm- using expectation

Note: You don't have to understand Approximation Algorithms to answer this Hello. I need to prove an algorithm approximation by using expectation. The algorithm takes x_i \in {0,1,2} such that i\in 1,...n+2 and there are constants c_i \in 0,1,2…
Tai
  • 59
  • 5
0
votes
1 answer

faster, very accurate approximation for tanh

I was playing with tanh and what would be very close but not as expensive as tanh, computation wise. I came up with: 2/(1+exp(-2*x))-1 It is VERY close. The biggest delta I saw was like in the 10 to the -15 range. It's still not as cheap as…
Bing Bang
  • 524
  • 7
  • 16
0
votes
0 answers

Dividing rotated rectangle into equal area grid

I have a rotated rectangle that is represented by the coordinates of its 4 vertices (Actually represented by 4 lat-lon). I want to divide the rectangle into equal area grids. I need this to find the approx area of intersection of 2 rotated…
Pratham
  • 1,522
  • 1
  • 18
  • 33
0
votes
2 answers

approximation ratio of maximum independent set?

suppose we have a weighted grid graph and our problem is to find maximum independent set. There is a greedy algorithm that each time choose the heaviest node and remove it and its neighbors until all nodes of G have been chosen or removed. we want…
user3070752
  • 694
  • 4
  • 23
0
votes
2 answers

how to prove my approximation ratio?

suppose we are given a weighted graph G and we want to cluster its nodes into k clusters such that sum of weights of all edges between clusters be maximum. we want an approximation algorithm of ratio (1-1/k). my solution : cause this is a…
user3070752
  • 694
  • 4
  • 23
0
votes
1 answer

approximation algorithm for optimization version of partitioning?

in optimization version of partitioning problem we want to partition set X to disjoint subset A and B such that max(sum(A),sum(B)) be minimal.A approximation algorithm has been suggested in wikipedia, but I can't understand why this approximation is…
user3070752
  • 694
  • 4
  • 23
0
votes
1 answer

matlab scientific vs exponential notation

I have a problem with Matlab. Mainly 5*10^-15!=5e-15. Depending on how I declare a number (e or 10^) it is different saved (5.000000000000001 vs. 5.000000000000000). It makes problems with comparing values declared with calculated (declared were…
Szczupak
  • 3
  • 1
0
votes
0 answers

Euler's approximation in MATLAB

I have a project in MATLAB where I am to approximate the solution of a diff equation. To do that, I use ode45 to get the "real solution" and compare it to Euler's approximation that I perform 3 times with halving the step every time. Here are my…
Nash
  • 103
  • 5
0
votes
1 answer

In recursive cycle, why does this value change?

My professor has a program that takes a seed and function and recursively outputs and inputs a value from there. The basic idea is that you have some f(x) and you start with an x_0, so that f(x_0) = x_1. Then you have that x_2 = f(x_1) and so on…