Question: 1 . 1 2 Are items a through e in the following list algorithms? If not, what qualities required of algorithms do they lack? a

1.12 Are items a through e in the following list algorithms? If not, what qualities required of algorithms do they lack?
a) Add the first row of the following matrix to another row whose first column contains a non-zero entry.
(Reminder: Columns run vertically; rows run horizontally.)
b) In order to show that there are as many prime numbers as there are natural numbers, match each prime
number with a natural number in the following manner. Create pairs of prime and natural numbers by matching
the first prime number with 1(which is the first natural number) and the second prime number with 2, the third
with 3, and so forth. If, in the end, it turns out that each prime number can be paired with each natural number,
then it is shown that there are as many prime numbers as natural numbers.
c) Suppose youre given two vectors each with 20 elements and asked to perform the following operation: Take
the first element of the first vector and multiply it by the first element of the second vector. Do the same to the
second elements, and so forth. Add all the individual products together to derive the dot product.
d) Lynne and Calvin are trying to decide who will take the dog for a walk. Lynne suggests that they flip a coin and
pulls a quarter out of her pocket. Calvin does not trust Lynne and suspects that the quarter may be weighted
(meaning that it might favor a particular outcome when tossed) and suggests the following procedure to fairly
determine who will walk the dog.
1. Flip the quarter twice.
2. If the outcome is heads on the first flip and tails on the second, then I will walk the dog.
3. If the outcome is tails on the first flip and heads on the second, then you will walk the dog.
4. If both outcomes are tails or both outcomes are heads, then we flip twice again.
Is Calvins technique an algorithm?
e) Given a number, perform the following steps in order:
1. Multiply it by 4
2. Add 4
3. Divide by 2
4. Subtract 2
5. Divide by 2
6. Subtract 1
7. At this point, add 1 to a counter to keep track of the fact that you performed steps 1 through 6. Then test
the result you got when you subtracted 1. If 0, write down the number of times you performed steps 1
through 6 and stop. If not 0, starting with the result of subtracting one, perform the seven steps again.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!