CS-KEY-PartA-Aug08 - Computer Science Foundation Exam...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Computer Science Foundation Exam August 8, 2008 Computer Science Section 1A Name: PID: Max Pts Passing Pts Category Score Q1 8 6 KNW, CMP Q2 8 6 ANL Q3 9 6 CMP Q4 8 6 KNW Q5 8 6 DSN Q6 9 6 KNW Total 50 36 You have to do all the 6 problems in this section of the exam. Partial credit cannot be given unless all work is shown and is readable. Be complete, yet concise, and above all be neat .
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Computer Science Exam, Part A Page 2 of 9 1. [ 8 pts ] Show all your work and indicate your final answer. a) [ 4 pts ] Determine the value of sum in terms of N , when the following code segment is executed: sum = 0; for(i=1; i <= N*N; i++){ for(j=1; j <= N-5; j++) { sum = sum + 3 + 4*j; } }    2 1 5 1 4 3 n i n j j sum    2 1 2 4 5 4 15 3 n i n n n (1 point) (1 point)     2 2 1 2 1 2 25 15 2 40 18 2 15 3 n i n i n n n n n (1 point) 2 3 4 25 15 2 n n n (1 point) There are many equivalent ways to approach this problem. Please be understanding. b) [ 4 pts ] Evaluate the following expression using summation rules and find the closed form in terms of n .   n n i i j 10 2 1 5 n n i n n i i i 10 10 10 10 11 1 1 10 n i n i i i      2 10 11 2 1 10 n n n n (1 point) (1 point) (1 point)       110
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 9

CS-KEY-PartA-Aug08 - Computer Science Foundation Exam...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online