112 年 國立臺灣大學資訊管理學系碩士班《資訊科技概論》

📄 試題原卷 免費註冊後即可對照原始考卷 PDF免費註冊

第 1 題

Which of the following is wrong about Von Neumann architecture? (A) it has four main units: CPU, memory, input, and output (B) memory is simply a linear array of storage locations (C) data and instructions are separated into different memory (D) a central processing unit has a control unit and an arithmetic/login unit (E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

馮紐曼架構的核心特徵是「儲存程式」:指令與資料存放在同一個記憶體中,處理器從記憶體取出指令並執行。典型架構包含中央處理器、記憶體、輸入單元與輸出單元;中央處理器則由控制單元與算術邏輯單元組成。

解題方法

逐項比對選項與馮紐曼架構的基本定義,特別檢查「指令和資料是否分開存放」。這是辨認馮紐曼架構與哈佛架構的重要差異:馮紐曼架構共用記憶體;哈佛架構則將指令記憶體與資料記憶體分開。

選項分析

  • (A) 正確。 架構通常分為中央處理器、記憶體、輸入單元與輸出單元四個主要部分。
  • **(B) 正確。
🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 2 題

Which of the following is wrong about process architecture? (A) in general, program compiled in CISC architecture has fewer instructions than that compiled in RISC architecture (B) the CISC approach tries to make each instruction more powerful (C) in general, instructions in a CISC approach will need more clock cycles to execute than in a RISC approach (D) in general, the instruction set in a CISC approach is typically smaller than the instruction set in a RISC approach (E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

這題在比較複雜指令集計算機(CISC)與精簡指令集計算機(RISC)的架構差異。

(A) CISC 的設計理念是讓每一條指令能夠完成較複雜的工作,因此編譯後產生的指令數量通常會比 RISC 少,但每條指令的執行時間可能較長。RISC 則反之,指令數量較多,但單條指令執行快速。所以「CISC 架構編譯的程式通常比 RISC 少指令」是正確的。

(B) CISC 的核心思想就是讓單一指令能做更多事情,因此指令設計更為「強大」或複雜,能夠執行複雜的操作。這點是正確的。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 3 題

Which of the following is wrong about computer architecture? (A) A processor with 32-bit address buses can access at most 2322^{32} bytes of memory (B) in memory-mapped I/O, I/O devices use the same address space as memory devices (C) in memory-mapped I/O, the same instructions are used to access I/O devices and memory devices (D) the internal data storage of a processor is known as its registers (E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

本題考查位址匯流排、記憶體映射輸入/輸出,以及處理器暫存器的基本定義。

若位址匯流排有 nn 條線,每條線可表示 00 或 11,因此可形成 2n2^n 種不同位址。採用位元組定址時,每個位址對應一個位元組,最多可定址 2n2^n 個位元組。

在記憶體映射輸入/輸出(memory-mapped I/O)中,輸入/輸出裝置的控制暫存器也配置在記憶體位址空間內,因此處理器使用存取記憶體的相同指令與位址機制來操作它們。

解題方法

逐一判斷 A 至 D 是否符合上述定義。題目另設 E,表示「若 A 至 D 都正確,則選 E」。因此,只要確認 A 至 D 均正確,E 就是本題應選的答案。

選項分析

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 4 題

Which of the following is wrong about Input/Output in a computer system? (A) in interrupt-driven I/O, an external device interrupts the processor to execute an interrupt service routine (B) an external device interrupts the processor by triggering an interrupt signal to the processor (C) Direct Memory Access (DMA) allows data to be transferred from I/O devices to memory directly without the continuous involvement of the processor (D) a hardware device is needed to allow I/O devices to directly access memory with less participation of the processor (E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題主要考察輸入/輸出(I/O)系統中的不同處理方式,特別是中斷驅動 I/O 和直接記憶體存取(DMA)。

(A) 在中斷驅動 I/O(interrupt-driven I/O)中,當外部設備準備好進行資料傳輸或發生事件時,它會發出一個中斷信號給處理器,要求處理器暫停當前任務,轉而去執行一個專門處理該中斷的中斷服務常式(Interrupt Service Routine, ISR)。這是正確的。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 5 題

Which of the following is wrong about CPU cache? (A) register in CPU is usually faster than L1 cache (B) number of registers in CPU is smaller than the size of L1 cache (C) the size of L1 cache in current CPUs typically ranges in dozens to hundreds bytes (D) the size of L2 cache is typically much bigger than L1 cache (E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

這題考查 CPU 快取(cache)的層級結構和性能特點。

(A) 暫存器(registers)是 CPU 內部速度最快、存取時間最短的儲存單元,它們直接位於 CPU 核心內,用於存放當前指令執行所需的數據和控制資訊。L1 快取雖然也很快,但速度仍略遜於暫存器。因此,「CPU 中的暫存器通常比 L1 快取快」是正確的。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 6 題

Which of the following is not a major functionality of operating systems? (A) Resource Management (B) Process Management (C) Memory Management (D) Security Management (E) all the above are major functionalities.

登入後即可作答並保存紀錄。

這一題的完整詳解

這題在詢問作業系統(Operating System, OS)的主要功能。作業系統的核心職責是管理電腦的硬體和軟體資源,並為應用程式提供一個執行環境。

(A) 資源管理(Resource Management):作業系統負責管理 CPU 時間、記憶體、I/O 設備、檔案系統等各種硬體資源,並在多個行程(process)之間公平有效地分配。這是作業系統的核心功能。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 7 題

Operating systems divide virtual and physical memory into fixed-sized chunks called pages. Which of the following page size is currently most common than the others? (A) 128 bytes (B) 512 bytes (C) 4KB (D) 128KB (E) 512KB.

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

作業系統會把虛擬記憶體切成固定大小的區塊,稱為「頁」(page);實體記憶體則切成相同大小的區塊,稱為「頁框」(frame)。兩者大小相同,才能讓虛擬頁對應到實體頁框。

一般作業系統最常見的基本頁面大小是 4 KB4\text{ KB},也就是 40964096 位元組。大型頁面也存在,但通常用於特定效能需求,不是最常見的基本頁面大小。

解題方法

辨認選項中符合常見基本頁面大小的數值即可。4 KB=40964\text{ KB}=4096 位元組,是多數一般用途系統常見的頁面大小,因此選擇 (C)。

選項分析

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 8 題

Which of the following is wrong for applications running in an operating system? (A) user applications usually run in user-mode (B) applications running in user-mode shares a virtual address space (C) a process running in user mode can't access virtual addresses that are reserved for the operating system (D) core operating system components run in kernel mode (E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念
本題測試作業系統的執行模式與記憶體保護機制。關鍵概念包括:

  • 使用者模式 (User‑mode) 與核心模式 (Kernel‑mode):CPU 在兩種特權等級下執行指令,使用者模式受限制,無法直接執行特權指令或存取受保護的記憶體區段;核心模式則可使用所有指令並直接操作硬體。
  • 虛擬位址空間 (Virtual Address Space):每個行程 (process) 在使用者模式下擁有獨立的虛擬位址空間,只有核心模式的位址空間對所有行程共享。
  • 記憶體保護:作業系統透過分頁或分段機制,將作業系統核心的位址標記為 supervisor‑only,使用者模式的程式無法直接存取。

解題方法
逐一檢視選項,判斷其描述是否符合上述概念。若選項敘述與事實相符,則為正確;若有違背特權等級或記憶體共享原則的情況,即為錯誤。最後,根據「E)all the above are correct」的限定,若有任何一項錯誤,須選擇錯誤的選項,而非 E。

選項分析

  • (A) user applications usually run in user‑mode
    正確。大多數使用者程式(瀏覽器、編輯器、辦公軟體等)皆在使用者模式執行,以避免任意存取硬體與核心資源。

  • (B) applications running in user‑mode shares a virtual address space
    錯誤。每個使用者行程都有自己獨立的虛擬位址空間,互不共享。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 9 題

Which of the following is wrong about computer clusters? (A) nodes in a cluster are typically independent and connected by a high-speed LAN (B) clustering computers can increase computing power (C) clustering computers can prevent security attacks (D) clustering computers can improve fault tolerance (E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題旨在考察對電腦集群(computer clusters)概念的理解。集群是由多台獨立的計算機(節點)組成,通過高速網路連接,共同協作以實現更高的計算能力、可用性或可靠性。

(A) 集群的節點通常是獨立的計算機,它們之間通過高速區域網路(LAN)或其他高速互連技術進行通信。這是集群的基本架構。

(B) 集群的目的是將多台計算機的計算能力匯總起來,以解決單台計算機無法處理的大規模計算問題,或加速計算過程。因此,集群可以顯著提高計算能力。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 10 題

With regard to process management, which of the following is generally not the responsibility of operating systems (OS)? (A) creating and deleting user processes (B) suspending and resuming processes (C) process synchronization (D) deadlock handling (E) all the above are OS's responsibility.

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考查作業系統(OS)在程序管理(Process Management)方面的職責範疇。

(A) 建立和刪除使用者行程(creating and deleting user processes):作業系統負責管理行程的生命週期,包括建立新行程以及在行程結束後釋放其資源。這是 OS 的核心職責。

(B) 暫停和恢復行程(suspending and resuming processes):作業系統需要能夠暫停(suspend)一個行程的執行(例如,為了排程或其他原因),並在需要時恢復其執行。這也是 OS 的職責。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 11 題

With regard to storage management, which of the following is generally not the responsibility of operating systems? (A) creating and deleting files (B) file integrity check (C) disk scheduling (D) backing up files onto stable permanent storage media (E) supporting primitives for manipulating files and directories.

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念
本題測驗「作業系統(Operating System, OS)在儲存管理(storage management)中的職責」範圍。作業系統對磁碟與檔案系統的管理主要包括:

  1. 檔案與目錄的建立、刪除與命名(file creation, deletion, naming)。
  2. 提供檔案操作的原語(primitives),如 open、read、write、close、seek、mkdir、rmdir 等。
  3. 磁碟排程(disk scheduling):對磁碟 I/O 請求進行排隊與優化(FCFS、SCAN、C‑SCAN、LOOK 等)。
  4. 檔案完整性檢查(file integrity check):透過校驗和、CRC、FSCK 等工具維護檔案系統結構的一致性。
  5. 備份(backup):將檔案資料複製至永久、穩定的儲存媒體,以防止硬體故障或災難。

在上述職責中,備份往往是由系統管理員或備援軟體(backup software)負責,作業系統本身僅提供檔案存取介面,並不直接執行「將檔案備份至永久儲存媒體」的工作。此為本題的關鍵辨識點。


解題方法
題目為單選題,要求找出**「一般不屬於作業系統責任」**的項目。解題步驟:

  1. 針對每一選項,回顧作業系統在儲存管理層面的功能定義。
  2. 判斷該功能是否屬於 OS 內建的基本服務(kernel)或僅是外部應用/管理工具提供的服務。
  3. 排除明確屬於 OS 的功能,留下唯一不屬於的選項即為答案。

此方法不需計算,只要具備作業系統概念即可快速完成。


選項分析

選項內容是否屬於 OS 責任判斷說明
(A) creating and deleting files建立與刪除檔案✅屬於 OS檔案系統的 create、unlink 等系統呼叫由 kernel 處理,負責分配 i‑node、更新目錄結構。
🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 12 題

A uniprocessor system achieves multiprogramming by ____ in CPU scheduling. (A) dynamic allocation (B) process rotating (C) pipelining (D) time slicing (E) none of the above.

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考查單處理器系統(uniprocessor system)如何透過 CPU 排程實現多程式設計(multiprogramming)。多程式設計是指在單一處理器上同時運行多個程式,透過快速切換處理器來給人同時執行的假象。

(A) 動態分配(dynamic allocation):這通常指記憶體分配,與 CPU 排程關係不大。
(B) 程序輪轉(process rotating):這個術語不常見,可能指的是行程切換,但不是標準的 CPU 排程術語。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 13 題

When a process is running in Unix-like systems, which of the following is wrong about its memory layout? (A) the code section starts at location 0 (B) the data section starts immediately above code section (C) the stack section starts immediately above the data section (D) the stack section can grow and shrink dynamically during process life cycle (E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

本題考 Unix-like process 的虛擬記憶體配置。傳統簡化模型中,程式碼(code/text)位於低位址,資料區(data)接在程式碼區之上;堆積(heap)位於資料區上方,堆疊(stack)則位於較高位址,並可依執行需求動態調整。

堆積與堆疊的典型成長方向相反:堆積通常往高位址成長,堆疊通常往低位址成長。因此,堆疊不會緊接在資料區上方。

解題方法

依序核對各選項是否符合傳統 Unix 行程記憶體配置。此題採用課本的簡化配置模型;其中「程式碼從位置 0 開始」是指由虛擬位址空間的低位址端開始,不代表所有現代作業系統都會把實際程式碼載入位址 0。

選項分析

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 14 題

In Ethernet, which of the following algorithm is used to resolve collision? (A) Carrier Sense (B) Exponential Backoff (C) Collision Avoidance (D) Request to Send/Clear to Send (RTS/CTS) (E) Round Robin.

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考查乙太網路(Ethernet)中用於處理碰撞(collision)的演算法。在早期的共享式乙太網路(如使用集線器 Hub)中,多個設備同時發送數據時,可能會發生碰撞。

(A) Carrier Sense:這是 CSMA/CD(Carrier Sense Multiple Access with Collision Detection)協定的一部分,意思是設備在發送數據前會先偵聽載波(Carrier Sense),確認鏈路空閒。這是一種預防碰撞的機制,但無法完全避免碰撞。

(B) Exponential Backoff:這是 CSMA/CD 協定中處理碰撞的核心演算法。當發生碰撞後,每個發生碰撞的設備會隨機延遲一段時間再嘗試重新發送。延遲時間的長度會隨著碰撞次數的增加而指數級增長(Exponential Backoff),以減少再次發生碰撞的機率。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 15 題

We can apply tags to network frames and handling these tags in a local area network to create the appearance and functionality of network traffic that is physically on a single network but acts as if it is split between separate networks. This effectively creates ____. (A) virtual LANs (B) VPN (C) domains (D) subdomains (E) private LANs.

登入後即可作答並保存紀錄。

這一題的完整詳解

本題描述了一種網路技術,透過在網路框架(network frames)上加上標籤(tags),使得物理上單一的區域網路(LAN)能夠呈現出被分割成多個獨立網路的樣子和功能。這種技術稱為虛擬區域網路(Virtual LANs, VLANs)。

(A) 虛擬 LAN(Virtual LANs):VLAN 允許網路管理員將同一物理網路上的設備劃分成邏輯上的群組,每個群組就像一個獨立的 LAN。VLAN 的實現通常基於 IEEE 802.1Q 標準,該標準定義了在乙太網路幀中加入 VLAN 標籤(tag)的方法。這與題目描述完全吻合。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 16 題

In router-table construction, which of the following algorithms let routers build up their routing tables by periodically exchanging information with their immediately neighboring? (A) adaptive (B) link-state (C) distance-vector (D) incremental update (E) none of the above.

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

路由器需要根據網路拓樸與鏈路成本,建立通往各目的地的路由表。距離向量(distance-vector)路由的核心做法,是每台路由器定期把自己的「到各目的地的距離估計」傳給相鄰路由器,再根據收到的資訊更新路由表。

其更新規則可表示為:

Dx(y)=min⁡v∈N(x){c(x,v)+Dv(y)}D_x(y)=\min_{v \in N(x)}\{c(x,v)+D_v(y)\}

其中,Dx(y)D_x(y) 是路由器 xx 到目的地 yy 的估計成本,N(x)N(x) 是 xx 的鄰居集合,c(x,v)c(x,v) 是 xx 到鄰居 vv 的鏈路成本,Dv(y)D_v(y) 則是鄰居通報的到目的地 yy 的成本。

解題方法

題幹的關鍵在「定期交換資訊」與「立即相鄰的路由器」。這正是距離向量路由的典型特徵:路由器彼此交換距離向量,並只直接與鄰居交換,再逐步將資訊傳播到整個網路。

選項分析

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 17 題

Which of the following is wrong about TCP? (A) it uses 2-way handshake to establish a connection (B) TCP is stream-oriented (C) TCP uses sliding window for flow control (D) TCP uses sequence numbers to ensure the correct order of delivery (E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考查傳輸控制協定(Transmission Control Protocol, TCP)的特性。TCP 是一種可靠的、面向連接的傳輸層協定。

(A) TCP 使用三次握手(three-way handshake)來建立一個可靠的連接,而不是兩次握手。三次握手包括 SYN, SYN-ACK, ACK 三個階段。因此,「TCP 使用兩次握手建立連接」是錯誤的。

(B) TCP 是流式(stream-oriented)的,這意味著它將應用程式傳送的數據視為一個連續的字節流,並負責將這個流分割成適當大小的段(segment)進行傳輸,同時確保接

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 18 題

Which of the following is wrong about security attacks? (A) In Man-in-the-Middle attack, an attacker intercepts messages between two parties, and then steals and manipulates data between them (B) In buffer overflow attack, the attacker crafts an oversized input string which, when read by the server and stored in memory, overflows the buffer and overwrites subsequent portions of memory, typically containing the stack-frame pointers. (C) In SQL Injections, an attacker inserts malicious code into a server using server query language, forcing the server to deliver protected information (D) In First-day attack, an attacker exploits a network vulnerability before a patch is released and/or implemented. (E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

本題考查常見資安攻擊的定義,包括中間人攻擊、緩衝區溢位、SQL 注入,以及零時差攻擊。判斷時要分清楚「攻擊利用的弱點」和「攻擊發生時是否已有修補程式」。

解題方法

逐項比對選項中的攻擊名稱與定義。尤其要注意 First-day attack 並非此處描述的標準攻擊名稱;利用尚未有修補程式的漏洞,通常稱為 Zero-day attack(零時差攻擊)。若漏洞已公開修補,但系統尚未安裝更新,則屬於未修補系統遭利用,不能因此稱為零時差攻擊。

選項分析

  • (A) 正確。 中間人攻擊是攻擊者介入兩方通訊,在雙方不知情的情況下攔截訊息,並可能竊取或竄改資料。
🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 19 題

Which of the following is wrong about program compilation? (A) assembler takes as input the assembly code and translates it into relocatable machine code (B) it is the linker's job to make sure all cross-file dependencies are resolved properly (C) programs can be linked either statically or dynamically (D) lexical and syntax analysis is done at compiling stage (E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

本題考程式從原始碼轉成可執行程式時,各工具的工作分工:

  • 編譯器(compiler):分析高階語言程式,通常包含詞法分析、語法分析、語意分析及程式碼產生。
  • 組譯器(assembler):把組合語言轉成機器碼,常輸出可重定位的目的檔。
  • 連結器(linker):整合多個目的檔與函式庫,解析跨檔案的符號參照。
  • 連結方式:靜態連結會把所需程式碼納入執行檔;動態連結則在執行時載入共享函式庫。

解題方法

逐一判斷 A 至 D 是否符合上述分工。若 A 至 D 都正確,題目括號內的規則表示選 E;E 是「以上皆正確」的保留選項。

選項分析

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 20 題

Which of the following is wrong about NoSQL databases? (A) in column-oriented structure, data is stored in cells grouped in a pre-defined number of columns (B) key-value stores use an associative array as their data mode (C) document stores use documents (e.g., XML, YAML, JSON) to hold and encode data in standard formats (D) graph databases represent data on a graph that shows how different sets of data relate to each other (E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念
NoSQL(Not‑Only‑SQL)資料庫依資料模型可分為四大類:

  1. Key‑Value Store:以「鍵」映射「值」的形式儲存,底層實作類似雜湊表(associative array)。
  2. Document Store:以文件(JSON、BSON、XML、YAML 等)為單位,文件內部可呈階層結構。
  3. Column‑Oriented(Column‑Family)Store:資料以「列」為主體,列下的欄位屬於「欄族」(column family),每列可擁有不同數量的的欄位,欄位名稱與型別不需事先定義。
  4. Graph Database:以節點(node)與邊(edge)形成圖形結構,直接描述資料之間的關聯。

了解上述分類的特性即可判斷敘述是否符合實際實作。


解題方法
逐一比對每個選項與 NoSQL 四類的官方定義與常見實作行為:

  • 若敘述與任一類型的核心特性相符,即為正確。
  • 若敘述與其特性相左或描述過於限定(如「必須預先定義欄位數」),即為錯誤。
  • 最後檢視「全部正確」的選項(E),若有任何一項錯誤則 E 必為錯。

選項分析

選項敘述判斷說明
Ain column-oriented structure, data is stored in cells grouped in a pre-defined number of columns錯誤Column‑Family(如 Apache Cassandra、HBase)允許每列的欄位數與欄位名稱皆可動態變化,沒有「預先定義固定欄位數」的限制。此敘述混淆了傳統關聯式資料庫的「固定欄位」概念。
🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 21 題

Which of the following is wrong about relational databases? (A) data are organized into tables of columns and rows (B) a unique key is used to identify each row (C) each row represents a data record (D) columns correspond to attributes of records (E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考查關聯式資料庫(relational databases)的基本概念。

(A) 關聯式資料庫的核心是將資料組織成表格(tables),每個表格由行(rows)和列(columns)組成。這是正確的。

(B) 在關聯式資料庫中,通常會定義一個或多個欄位作為主鍵(primary key),主鍵的目的是唯一識別表格中的每一行(record)。因此,「唯一鍵用於識別每一行」是正確的。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 22 題

Which of the following is wrong about relational databases? (A) a primary key is used to ensure data in the specific column is unique (B) a foreign key refers to the field in a table which is the primary key of another table (C) foreign key does not allow NULL value (D) more than one foreign key are allowed in a table (E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題繼續考查關聯式資料庫(relational databases)的特性,特別是主鍵(primary key)和外鍵(foreign key)。

(A) 主鍵(primary key)的目的是唯一識別表格中的每一行。這意味著主鍵欄位的值在同一表格中必須是唯一的。因此,「主鍵用於確保特定欄位中的資料是唯一的」是正確的。

(B) 外鍵(foreign key)是定義在一個表格中的一個或多個欄位,它的值必須參照另一個表格的主鍵(或其他唯一鍵)中的值。這用於建立表格之間的關聯。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 23 題

The term ____ has been coined to represent a digital counterpart of a real-world object for use such as simulation, integration, testing, monitoring, and maintenance. (A) avatar (B) digital twin (C) virtual reality (D) cloud object (E) none of the above.

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考查對新興技術術語的理解,特別是與現實世界物件的數位對應體相關的概念。

(A) Avatar(虛擬替身):通常指在虛擬世界或線上遊戲中代表使用者的數位形象。
(B) Digital Twin(數位分身):數位分身是指一個實體物件(如產品、系統或流程)的動態數位模型,它與實體物件實時同步,用於模擬、測試、監控和維護。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 24 題

In blockchain technology like that used in Bitcoin, the process "mining" is designed mainly to ____. (A) enforce concurrency control of transactions (B) ensure atomicity (C) distribute transaction (D) validate transaction (E) none of the above.

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考查區塊鏈技術(blockchain technology),特別是比特幣(Bitcoin)中的「挖礦」(mining)過程的主要目的。

區塊鏈的挖礦過程是工作量證明(Proof-of-Work, PoW)共識機制的核心。礦工(miners)競爭解決一個計算難題,第一個解決的礦工有權將一批待確認的交易打包成一個新的區塊,並添加到區塊鏈上。

(A) 執行併發交易控制(enforce concurrency control of transactions):區塊鏈的設計本身就是為了處理交易,並透過共識機制來確保交易的順序和有效性,但「併發交易控制」不是挖礦的主要目的。
(B) 確保原子性(ensure atomicity):原子性是指一個操作要么完全成功,要么完全失敗,不出現中間狀態。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 25 題

Which of the following is wrong about B-tree? (A) B-tree is self-balancing (B) A non-leaf node with k children contains k keys (C) a B-tree of order m has at most m children (D) every internal node has at least [m/2] children (E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

B-tree 是一種多路搜尋樹。若採用「階數為 mm」的定義,每個節點最多有 mm 個子節點;對非根內部節點,最少子節點數通常為 ⌈m/2⌉\lceil m/2\rceil。一個有 kk 個子節點的非葉節點,子節點之間的分隔鍵數為 k−1k-1,而非 kk。

根節點另有例外:若根節點不是葉節點,通常至少有 22 個子節點;根節點若是葉節點,則可不含子節點。因此,題目中的選項 D 按常見教科書簡寫,應理解為非根內部節點的最低子節點數,且 [m/2][m/2] 表示向上取整。

解題方法

先用「子節點數與鍵值數的關係」檢查選項 B:搜尋樹中每個鍵值會把鍵值區間分成一段,而 kk 個子節點需要 k−1k-1 個分隔鍵。B 說有 kk 個子節點就有 kk 個鍵,與此關係不符,因此 B 錯誤。

再檢查其餘選項是否符合 B-tree 的性質,判斷是否應選 E。

選項分析

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 26 題

Which of the following is wrong about spanning trees? (A) if all of the edges of a graph G are also edges of a spanning tree T of G, then G is a tree (B) if all of the edges of a graph G are also edges of a spanning tree T of G, then G is identical to T (C) if T is a spanning tree of G, and e is an edge of G that is not in T, then adding e to T will create a cycle (D) a graph may have more than one spanning trees (E) all the above are correct (choose this one only if none of the above can be chosen).

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考查生成樹(spanning trees)的性質。生成樹是圖(graph)的一個子圖,它包含圖的所有頂點,並且是一個樹(tree),即無環連通圖。

(A) 如果一個圖 G 的所有邊都屬於 G 的一個生成樹 T,並且 T 本身是一個樹(無環連通圖),那麼 G 必然也是一個樹。因為 T 包含 G 的所有頂點,且 T 是連通的,所以 G 也是連通的。如果 G 有 T 的所有邊,且 T 無環,那麼 G 也不會有比 T 更多的邊引入環,所以 G 也是無環的。因此,G 也是一個樹。這個敘述是正確的。

(B) 如果一個圖 G 的所有邊都屬於 G 的一個生成樹 T,那麼這意味著 G 和 T 擁有完全相同的邊集。由於 T 是 G 的生成樹,它包含 G 的所有頂點,並且是無環連通的。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 27 題

Recall that a min heap is a complete binary tree such that the key stored in each node is greater than or equal to the keys in the node's children. Then, the time complexity for inserting a key into a min heap of n nodes can be done in ____. (A) O(1) (B) O(log n) (C) O(n) (D) O(n log n) (E) none of the above.

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考查最小堆(min heap)中插入操作的時間複雜度。最小堆是一種完全二元樹,其中每個節點的值都小於或等於其子節點的值。

插入一個新元素到最小堆的過程如下:

  1. 將新元素添加到堆的最後一個位置(即完全二元樹的下一個可用位置)。這保持了完全二元樹的結構。
  2. 將新元素與其父節點進行比較。如果新元素的值小於其父節點的值,則交換這兩個節點。
  3. 重複步驟 2,直到新元素的值大於或等於其父節點的值,或者新元素到達堆頂(根節點)。
🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 28 題

The time complexity for finding an arbitrary element in a min heap of n nodes can be done in ____. (A) O(1) (B) O(log n) (C) O(n) (D) O(n log n) (E) none of the above.

登入後即可作答並保存紀錄。

這一題的完整詳解

本題考查最小堆(min heap)中尋找任意元素的時間複雜度。

最小堆的主要優勢在於能夠快速存取並移除最小值(堆頂元素,時間複雜度 O(1)O(1) 存取,O(log⁡n)O(\log n) 移除),以及快速插入元素(時間複雜度 O(log⁡n)O(\log n))。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 (a) 題15 分

Consider the following C++ code.
#include <bits/stdc++.h>
using namespace std;

define NO_OF CHARS 256

void PREPROCESS (string str, int size, int badchar [NO_OF_CHARS])
{
int i;
for (i = 0; i < NO_OF_CHARS; i++)
badchar[i] = -1;
for (i = 0; i < size; i++)
badchar[(int) str[i]] = i;
}
void search (string txt, string pat)
{
int m = pat.size();
int n = txt.size();
int badchar [NO_OF_CHARS];
PREPROCESS(pat, m, badchar);
int s = 0;
while (s <= (n m))
{
int j = m
1;
while (j >= 0 && pat[j] == txt[s + j])
j--;
if (j < 0)
{
cout << "pattern occurs at " << s << endl;
s += (s + m < n)? m-badchar [txt [s + m)) : 1;
}
else
s += max(1, j
}
}
badchar [txts + j)));
(a)(15 points) When given the two strings txt = "ABAAABCDABC" and pat = "ABC", what is the
output of search (txt, pat)?

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

這段程式使用 Boyer–Moore 字串搜尋法的「壞字元規則」:每次從模式字串右端開始比對。若在位置 jj 發生不匹配,就查詢文字中的不匹配字元在模式字串中最右側的位置,據此將模式字串向右移動。

令 badchar[c] 表示字元 cc 在模式字串中的最右側索引;若 cc 未出現,則為 −1-1。不匹配時的位移量為:

max⁡(1, j−badchar[txt[s+j]])\max(1,\ j-\text{badchar}[\text{txt}[s+j]])

題目程式碼有轉錄缺漏;以下依其標準寫法解讀,包括搜尋條件 s <= n - m、j = m - 1,以及上述不匹配位移公式。

解題方法

模式字串為 ABC,長度 m=3m=3。其最後出現位置表為:

字元ABC其他字元
最後出現索引012-1

文字 ABAAABCDABC 的索引如下:

索引012345678910
字元ABAAABCDABC

逐次比對:

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 (b) 題8 分

(b) (8 points) If the lengths of txt and pat are n and m respectively, what is the worst case time
complexity of search (txt, pat)? Briefly explain your answer.

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

題目未提供 search(txt, pat) 的程式碼或演算法定義,以下依一般的暴力字串搜尋法說明:將模式字串 pat 逐一對齊到文字 txt 的位置,逐字比較是否相符。

解題方法

若 m≤nm \le n,pat 最多可從 txt 的 n−m+1n-m+1 個位置開始比對。每個位置最壞需要比較 mm 個字元,因此:

T(n,m)=O((n−m+1)m)=O(nm)T(n,m) = O\bigl((n-m+1)m\bigr) = O(nm)
🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 (c) 題7 分

(c) (7 points) Continue from above. What is the best case time complexity of search(txt, pat)?
Briefly explain your answer.

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

令文字長度為 nn、樣式長度為 mm。字串搜尋的時間複雜度取決於 search(txt, pat) 的實作方式,以及找到匹配後是否立即回傳。

解題方法

題目未附前文中的 search 程式碼;以下依常見的逐位置比對法,並假設找到第一個匹配就立即回傳。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

其他考古題