Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 . 1 2 Are items a through e in the following list algorithms? If not, what qualities required of algorithms do they lack? a
Are items a through 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 nonzero 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 which is the first natural number and the second prime number with the third with 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 you're given two vectors each with 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.
Flip the quarter twice.
If the outcome is heads on the first flip and tails on the second, then I will walk the dog.
If the outcome is tails on the first flip and heads on the second, then you will walk the dog.
If both outcomes are tails or both outcomes are heads, then we flip twice again.
Is Calvin's technique an algorithm?
e Given a number, perform the following steps in order:
Multiply it by
Add
Divide by
Subtract
Divide by
Subtract
At this point, add to a counter to keep track of the fact that you performed steps through Then test the result you got when you subtracted If write down the number of times you performed steps through and stop. If not starting with the result of subtracting one, perform the seven steps again.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started