Confirmations – Shortest and longest block interval time ever recorded in Bitcoin

(This data is current via block 535276.)

Based on Block timestamp (which need not be exact) the longest difference between successive blocks is 463,160 seconds (5 days, 8 hours, 39 minutes, 20 seconds) between blocks 0 and 1. The second longest is 90532 seconds (1 day 1 hour 8) minutes 52 Seconds) between blocks 15323 and 15324.

For "shortest", since timestamps are not strictly enforced and can be accidentally or deliberately falsified, a block can have an earlier timestamp than its predecessor, by up to 2 hours (7200 seconds). In this case the time difference is negative. This has happened 13828 times. The most negative difference is -7125 seconds (1 hour 58 minutes 45 seconds) between blocks 156113 and 156114.

There were 222 blocks with the same timestamp as their predecessor, making a difference of 0.

The script that I used to collect this data is located at

The actual block intervals are difficult to determine precisely because we are not sure when the individual blocks were actually dismantled. Some sites like record the first time their node received the block, but there is an unknown propagation delay between when a block is actually dismantled and when another node receives it (though for a well-connected knot) it's probably not much longer than 1 second) It is also possible to receive blocks out of order, so the difference in reception times can also be negative. In addition, such data is obviously not available for early blocks prior to the existence of the site in question.

In principle, it might be possible to search for the longest and shortest difference between the reception times, but I don't know how to get this data in bulk.

Shortest cycles in undirected graphs

Find the shortest cycle that contains a particular vertex on an undirected (and unweighted) chart $ s $It is usually said that a BFS is running $ s $ and the first time to find another visit, this is the smallest cycle length you want.

This does not seem to be true, quoted from page 3:

Keep this in mind when you run BFS from $ s $ and stop once you visit a again
You may not get the vertex (using a previously unused edge)
shortest path contains $ s $,

Examples where this technique seems to be suggested: An efficient algorithm to find a shortest cycle including a specific vertex

Another technique, in which the shortest cycle in the entire diagram is determined by executing BFS from each vertex, seems to recognize only the shortest length +1 in a special case, as mentioned in this document: https: // link. /10.1007/978-3-540-78773-0_63 in the "unweighted case". on the other handHere ( it is mentioned (first and second paragraph) that executing BFS results in every case from each vertex the shortest length (circumference). This is also mentioned in an archive ( , ,

