Docsity

Introduction to Computer Science exam, Exams of Computer Science

Toggle sidebar
bg1
本試題(含本封面)共12頁:第1頁
115學年度 學士後醫學系招生考試
計算機概論與程式設計試題封面
考試開始鈴響前,請勿翻閱本試題!
★考試開始鈴響前,請注意:
一、 除准考證、應考文具及一般手錶外;行動電話、穿戴式裝置及其他物品
均須放在臨時置物區。
二、 請務必確認行動電話已取出電池或關機,行動電話及手錶的鬧鈴功能必
須關閉。
三、 就座後,不可擅自離開座位或與其他考生交談。
四、 坐定後,雙手離開桌面,確認座位號碼、答案卡號碼與准考證號碼相
同,以及抽屜中、桌椅下或座位旁均無非考試必需用品。如有任何問
題,請立即舉手反應。
五、 考試開始鈴響前,不得翻閱試題本或作答。
六、 考試全程不得吃東西、喝水及嚼食口香糖。
七、 違反上述規定,依「筆試規則及違規處理辦法」議處。
★作答說明:
一、 考試時間:100 分鐘。
二、 本試題(含封面)共12 頁,如有缺頁或毀損,應立即舉手請監試人員補發。
三、 本試題單選題共 30 題、申論題 4題,共計 100 分;每題單選題答錯倒
扣,不作答不計分。
四、 單選題答題依題號順序劃記在答案卡上,寫在試題本上無效;答案卡限用
2B 鉛筆劃記,若未按規定劃記,致電腦無法讀取者,考生自行負責。
五、 申論題部分以「答案卷」作答,作答時不得使用鉛筆,違者該科答案卷
不予計分;限用黑色或藍色墨水的筆書寫。
六、 試題本必須與答案卡一併繳回,不得攜出試場。
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Introduction to Computer Science exam and more Exams Computer Science in PDF only on Docsity!

2B 鉛筆劃記,若未按規定劃記,致電腦無法讀取者,考生自行負責。

計算機概論與程式設計試題 【單選題】每題 2 分,共計 60 分。答錯 1 題倒扣 0.5 分,倒扣至本大題零分為止,未作 答,不給分亦不扣分。

  1. In a direct-mapped cache system with 16 cache lines, a 32-bit memory address is divided into Tag, Index, and Offset fields. Assuming a byte-addressable memory and a block size of 64 bytes, how many bits are used for the Tag field? (A) 16 bits (B) 20 bits (C) 22 bits (D) 24 bits (E) 26 bits
  2. A system implements the Banker's Algorithm for deadlock avoidance. There are 3 resource types (A, B, C). The current Available resources are (2, 1, 2). The current Allocation and Maximum matrices are as follows: Process Allocation (A, B, C) Maximum (A, B, C) P0 2, 0, 1 4, 2, 2 P1 3, 1, 2 5, 3, 3 P2 1, 2, 0 3, 3, 2 Which of the following resource requests can be safely granted? (A) P0 requests (1, 1, 0) (B) P1 requests (2, 2, 1) (C) P2 requests (2, 1, 2) (D) P0 requests (2, 2, 1) (E) P1 requests (3, 1, 1)
  3. Which statement best describes a key difference between how CNNs and Transformers extract features from input data? (A) CNNs rely on global attention mechanisms, while Transformers use fixed-size convolutional filters. (B) CNNs and Transformers extract features in identical ways but differ only in training speed. (C) Both CNNs and Transformers require manually designed filters for feature extraction. (D) CNNs capture local spatial patterns using convolution, while Transformers model global relationships using self‑attention. (E) Transformers can only process sequential text data, while CNNs can only process images.

