[Subj] CS subject題目

看板GRE (GRE入學考試)作者 (飛鴻雪泥)時間17年前 (2008/11/07 16:29), 編輯推噓2(207)
留言9則, 3人參與, 最新討論串1/1
想跟大家請教ETS提供範例中的幾題 (題目可以到http://www.ets.org/Media/Tests/GRE/pdf/CompSci.pdf 下載) Consider the collection of all undirected graphs with 10 nodes and 6 edges. Let M and m, respectively, be the maximum and minimum number of connected components in any graph in the collection. If a graph has no selfloops and there is at most one edge between any pair of nodes, which of the following is true? (A) M = 10, m = 10 (B) M = 10, m = 1 (C) M = 7, m = 4 (D) M = 6, m = 4 (E) M = 6, m = 3 Ans: C 這題看不懂. 題目說有6個edges, 那又怎麼可能"one edge between any pair of nodes" In order to find a solution x* to the equation f(x) = 0 for a polynomial f(x) of degree >= 2 with derivative f'(x*) <> 0, Newton’s method does iterations of the form x_(t+1) = x_t - f(x_t)/f'(x_t)' starting with some initial value x_0 <> x* sufficiently close to the desired solution x* to ensure convergence to x*. For fixed values of x_0 and x*, which of the following represents the order of growth of the minimal number of iterations required to compute x* to b bits of accuracy as a function of b ? (A) O(1) (B) O(loglogb) (C) O(logb) (D) O(b^0.5) (E) O(b) Ans: C 這題有甚麼方向可以快速理解的嗎? Which of the following characteristics of a programming language is best specified using a context-free grammar? (A) Identifier length (B) Maximum level of nesting (C) Operator precedence (D) Type compatibility (E) Type conversion Ans: C Context-free grammar不是可以用來產生(( ))等巢狀表示,為何B不是呢? In systems with support for automatic memory management, a garbage collector typically has the responsibility for reclaiming allocated memory objects whose contents cannot affect any future legal computation. Such objects are identified by determining that they cannot be reached from a root set. Which of the following is NOT part of the root set in a typical garbage collector? (A) Actual parameters of the active procedures (B) Dynamically allocated objects on the heap (C) Global variables of the program (D) Local variables on the call stack (E) Values in machine registers Ans: B 其它選項可以了解,但為何B不是呢?heap是用來做甚麼的? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.109.23.135

11/07 18:51, , 1F
1. one edge between any pair of node
11/07 18:51, 1F

11/07 18:52, , 2F
指的是沒有 multi-edges
11/07 18:52, 2F

11/07 21:57, , 3F
heap是程式在記憶體裡面用來放執行階段
11/07 21:57, 3F

11/07 21:58, , 4F
才會產生的,大小可能不固定的記憶體需求
11/07 21:58, 4F

11/08 18:39, , 5F
每兩點連結一邊 10點共要5個邊 又題
11/08 18:39, 5F

11/08 18:40, , 6F
目說共6邊 所以有兩個component會相
11/08 18:40, 6F

11/08 18:40, , 7F
連 所以m=4
11/08 18:40, 7F

11/08 18:41, , 8F
又一點連一邊 點個數大於邊 所以M=10
11/08 18:41, 8F

11/08 22:32, , 9F
M=7, k4 + 6 isolated nodes 總共7個cc
11/08 22:32, 9F
文章代碼(AID): #194_o2-0 (GRE)
文章代碼(AID): #194_o2-0 (GRE)