algorithms – Calculate milliseconds and avoid floating numbers

I have a variable that increases / decreases `0` at `255` each `(X) millisecond`. so:

``````(X) x 255 = time in milliseconds / 60000 = minute
``````

`(X) millisecond` is a variable that only increases by itself, for example after each push of a button:

``````(X) + (X) x 255 = time in milliseconds / 60000 = minute
(X) + (X) + (X) x 255 = time in milliseconds / 60000 = minute
etc.
``````

What number should we use in (X) so that whenever it increases I get `+1` exit minute.
I want a whole number not a float.

The language is C ++ if it helps anyway …

algorithms – What is the difference between Shape-From-Stereo and Shape-From-Motion?

I read about different approaches for 3D facial reconstruction and can not get a difference between Stereo form (SFS) and Movement form (SFM). The SFS regresses a shape from a few images looking for corresponding feature points, but it seems that the SFM also works with few images. So what's the difference?

Can any one explain me a difference?

P.S. I can not find the proper tags because of my level of english who knows the proper tags, pls, correct my question.

algorithms – Calculation of minimum overlay trees in very large graphics

I need to determine the minimum overlay trees (MSTs) of very large, complete graphs, whose edge weights can be calculated from the data associated with the vertices.

In the plane Euclidean case, for example, the weights of the edges correspond to the Euclidean distances between the points to which the adjacent vertices correspond; in this case, the peak of the MST can not be greater than 6 and it would therefore be sufficient to calculate the MST in the subgraph $$S subseteq G$$ this is induced by the 6 edges of the least weight adjacent to each vertex, although this is inferior to calculate the MST of the graph induced by the Delaunay triangulation of the set of points.

Now, my idea would be to assume a reasonable upper limit $$k$$ on the degree of peaks of graphs STS with edge weights that can be calculated deterministically from the information associated with vertices and take and attempt to compute the MST in the subgraph induced by sets of the $$k$$ the shortest edges adjacent to the individual vertices; this would reduce the storage requirements of $$O (n ^ 2)$$ at $$O (n)$$.
The case where the peak of an STD is greater than the hypothesis assumed $$k$$ can be detected when calculating the MST and, if a vertex "exhausts" adjacent edges, the next $$k$$ the shortest adjacent edges can be determined $$O (n)$$ time and added to S to maintain the current algorithm.

Question:

Has the problem of STD determination in very large graphs, with deterministically calculated edge weights from vertex data, already been studied and what (free) online resources can be recommended?

Why are discrete mathematics needed to understand algorithms?

I am new to algorithms. I need to know if it is necessary to study discrete mathematics to understand the algorithms. If yes, why? In particular, is it necessary to understand algorithms or only to create your own algorithms (when you have to prove the accuracy of the algorithm).

algorithms – Thorup: What is the meaning of super distance?

When reading Thorup's algorithm to solve the SSSP problem, I have a point that I do not understand: the super distance.

He says: "For every summit, we have a great distance $$D (v) geq d (v)$$"

$$d (v)$$ must refer to the shortest distance between the origin and $$v$$, but what is $$D$$ ?

Is it just a distance value from the origin during the calculation $$D (v) = d (v)$$ ?

Turing machines – If NP were closed under complement, then what would be the consequences for the error in terms of randomization algorithms?

I thought maybe we could run a random algorithm on the A problem, and then run a different algorithm on the A add-in.

Would it reduce the term of error anyway depending on the output of each? Since A and A do not intersect

Algorithms – How can I create a loot system based on a C # percentage

So I'm creating this game, but I can not understand what I'm thinking. Basically, I would also like to know how to create a simple percentage system that removes items more often if they have a higher percentage, if you can show me a code compatible with Unity that will help you. but if you can just show me the basics of this issue with more frequent numbers like 1, 1, 1, 3, 1, 1, etc., that's fine, I can configure it for the elements,

algorithms – How to find the nearest point in the coordinate system

There are so many points in the coordinate system. When a specific point is indicated in the coordinate system, I want to find the closest point to the distance in a straight line. For example, if you have 800 points, calculate the distance 800 times and look for the smallest value. But I want to create a more efficient algorithm that does not run 800 times, as it could be sorted in a certain order before searching.
In other words, if the points are placed in a certain order, could he find
Could you recommend some notions?

Do algorithms reduce?

Given two problems A and B.

Given two algorithms to & bt and b & # 39; has solved A and b & # 39; solves B.

If A reduces to B and B reduces to A.

So can we say something about a & b and? Are they the same?

Randomized algorithms – How can a maximum number of minimum cuts in a graph be exactly \$ n choose \$ 2?

According to my instructor, $$n choose 2$$ is the maximum number of minimum cuts that we can have on a graph. To prove it, he showed the lower limit using an n cycle chart. To prove the upper limit, he drew the argument of two facts:

• Probability of finding $$i ^ {th}$$ min cut $$geq frac {2} {n (n-1)} = frac {1} {n choose 2}$$
• Event to find $$i ^ {th}$$ min cut is disjointed.

So, by adding the probabilities, he proved the upper limit of $$n choose 2$$.

Now, if we look at a tree, graphically, with $$n$$ nodes, then we will be able to conclude $$(n-1)$$ cuts min which is less than $$n choose 2$$ cuts ($$n geq3)$$. Did I miss something?