所屬科目:學士後西醫◆計算機概論與程式設計
7. For the process shown in the table below: [time unit: ms] Please find the average waiting time if the processes are conducted in Preemptive-Priority. (A) 3 (B) 4 (C) 5 (D) 6 (E) 7
11. Given a database table named “animal” with four columns, please find out a CORRECT SQL command that can obtain the desired output as below. (A) SELECT category, count(animalid) as countaid FROM animal WHERE born > '2023-02- 14' AND count(animalid)>=2 GROUP BY category ORDER BY count(animalid) DESC, category ASC (B) SELECT category, count(animalid) as countaid FROM animal WHERE born > '2023-02- 14' GROUP BY category HAVING count(animalid)>=2 ORDER BY count(animalid) DESC, category ASC (C) SELECT category, count(animalid) as countaid FROM animal GROUP BY category HAVING count(animalid)>=2 AND born > '2023-02-14' ORDER BY count(animalid), category DESC (D) SELECT category, count(animalid) as countaid FROM animal WHERE count(animalid)>=2 GROUP BY category HAVING born > '2023-02-14' ORDER BY count(animalid) DESC, category ASC (E) SELECT category, count(animalid) as countaid FROM animal WHERE born > '2023-02- 14' GROUP BY category ORDER BY count(animalid) DESC, category ASC
14. According to the three database tables listed below, which of the following statements is CORRECT if you want to create a relational database model? (A) There is no possible foreign key that can be used in“Purchase”table. (B) EID can be regarded as a primary key in“Purchase”table. (C) There is a one-to-many relationship between“Employee”and“Purchase”tables. (D) Every table must have a foreign key to uniquely identify a particular row. (E) If we want to query Employee’s names in the Purchase with PID= "1234" and "1238", it is a better approach to use UNION in SQL command.
15. Which of the followings is the path for BFS algorithm? (The starting point is the first element of each of the following path) (A) H→G→A→J→B→C→D→E→F→I (B) B→J→C→E→F→I→D→A→G→H (C) J→A→G→H→B→C→D→E→I→F (D) H→B→D→I→F→G→E→A→C→J (E) H→G→A→J→C→E→I→F→D→B
16. Which one of the following statements is the biggest, when n approaches to ∞? (A) nlog n (B) (C) n! (D) (E)
17. Which is the answer of printf? (A) 4 (B) 5 (C) 6 (D) 7 (E) 8
20. You are given a Python function that is supposed to implement the binary search algorithm to find the index of a target element in a sorted list. However, there is a mistake in the code. Identify the mistake and provide the corrected version of the code. (A) Change len(arr) to len(arr)-1 (B) Change the condition in the while loop to while left<right (C) Change left=mid+1 to left=mid (D) Change right=mid-1 to right=mid (E) Add a condition to handle the case when the target is not found in the list
21. The Advanced Encryption Standard (AES) uses arithmetic in Galois field GF(28), with the irreducible polynomial m(x)=x8+x4+x3+x+1. Find out the result of the multiplication of two byte states in GF(28). (A) (B) (C) (D) (E)
22. Which is a CORRECT output for the following C program? (A) 8 8 (B) 64 8 (C) 512 512 (D) 512 8 (E) 64 64
【申論題】1. What will be the output of the following code?
4.The results of a hypothetical study to measure test performance of the PCR (polymerase chain reaction) test for Covid-19 are shown in the following table.Calculate the (A) accuracy, (B) precision (positive predictive rate, PPV), (C) recall (sensitivity, true positive rate, TPR), (D) true negative rate (TNR) and (E) F1-measure. Note: Show the result by rounding up the 3rd digit after the decimal point, e.g. 0.9876 should be 0.988.