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

463 questions
10
votes
2 answers

Ratio of polynomials approximation

I am trying to fit a polynomial to my dataset, which looks like that (full dataset is at the end of the post): The theory predicts that the formulation of the curve is: which looks like this (for x between 0 and 1): When I try to make a linear…
marco11
  • 225
  • 2
  • 8
9
votes
1 answer

How to measure complexity of a string?

I have a few long strings (~ 1.000.000 chars). Each string only contains symbols from the defined alphabet, for example A = {1,2,3} Sample strings string S1 = "1111111111 ..."; //[meta complexity] = 0 string S2 = "1111222333 ..."; //[meta…
oleksii
  • 33,544
  • 11
  • 83
  • 149
9
votes
1 answer

Mixed-Integer Nearest Optimal Solution in Matlab

Is it possible to find the nearest solution to optimal for a mixed-integer problem? For example I would want the simplified problem below: f = [1;1;1]; intcon = 1:3; Aeq = [0.99,0.97,0.15]; beq = 0.16; lb = zeros(3,1); ub = [1;1;1]; x =…
Mary
  • 878
  • 5
  • 18
  • 42
9
votes
2 answers

Approximation algorithm for TSP variant, fixed start and end anywhere but starting point + multiple visits at each vertex ALLOWED

NOTE: Due to the fact that the trip does not end at the same place it started and also the fact that every point can be visited more than once as long as I still visit all of them, this is not really a TSP variant, but I put it due to lack of a…
8
votes
1 answer

Best way to approximate in direction to zero in C++

I have some troubles explaining clearly but it's rather simple.. I have a double named value in my C++ program and I want to Floor it if it's a positive value and Ceil if it's a negative value, the precision is given by an external variable. An…
tony497
  • 321
  • 2
  • 11
8
votes
2 answers

Estimate the minimum Distance between two Clusters

I am designing an agglomerative, bottom-up clustering algorithm for millions of 50-1000 dimensional points. In two parts of my algorithm, I need to compare two clusters of points and decide the separation between the two clusters. The exact distance…
Paul Chernoch
  • 4,511
  • 2
  • 39
  • 58
8
votes
1 answer

Increasing accuracy of solution of transcendental equation

I have a specific kinematics as a part of a more complex machine and need to compute some physical parameters that are very hard (more like impossible) to measure with proper accuracy with instruments I have at my disposal [kinematics] At first…
Spektre
  • 41,942
  • 8
  • 91
  • 312
8
votes
2 answers

Optimal shift scheduling algorithm

I have been trying for some time solve a scheduling problem for a pool that I used to work at. This problem is as follows... There are X many lifeguards that work at the pool, and each has a specific number of hours they would like to work. We hope…
yiati
  • 972
  • 1
  • 13
  • 27
7
votes
1 answer

How does this division approximation algorithm work?

I'm working on a game with a software renderer to get the most accurate PS1 look. As I was doing research on how the PS1 graphics/rendering system worked, reason for the wobbly vertices etc, I came across some documentation regarding the way they…
vexe
  • 4,725
  • 8
  • 40
  • 72
7
votes
2 answers

How approximation search works

[Prologue] This Q&A is meant to explain more clearly the inner working of my approximations search class which I first published here Increasing accuracy of solution of transcendental equation I was requested for more detailed info about this few…
Spektre
  • 41,942
  • 8
  • 91
  • 312
7
votes
3 answers

RGB Similar Color Approximation Algorithm

Given that in RGB we can represent 256^3 combinations = 16,777,216 colors, and since the human eye can only distinguish roughly 10,000,000, there is obviously a surplus of 6,777,216 RGB combinations that chromatically are indistinguishable from…
Darius
  • 4,924
  • 5
  • 42
  • 59
7
votes
4 answers

tracking square root of moving value

I have a control loop running at high frequency and need to compute a square root each cycle. Typical square root functions work fine but take excessive time. Since the value I'm taking the square root of doesn't change too much on each cycle, I…
phkahler
  • 5,474
  • 1
  • 20
  • 31
6
votes
3 answers

Distribute points on mesh according to density

Given a (possibly open) mesh with a density texture and a number of points I need to distribute these points according to the density on the mesh. So far I have made up several solutions some of which worked and others did not. One of the algorithms…
6
votes
2 answers

Function approximation Tensorflow

I am trying to create a neural network in Tensorflow that approximates a sine function. I have found some examples of universal function approximators but I am not fully understanding the code and, since I am quite new with Tensorflow, I would like…
6
votes
3 answers

SSE normalization slower than simple approximation?

I am trying to normalize a 4d vector. My first approch was to use SSE intrinsics - something that provided a 2 times speed boost to my vector arithmetic. Here is the basic code: (v.v4 is the input) (using GCC) (all of this is inlined) //find…
Pubby
  • 48,511
  • 12
  • 121
  • 172
1
2
3
30 31