阿摩線上測驗 登入

申論題資訊

試卷:110年 - 110 國立政治大學_碩士班暨碩士在職專班招生考試_資訊科學系:資料結構及演算法#105973
科目:研究所、轉學考(插大)◆資料結構及演算法
年份:110年
排序:0

申論題內容

7. (15%) Design a polynomial-time algorithm for the following problem.
 Input: An n-node undirected graph G. 
Output:
 "'Yes', if there is a cycle of length at most n/2 (i.e., a cycle that has at most n/2 nodes) in G;
 "No", otherwise.
***Please give the high-level idea of your algorithm and explain why it has polynomial running time. ***