WYSE Academic Challenge Regional Computer Science 2008 Solution Set

Similar documents
2008 Academic Challenge

WYSE Academic Challenge State Finals Computer Science 2007 Solution Set

WYSE Academic Challenge Computer Science Test (Regional) 2015 Solution Set

WYSE Academic Challenge Computer Science Test (State) 2015 Solution Set

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

First Semester - Question Bank Department of Computer Science Advanced Data Structures and Algorithms...

Sub: EM-III (14MA301) Section: A & B Date: 13/07/17 One Mark Questions: 1. a) Write the iterative formula to compute 3 N by Newton s method.

Philadelphia University Student Name: Student Number:

Read this before starting!

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

Abstract Data Structures IB Computer Science. Content developed by Dartford Grammar School Computer Science Department

ISC 2011 COMPUTER SCIENCE PAPER 1 THEORY

Assignment (3-6) Boolean Algebra and Logic Simplification - General Questions

that system. weighted value associated with it. numbers. a number. the absence of a signal. MECH 1500 Quiz 2 Review Name: Class: Date:

FORTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLIGY- OCTOBER, 2012 DATA STRUCTURE

WYSE Academic Challenge Computer Science Test (State) 2013 Solution Set

Largest Online Community of VU Students

15110 PRINCIPLES OF COMPUTING SAMPLE EXAM 2

Trees : Part 1. Section 4.1. Theory and Terminology. A Tree? A Tree? Theory and Terminology. Theory and Terminology

DKT 122/3 DIGITAL SYSTEM 1

Read this before starting!

University of Palestine. Final Exam 2 nd semester 2014/2015 Total Grade: 50

EE292: Fundamentals of ECE

WYSE Academic Challenge 2002 Computer Science Test (Sectional) SOLUTION

1. Mark the correct statement(s)

Name CPTR246 Spring '17 (100 total points) Exam 3

1. Which of the following circuits can be used to store one bit of data? A) Encoder B) OR gate C) Flip Flop D) Decoder

Points Addressed in this Lecture. Standard form of Boolean Expressions. Lecture 4: Logic Simplication & Karnaugh Map

Circuit analysis summary

Chapter 4 Trees. Theorem A graph G has a spanning tree if and only if G is connected.

SECTION-A

Section 5.5. Left subtree The left subtree of a vertex V on a binary tree is the graph formed by the left child L of V, the descendents

5. (a) What is secondary storage? How does it differ from a primary storage? (b) Explain the functions of (i) cache memory (ii) Register

ONE MARKS QUESTION AND ANSWERS

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

