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
3
votes
7 answers

Is there a way to get the number of places after the decimal point in a java double?

I'm working on a Java/Groovy program. I have a double variable that holds a number that was typed in by a user. What I really want to know is how many numbers the user typed to the right of the decimal place. Something like: double num =…
Electrons_Ahoy
  • 36,743
  • 36
  • 104
  • 127
3
votes
1 answer

Combining two data sets and plotting in matlab

I am doing experiments with different operational amplifier circuits and I need to plot my measured results onto a graph. I have two data sets: freq1 = [.1 .2 .5 .7 1 3 4 6 10 20 35 45 60 75 90 100]; %kHz Vo1 = [1.2 1.6 1.2 2 2 2.4 14.8 20.4 26.4…
bautrey
  • 75
  • 1
  • 10
3
votes
5 answers

Heron method in Python

Heron's method generates a sequence of numbers that represent better and better approximations for √n. The first number in the sequence is an arbitrary guess; every other number in the sequence is obtained from the previous number prev using the…
Snarre
  • 597
  • 5
  • 14
  • 22
3
votes
2 answers

bin packing with overlapping objects

I have some bins with different capacities and some objects with specified size. The goal is to pack these objects in the bins. Until now it is similar to the bin-packing problem. But the twist is that each object has a partial overlap with another.…
Masood_mj
  • 1,144
  • 12
  • 25
3
votes
1 answer

AR model with MATLAB

I'm using the following code taken from MATLAB documentation to estimate the parameters of an ARMA model: y = sin([1:300]') + 0.5 * randn(300, 1); y = iddata(y); mb = ar(y, 4, 'burg'); At this point, if if I type mb what I get is…
Bob
  • 10,741
  • 27
  • 89
  • 143
3
votes
1 answer

How to resample an array of n elements into an array of m elements

I have an array of N measurements that I should present as a graph, but the graph can be only of M pixels wide and is scrolled only by M pixels. While M is constant, N can be anything from tens to thousands. Each time when I need to show the graph,…
Flot2011
  • 4,601
  • 3
  • 44
  • 61
2
votes
1 answer

What is the best algorithm for computing rectilinear minimum Steiner tree?

There are many algorithms that find approximations of rectilinear Steiner minimum trees (RSMT). Among them are: a suite of algorithms that find minimum spanning trees RST-T (rectilinear single trunk Steiner tree) BGA (batcheed greedy…
Andrei Botalov
  • 20,686
  • 11
  • 89
  • 123
2
votes
0 answers

A Different version of facility location problem

I posted this question before but since Mathjax is not supported here, I took a picture of the compiled latex file and I am posting a picture of that.
Sandra
  • 91
  • 8
2
votes
0 answers

How to make poisson noise from uniform random numbers using central limit theorem?

Using the fact that Gaussian(λ=σ) is an approximation of Poisson(λ), I want to compute an approximation of Poisson noise using only uniform random numbers without using factorials. There are two things I have no clue. How to approximate gaussian…
nishi
  • 21
  • 1
2
votes
4 answers

Why is the data stored in a Float datatype considered to be an approximate value?

I've never understood why a float datatype is considered an approximation while a decimal datatype is considered exact. I'm looking for a good explanation, thanks.
2
votes
0 answers

Approximation Softmax Kernel using Random Fourier Features & Performers

I read the work titled 'Rethinking Attention with Performers'. This is a seminal contribution to handling the quadratic time complexity of self-attention used in Transformer with strong theoretical guarantees. However, I am stuck with the following…
2
votes
1 answer

geomdl approximate_surface not working as expected

I am trying to approximate a image with a b-spline surface. The geomdl library has a function called "approximate_surface" to do this. When I use this with an image generated from a nice smooth functions such as f(x)=x^2, things work as expected.…
zilleplus
  • 479
  • 1
  • 3
  • 12
2
votes
1 answer

Approximation for random coloring graph with 2 colors

Having trouble figuring out how to show this approximation, hoping someone could lend some advice. I'm quite new to approximation (especially with randomization) and having trouble figuring out how to narrow this down. The problem: Suppose we have a…
zvonimir
  • 79
  • 7
2
votes
1 answer

Rational approximation of double using int numerator and denominator in C++

A real world third party API takes a parameter of type fraction which is a struct of an int numerator and denominator. The value that I need to pass is known to me as a decimal string that is converted to a double. The range of possible values are,…
2
votes
2 answers

How do we find the logsumexp of all subsets (or some approximation to this)?

I have a set of numbers n_1, n_2, ... n_k. I need to find the sum (or mean, its the same) of the logsumexp of all possible subsets of this set of numbers. Is there a way to approximate this or compute it exactly? Note, the logsumexp of a, b, c is…
piedpiper
  • 1,222
  • 3
  • 14
  • 27