計算機概論與程式設計試題

  1. In data mining, consider a transactional database with 1,000,000 transactions. An itemset X appears in 12,000 transactions, and an itemset Y appears in 15,000 transactions.The combined itemset X∪Y appears in 9,000 transactions.Which of the following statements is CORRECT? (A) The confidence of the rule X→Y is 0.75. (B) The support of the rule X→Y is 0.75. (C) The lift of the rule X→Y is less than 1. (D) The rule X→Y is independent because its confidence^ equals the support of Y. (E) The conviction of the rule X→Y must be less than 1.
  2. A processor uses a pipelined architecture with multiple stages. Which situation most directly causes a control hazard? (A) Two instructions require the same hardware resource at the same time. (B) An instruction depends on the result of a previous instruction. (C) Data must be transferred between cache and main memory. (D) The processor encounters a branch instruction whose outcome is not yet known. (E) An instruction has a longer execution time than others.
  3. In an operating system, various synchronization mechanisms are used to coordinate concurrent processes. Which of the following statements about mutex locks and semaphores is CORRECT? (A) A mutex allows multiple processes to enter a critical section simultaneously as long as they release the lock quickly. (B) A counting semaphore can allow a limited number of processes to access a shared resource concurrently, based on its initial value. (C) A binary semaphore automatically prevents deadlock by detecting circular wait conditions. (D) A mutex lock increases system throughput by eliminating the need for context switching. (E) Semaphores guarantee fairness by ensuring processes access the critical section in strict FIFO order.
  4. Standard Recurrent Neural Networks (RNNs) often suffer from the vanishing gradient problem. Which of the following architectural modifications is most effective at addressing this issue? (A) Increasing the learning rate (B) Adding more hidden layers (C) Using ReLU activation functions exclusively (D) Reducing the sequence length (E) Using LSTM (Long Short-Term Memory) units

計算機概論與程式設計試題

  1. What is the primary function of Network Function Virtualization (NFV) in modern networking architecture? (A) It centralizes routing decisions into a single hardware controller. (B) It virtualizes network services that traditionally run on dedicated hardware devices. (C) It increases physical bandwidth by upgrading transmission media. (D) It replaces packet-switching mechanisms with circuit-switching mechanisms. (E) It encrypts all network traffic at the data link layer by default.
  2. Consider the following adjacency matrix representing a weighted graph: 0 1 2 3 0 [ 0 4 ∞ 2 ] 1 [ 4 0 3 ∞ ] 2 [ ∞ 3 0 1 ] 3 [ 2 ∞ 1 0 ] Using Dijkstra's algorithm to find the shortest path from node 0 to node 2, what is the shortest distance? (A) 2 (B) 3 (C) 4 (D) 5 (E) 7
  3. You are given a Python function that is supposed to calculate the sum of all integers from 1 to n using recursion. However, there is a mistake in the code. Identify the mistake and provide the corrected version of the code. (A) Change sum_to_n(n) to sum_to_n(n-1) in the recursive call (B) Change return 1 to return 0 in the base case (C) Change n + sum_to_n(n) to n * sum_to_n(n) in the recursive call (D) Change the base case from n == 1 to n == 0 (E) Change return 1 to return n in the base case def sum_to_n(n): if n == 1: # base case return 1 else: return n + sum_to_n(n)

計算機概論與程式設計試題

  1. Which of the following best describes the role of edge computing in AI‑powered systems? (A) Processing all AI workloads only in large centralized cloud data centers (B) Improving AI accuracy by training all models exclusively on historical datasets (C) Reducing storage costs by deleting raw sensor data before any processing occurs (D) Using only wireless networks to transmit AI inference results (E) Processing data closer to where it is generated to reduce latency and improve real‑time AI performance
  2. Which of the following statements about TCP Reno is INCORRECT? (A) TCP Reno uses Slow Start to exponentially increase the congestion window at the beginning of a connection. (B) TCP Reno switches to Congestion Avoidance once the congestion window (cwnd) reaches the slow-start threshold (ssthresh). (C) TCP Reno enters Fast Recovery after receiving three duplicate ACKs. (D) TCP Reno reduces the congestion window (cwnd) to one segment after Fast Recovery. (E) Packet loss detected by timeout causes TCP Reno to enter Slow Start.
  3. In a classic 5-stage CPU pipeline (IF, ID, EX, MEM, WB), what is the main effect of pipelining on program execution? (A) It reduces the latency of each individual instruction to less than one clock cycle. (B) It increases the CPU clock frequency without any need for hazard handling. (C) It improves overall throughput by allowing multiple instructions to be in different stages at the same time, though hazards may cause stalls or require forwarding. (D) It guarantees that the program always finishes in exactly n + 4 cycles for n instructions, regardless of branch instructions. (E) It eliminates the need for cache memory because instructions are executed continuously.
  4. The arithmetic of Galois Field GF(2^8 ) can be implemented using polynomial multiplication modulo an irreducible polynomial. Assume the irreducible polynomial is m( x )= x^8 + x +1. Compute the multiplication of the two byte values: 0x13 and 0x04 in GF(2^8 ). (A) 0x (B) 0x4C (C) 0x (D) 0x2F (E) 0x

