113 年 國立臺灣大學資訊管理學系碩士班《資訊科技概論》
第 1 題
Which of the following is not a popularly used file system?
(A) FAT32
(B) exFAT
(C) NTFS
(D) APFS
(E) all the above are popular file systems (choose this one only if none of the above can be chosen).
登入後即可作答並保存紀錄。
本題考驗對常見檔案系統的認識。檔案系統是作業系統用來管理電腦儲存裝置上檔案的一種方法。
(A) FAT32 (File Allocation Table 32) 是一個廣泛使用的檔案系統,尤其在舊版 Windows 和許多可攜式儲存裝置(如 USB 隨身碟)上。
(B) exFAT (Extended File Allocation Table) 是 FAT32 的擴展,支援更大的檔案和磁碟分割區,也廣泛用於 SD 卡和 USB 隨身碟。
(C) NTFS (New Technology File System) 是 Windows NT 及其後繼版本(包括 Windows XP, Vista, 7, 8, 10, 11)的主要檔案系統,提供了更好的安全性、穩定性和效能。
第 2 題
Which of the following is wrong?
(A) multiprocessing allows simultaneous execution of processes on separate cores or processors
(B) in multiprocessing, two processes spawned by a parent process share their memory, stack, and program counter
(C) processes in multiprocessing can communicate through mechanisms like shared memory or message passing
(D) the main purpose of multiprocessing is to improve system throughput and performance
(E) all of the above are correct (choose this one only if none of the above can be chosen).
登入後即可作答並保存紀錄。
核心觀念
本題測試作業系統中「多處理(Multiprocessing)」與「多執行緒(Multithreading)」兩大架構的區分。多處理的核心在於讓多個處理器(或核心)同時執行多個獨立的程序(Process),每個程序擁有各自獨立的記憶體空間、堆疊(Stack)、暫存器(Register)與程式計數器(Program Counter, PC)。相對地,多執行緒則是在同一個程序內部,讓多個執行緒共享該程序的全域資料區(Data Segment)、堆積區(Heap)與程式碼區,但各執行緒仍需維護各自獨立的 PC 與堆疊,以確保程式執行流程的獨立性。
解題方法
透過檢視多處理與多執行緒在記憶體與執行狀態上的資源配置差異,針對各個選項的敘述進行真偽判斷。切入重點在於「程序(Process)」在作業系統中被視為資源配置的最小單位,其邊界是封閉且獨立的,各個程序之間無法直接存取對方的私有記憶體。
選項分析
(A) 正確。多處理(Multiprocessing)的定義正是指系統透過具備多個處理器(Multiprocessor)或多核心架構,將不同的程序(Processes)分配給不同的處理器同時執行,藉此實現平行運算(Parallelism)。
(B) 錯誤。在多處理架構中,程序是被視為獨立的單位。每個程序都擁有自己完全獨立的記憶體位址空間(Virtual Address Space)、獨立的執行堆疊(Stack)以及獨立的程式計數器(Program Counter, PC)。程序之間無法直接存取對方的記憶體空間,更不用說共享堆疊或 PC。題幹所述的資源共享特徵屬於「多執行緒」中的執行緒共享行為,且即便在執行緒中,堆疊與 PC 仍是每個執行緒各自擁有的。
第 3 題
Which of the following is wrong?
(A) a thread represents an independent path of execution within a program
(B) multiple threads can run simultaneously within a single process
(C) communication between threads is more lightweight and efficient than communication between processes
(D) threads within a process sharing the same memory space
(E) all the above are correct (choose this one only if none of the above can be chosen).
登入後即可作答並保存紀錄。
本題考驗對多執行緒(Multithreading)概念的理解。
(A) 正確。執行緒(Thread)是程序內的一個獨立執行路徑,它有自己的程式計數器、堆疊和執行狀態。
(B) 正確。在多核心處理器上,多個執行緒可以在同一時間點被分配到不同的核心上執行,實現同時執行;在單核心處理器上,作業系統透過時間切片(time slicing)讓多個執行緒輪流執行,模擬同時性。
(C) 正確。執行緒之間共享同一程序的記憶體空間,因此它們的通信(如讀寫共享變數)比程序間通信(IPC)更直接、快速且開銷小。程序間通信需要作業系統的介入,例如使用訊息佇列或共享記憶體,開銷較大。
第 4 題
A von Neumann architecture consists of four main components, which are:
(A) input, output, memory, processing
(B) input, output, CPU, program counter
(C) arithmetic control, logic control, register, program counter
(D) CPU, GPU, RAM, hard disk
(E) I/O, RAM, CPU, storage
登入後即可作答並保存紀錄。
本題考驗對馮紐曼(von Neumann)架構的理解。馮紐曼架構是現代計算機的基礎,其核心思想是將指令和數據儲存在同一個記憶體中,並由一個中央處理器(CPU)依序執行。
傳統上,馮紐曼架構的電腦主要由以下幾個部分組成:
- 中央處理器 (CPU):負責執行指令。CPU 通常包含算術邏輯單元 (ALU) 和控制單元 (Control Unit)。
- 記憶體 (Memory):儲存指令和數據。
- 輸入/輸出設備 (I/O Devices):用於與外部世界互動,例如鍵盤、顯示器。
- 匯流排 (Bus):連接 CPU、記憶體和 I/O 設備,用於傳輸數據和控制信號。
選項分析:
(A) input, output, memory, processing - 這是對馮紐曼架構的組成部分的描述,其中 "processing" 指的是 CPU 的功能。這是最接近正確答案的選項。
(B) input, output, CPU, program counter - CPU 包含程式計數器,但選項將 CPU 和程式計數器並列,且少了記憶體這個核心組成部分。
(C) arithmetic control, logic control, register, program counter - 這些是 CPU 的內部組件,不是馮紐曼架構的四個主要組成部分。
第 5 題
Which of the following about stack memory in operating system is wrong?
(A) local variables of a program are stored in stack
(B) every time a function is called, the operating system allocates some stack memory for it
(C) during a program's execution, allocation and deallocation for stack memory is automatically done
(D) a stack overflow occurs when a program tries to use more memory space in the call stack than has been allocated
(E) all the above are correct (choose this one only if none of the above can be chosen).
登入後即可作答並保存紀錄。
核心觀念
本題的核心考點在於程式執行時的記憶體佈局(Memory Layout)以及作業系統(OS)與編譯器/執行時期環境(Runtime)在記憶體管理上的權責劃分:
- 呼叫堆疊(Call Stack)的運作機制:當程式執行函數呼叫時,系統會為該次呼叫建立一個活動紀錄(Activation Record,又稱 Stack Frame / 堆疊幀),用以存放傳入參數、返回位址(Return Address)、區域變數(Local Variables)及暫存器備份。
- 權責劃分(OS vs. Compiler / Runtime):
- 作業系統(OS)的職責:在行程(Process)或執行緒(Thread)建立時,為其配置一段固定上限的虛擬記憶體區間作為堆疊區段;當堆疊向下增長碰觸到尚未映射的頁面時,透過分頁錯誤(Page Fault)中斷補配實體記憶體頁面(Demand Paging)。
- 編譯器與執行時期的職責:每次函數呼叫時堆疊空間的分配與釋放,完全由編譯器所產生的機器指令(如 x86/x64 的
push、pop、sub rsp, N、add rsp, N)在使用者空間(User Space)直接調整堆疊指標(Stack Pointer, SP)完成,作業系統完全不介入每一次具體的函數呼叫。
- 堆疊(Stack)與堆積(Heap)的特性對比:堆疊記憶體具備自動化配置與生命週期管理(隨函數返回自動消滅)、高存取效能、但容量上限固定等特性;若消耗空間超過預設上限,則會引發堆疊溢位(Stack Overflow)。
解題方法
題目詢問關於作業系統中堆疊記憶體的敘述何者錯誤(wrong)。解題時應從執行效能與系統架構分工切入審視:
- 現代程式每秒可能發生數百萬次函數呼叫,若每次函數呼叫都需要作業系統介入配置記憶體,將引發頻繁的系統呼叫(System Call)與核心態/使用者態(Kernel / User Mode)切換,造成難以承受的效能負擔。
- 逐一檢視各選項敘述的主詞與動作是否符合電腦系統底層實際運作。
選項分析
-
(A) 正確:
在 C/C++ 等典型編譯式語言中,未標明static的區域變數屬於自動儲存期(Automatic Storage Duration),在進入函數區塊時,編譯器會在該函數的堆疊幀(Stack Frame)中保留相應位元組的空間來存放這些區域變數。 -
(B) 錯誤(為本題應選答案):
敘述稱「每次函數被呼叫時,作業系統都會為它分配部分堆疊記憶體(every time a function is called, the operating system allocates some stack memory for it)」,此敘述與底層運作機制不符:- 函數呼叫時堆疊空間的「分配」,純粹是在使用者空間(User Space)執行 CPU 指令(調整堆疊指標暫存器,例如
sub rsp, 32)而劃出空間,整個過程由編譯器預先編寫的常規指令完成,不需要通知作業系統,也沒有發出任何系統呼叫。 - 作業系統(OS)只在行程初始化時預先劃定堆疊的虛擬位址範圍,或在堆疊生長超出目前已分配的實體頁時,由硬體觸發 Page Fault 讓 OS 的例外處理程式分配實體頁面(Physical Frame)。OS 絕不會、也不可能在「每一次呼叫函數時」個別介入分配記憶體。
- 函數呼叫時堆疊空間的「分配」,純粹是在使用者空間(User Space)執行 CPU 指令(調整堆疊指標暫存器,例如
-
(C) 正確:
相較於堆積(Heap)記憶體必須由程式設計師手動發出要求與釋放(例如使用malloc()/free()或new/ `d
第 6 題
Which of the following about heap memory in operating system is wrong?
(A) objects dynamically created by a program are stored in the heap memory
(B) the heap segment can suffer from fragmentation
(C) memory allocated on the heap persists until explicitly deallocated by the programmer
(D) garbage collection is invoked to clean up objects in the heap that are no longer being referenced
(E) all the above are correct (choose this one only if none of the above can be chosen).
登入後即可作答並保存紀錄。
本題考驗對堆積記憶體(Heap Memory)在作業系統中作用的理解。堆積用於動態記憶體分配,其生命週期由程式設計師管理,或由垃圾回收機制管理。
(A) 正確。在許多程式語言(如 C++, Java, Python)中,使用 new 或 malloc 等關鍵字動態創建的物件或數據結構,其記憶體是從堆積中分配的。
(B) 正確。堆積分配和釋放的過程可能導致記憶體碎片化(fragmentation)。當小塊的已分配記憶體和未分配記憶體交錯存在時,即使總的可用空間足夠,也可能無法分配一個較大的連續記憶體塊。
(C) 錯誤。在 C/C++ 等手動管理記憶體的語言中,記憶體分配在堆積上後,確實需要由程式設計師使用 free 或 delete 等函數顯式釋放。
第 7 題
Which of the following about interrupt in a computer is wrong?
(A) an interrupt is a signal to the processor that an event has occurred, requiring its attention
(B) when an interrupt occurs, the usual procedure is for the processor to save its state by pushing its registers and program counter onto the stack
(C) in a polled interrupt system, the interrupting device directs the processor to the appropriate interrupt service routine
(D) interrupts can be assigned priorities to allow a higher priority one to "interrupt" lower priorities
(E) all of the above are correct (choose this one only if none of the above can be chosen).
登入後即可作答並保存紀錄。
本題考驗對中斷(Interrupt)機制的理解。中斷是硬體或軟體發出的信號,用於通知處理器發生了需要立即處理的事件。
(A) 正確。中斷是一個信號,表明有某個事件(硬體故障、I/O 完成、定時器到期等)發生,需要處理器暫停當前任務來處理這個事件。
(B) 正確。當處理器接收到一個中斷請求時,為了能夠在處理完中斷後恢復到原來的執行狀態,它通常會將當前 CPU 的狀態(包括程式計數器 PC、通用暫存器等)保存到堆疊(stack)中。
(C) 錯誤。在「輪詢」(Polled)系統中,CPU 會週期性地檢查各個設備是否需要服務。當 CPU 檢查到設備需要服務時,CPU 才知道要執行哪個服務例程。這與中斷不同。在中斷機制下,是「中斷控制器」或設備本身發出信號給 CPU,CPU 才知道有事件發生。
第 8 題
Amdahl's law is used in parallel computing to formulate the theoretical speedup when using multiple processors. Let p be the fraction of a task that is unaffected by adding more processors, and n is the number of processors used to speed up the task.
Then the theoretical speedup of the execution of the whole task is
(A)
(B)
(C)
(D)
(E)
none of the above.
登入後即可作答並保存紀錄。
本題考驗對 Amdahl's Law 的理解。Amdahl's Law 用於計算在並行計算中,增加處理器數量後,理論上能達到的最大加速比。
Amdahl's Law 的公式為:
其中:
- 是使用 個處理器時的加速比。
- 是可以被並行化的任務分數(fraction of the task that can be parallelized)。
- 是處理器的數量。
- 是串行部分(不可並行化)的任務分數。
題目中給定的變數:
- 是「不受增加更多處理器影響的任務分數」,這意味著 是串行部分的比例,即 。
第 9 題
Which of the following is wrong about mutual exclusion in operating system?
(A) mutual exclusion is used to ensure that a shared resource can be accessed by only one process at a time
(B) if not designed properly, a mutual exclusion mechanism may result in starvation
(C) if not designed properly, a mutual exclusion mechanism may result in deadlock
(D) if not designed properly, a mutual exclusion mechanism may result in livelock
(E) all of the above are correct (choose this one only if none of the above can be chosen).
登入後即可作答並保存紀錄。
本題考查作業系統(Operating System)中並行處理(Concurrency)與互斥(Mutual Exclusion)機制的概念,以及互斥機制若設計不當可能引發的同步問題。
一、各選項逐一檢驗:
- (A) mutual exclusion is used to ensure that a shared resource can be accessed by only one process at a time:
敘述正確。互斥(Mutual Exclusion)是臨界區問題(Critical Section Problem)的核心要求,其目的在於保證當某個行程(或執行緒)正在存取某個共享資源或執行臨界區程式碼時,其他任何行程皆被禁止進入該臨界區,以避免競態條件(Race Condition)並維護資料一致性。 - (B) if not designed properly, a mutual exclusion mechanism may result in starvation:
敘述正確。飢餓(Starvation,又稱無限期阻斷 Indefinite Blocking)是指某個行程長期或無限期無法取得所需資源以進入臨界區。若互斥機制採用不具公平性的排隊鎖,或優先級排程中未引入老化機制(Aging),高優先級行程持續搶佔鎖,將導致低優先級行程陷入無限期等候的飢餓狀態。 - (C) if not designed properly, a mutual exclusion mechanism may result in deadlock:
敘述正確。死鎖(Deadlock)是指兩個或多個行程因各自持有一項資源並同時等候對方釋放其所持有的資源,導致所有相關行程陷入永久互相阻塞的狀態。
第 10 題
____ refers to the process of temporary storage of data for use and execution by a device, program, or system. Data is sent to and stored in main memory or other storage until it is requested for execution by a program or computer.
(A) pipelining
(B) spooling
(C) buffering
(D) stacking
(E) none of the above.
登入後即可作答並保存紀錄。
核心觀念
本題考查的是作業系統與資源管理中的 暫存 (temporary storage) 機制,特別是資料在被實際執行或輸出之前,先存放於記憶體或磁碟之中的概念。相關定義:
- Spooling(Simultaneous Peripheral Operations On‑Line):將資料暫存於磁碟或記憶體,待外部裝置(如印表機、磁帶機)空閒時再取出執行。屬於 批次排程 的一部份,常用於列印、批次檔案處理等情境。
- Buffering(緩衝):在資料流動的兩端提供暫時的容納空間,以平衡產生速度與消費速度的差異,常見於 I/O 流程、網路傳輸。
- Pipelining(管線化):在 CPU 或資料處理系統中,將指令或資料分段同時處理,以提高吞吐量。
- Stacking(堆疊):資料結構概念,遵循 LIFO(後進先出)原則,常用於函式呼叫、記憶體管理等。
解題方法
- 先閱讀題幹:「temporary storage of data for use and execution by a device, program, or system」以及「Data is sent to and stored in main memory or other storage until it is requested for execution」。
- 判斷關鍵字 「until it is requested for execution」,說明資料在被真正使用前僅是等待排程,符合 Spooling 的特性。
- 檢視其他選項的定義,排除不符合「等待執行」概念的答案。
選項分析
| 選項 | 解析 | 正誤 |
|---|---|---|
| (A) pipelining | 管線化指的是將多個處理階段同時進行,使指令或資料在不同階段持續流動,不涉及先行存放於磁碟或記憶體等待執行。 | 錯 |
| (B) spooling | 符合題意:資料先寫入暫存(通常是磁碟或主記憶體),待外部裝置或程式空閒時再讀取執行。常見於印表機排程、批次作業。 | ✅ 正確 |
第 11 題
Which of the following is wrong about cookies?
(A) cookie is stored both on user's computer and host website
(B) cookies are created and updated when user visit websites
(C) first-party cookies are generated by the visited website
(D) third-party cookies are generated by domains separate from the primary website visited
(E) all the above are correct (choose this one only if none of the above can be chosen).
登入後即可作答並保存紀錄。
本題考驗對網頁 Cookie 的理解。Cookie 是一種儲存在使用者瀏覽器中的小型文本文件,用於記錄使用者在網站上的資訊。
(A) 錯誤。Cookie 主要儲存在使用者的電腦(瀏覽器)上,而不是「同時」儲存在主機網站上。主機網站(伺服器)會將 Cookie 發送給瀏覽器,瀏覽器再將其儲存。當瀏覽器再次訪問該網站時,會將儲存的 Cookie 發送回伺服器。因此,Cookie 的儲存位置是使用者端(瀏覽器),伺服器端僅持有 Cookie 的副本或在伺服器端記錄相關資訊。將 Cookie 說成「儲存在用戶電腦和主機網站」是不精確的。
(B) 正確。當使用者訪問網站時,伺服器可以創建或更新 Cookie,並通過 HTTP 響應頭將其發送給瀏覽器,瀏覽器將其儲存。
(C) 正確。
第 12 題
Which of the following is wrong about Domain Name System (DNS)?
(A) DNS is a hierarchical naming system
(B) DNS is a centralized naming system
(C) DNS translates human readable names (for example, www.im.ntu.tw) to machine readable IP addresses
(D) .tw is a top-level domain
(E) all the above are correct (choose this one only if none of the above can be chosen).
登入後即可作答並保存紀錄。
本題考驗對網域名稱系統(DNS)的理解。DNS 負責將人類可讀的網域名稱轉換為機器可讀的 IP 位址。
(A) 正確。DNS 採用層次結構(hierarchical)的命名方式,從根節點(.)開始,向下延伸到頂級域(TLD,如 .com, .org, .tw),再到二級域(如 ntu.edu.tw),最後到主機名(如 www.im.ntu.tw)。
(B) 錯誤。DNS 是一個分散式(distributed)的命名系統,而不是集中式的。其根伺服器、頂級域伺服器、權威名稱伺服器等遍佈全球,共同協作完成域名解析,沒有單一的中央伺服器控制整個系統。
(C) 正確。
第 13 題
Which of the following is wrong about proxy servers?
(A) it can help prevent cyber attacks
(B) it can help improve performance
(C) proxy servers can serve as content filtering
(D) a forward proxy shields servers by handling client requests, ensuring they reach the right server, and returning the results to clients, who are unaware of the server's direct involvement
(E) all the above are correct (choose this one only if none of the above can be chosen).
登入後即可作答並保存紀錄。
本題考驗對代理伺服器(Proxy Server)功能的理解。代理伺服器位於客戶端和目標伺服器之間,充當中間人。
(A) 正確。代理伺服器可以作為防火牆的一部分,過濾惡意流量,隱藏內部網路結構,從而幫助防止網路攻擊。
(B) 正確。代理伺服器可以緩存(cache)經常訪問的網頁內容。當多個客戶端請求相同內容時,代理伺服器可以直接從緩存提供,減少對原始伺服器的請求,從而提高訪問速度和效率。
(C) 正確。代理伺服器可以配置內容過濾規則,阻止訪問不當網站或下載特定類型的內容,實現內容過濾。
(D) 錯誤。選項描述的是 反向代理(Reverse Proxy) 的功能,而不是正向代理(Forward Proxy)。
* 正向代理(Forward Proxy):位於客戶端網路內部,代表客戶端向外部伺服器發起請求。它主要為客戶端提供服務,例如訪問外部網站、隱藏客戶端 IP、進行內容過濾等。
* 反向代理(Reverse Proxy):位於伺服器網路內部,代表伺服器處理來自外部客戶端的請求。
第 14 題
Which of the following is wrong about information security?
(A) 'C' in CIA triad refers to confidentiality
(B) 'A' in CIA triad refers to availability
(C) information security management describes the set of policies and procedural controls that IT and business organizations implement to secure their informational assets against threats and vulnerabilities
(D) ISO/IEC 27000-series provides best practice recommendations on information security management
(E) all the above are correct (choose this one only if none of the above can be chosen).
登入後即可作答並保存紀錄。
本題考驗對資訊安全基本概念的理解,特別是 CIA 三要素和相關標準。
(A) 正確。CIA 三要素是資訊安全的核心原則,分別是:Confidentiality(機密性)、Integrity(完整性)、Availability(可用性)。C 代表機密性,確保資訊僅被授權人員訪問。
(B) 正確。A 代表可用性(Availability),確保授權使用者在需要時能夠訪問資訊和系統。
(C) 正確。資訊安全管理(Information Security Management)確實是組織為保護資訊資產免受威脅和漏洞影響而制定的一系列政策、程序和控制措施的集合。
(D) 正確。
第 15 題
Which of the following is wrong about access control in information security?
(A) identification is an assertion of who someone is or what something is
(B) authentication is the act of verifying a claim of identity
(C) accountability determines what informational resources a user is permitted to access and what actions he/she will be allowed to perform
(D) role-based access control assigns permissions to users based on their role within an organization.
(E) all the above are correct (choose this one only if none of the above can be chosen).
登入後即可作答並保存紀錄。
本題考驗對資訊安全中存取控制(Access Control)相關術語的理解。存取控制是確保只有授權使用者或系統能夠訪問特定資源的機制。
(A) 正確。識別(Identification)是使用者聲稱自己是誰的過程,通常通過提供一個唯一的識別符(如用戶名、帳號)來實現。
(B) 正確。認證(Authentication)是驗證使用者聲稱的身份是否真實的過程,例如通過密碼、生物特徵、安全令牌等。
(C) 錯誤。選項 (C) 描述的是 授權(Authorization) 的概念,而不是問責制(Accountability)。
* 識別(Identification):聲稱你是誰 (Who are you?)
* 認證(Authentication):證明你是你聲稱的那個人 (Are you who you claim to be?)
* 授權(Authorization):確定你被允許做什麼 (What are you allowed to do?)
第 16 題
Which of the following is wrong about public key infrastructure (PKI)?
(A) PKI uses public-key encryption
(B) a registration authority stores, issues, and signs the digital certificates
(C) digital certificate is used to prove the validity of a public key
(D) RSA is an asymmetric encryption
(E) all the above are correct (choose this one only if none of the above can be chosen).
登入後即可作答並保存紀錄。
本題考驗對公鑰基礎設施(PKI)及其相關概念的理解。PKI 是一個用於管理數位憑證和公鑰加密的框架。
(A) 正確。PKI 的核心是基於公鑰加密(Public-Key Cryptography),也稱為非對稱加密,它使用一對密鑰:公鑰和私鑰。
(B) 錯誤。在 PKI 中,憑證授權中心(Certificate Authority, CA) 負責儲存、簽發和簽署數位憑證。註冊授權(Registration Authority, RA)通常負責驗證申請人的身份,並將其資訊提交給 CA,但 RA 本身不簽發憑證。
(C) 正確。
第 17 題
Which of the following is wrong about Hypertext Transfer Protocol Secure (HTTPS)?
(A) Transport Layer Security (TLS) is a cryptographic protocol designed to provide secure communication over a computer network
(B) HTTPS is basically an HTTP over TLS
(C) HTTPS requires a trusted third party to sign server-side digital certificates
(D) HTTPS supports a mutual authentication mode, allowing both server and client to authenticate each other
(E) all the above are correct (choose this one only if none of the above can be chosen).
登入後即可作答並保存紀錄。
第 17 題詳解
核心觀念
本題測試考生對於網路傳輸安全協定 HTTPS(Hypertext Transfer Protocol Secure)及其底層加密協定 TLS(Transport Layer Security)的運作機制與標準規範的掌握度。HTTPS 的核心在於將標準的 HTTP 通訊內容透過 TLS 進行加密封裝,確保資料在網際網路傳輸過程中的機密性、完整性與身分驗證。
選項分析
-
(A) Transport Layer Security (TLS) is a cryptographic protocol designed to provide secure communication over a computer network
- 分析:正確。TLS 是目前網際網路安全通訊的主流加密協定,其前身為 SSL(Secure Sockets Layer)。它的設計目標正是為通訊雙方提供加密傳輸、訊息完整性檢核與身分驗證功能。
-
(B) HTTPS is basically an HTTP over TLS
- 分析:正確。HTTPS 並非一個獨立的應用層協定,而是將 HTTP 的資料流(Data stream)放置於 TLS 通訊層之上。通訊流程為:建立 TCP 連線後,進行 TLS 握手(Handshake),之後所有 HTTP 請求與回應均通過加密通道傳送。
-
(C) HTTPS requires a trusted third party to sign server-side digital certificates
- 分析:正確。為了防止中間人攻擊(Man-in-the-Middle Attack),HTTPS 依賴數位憑證(Digital Certificate)來驗證伺服器的身分。這些憑證必須由受信任的第三方,即憑證授權中心(Certificate Authority, CA)進行數位簽章,以保證公鑰與伺服器身分之關聯性。
-
(D) HTTPS supports a mutual authentication mode, allowing both server and client to authenticate each other
- 分析:正確。
第 18 題
Which of the following is wrong about ACID Properties in Database Management System (DBMS)?
(A) 'A' stands for availability
(B) 'C' stands for consistency
(C) 'I' stands for isolation
(D) 'D' stands for durability
(E) all the above are correct (choose this one only if none of the above can be chosen).
登入後即可作答並保存紀錄。
本題考驗對資料庫管理系統(DBMS)中 ACID 特性的理解。ACID 是指事務(Transaction)的四個核心屬性:原子性(Atomicity)、一致性(Consistency)、隔離性(Isolation)和持久性(Durability)。
(A) 錯誤。ACID 中的 'A' 代表 原子性(Atomicity),它保證事務中的所有操作要么全部成功執行,要么全部不執行,不存在部分完成的情況。可用性(Availability)是系統的另一項重要屬性,但與 ACID 無關。
(B) 正確。ACID 中的 'C' 代表 一致性(Consistency),它保證事務的執行不會破壞資料庫的完整性約束,使資料庫從一個有效狀態轉換到另一個有效狀態。
(C) 正確。
第 19 題
____ is a constraint that determines the relation of one attribute to another in a DBMS, and thus helps to maintain the quality of data in the database.
(A) inclusion dependency
(B) column dependency
(C) functional dependency
(D) join dependency
(E) none of the above.
登入後即可作答並保存紀錄。
核心觀念
本題考查關聯式資料庫系統(DBMS)中的資料完整性限制(Data Integrity Constraint)。
在關聯式模型理論中,函數依賴(Functional Dependency, FD) 是定義屬性間約束關係的核心概念。若給定一個關係(Relation),對於其中的兩個屬性集(或單一屬性) 與 ,若對於關係 的任何兩個元組(Tuple) 與 ,只要滿足 ,則必有 ,則稱 函數依賴於 ,記作 。
在此關係中:
- 為決定方(Determinant):即 的值決定了 的值。
- 為依賴方(Dependent):即 的值是由 所決定的。
函數依賴是資料庫正規化(Normalization)理論的基石,透過定義這種屬性間的約束,能有效地減少資料冗餘(Redundancy)並維護資料的一致性與品質。
解題方法
題目敘述「determines the relation of one attribute to another」,強調的是屬性之間的決定性關係。根據上述函數依賴的定義,這種透過特定屬性值來唯一映射出另一個屬性值的行為,即為函數依賴的核心定義。因此,我們直接鎖定函數依賴的概念即可選出正確選項。
選項分析
-
(A) inclusion dependency(包含依賴):
這是一種跨關係(跨資料表)的限制,用於表達參照完整性(Referential Integrity)。例如:若 ,代表 的屬性 之值必須存在於 的屬性 中。這與單一關係內部的屬性映射關係無直接關聯。 -
(B) column dependency(行依賴):
這並非關聯式資料庫理論中的正式專業術語。通常僅作為描述資料行(Column)之間某種關聯的口語化詞彙,不具備學術嚴謹性。 -
(C) functional dependency(函數依賴):
符合題目描述。定義上,函數依賴明確規範了一個屬性集(或屬性)對於另一個屬性集的決定性關係。
第 20 題
A relation is in ____ normal form if and only if no attribute domain has relations as elements.
(A) first
(B) second
(C) third
(D) closed
(E) none of the above.
登入後即可作答並保存紀錄。
本題考驗對資料庫正規化(Normalization)中,特別是第一正規形式(1NF)的定義。
正規化是將大型表格分解為較小的表格,並定義它們之間的關係,以減少數據冗餘和提高數據完整性。
- 第一正規形式(1NF):要求關係模式中的所有屬性都必須是原子性的(atomic)。這意味著任何屬性的值都不能是集合、列表、記錄或其他關係(表)。換句話說,每個欄位(屬性)只能包含單一的值,不能包含多個值或另一個關係作為其值。
- 第二正規形式(2NF):要求關係模式首先滿足 1NF,並且所有非主屬性(non-prime attributes)都必須完全函數依賴於主鍵(prime key)。
- 第三正規形式(3NF):要求關係模式首先滿足 2NF,並且不存在非主屬性對主鍵的傳遞依賴(transitive dependency)。
第 21 題
Which of the following is wrong about Object-Oriented Programming (OOP)?
(A) encapsulation describes the bundling of data and methods operating on this data into one unit
(B) a class that inherits from another class shares all the attributes and methods of the referenced class
(C) multiple inheritance allows a subclass to inherit from two or more superclasses
(D) abstract classes cannot be instantiated into objects
(E) all the above are correct (choose this one only if none of the above can be chosen).
登入後即可作答並保存紀錄。
本題考驗對物件導向程式設計(OOP)核心概念的理解。
(A) 正確。封裝(Encapsulation)是 OOP 的一個基本原則,它將數據(屬性)和操作這些數據的方法(行為)捆綁在一起,形成一個獨立的單元(類別)。這有助於隱藏內部實現細節,並提供清晰的接口。
(B) 錯誤。一個繼承(Inheritance)自另一個類別(父類別/超類別)的子類別(Subclass)會繼承父類別的 公共(public) 和 保護(protected) 的屬性和方法,但不一定能「共享所有」屬性和方法。例如,父類別的私有(private)成員是不能被子類別直接訪問或繼承的。
(C) 正確。多重繼承(Multiple Inheritance)允許一個子類別同時繼承來自兩個或多個父類別的屬性和方法。
第 22 題
Which of the following is wrong about variables in OOP?
(A) a member variable is a variable that is associated with a particular object and accessible from all of its methods
(B) a member variable must be declared within the body of a method
(C) there is only one copy of each class variable
(D) an instance variable is a variable defined in a class for which each instantiated object of the class has a separate copy
(E) all the above are correct (choose this one only if none of the above can be chosen).
登入後即可作答並保存紀錄。
本題考驗對物件導向程式設計(OOP)中變數類型的理解。在 OOP 中,變數通常分為成員變數(也稱為實例變數或類別變數)和局部變數。
(A) 正確。成員變數(Member Variable),也稱為實例變數(Instance Variable),是與特定物件(Object)關聯的變數。它們的值屬於該物件,並且可以被該物件的所有方法(Methods)訪問(取決於其存取修飾符,如 public, private)。
(B) 錯誤。成員變數(包括實例變數和類別變數)必須在類別的定義體內聲明,但不在方法體內。它們是類別的屬性,而不是方法的局部變數。局部變數才是在方法體內聲明的。
(C) 正確。
第 23 題
GPT is the large language model behind ChatGPT. 'GPT' stands for
(A) Generative Proficiency in Text
(B) Grasping the Paradigm of Texts
(C) Generative Prowess in Text
(D) Generative Pathfinding Transformer
(E) none of the above.
登入後即可作答並保存紀錄。
核心觀念
本題測驗對「GPT」縮寫的正確認識。GPT(Generative Pre‑trained Transformer)是由 OpenAI 提出的以Transformer架構為基礎、經過大量語料預訓練(pre‑training)再進行特定任務微調(fine‑tuning)的生成式(Generative)語言模型。題目雖著重於名稱辨識,但仍涉及以下概念:
- 生成式模型(Generative Model):能根據輸入條件產生新文字序列。
- 預訓練(Pre‑trained):先於大量通用語料上訓練,再針對下游任務微調。
- Transformer:由 Vaswani 等人在 2017 年提出的自注意力(self‑attention)結構,成為當前自然語言處理的主流架構。
解題方法
直接比對選項文字與正式全稱 “Generative Pre‑trained Transformer” 的關鍵詞。檢查每個選項是否包含「Generative」與「Transformer」兩個核心詞彙,且是否錯誤加入「Pre‑trained」或其他非官方詞彙。若選項皆未符合,則選擇 E. none of the above。
選項分析
| 選項 | 文字內容 | 是否符合正式全稱 | 評析 |
|---|---|---|---|
| (A) | Generative Proficiency in Text | 未包含 Transformer,且「Proficiency」非官方用語。 | 錯誤 |
| (B) | Grasping the Paradigm of Texts | 完全偏離「Generative」與「Transformer」概念。 | 錯誤 |
第 24 題
Which of the following refers to an assessment to determine whether a machine can exhibit the same intelligence as a human?
(A) artificial general intelligence (AGI)
(B) Turing complete
(C) Chinese room argument
(D) Turing test
(E) none of the above.
登入後即可作答並保存紀錄。
核心觀念
本題考查人工智慧的基本概念,尤其是艾倫・圖靈提出的 圖靈測試(Turing test)。
圖靈測試是一種用來判斷機器是否具有人類般智能表現的評估方法。典型情境是:由人類評審透過文字與一名人類及一台機器互動,在不知道對方身分的情況下,判斷誰是人類。若評審無法穩定區分機器與人類,則可認為該機器在測試中展現出接近人類的智能行為。
本題關鍵在於辨識題幹中的「assessment to determine whether a machine can exhibit the same intelligence as a human」,也就是「評估機器是否能展現與人類相同的智能」。這正是圖靈測試所要探討的問題。
解題方法
判斷方式是將題幹描述與各人工智慧術語的定義逐一對照:
- 題幹詢問的是一種「評估方法」。
- 評估目標是判斷機器是否能表現出人類般的智能。
- 符合此定義的術語為 Turing test。
因此正確答案為圖靈測試。
選項分析
(A) artificial general intelligence(AGI)
AGI 指「人工通用智慧」,是指具備廣泛、通用認知能力的人工智慧系統,能在多種不同領域理解、學習、推理與解決問題,而非只專精於單一任務。
AGI 是一種人工智慧能力或系統目標,不是用來評估機器是否具有人類智能的測試方法,因此錯誤。
(B) Turing complete
Turing complete 指「圖靈完備」。若一個計算模型能夠模擬圖靈機,理論上便能計算所有可計算的函數,則稱其具備圖靈完備性。
這是計算理論中的能力描述,與程式語言或計算模型的表達能力有關,不是人工智慧評估方法,因此錯誤。
(C) Chinese room argument
「中文房間論證」是哲學家約翰・瑟爾提出的思想實驗,用來質疑「依照形式規則操作符號」是否就等同於真正理解語意。
在中文房間情境中,系統即使能根據規則產生看似合理的中文回答,也未必真正理解中文。這是關於機器是否具備真正心智與理解能力的哲學論證,不是用來實際評估機器智能的標準測試,因此錯誤。
(D) Turing test
Turing test 即「圖靈測試」,是評估機器是否能展現類似人類智能行為的方法。
第 25 題40 分
The following C++ code fragment shows the class definition of a pointer-based implementation of ADT Binary Search Tree that stores employee information of a company. Each tree node stands for an employee. The employeeID is the key and it cannot be duplicated!!
class TreeNode
{
public:
private:
int employeeID;
string emplyeeName;
int age;
TreeNode *leftChildPtr;
TreeNode *rightChildPtr;
friend class BinarySearchTree;
};
class BinarySearchTree
{
public:
int InsertNewEmployee (int newID, string newName, int newAge);
// return 1 if the insertion is successful; otherwise return 0
void ListAllEmployee();
// print all employee info in sorted order
protected:
void inorder (TreeNode *treePtr);
// a RECURSIVE inorder traversal that prints (ID, name, age) of all employees
private:
TreeNode *rootPtr; // pointer to the root of tree, NULL if the tree is empty
};
(a) (20 points) Write the BinarySearchTree::InsertNewEmployee() that inserts a new employee into the binary search
tree. Here, we assume the employee ID is never duplicated; and the ID is the key of a tree node.
(b) (20 points) Write the BinarySearchTree::ListAllEmployee() that prints all employee information in ascending order
in accordance with employeeID. Note that you also need to implement the protected function
BinarySearchTree::inorder() called by ListAllEmployee() that recursively traverses the tree for printing all
employee information.
登入後即可作答並保存紀錄。
核心觀念
本題考查:
-
二元搜尋樹(Binary Search Tree, BST)的插入。
-
BST 的排序性質:
- 左子樹所有節點的
employeeID小於根節點。 - 右子樹所有節點的
employeeID大於根節點。 employeeID不可重複。
- 左子樹所有節點的
-
中序走訪(inorder traversal):
對 BST 進行中序走訪,會依照 key 由小到大輸出所有節點。
題目中的 rootPtr 必須在建立樹物件時初始化為 NULL:
BinarySearchTree() : rootPtr(NULL) {}
(a)插入新員工
解題方法
插入流程如下:
- 建立新的
TreeNode,填入員工資料。 - 若樹為空,將新節點設為根節點。
- 若樹不為空,從根節點開始比較:
newID較小,往左子樹走。newID較大,往右子樹走。
- 持續走訪直到找到空指標,再將新節點接到上一個節點下方。
- 若遇到相同的
employeeID,插入失敗並回傳0。
參考程式碼
int BinarySearchTree::InsertNewEmployee(
int newID,
string newName,
int newAge)
{
TreeNode *newNode = new TreeNode;
newNode->employeeID = newID;
newNode->emplyeeName = newName;
newNode->age = newAge;
newNode->leftChildPtr = NULL;
newNode->rightChildPtr = NULL;
// 樹為空,新節點成為根節點
if (rootPtr == NULL)
{
rootPtr = newNode;
return 1;
}
TreeNode *currentPtr = rootPtr;
TreeNode *parentPtr = NULL;
// 尋找新節點應插入的位置
while (currentPtr != NULL)
{
parentPtr = currentPtr;
if (newID < currentPtr->employeeID)
{
currentPtr = currentPtr->leftChildPtr;
}
else if (newID > currentPtr->employeeID)
{
currentPtr = currentPtr->rightChildPtr;
}
else
{
// employeeID 重複,不允許插入
delete newNode;
return 0;
}
}
// 將新節點接到正確的子樹
if (newID < parentPtr->employeeID)
{
parentPtr->leftChildPtr = newNode;
}
else
{
parentPtr->rightChildPtr = newNode;
}
return 1;
}
時間與空間複雜度
設樹高為 :
- 插入時間複雜度:
- 額外空間複雜度:
若 BST 平衡,,插入為 ;若樹退化成鏈結串列,,最差為 。
(b)依員工編號遞增輸出
解題方法
對 BST 使用中序遞迴:
- 遞迴走訪左子樹。
- 輸出目前節點資料。
- 遞迴走訪右子樹。
因為 BST 的左、中、右順序分別代表「較小、目前、較大」的 key,所以中序走訪結果會依 employeeID 遞增排列。
ListAllEmployee()
void BinarySearchTree::ListAllEmployee()
{
inorder(rootPtr);
}
inorder()
void BinarySearchTree::inorder(TreeNode *treePtr)
{
if (treePtr == NULL)
{
return;
}
// 先走訪左子樹
inorder(treePtr->leftChildPtr);
// 輸出目前員工資料
cout << "("
<< treePtr->employeeID << ", "
<< treePtr->emplyeeName << ", "
<< treePtr->age
<< ")" << endl;
// 再走訪右子樹
inorder(treePtr->rightChildPtr);
}
時間與空間複雜度
共有 個節點時:
- 每個節點恰好拜訪一次。
- 時間複雜度:
- 遞迴堆疊空間:
平衡樹的遞迴深度約為 ;退化樹的遞迴深度可能達到 。
解題技巧與常見陷阱
- 插入時必須同時記錄目前節點
currentPtr與父節點parentPtr,因為找到NULL時,需要把新節點接回父節點。 - 新節點的
leftChildPtr和rightChildPtr必須初始化為NULL。 - 不可使用 preorder 或 postorder 來取得排序結果,BST 必須使用 inorder。
- 欄位名稱是題目指定的
emplyeeName,雖然拼字看似少了o,程式中仍須依照類別定義使用該名稱。 - 重複 key 不應插入;