CSP Unit #6 Test Questions and answers with rated content 2023
1. Which of the following is true of algorithms? C. Every algorithm can be constructed using combinations of sequencing, selection, and iteration 2. The following algorithm is followed by a person every morning when they get up from bed to go to school. Which concept does this algorithm BEST demonstrate? A. Sequencing 00:02 01:14 3. Which of these algorithms will move the robot along the same path as the algorithm below? D. 4. A town government is designing a new bus system and are deciding where to put the different bus stops. they want to pick the collection of locations that minimizes the distance that anyone needs to walk in order to get to at least one bus stop. What term best defines the kind of problem? B. An optimization problem 5. The algorithm below is used to find the largest element in a list of numbers. By modifying one of the lines in the program it is possible to make the algorithm find the SMALLEST element. Which line would need to be modified and how? B. Line 04 becomes "IF (num < target)" 6. Which of the following algorithms is the same as the flowchart shown below? B. 7. The graph shows the efficiencies of two different algorithms that solve the same problem. Which of the following is most efficient? D. The algorithms have different efficiencies depending on the input size 8. A school is creating class schedules for its students. The students submit their requested courses and then a program will be designed to find the optimal schedule for all students. The school has determined that finding the absolute best schedule cannot be solved in a reasonable time. Instead, they have decided to use a simpler algorithm that produces a good but non-optimal schedule in a more reasonable amount of time. Which principle does this decision best demonstrate? B. Heuristics can be used to solve some problems for which no reasonable algorithm exists 9. Which of the following algorithmic efficiencies would be considered LEAST efficient? D. Exponential 10. Which of the following best describes the existence of undecidable problems? D. An undecidable problem is a problem for which no algorithm can be constructed that always produces a correct output 11. A group of students writes their names and unique student ID numbers on sheets of paper. The sheets are then randomly placed in a stack. Their teacher is looking to see if a specific ID number is included in the stack. Which of the following best describes whether their teacher should use a linear or a binary search? B. The teacher could use either type of search though the binary search is likely to be faster 12. A computer is performing a binary search on the sorted list of 7 numbers below. What is the maximum number of iterations needed to find the item? B. 3 00:02 01:14 13. Which of the following is a benefit of parallel and distributed computing? C. Parallel computing scales more effectively than sequential computing 14. A software company is used to run an algorithm sequentially on one server. As more users start using their app, the company decided to rewrite the program to be parallel. It is now run on four separate servers instead of one. Thanks to the use of a parallel algorithm, the same process that used to take 40 minutes to run now only requires 20 minutes. The company is considering purchasing additional computers to decrease the time the program runs even further. Which of the following best describes the impacts of running the parallel algorithm on an even larger number of computers? C. The algorithm will likely require less time to run though the improvements in efficiency will not be as significant as before. 15. A sequential algorithm is broken into three stages. A parallel version of the algorithm completes the sorting stage in parallel leading to a new set of times. What is the speedup of the parallel solution? C. 2
École, étude et sujet
- Établissement
- Csp
- Cours
- Csp
Infos sur le Document
- Publié le
- 24 janvier 2023
- Nombre de pages
- 2
- Écrit en
- 2022/2023
- Type
- Examen
- Contient
- Questions et réponses
Sujets
- selection
- and iteration
-
1 which of the following is true of algorithms c every algorithm can be constructed using combinations of sequencing
-
2 the following algorithm is followed by a person eve
Document également disponible en groupe