q2K BHP
Black History Portal
THE BHP WIRE —
HIDDEN TRUTHS
What's New!
THE JOURNEY THROUGH TIME

Explore Black History

Explore the people, places, events, achievements, struggles and stories that shaped our journey.

✊🏾

Civil Rights

Movements, leaders, victories and the continuing fight for equality.

⚙️

Black Inventors

Innovation, patents, science, technology and world-changing contributions.

🏆

Sports

Pioneers, champions, Negro Leagues, records, activism and excellence.

♟️

People

Meet the people whose lives, choices and achievements shaped the journey.

📍

Places

Black towns, communities, institutions and places where history happened.

📜

Events

Moments that changed communities, movements, institutions and the nation.

Enter a person, place, event, or topic.
MY'STORY

The MOVE Fire

This is a personal recollection on the Move fire on May 13, 1985 Philadelphia police fired thousands of rounds at the MOVE house, city officials approved dropping an explosive device on the roof, the resulting fire was allowed to burn, 11 people—including five children—died, and 61 homes were destroyed. Philadelphia City Council later called it a “brutal attack carried out by the City of Philadelphia on its own citizens” and acknowledged that no individual faced criminal consequences for the bombing. One timeline correction worth preserving for the BHP record: the major previous MOVE-police confrontation was August 8, 1978, about seven years before the bombing, not a year or two earlier. Officer James Ramp was killed, other police and firefighters were wounded, nine MOVE members were later convicted, and television cameras recorded police beating Delbert Africa during his arrest. The 1985 MOVE Commission later specifically criticized city planners for failing to adequately use lessons from that 1978 confrontation. And that actually strengthens the point you’re making: 1985 did not happen without precedent or institutional memory. There had already been a deadly confrontation with MOVE, years of conflict, negotiations and police involvement before Osage Avenue.

MORE →
BLACK FACTS
The Truths They Never Taught You...

Ruler of the Mali Empire in the 14th century

Mansa Musa was the ruler of the Mali Empire in West Africa. Details recorded here should be sourced; unknown information is left blank.

MORE →
BHP gathered finds from its connected research sources. Showing the 4 strongest Black History matches.
← BACK TO RESULTS
Wikipedia

Chan's algorithm

A 2D demo for Chan's algorithm. Note however that the algorithm divides the points arbitrarily, not by x-coordinate.

In computational geometry, Chan's algorithm,[1] named after Timothy M. Chan, is an optimal output-sensitive algorithm to compute the convex hull of a set of points, in 2- or 3-dimensional space. The algorithm takes time, where is the number of vertices of the output (the convex hull). In the planar case, the algorithm combines an algorithm (Graham scan, for example) with Jarvis march (), in order to obtain an optimal time. Chan's algorithm is notable because it is much simpler than the Kirkpatrick–Seidel algorithm, and it naturally extends to 3-dimensional space. This paradigm[2] has been independently developed by Frank Nielsen in his Ph.D. thesis.[3]

Algorithm

[edit]

Overview

[edit]

A single pass of the algorithm requires a parameter which is between 0 and (number of points of our set ). Ideally, but , the number of vertices in the output convex hull, is not known at the start. Multiple passes with increasing values of are done which then terminates when . See below on choosing parameter .

The algorithm starts by arbitrarily partitioning the set of points into subsets with at most points each; notice that .

For each subset , it computes the convex hull, , using an algorithm (for example, Graham scan), where is the number of points in the subset. As there are subsets of points each, this phase takes time.