Which of all algorithms / methods applies to:

  1. Can you find the cycle with the shortest length in an undirected diagram?
  2. Find the shortest length cycle that passes through a known vertex $ s $ in an undirected graph?
  3. Where is the trap in each of my comparisons and contrasts above? (I can't believe some of the above are even wrong …)

Note: A randomized sub-cubic algorithm appears to exist in Raphael Yuster's publication "A shortest cycle for each vertex of a graph": .pdf

Find the shortest path on a diagram with a number of queues

I recently saw a video of an Errichto about solving the problem with Leetcode shift boxes. This problem is essentially a graph problem, where each vertex describes the state of the system and can be described by 4 integer values ​​(coordinates of the box and the player).
Each edge has a weight of 1 or 0.
The author used an interesting approach to many queues (more specifically, he used a vector instead of a queue, but this is an implementation detail). There is a queue for every possible distance from the source. Interestingly, this is a generalization of the know-dequeue technique to solve the shortest path in an edge-weighted 0/1 graph.

I wonder if there is a formal analysis of this approach to understand when it is rational to apply instead of Dijkstra. Couldn't find anything so far.

Arithmetic – total completion time with the shortest job first

I am trying to understand the solution to the sum of the completion times. I found the following in the link:
Prompt scheduling for selfish agents

Consider the case of a single queue, a selfish agent will simply join
In the queue immediately after arrival there is no reason to be late. Consequently,
Orders are processed in FIFO order. However,
This can be pretty bad in terms of the total completion times. Imagine
a job with processing time L that arrives at time zero, followed by
sqrt (L) jobs of length 1, all of which arrive immediately after
first. Since the first task is only completed at time L, the sum results
The completion times for these 1 + sqrt (L) jobs are approximately L ^ (3/2).

I am able to understand the completion time of the above through a solution on the.stackExchange (solution of completion times). First I want to understand the duration of the shortest job:

The paper says the following (i.e. Text2) immediately after the text above:

Redraw whether orders of 1 sqrt (L) in length were previously processed
Length L job, the total of the completion times would be approx. 2L. Obviously
It seems like a good idea to postpone longer jobs
and accelerate shorter jobs.

I tried the following:

1 + 2 + 3 +………..+sqrt(L) + L
(Sqrt(L) ( sqrt(L) + 1))/2 +L

L/2 + sqr(L)/2 + L

I don't know how it is 2L, as in the paper text2 above.

Some body leads me please.

substrings – What is the shortest superstring for $ {c (ab) ^ k, (ba) ^ k, (ab) ^ k c } $?

In this article on PDF page 3 they give $ {c (ab) ^ k, (ba) ^ k, (ab) ^ k c } $ as an example of an input to the GREEDY shortest superstring algorithm that causes it to have an approximate ratio of 2.

As far as I can tell, the shortest superstring of this set is either $ c (ab) ^ k c (ba) ^ k $ or $ b (ab) ^ k c (ab) ^ k $ – Anyway, the length is $ 4k + $ 2, Unfortunately, this contradicts the claim in the publication that GREEDY prints a string twice the length of the optimal super string.

  • Without loss of generality, we can assume that GREEDY never returns a string that is longer than the concatenation of its input sentence. If the GREEDY algorithm is really described like this, we can simply add an if statement to check this case and return the chaining instead.
  • The length of the input string concatenation is $ 6k + $ 2,
  • For all $ k in mathbb {N} $. $ 1 le frac {6k + 2} {4k + 2} le 1.5 $
  • So either the approximation ratio for a reasonable algorithm for this class of problems must be less than or equal to 1.5, or I think the shortest superstring is not the shortest.

Can anyone explain why this reasoning doesn't work or what is the shortest superstring of this set?

THREE.JS – How can you determine the shortest direction of rotation that an object must have in order to view others?

In THREE.JS (and the mathematical basis) I try to understand a way to determine the direction in which an object should turn in order to orient itself differently, but without actually rotating it.

I want to apply a small custom rotation in this direction.

thank you in advance

Diagrams – The shortest route from Dijkstra leads to non-intuitive results

Looking at the following nodes with red edge weights, Dijkstra's shortest path algorithm seems to give incorrect results, at least due to the definition of the steps in Wikipedia. These rules will remove 0 to 2 is calculated by passing 1 Instead of 3,

The last distances (from 0) would come to:

0 -> 0

1 -> 0.2

2 -> 1000.2

3 -> 0.5

The weights in this case are bidirectional, but I see no way of providing information about the connection between 2 and 3 ever affect the final distance between 0 and 2, Am I missing something about the limitations of this algorithm for this type of graphics or are the steps listed wrong?

example cycle

Algorithms – Shortest distances between given red and arbitrary blue corner points

I don't take negative weights in this solution (since you specified Dijkstra). My solution also uses Dijkstra. To let $ G & # 39; $ be the graph that results from $ G $ by pulling all the blue vertices together into one vertex. So remove all blue vertices in the diagram and add a blue vertex $ b $and for each edge between a red corner point $ u $ and a blue vertex $ v $Add an edge between $ u $ and $ b $,

Claim. A shortest path from a red vertex $ u $ to a blue vertex in $ G $ has the same length as a short one $ u $ to $ b $ in the $ G & # 39; $,

Proof. Since the graph has no negative weights, a shortest path can always be replaced by another shortest path with only the last vertex in blue (all points after this vertex are edges with weight 0). Now there is a one-to-one correspondence between the shortest paths in both diagrams because the inner vertices of the path can be moved unchanged and the last edge of the path in $ G $ corresponds to an artificial edge $ b $ in the $ G & # 39; $ with the same weight.

Since the graph is now undirected, there is a shortest path from $ u $ to $ v $ is a shortest path from $ v $ to $ u $ (For directional graphs, we can do this by inverting the graph.) Therefore, Dijkstra does not have to be executed from a red vertex for every query $ v $, do a Dijkstra as preprocessing $ b $ and for each query node $ v $ reply $ d_ {G & # 39;} (b, v) $,

Conic sections – normal to curve $ y = x ^ 2 $ form the shortest chord

Find the normal to the curve $ y = x ^ 2 $ form the shortest chord

Normal at one point $ P (x, y) = (t, t ^ 2) $ is $ x + 2ty = t + 2t ^ 3 $what hits the point $ Q (m, m ^ 2) $
m + 2tm ^ 2 = t + 2t ^ 3 implies m-t = -2t (m ^ 2-t ^ 2) = -2t (m-t) (m + t) \
t + m = frac {-1} {2t} implies m = -t- frac {1} {2t} \
T = Delta ^ 2 = (x_1-x_2) ^ 2 + (y_1-y_2) ^ 2 \
= ™ ^ 2 + (t ^ 2-m ^ 2) ^ 2 = ™ ^ 2 (1+ (t + m) ^ 2) = (2t + frac {1} {2t}) ^ 2 large (1+ frac {1} {4t ^ 2} large) \
= ( frac {4t ^ 2 + 1} {2t}) ^ 2 ( frac {4t ^ 2 + 1} {4t ^ 2}) = bigg ( frac {4t ^ 2 + 1} {2t} bigg) ^ 3 \
frac {dT} {dt} = 3 bigg ( frac {4t ^ 2 + 1} {2t} bigg) ^ 2. frac {2t (8t) – (4t ^ 2 + 1) .2} { 4t ^ 2} = 3 bigg ( frac {4t ^ 2 + 1} {2t} bigg) ^ 2. Frac {16t ^ 2-8t ^ 2-2} {4t ^ 2} \
= 3 bigg ( frac {4t ^ 2 + 1} {2t} bigg) ^ 2.2. Frac {4t ^ 2-1} {(2t) ^ 2} = 0 \
implies t ^ 2 = frac {1} {4} implies t = pm frac {1} {2} \
N: x + y = 3/4

But my advice gives the solution $ y = pm dfrac {x} { sqrt {2}} + 1 $what is asked what is normal $ 𝑦 = 𝑥 ^ 2 $ forms the shortest chord? but I really can't figure out what's wrong with my attempt?