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
1 answer

Rational approximation of rational exponentiation root with error control

I am looking for an algorithm that would efficiently calculate b^e where b and e are rational numbers, ensuring that the approximation error won't exceed given err (rational as well). Explicitly, I am looking for a function: rational exp(rational…
radrow
  • 6,419
  • 4
  • 26
  • 53
0
votes
1 answer

How is quantization applied/simulated in software?

How is quantization applied/simulated in software in practice? Suppose for example that I'd like to compute how much error in an output of some function I will get if instead of using 16 bit floating point values I were to use 6 bit integer values…
RayaneCTX
  • 573
  • 4
  • 13
0
votes
1 answer

Approximating Sin wave with euler method in python

Hi I'm trying to use euler method in python to plot a sin wave function sin(A). Using the following algorithm: define f(t,y) input t0 and y0 . input step size, h and the number of steps, n . for j from 1 to n do: 4a. m=f(t0,y0) 4b. y1=y0+h∗m 4c.…
Bobby M
  • 159
  • 1
  • 2
  • 9
0
votes
1 answer

Check if a random graph coloring is correct (Python)

So i'm trying a different approach to graph coloring, what i did basically is assign randomly colors to the nodes of a graph and what i want to do is, after assigning those colors, check if that coloring is correct (no adjacent nodes having the same…
0
votes
1 answer

what O*(c^n) stand for? is it some how related to log * ? (if so - how?)

I need to explain this article: http://duch.mimuw.edu.pl/~kowalik/papers/setcover.pdf and they use this time bound: O*(C^n) \ O*(C^m) what is this O*? i looked for it and the only thing that look slimier is the log star but since they use the star…
OrNot
  • 1
0
votes
1 answer

Why there is a need of approximate solution for 0-1 Knapsack, if input values are high?

On Geeks for Geeks Link, It is mentioned that " if input values are high, then the solution for 0-1 Knapsack becomes infeasible and there is a need of approximate solution." And in the approximate solution i.e FPTAS solution, the values…
coderAJ
  • 310
  • 5
  • 17
0
votes
0 answers

How to apply bilinear interpolation in R

I have 2D data, and want to find the interpolant that approximates the function in R. In other words, I need to apply the general function of "approxfun()", but can't find the appropriate package/function.
David
  • 1
  • 3
0
votes
0 answers

Overflow when approximating activation functions in neural network

I am facing an issue for several days and I haven't found a solution yet. For cryptographic purposes (Homomorphic Encryption to be precise), I need to use polynomial approximations of the activation functions in a neural network. My ANN is for now…
Binou
  • 124
  • 9
0
votes
1 answer

How to solve the numerical instability to a solution of a system of ordinary differential equations

I have been trying to get the numerical solution to the following system of ordinary differential equations: Equations for the movement of a body through air in a inclined lunch: (apparently LaTeX doesn't work on stack overflow) u'= -F(u, theta,…
0
votes
0 answers

Approximation of a times series with a given function in matlab

I am trying to fit in matlab a temperature time series that follows this kind of function I would need to retrieve the 8 parameters of the function, putting as boundary lambda=0 and sigma positive. I tried using the lsqcurvefit function in matlab,…
Alessandro
  • 43
  • 1
  • 4
0
votes
0 answers

Python: computational accuracy when calculating kernel of the matrix

The problem is as follows: I have an equation: A*x = 0, where A is matrix 8x8, x is vector with 8 elements, and 0 means zero vector. Elements of matrix A contain a parameter E whose values for which the equation is solvable I have to find - and I…
0
votes
1 answer

R: approximation error with simple algebraic sums

I had an apparent bug in a script. After several hours, I discovered it was a problem of decimal approximations. To make the problem reproducible, consider this: 0.02 - 0.000904686260609299 - 0.005 == 0.02 +…
antonio
  • 10,629
  • 13
  • 68
  • 136
0
votes
0 answers

Optimization of cost function using newton method

I am studying "Distributed newton method for deep neural network", a research paper by CC Wang and his associates. In the section of "Non-hessian Newton method", there is a mention of second-order approximation of the cost function f(θ). It is not…
0
votes
0 answers

Find x from a given y in a spline function in R

What is the correct way of finding x from a given y from a spline function? library(cobs) library(tidyverse) # data dat <- tibble( x = c(seq(80, 360, 40),373.3), y = c(1.07, .85, .84, .97, 1.11, 2.02, 4.01, 7.99, 10.4) ) #…
FMM
  • 1,857
  • 1
  • 15
  • 38
0
votes
1 answer

How to approximate OCTANT of a circle using QUADRATIC Bezier curve?

In a vector graphics program I am writing using Java, ideally any shape would be represented by a modified form of the Path2D class, which uses quadratic Bezier curves. Ideally ellipses would be represented as Path2D objects as well. There is heavy…
J Ray
  • 11