Input : A set S of planar points
Output : A convex hull for S
Step 1: If S contains no more than five points, use exhaustive searching to find the convex hull and return.
Step 2: Find a median line perpendicular to the X-axis which divides S into SL and SR SL lies to the left of SR .
Step 3: Recursively construct convex hulls for SL and SR. Denote these convex hulls by Hull(SL) and Hull(SR) respectively.
Step 4: Apply the merging procedure to merge Hull(SL) and Hull(SR) together to form a convex hull.
Time complexity:
T(n) = 2T(n/2) + O(n)
= O(n log n)
Huffman codes
In telecommunication, how do we represent a
set of messages, each with an access
frequency, by a sequence of 0’s and 1’s?
To minimize the transmission and decoding
costs, we may use short strings to represent
more frequently used messages.
This problem can by solved by using an
extended binary tree which is used in the 2-
way merging problem.
aiParts is a set of C++ classes that can be used to develop artificial intelligence for multi-decision problems. It includes classes that implement the High-Hope technique and some sample programs.
The BNL toolbox is a set of Matlab functions for defining and estimating the
parameters of a Bayesian network for discrete variables in which the conditional
probability tables are specified by logistic regression models. Logistic regression can be
used to incorporate restrictions on the conditional probabilities and to account for the
effect of covariates. Nominal variables are modeled with multinomial logistic regression,
whereas the category probabilities of ordered variables are modeled through a cumulative
or adjacent-categories response function. Variables can be observed, partially observed,
or hidden.