You are on page 1of 4

Foundations of Computing

Class Test 2

Osama Abushama

Faculty of Computing
Griffith College Dublin
October, 2015

Attempt all questions


Show all workings
No calculators allowed
This test is worth 10%

Student Name:
Student Number:

Q
1

Points
Given the set A = {x : x is an odd number and 0 x and x 7} in predicate form,
write A in enumerated form

10

Solution A = { 1,3,5,7}
2

Distinguish between a set and a bag.

10

Solution: set are distinct and unique elements , bag are not and allow duplicates

Draw the truth table for [X (Y Z)

10

Draw the truth table for [(X Y) (X Z)]

10

Is the following true and why? [X (Y Z) (X Y) (X Z)]

10

Given an array f(1...30] of integers, express the following in quantified


form: K is the maximum of the first 10 elements in f.
Solution: K = < i : 10 i < 30 : f.i >

10

Find the maximum value of the profit function z

40

You might also like