Combinational Circuits Digital Logic (Materials taken primarily from:

Boolean Logic CS.352.F12

Computer Organization and Programming

the absence of a signal. produce a result at one or more of their outputs. parallel. Y= AB. interconnected. connected. changed.

Fundamental of I.T. (c) Application of computer *************

2005 Academic Challenge

Previous Year Questions

Section 001. Read this before starting!

Summary. Boolean Addition

Topic 14. The BinaryTree ADT

Read this before starting!

Digital Logic Design Exercises. Assignment 1

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING B.E SECOND SEMESTER CS 6202 PROGRAMMING AND DATA STRUCTURES I TWO MARKS UNIT I- 2 MARKS

CS301 - Data Structures Glossary By

Experiment 4 Boolean Functions Implementation

Logic Gates and Boolean Algebra ENT263

User. Application program. Interfaces. Operating system. Hardware

CSE 373 OCTOBER 11 TH TRAVERSALS AND AVL

LSN 4 Boolean Algebra & Logic Simplification. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

SPLIT-UP SYLLABUS ----CHENNAI REGION COMPUTER SCIENCE (Code: 083) Class-XII Academic Session

Read this before starting!

MID TERM MEGA FILE SOLVED BY VU HELPER Which one of the following statement is NOT correct.

DATA STRUCTURE : A MCQ QUESTION SET Code : RBMCQ0305

IT 201 Digital System Design Module II Notes

tree nonlinear Examples

Revision Statement while return growth rate asymptotic notation complexity Compare algorithms Linear search Binary search Preconditions: sorted,

Data Structure (CS301)

SYNERGY INSTITUTE OF ENGINEERING & TECHNOLOGY,DHENKANAL LECTURE NOTES ON DIGITAL ELECTRONICS CIRCUIT(SUBJECT CODE:PCEC4202)

DATA STRUCTURE AND ALGORITHM USING PYTHON

Data Structure. IBPS SO (IT- Officer) Exam 2017

ISC 2010 COMPUTER SCIENCE PAPER 1 THEORY

CS DATA STRUCTURES AND ALGORITHMS

Bawar Abid Abdalla. Assistant Lecturer Software Engineering Department Koya University

1.1 The Fifth Trial pages 18 and 25

GC03 Boolean Algebra

Austin Herring Recitation 002 ECE 200 Project December 4, 2013

WYSE Academic Challenge Computer Science Test (State) 2012 Solution Set

FINALTERM EXAMINATION Fall 2009 CS301- Data Structures Question No: 1 ( Marks: 1 ) - Please choose one The data of the problem is of 2GB and the hard

Code No: R Set No. 1

8. Write an example for expression tree. [A/M 10] (A+B)*((C-D)/(E^F))

Fundamentals, Design, and Implementation, 9/e Copyright 2004 Database Processing: Fundamentals, Design, and Implementation, 9/e by David M.

At this point in our study of digital circuits, we have two methods for representing combinational logic: schematics and truth tables.

CIS 1.5 Course Objectives. a. Understand the concept of a program (i.e., a computer following a series of instructions)

Starting Boolean Algebra

LECTURE 17 GRAPH TRAVERSALS

Dec Hex Bin ORG ; ZERO. Introduction To Computing

Systems Programming. Lecture 2 Review of Computer Architecture I

Department of Computer Science and Technology

Code No: R Set No. 1

PRACTICAL LIST FOR EVEN SEMESTERS (PGDCA/MCA/MSC (CS))

Binary Trees

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17

Stacks, Queues and Hierarchical Collections

MODULE 5 - COMBINATIONAL LOGIC

Chapter 14. Graphs Pearson Addison-Wesley. All rights reserved 14 A-1

17CS33:Data Structures Using C QUESTION BANK

8.3 Common Loop Patterns

Programming and Data Structure Solved. MCQs- Part 2

9/10/2016. The Dual Form Swaps 0/1 and AND/OR. ECE 120: Introduction to Computing. Every Boolean Expression Has a Dual Form

implementing the breadth-first search algorithm implementing the depth-first search algorithm

CS 8391 DATA STRUCTURES

QUESTION BANK FOR TEST

CS8391-DATA STRUCTURES QUESTION BANK UNIT I

2015 Academic Challenge

5. The result of dividing the 8 bit value by the 8 bit value is:

Transcription:

1. Correct answer: C. WYSE Academic Challenge Regional 2008 Solution Set 8 bits are sent at each clock cycle and there are 1,000,000 cycles per second, so 8,000,000 bits per second or 1,000,000 bytes per second are transmitted. 2. Correct answer: B. Main memory (ram) is faster and generally more expensive than secondary storage. One of the reasons that main memory is faster is that it has no moving parts. So, it is not cheaper and the fact that it has no moving parts is an advantage, not a disadvantage. However, when powered down, main memory does not preserve the state it was in, causing all data to be lost unless it is saved to the hard drive before being powered down. 3. Correct answer: C. An asymmetric connection is not symmetric because it allows for the maximum amount of data that the client can receive to be greater than it can send. This is done because the service providers expect their customers to request more data than they provide in general. 4. Correct answer: B. HTML is the hypertext markup language. It is used for formatting the webpage, but is not a programming language. All others are programming languages that can be used to create dynamically changing websites. 5. Correct answer: D. DeMorgan's Law can be written in the form listed above or in the alternate format of not(a or B) = not A and not B. 6. Correct answer: D. The values are the opposite of C for each row. 7. Correct answer: A. Each bit can represent 2 different states, 0 or 1. There are 12 different bits. So, there are two ways for each of the 12 bits to be set resulting in 2 12 combinations. 8. Correct answer: D. 75 in base 16 is equivalent to 7 * 16 + 5 = 117 decimal. To convert it to binary, you may convert each of the hexadecimal digits independently, so: 7 = 4 + 2 + 1 = 0*2 3 + 1*2 2 + 1*2 1 + 1*2 0 = 0111 5 = 4 +1 = 0*2 3 + 1*2 2 + 0*2 1 + 1*2 0 = 0101 Combining the results yields from 7 (0111) and then 5 (0101), yields 01110101.

9. Correct answer: A. The logic for the expression is below. not ((A and B) and (B or C)) The logical circuit as an equation not ((T and F) and (F or C)) Substituting for A and B: not ((F) and (F or C)) Any and with a F is F not ((F and C)) Or is dependent upon C only not (F) Same reason as above T not F is T It might be quicker to notice that as A and B are false, the last nand gate is going to be true no matter what the value of C is, because one of the inputs to the nand is already false. The truth table for the nand is given below. X Y X nand Y F F T F T T T F T T T F 10. Correct answer: A. The logic for the expression is below. (C and A) or (A and not B) Substitute in A and B (C and T) or (T and not F) Substitute in A and B (C and T) or (T and T) not F is T (C and T) or T T and T is T T Logical or of anything with T is T 11. Correct answer: D. j x Output 0 2 261426 1 4 2 6 3 8 4 10 12. Correct answer: B. j starts at 1, goes to 0, 1, 2, 3, 4 and then terminates. While the loop does not run for the value of 4, j still reaches the value of 4. 13. Correct answer: A. a b c d 0 2 4 6 Considering the first if statement a==b F a==b&&c F Thus!(F)=T, and by short-circuit logic the statement is true. Therefore a+b+c+d =12

14. Correct answer: E. n i f1 f2 f Action 5 0 1 0 0 5 2 1 0 0 5 2 1 0 1 5 2 1 1 1 print f or 1 5 3 1 1 1 5 3 1 1 2 5 3 2 1 2 print f or 2 5 4 2 1 2 5 4 2 1 3 5 4 2 2 3 5 4 3 2 3 print f or 3 *** 5 5 3 2 3 5 5 3 2 5 5 5 3 3 5 5 5 5 3 5 print f or 5 5 6 5 3 5 Output 1235 15. Correct answer: D. The code will trace the same way as the last problem, but it will stop at the spot where the three * are placed. 16. Correct answer: D. Recursive functions are those that call themselves. 17. Correct answer: A. n i f1 f2 f Output 4 0 8 8 0 0 2 0 8 4 1 9 7 0 4 2 10 6 2 4 3 11 5 0 4 4 12 4 8 4 5 18. Correct answer: C. The loop is entered (n-1) + 1 or n times. 19. Correct answer: E. A trace of the code is provided below. i 0 0/2 is 0, print i or 0 1 1/2 is 0, print i or 1 2 2/2 is 1, print 2/2 or 1 and then because there is no break, print 7 3 3/2 is 1, print 3/2 or 1 and then because there is no break, print 7 4 4/2 is 2, print 7 5 5/2 is 2, print 7

20. Correct answer: A. A trace of the actions follows. Action Stack PUSH A, A PUSH B, BA POP, A POP, empty PUSH C, C PUSH D, DC POP C 21. Correct answer: C. A trace for the code follows. i j s action 0 0 0 0 0 1 s = s + A[i][j] 0 1 1 j++ 1 1 1 j not less than i, do ends for increments i 1 0 1 j set back to zero 1 0 5 s = s + A[1][0] 1 1 5 j++ 2 1 5 j not less than i, do ends for increments i 2 0 5 j set back to zero 2 0 12 s = s + A[2][0] 2 1 12 j++ 2 1 20 s = s + A[2][1] 2 2 20 j++ 3 2 20 do loop ends, for loop increments i, but ends OUTPUT 20 22. Correct answer: B. A do/while loop will always run a minimum of once. 23. Correct answer: E. The nested loop will run 1+1+2+3+...+(n-1) which would equal ((n-1)n/2+1, which is O(n 2 ). 24. Correct answer: B. The OOP paradigm is centered around the idea of representing real world entities and then the algorithms needed to manipulate these entities. 25. Correct answer: C. The if statement only executes once, so it cannot be used to execute a code block repeatedly. 26. Correct answer: B. A postorder traversal will visit the left child node, the right child node and then the parent or vertex last.

27. Correct answer: E. A queue has insertions at the rear and deletions at the front. 28. Correct answer: E. A trace of the actions follows. Action Queue INSERT A, A REMOVE, INSERT B, B REMOVE, INSERT C, C INSERT D, DC REMOVE, D INSERT E, ED REMOVE E 29. Correct answer: C. In OOP a constructor is a class method that is automatically called when an instance of a class is declared. The constructor is usually used to initialize variables. 30. Correct answer: E. These are all aspects of OOP.