complexity-theory

Computational Complexity of SIFT descriptor?

一曲冷凌霜 提交于 2020-01-03 19:22:07
问题 The SIFT descriptor is a local descriptor that introduced by David Lowe. This descriptor can be splitted up into multiple parts: 1- Constructing a scale space 2- LoG Approximation 3- Finding keypoints 4- Get rid of bad key points 5- Assigning an orientation to the keypoints 6- Generate SIFT features So, my question is: What is the computational complexity of SIFT descriptor? something like O(2n+logn) 回答1: Here's a paper that talks exactly about this. The actual time complexity for a n by n

What is the complexity (Big-O) of this algorithm?

牧云@^-^@ 提交于 2020-01-03 12:12:25
问题 I'm fairly familiar with algorithm analysis and can tell the Big-O of most algorithms I work with. But I've been stuck for hours unable to come up with the Big-O for this code I write. Basically it's a method to generate permutations for a string. It works by making each character in the string the first character and combine it with the permutations of the substring less that character (recursively). If I put in the code to count the number of iterations, I've got something between O(N!) and

What is the complexity (Big-O) of this algorithm?

断了今生、忘了曾经 提交于 2020-01-03 12:12:06
问题 I'm fairly familiar with algorithm analysis and can tell the Big-O of most algorithms I work with. But I've been stuck for hours unable to come up with the Big-O for this code I write. Basically it's a method to generate permutations for a string. It works by making each character in the string the first character and combine it with the permutations of the substring less that character (recursively). If I put in the code to count the number of iterations, I've got something between O(N!) and

Complexity - determining the order of growth

空扰寡人 提交于 2020-01-03 05:52:09
问题 I understand how to calculate a function's complexity for the most part. The same goes for determining the order of growth for a mathematical function. [I probably don't understand it as much as I think I do, which is why I'm probably asking this.] For instance: an^3 + bn^2 + cn + d could be written as O(n^3) in big-o notation, since for large enough n the values of the term bn^2 + cn + d are insignificant in comparison to an^3 (the constant coefficients a, b, c and d are left out as well, as

max-weight k-clique in a complete k-partite graph

牧云@^-^@ 提交于 2020-01-02 01:20:12
问题 My Problem Whether there's an efficient algorithm to find a max-weight (or min-weight) k -clique in a complete k -partite graph (a graph in which vertices are adjacent if and only if they belong to different partite sets according to wikipedia)? More Details about the Terms Max-weight Clique: Every edge in the graph has a weight. The weight of a clique is the sum of the weights of all edges in the clique. The goal is to find a clique with the maximum weight. Note that the size of the clique

NP problems and need some detail?

随声附和 提交于 2020-01-01 19:40:29
问题 I see one solved ex on Algorithms. Which of the following is in NP? a) Decision Version of TSP b) Array is Sorted? c) Finding the maximum flow network d) Decision version of 0/1 knapsack? My Note, says all of these is in NP, anyone could add a bit detail for each one why? and I confusing about 0/1 knapsack, is it NP? NP-HARD? or NP-Complete? Thanks. 回答1: They all are in NP, because: It is verifiable in polynomial time. Given some route, we can easily check whether its length does not exceed

Time complexity for Search and Insert operation in sorted and unsorted arrays that includes duplicate values

断了今生、忘了曾经 提交于 2020-01-01 18:52:08
问题 1-)For sorted array I have used Binary Search. We know that the worst case complexity for SEARCH operation in sorted array is O(lg N), if we use Binary Search, where N are the number of items in an array. What is the worst case complexity for the search operation in the array that includes duplicate values, using binary search?? Will it be the be the same O(lg N)?? Please correct me if I am wrong!! Also what is the worst case for INSERT operation in sorted array using binary search?? My guess

3D Connected Points Labeling based on Euclidean distances

流过昼夜 提交于 2020-01-01 16:33:12
问题 Currently, I am working on a project that is trying to group 3d points from a dataset by specifying connectivity as a minimum euclidean distance. My algorithm right now is simply a 3d adaptation of the naive flood fill. size_t PointSegmenter::growRegion(size_t & seed, size_t segNumber) { size_t numPointsLabeled = 0; //alias for points to avoid retyping vector<Point3d> & points = _img.points; deque<size_t> ptQueue; ptQueue.push_back(seed); points[seed].setLabel(segNumber); while (!ptQueue

Associating nearby points with a path

心不动则不痛 提交于 2020-01-01 14:35:11
问题 Given a set of ordered points, and a path made up of ordered lat,lon points that goes near those points (in lat/lon coordinates), I want to associate the points with the path, ideally with good algorithmic complexity (n*log(n)) or better, but maybe that might not be realistic. The below diagram illustrates my question better. The blue line is the ordered path that is provided, and the red points are in the same order as the blue line. The green path is my desired result, which merges the red

Finding a shortest path in a graph with node and edge weights?

◇◆丶佛笑我妖孽 提交于 2020-01-01 12:13:55
问题 Let's say I have a weighted graph with weights on both edges and vertices. How do I find the "cheapest" path from a certain node s to a certain node t? My complexity should be O(n 2 (n+m)). 回答1: One way to solve this would be to convert the graph into a new graph in which only edges are weighted, not vertices. To do this, you can split each node apart into two nodes as follows. For any node v, make two new nodes, v1 and v2. All edges that previously entered node v now enter node v1, and all