During the second phase, Jarvis's march is executed, making use of the precomputed (mini) convex hulls, . At each step in this Jarvis's march algorithm, we have a point in the convex hull (at the beginning, may be the point in with the lowest y coordinate, which is guaranteed to be in the convex hull of ), and need to find a point such that all other points of are to the right of the line [clarification needed], where the notation simply means that the next point, that is , is determined as a function of and . The convex hull of the set , , is known and contains at most points (listed in a clockwise or counter-clockwise order), which allows to compute in time by binary search[how?]. Hence, the computation of for all the subsets can be done in time. Then, we can determine using the same technique as normally used in Jarvis's march, but only considering the points (i.e. the points in the mini convex hulls) instead of the whole set . For those points, one iteration of Jarvis's march is which is negligible compared to the computation for all subsets. Jarvis's march completes when the process has been repeated times (because, in the way Jarvis march works, after at most iterations of its outermost loop, where is the number of points in the convex hull of , we must have found the convex hull), hence the second phase takes time, equivalent to time if is close to (see below the description of a strategy to choose such that this is the case).

By running the two phases described above, the convex hull of points is computed in time.

Choosing the parameter m

[edit]

If an arbitrary value is chosen for , it may happen that . In that case, after steps in the second phase, we interrupt the Jarvis's march as running it to the end would take too much time. At that moment, time will have been spent, and the convex hull will not have been calculated.

The idea is to make multiple passes of the algorithm with increasing values of ; each pass terminates (successfully or unsuccessfully) in time. If increases too slowly between passes, the number of iterations may be large; on the other hand, if it rises too quickly, the first for which the algorithm terminates successfully may be much larger than , and produce a complexity .

Squaring Strategy

[edit]

One possible strategy is to square the value of at each iteration, up to a maximum value of (corresponding to a partition in singleton sets).[4] Starting from a value of 2, at iteration , is chosen. In that case, iterations are made, given that the algorithm terminates once we have

with the logarithm taken in base , and the total running time of the algorithm is

In three dimensions

[edit]

To generalize this construction for the 3-dimensional case, an algorithm to compute the 3-dimensional convex hull by Preparata and Hong should be used instead of Graham scan, and a 3-dimensional version of Jarvis's march needs to be used. The time complexity remains .[1]

Pseudocode

[edit]

In the following pseudocode, text between parentheses and in italic are comments. To fully understand the following pseudocode, it is recommended that the reader is already familiar with Graham scan and Jarvis march algorithms to compute the convex hull, , of a set of points, .

