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

Why does my binary search algorithm miss the optimal solution, and how can it be improved?

I am looking primarily for a theoretical answer, ideally one addressing my misunderstanding (below) about binary search algorithms. Practical examples are welcome as well. I have a complex function where I want to do a binary search on that…
Dennis
  • 7,907
  • 11
  • 65
  • 115
3
votes
1 answer

what does n^O(1/ε) means?

I often find n^O(1/ε) in approximation algorithms. for example, in euclidean tsp, the number of portals(with its possible state) is equal to n^O(1/ε). here is the link to the…
ryan chandra
  • 321
  • 3
  • 11
3
votes
1 answer

Underestimation of f(x) by using a piecewise linear function

I am trying to check if there is any Matlab/Python procedure to underestimate f(x) by using a piecewise linear function g(x). That is g(x) needs to be less or equal to, f(x). See the picture and code below. Could you please help to modify this code…
Juan
  • 2,073
  • 3
  • 22
  • 37
3
votes
0 answers

Sorting based on fuzzy criteria OR Create an acceptable order with only n comparisons

I'm looking for an algorithm to sort a large number of items using the fewest comparisons. My specific case makes it unclear which of the obvious approaches is appropriate: the comparison function is slow and non-deterministic so it can make errors,…
3
votes
0 answers

Star deletion kernel

In Star Deletion problem, i have a graph G and k ∈ N, and the objective is to decide whether there exists a subset S ⊆ V(G) of size at most k such that G\S does not contain any 3-star as a subgraph. Is there a O(k)-vertex kernel for the problem? The…
avi ron
  • 39
  • 1
3
votes
3 answers

Simple approximation of Inverse Incomplete gamma function

How could one approximate Inverse Incomplete gamma function Г(s,x) by some simple analytical function f(s,Г)? That means write something like x = f(s,Г) = 12*log(123.45*Г) + Г + 123.4^s . (I need at least ideas or references.)
klm123
  • 12,105
  • 14
  • 57
  • 95
3
votes
2 answers

Need help fixing an algorithm that approximates pi

I'm trying to write the C code for an algorithm that approximates pi. It's supposed to get the volume of a cube and the volume of a sphere inside that cube (the sphere's radius is 1/2 of the cube's side). Then I am supposed to divide the cube's…
Hypercube
  • 89
  • 6
3
votes
2 answers

How do I store data with a query that's a approximated?

I'm trying to find a way to store my data with fast access (better than O(n)). My database consists of data (4096 byte strings) that represents some information about some items. The problem is, that the query is never exact. I get one Item, and…
Yochai Timmer
  • 48,127
  • 24
  • 147
  • 185
3
votes
0 answers

Calculating approximate pi with limit using gregory series

Here is the problem that I am trying to solve: Write a program that calculates the value of pi using the Gregory series. The input to the program will be a decimal value called limit. The program shall proceed to calculate the value of pi by summing…
LearningNoob
  • 662
  • 6
  • 23
3
votes
2 answers

Approximate value of sin by Taylor series

I have some code that should find approximate value of sin(15°) by Taylor series definition and compare it to the built-in function sin. I have different results. X - radian value R - current value of series sum Eps - accuracy value S - sign F -…
3
votes
2 answers

Efficiently calculate top-k elements in spark

I have a dataframe similarly to: +---+-----+-----+ |key|thing|value| +---+-----+-----+ | u1| foo| 1| | u1| foo| 2| | u1| bar| 10| | u2| foo| 10| | u2| foo| 2| | u2| bar| 10| +---+-----+-----+ And want to get a result…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
3
votes
1 answer

sine computation with CORDIC results in not precise values

I am trying to implement the CORDIC algorithm for approximating a sine function in single precision, on architecture with no FPU. I compare the result obtained from my implementation with results obtained from standard C math functions. I tried…
Daniel
  • 440
  • 4
  • 13
3
votes
1 answer

How can I get the size of bloom filter set while using union or intersection function?

I'm trying to get the size of bloom filter set while using bloom filter's union & intersection functions with python package(https://github.com/jaybaird/python-bloomfilter.git) I though that after conducting the function 'union' or 'intersection',…
ahnpersie
  • 73
  • 8
3
votes
1 answer

Algorithm for multiple polyline and polygon decimation

We have some polylines (list of points, has start and end point, not cyclic) and polygons (list of points, cyclic, no such thing as endpoints). We want to map each polyline to a new polyline and each polygon to a new polygon so the total number of…
user4159038
3
votes
1 answer

graph algorithm, approximation algorithm

After removing the leaves of the dfs tree of a random graph , suppose the number of edges left is |S|, can we prove that the matching for that graph will be |S|/2?
justin waugh
  • 885
  • 3
  • 12
  • 22