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

Coding an approximation sequence recursively. DrRacket, Scheme

Very recently, a question was asked, "How to find mistake in my sequence. DrRacket, Scheme", and then deleted by an impatient asker. Since I was in the process of typing the very few last words of my answer, here it is reposted, the Q and the A, so…
Will Ness
  • 70,110
  • 9
  • 98
  • 181
3
votes
1 answer

Approximate Logarithmic Function with a Neural Network

I'm trying to approximate a the log-function on a domain from one to one hundred with a neural network. I use tensorflow as software. The results are not as good as I expected and I would like to understand why. I use the following code: import…
fabian
  • 1,413
  • 1
  • 13
  • 24
3
votes
1 answer

Neural network: fit a function

Can you approximate a function (different from a line but still in the x,y plane: like cos, sin, arc, exp, etc) using a neural network with just an input, an output and a single layer of hidden neurons?
user1315621
  • 3,044
  • 9
  • 42
  • 86
3
votes
2 answers

Minimal spanning tree with K extra node

Assume we're given a graph on a 2D-plane with n nodes and edge between each pair of nodes, having a weight equal to a euclidean distance. The initial problem is to find MST of this graph and it's quite clear how to solve that using Prim's or…
3
votes
1 answer

What algorithm is used to achieve APPROX_TOP_COUNT in BigQuery?

BigQuery says that Approximate aggregate functions are scalable in terms of memory usage and time, but produce approximate results instead of exact results. I can't find any function like this in drill or hive. With the cluster computing,we can…
cxco
  • 143
  • 2
  • 13
3
votes
1 answer

How to write PI calculation program in Java using multi-thread?

I need to create a program that can calculate approximation to the constant PI, using Java multi-thread. I'm intent to use Gregory-Leibniz Series to calculate the result for PI / 4, and then multiply by 4 to get the PI approximation. But I have…
Thong Vo
  • 809
  • 1
  • 9
  • 21
3
votes
1 answer

Population Monte Carlo implementation

I am trying to implement the Population Monte Carlo algorithm as described in this paper (see page 78 Fig.3) for a simple model (see function model()) with one parameter using Python. Unfortunately, the algorithm doesn't work and I can't figure out…
beginneR
  • 3,207
  • 5
  • 30
  • 52
3
votes
2 answers

Using approx in dplyr

I'm trying to do a linear approximation for each id in the data frame between year using point x. dplyr seems like an appropriate option for this, but I can't get it to work because of an error: Error: incompatible size (9), expecting 3 (the group…
Vedda
  • 7,066
  • 6
  • 42
  • 77
3
votes
1 answer

Approximate Optimization using gurobi attributes in python

I'm trying to use python for an ILP optimization using gurobi. I wonder if primal-dual approximation has been implemented on gurobi and how should we use an approximation algorithm. I'm using m.optimize function and don't know which attributes to…
Diman ZT
  • 31
  • 1
3
votes
1 answer

Approximation error when using sqrt and floor

I have to do an enumeration of solutions of an equation and I know that y < x *( sqrt(n) - 1 ), where x, y and n are integers. My naive approach would be to look for y less or equal than floor( x * ( sqrt( (float)n ) - 1 ) ). Should I be worried…
rgugliel
  • 43
  • 6
3
votes
2 answers

Circular approximation of polygon (or its part)

SHORT DESCRIPTION OF MY PROBLEM I need to implement GCODE autorefactoring from G1 instructions to G2 and G3 (http://www.cnccookbook.com/CCCNCGCodeArcsG02G03.htm) for 3D Printing. G1 is a movement in straight line with printing (path is describe by…
Mr.Qbs
  • 152
  • 2
  • 9
3
votes
2 answers

An approximate algorithm for finding Steiner Forest

Consider a weighted graph G=(V,E,w). We are given a family of subsets of vertices V_i. A Steiner Forest is a forest that for each subset of vertices V_i connects all of the vertices in this subset with a tree. Example: only one subset V_1 = V. In…
Tadeusz A. Kadłubowski
  • 8,047
  • 1
  • 30
  • 37
3
votes
1 answer

Plotting Legendre Polynomials - Getting different results for own method

I'm trying to plot the legendre polynomials, defined as: P0(x) = 1 P1(x) = x Pn+1(x) = ((2n+1)/(n+1)) * x * Pn(x) - (n / (n+1)) * Pn-1(x) I've done it the easy slow way, and I've done it the direct, a little more complicated way. Both result in a…
3
votes
2 answers

Lack of reproducibility between R and Excel for big data sets

I'm running R version 3.0.2 in RStudio and Excel 2011 for Mac OS X. I'm performing a quantile normalization between 4 sets of 45,015 values. Yes I do know about the bioconductor package, but my question is a lot more general. It could be any other…
biohazard
  • 2,017
  • 10
  • 28
  • 41
3
votes
5 answers

approximation methods

I attached image: (source: piccy.info) So in this image there is a diagram of the function, which is defined on the given points. For example on points x=1..N. Another diagram, which was drawn as a semitransparent curve, That is what I want to…
maximus
  • 4,201
  • 15
  • 64
  • 117