Input: Set with points .
Output: Set with points, the convex hull of .
(Pick a point of which is guaranteed to be in : for instance, the point with the lowest y coordinate.)
(This operation takes time: e.g., we can simply iterate through .)
( is used in the Jarvis march part of this Chan's algorithm,
so that to compute the second point, , in the convex hull of .)
(Note: is not a point of .)
(For more info, see the comments close to the corresponding part of the Chan's algorithm.)
(Note: , the number of points in the final convex hull of , is not known.)
(These are the iterations needed to discover the value of , which is an estimate of .)
( is required for this Chan's algorithm to find the convex hull of .)
(More specifically, we want , so that not to perform too many unnecessary iterations
and so that the time complexity of this Chan's algorithm is .)
(As explained above in this article, a strategy is used where at most iterations are required to find .)
(Note: the final may not be equal to , but it is never smaller than and greater than .)
(Nevertheless, this Chan's algorithm stops once iterations of the outermost loop are performed,
that is, even if , it doesn't perform iterations of the outermost loop.)
(For more info, see the Jarvis march part of this algorithm below, where is returned if .)
for do
(Set parameter for the current iteration. A "squaring scheme" is used as described above in this article.
There are other schemes: for example, the "doubling scheme", where , for .
If the "doubling scheme" is used, though, the resulting time complexity of this Chan's algorithm is .)
(Initialize an empty list (or array) to store the points of the convex hull of , as they are found.)
(Arbitrarily split set of points into subsets of roughly elements each.)
(Compute the convex hull of all subsets of points, .)
(It takes time.)
If , then the time complexity is .)
for do
(Compute the convex hull of subset , , using Graham scan, which takes time.)
( is the convex hull of the subset of points .)
(At this point, the convex hulls of respectively the subsets of points have been computed.)
(Now, use a modified version of the Jarvis march algorithm to compute the convex hull of .)
(Jarvis march performs in time, where is the number of input points and is the number of points in the convex hull.)
(Given that Jarvis march is an output-sensitive algorithm, its running time depends on the size of the convex hull, .)
(In practice, it means that Jarvis march performs iterations of its outermost loop.
At each of these iterations, it performs at most iterations of its innermost loop.)
(We want , so we do not want to perform more than iterations in the following outer loop.)
(If the current is smaller than , i.e. , the convex hull of cannot be found.)
(In this modified version of Jarvis march, we perform an operation inside the innermost loop which takes time.
Hence, the total time complexity of this modified version is
If , then the time complexity is .)
for do
(Note: here, a point in the convex hull of is already known, that is .)
(In this inner for loop, possible next points to be on the convex hull of , , are computed.)
(Each of these possible next points is from a different :
that is, is a possible next point on the convex hull of which is part of the convex hull of .)
(Note: depend on : that is, for each iteration , there are possible next points to be on the convex hull of .)
(Note: at each iteration , only one of the points among is added to the convex hull of .)
for do
( finds the point such that the angle is maximized [why?],
where is the angle between the vectors and . Such is stored in .)
(Angles do not need to be calculated directly: the orientation test can be used [how?].)
( can be performed in time[how?].)
(Note: at the iteration , and is known and is a point in the convex hull of :
in this case, it is the point of with the lowest y coordinate.)
(Choose the point which maximizes the angle [why?] to be the next point on the convex hull of .)
(Jarvis march terminates when the next selected point on the convext hull, , is the initial point, .)
if
(Return the convex hull of which contains points.)
(Note: of course, no need to return which is equal to .)
return
else
(If after iterations a point has not been found so that , then .)
(We need to start over with a higher value for .)

Implementation

[edit]

Chan's paper contains several suggestions that may improve the practical performance of the algorithm, for example:

  • When computing the convex hulls of the subsets, eliminate the points that are not in the convex hull from consideration in subsequent executions.
  • The convex hulls of larger point sets can be obtained by merging previously calculated convex hulls, instead of recomputing from scratch.
  • With the above idea, the dominant cost of algorithm lies in the pre-processing, i.e., the computation of the convex hulls of the groups. To reduce this cost, we may consider reusing hulls computed from the previous iteration and merging them as the group size is increased.

Extensions

[edit]

Chan's paper contains some other problems whose known algorithms can be made optimal output sensitive using his technique, for example:

  • Computing the lower envelope of a set of line segments, which is defined as the lower boundary of the unbounded trapezoid of formed by the intersections.
  • Hershberger[5] gave an algorithm which can be sped up to , where h is the number of edges in the envelope
  • Constructing output sensitive algorithms for higher dimensional convex hulls. With the use of grouping points and using efficient data structures, complexity can be achieved provided h is of polynomial order in .

See also

[edit]

References

[edit]
  1. ^ a b Chan, Timothy M. (1996). "Optimal output-sensitive convex hull algorithms in two and three dimensions". Discrete & Computational Geometry. 16 (4): 361–368. doi:10.1007/BF02712873.
  2. ^ Nielsen, Frank (2000). "Grouping and Querying: A Paradigm to Get Output-Sensitive Algorithms". Discrete and Computational Geometry. Lecture Notes in Computer Science. Vol. 1763. pp. 250–257. doi:10.1007/978-3-540-46515-7_21. ISBN 978-3-540-67181-7.
  3. ^ Frank Nielsen. "Adaptive Computational Geometry". Ph.D. thesis, INRIA, 1996.
  4. ^ Chazelle, Bernard; Matoušek, Jiří (1995). "Derandomizing an output-sensitive convex hull algorithm in three dimensions". Computational Geometry. 5: 27–32. doi:10.1016/0925-7721(94)00018-Q.
  5. ^ Hershberger, John (1989). "Finding the upper envelope of n line segments in O(n log n) time". Information Processing Letters. 33 (4): 169–174. doi:10.1016/0020-0190(89)90136-1.

Source: Wikipedia. Article content is retrieved live through the MediaWiki API.

Wikipedia

Chan's algorithm

In computational geometry, Chan's algorithm, named after Timothy M. Chan, is an optimal output-sensitive algorithm to compute the convex hull of a set P {\displaystyle P} of n {\displaystyle n} points, in 2- or 3-dimensional space. The algorithm takes O ( n log ⁡ h ) {\displaystyle O(n\log h)} time, where h {\displaystyle h} is the number of vertices of the output (the convex hull). In the planar case, the algorithm combines an O ( n log ⁡ n ) {\displaystyle O(n\log n)} algorithm (Graham scan, for example) with Jarvis march ( O ( n h ) {\displaystyle O(nh)} ), in order to obtain an optimal O ( n log ⁡ h ) {\displaystyle O(n\log h)} time. Chan's algorithm is notable because it is much simpler than the Kirkpatrick–Seidel algorithm, and it naturally extends to 3-dimensional space. This paradigm has been independently developed by Frank Nielsen in his Ph.D. thesis.

MORE →
Wikipedia

Klee's measure problem

In computational geometry, Klee's measure problem is the problem of determining how efficiently the measure of a union of (multidimensional) rectangular ranges can be computed. Here, a d-dimensional rectangular range is defined to be a Cartesian product of d intervals of real numbers, which is a subset of Rd. The problem is named after Victor Klee, who gave an algorithm for computing the length of a union of intervals (the case d = 1) which was later shown to be optimally efficient in the sense of computational complexity theory. The computational complexity of computing the area of a union of 2-dimensional rectangular ranges is now also known, but the case d ≥ 3 remains an open problem.

MORE →
No preview image
Wikipedia

Floyd–Warshall algorithm

In computer science, the Floyd–Warshall algorithm (also known as Floyd's algorithm, the Roy–Warshall algorithm, the Roy–Floyd algorithm, or the WFI algorithm) is an algorithm for finding shortest paths in a directed weighted graph with positive or negative edge weights (but with no negative cycles). A single execution of the algorithm will find the lengths (summed weights) of shortest paths between all pairs of vertices. Although it does not return details of the paths themselves, it is possible to reconstruct the paths with simple modifications to the algorithm. Versions of the algorithm can also be used for finding the transitive closure of a relation, or (in connection with the Schulze voting system) widest paths between all pairs of vertices in a weighted graph.

MORE →
No preview image
Wikipedia

Yao's principle

In computational complexity theory, Yao's principle (also called Yao's minimax principle or Yao's lemma) relates the performance of randomized algorithms to deterministic (non-random) algorithms. It states that, for certain classes of algorithms, and certain measures of the performance of the algorithms, the following two quantities are equal: The optimal performance that can be obtained by a deterministic algorithm on a random input (its average-case complexity), for a probability distribution on inputs chosen to be as hard as possible and for an algorithm chosen to work as well as possible against that distribution The optimal performance that can be obtained by a random algorithm on a deterministic input (its expected complexity), for an algorithm chosen to have the best performance on its worst case inputs, and the worst case input to the algorithm Yao's principle is often used to prove limitations on the performance of randomized algorithms, by finding a probability distribution on inputs that is difficult for deterministic algorithms, and inferring that randomized algorithms have the same limitation on their worst case performance. This principle is named after Andrew Yao, who first proposed it in a 1977 paper. It is closely related to the minimax theorem in the theory of zero-sum games, and to the duality theory of linear programs.

MORE →
TOPIC OF THE DAY

Greenwood / Black Wall Street

Before the 1921 destruction of Tulsa’s Greenwood District, Black residents had created a remarkable center of business and community life. The district included stores, professional offices, entertainment venues and homes owned by Black citizens. Understanding Greenwood means learning what was built—not only what was burned.

MORE →
TRIVIA QUESTION OF THE DAY

Which Supreme Court case ruled state-sponsored public-school segregation unconstitutional?

Brown v. Board of Education in 1954.