mathematical induction
- Use mathematical induction to show that when n is a power of 2, T(n) = n lg n is the
solution of the recurrence relation
T(n) = (
2 if n = 2
2 · T(
n
2
) + n if n = 2k
for k > 1. - Suppose we are comparing implementations of Insert-sort and Merge-sort on
the same machine. For input of size n = 2k
for k ≥ 1, Insert-sort runs in 8n
2
comparisons, while Merge-sort runs in 64n lg n comparisons. For which value of n
does Insert-sort beat Merge-sort? - We can express Insert-sort as a recursive procedure as follows. In order to sort
A[1…n], we recursively sort A[1…n−1] and then insert A[n] into sorted array A[1…n−
1].
(a) Write the pseudocode for this recursive version of Insert-sort, name it Insertsort-recur.
(b) Write a recurrence for the running time of of Insert-sort-recur.
(c) Find the solution of the recurrence relation in (b).
(d) Is Insert-sort-recur more expensive than Insert-sort? - Given an array s = hs[1], s[2], . . . , s[n]i, and n = 2d
for some d ≥ 1. We want to find
the minimum and maximum values in s. We do this by comparing elements of s.
(a) The “obvious” algorithm makes 2n − 2 comparisons. Explain.
(b) Can we do it better? Specify a divide-and-conquer algorithm.
(c) Let T(n) = the number of comparisons your divide-and-conquer algorithm makes.
Write a recurrence relation for T(n).
(d) Show that your recurrence relation has as its solution T(n) = 3
2
n − 2. - Let S be an array of n integers such that S[1] < S[2] < · · · < S[n]. (1) Specify
an O(lg n) algorithm which either finds an i ∈ {1, 2, . . . n} such that S[i] = i or else
determine that there is no such i. (2) Justify the correctness and running time of your
algorithm.
Sample Solution
As mentioned earlier, there is a long list of methods that can be used for facial recognition. Four of them, i.e Eigenface Method, Correlation Method, Fisherface Method and the Linear Subspaces Method, are the most favorite. Below here, you can find the error rates of those four methods, considered pictures with close crop or the whole face. Figure 3: Graph and table of the result of an experiment with the four most used facial recognition techniques [1] As you can see, the Eigenface Method has the most errors, and the Fisherface Method the least. You can also see that the error rate is higher with images of close crops faces, compared to a full face image. This shows that it is harder for a facial recognition algorithm to recognize someone if their face is not fully shown in the picture and the features are thus not recognized. It also reminds us of the fact that facial recognition techniques are not completely accurate. Hopefully they will become more accurate in the future, so e.g crime can be prevented faster and better. 3. Results of face recognition technologies in crime prevention There are many ways for law enforcement to help them with decreasing the amount of crime. Face recognition has a big role in human life. Witnesses can describe a person’s face. Also, the citizenry can help by sending in photos. But an Artificial Intelligence can also do face recognition. It can search through a database full of mug shots to find a match with the face from an image or sketch. The Artificial Intelligence will take much shorter time to find a match than a group of officers or even specialists. In the following part, there will be discussed how four different approaches are all playing a role in crime prevention.>
GET ANSWER