計算機概論與程式設計試題

  1. In supervised learning, what is the primary purpose of using a validation dataset? (A) To increase the size of the training data. (B) To evaluate the final performance of the model. (C) To tune model hyperparameters and detect overfitting. (D) To generate new features automatically. (E) To replace the test dataset.
  2. Consider the following relation: Enrollment(StudentID, StudentName, CourseID, CourseName, InstructorName). Assume 1) Each student has only one StudentName; 2) Each course has only one CourseName; 3) Each course is taught by only one InstructorName; 4) A student can enroll in multiple courses.Which of the following decompositions correctly converts the relation into Third Normal Form (3NF)? (A) Enrollment(StudentID, CourseID) (B) Enrollment(StudentID, StudentName, CourseID), Course(CourseID, InstructorName) (C) Student(StudentID, StudentName, CourseID), Course(CourseID, CourseName, InstructorName) (D) Student(StudentID, StudentName), Course(CourseID, CourseName), Instructor(InstructorName, CourseID), Enrollment(StudentID, CourseID, InstructorName) (E) Student(StudentID, StudentName), Course(CourseID, CourseName, InstructorName), Enrollment(StudentID, CourseID)
  3. Consider the following processes with their arrival times and CPU burst times (in milliseconds): Process Arrival Time Burst Time P1 0 6 P2 2 8 P3 4 7 P4 5 3 (A) 5 ms (B) 5.5 ms (C) 6 ms (D) 6.5 ms (E) 7 ms Using non-preemptive Shortest Job First (SJF) scheduling, what is the Average Waiting Time (AWT)?

計算機概論與程式設計試題

  1. Which of the following statements is CORRECT regarding NP-complete problems? (A) If a polynomial-time algorithm is found for any NP-complete problem, then all problems in NP can be solved in polynomial time. (B) Every NP-complete problem has a polynomial-time algorithm that approximates the optimal solution within a constant factor. (C) NP-complete problems are those for which no polynomial-time verification algorithm exists. (D) A problem is NP-complete if and only if it can be reduced in polynomial time to every problem in NP. (E) If a problem is NP-complete, then it cannot be an NP-Hard problem.
  2. Please calculate the value of 2^2026 mod 13. Which of the following is CORRECT? (A) 0 (B) 1 (C) 7 (D) 10 (E) 11
  3. In a decision tree for classification, which measure is commonly used to determine the best attribute to split on at each node? (A) Euclidean Distance (B) Cosine Similarity (C) Information Gain (Entropy Reduction) (D) Manhattan Distance (E) Pearson Correlation

計算機概論與程式設計試題 【申論題】每題 10 分,共計 40 分。未作答或作答錯誤,不給分亦不扣分。

  1. A medical research team is building a classifier to predict disease presence (Positive/Negative) based on patient data. After testing on 200 patients, they obtain the following confusion matrix: Predicted Positive Negative Actual Positive 72 18 Negative 12 98 ( 1 ) ( 5 %) Calculate the following metrics and explain what each represents (Show the result with percentage, e.g. 0.78256 should be stated as 78.26 %): a. Accuracy b. Precision c. Recall (Sensitivity) d. F1-Score e. Specificity ( 2 ) (5%) The team wants to adjust the classification threshold to reduce false negatives (missed diseases), even if it increases false positives. Explain which metric should be prioritized and why this trade-off is important in medical diagnosis.
  2. Consider the following Hidden Markov Model: States: S = {H, C} (H = Hot, C = Cold) Observations: O = {1, 2} Initial probabilities: p 0 (H)=0.5, p 0 (C)=0. Transition probabilities: P(H→H)=0.6, P(H→C)=0. P(C→H)=0.5, P(C→C)=0. Emission probabilities: P(1|H)=0.8, P(2|H)=0. P(1|C)=0.3, P(2|C)=0. Observed sequence: O=(1,2) (1) (4%) Fill in the Viterbi table. State\Time t =0 t =1 (O=1) t =2 (O=2) Hot (H) 0. Cold (C) 0. (2) (3%) Determine the most likely hidden state sequence. (3) (3%) Why is Viterbi more efficient than checking all possible state sequences?