



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Main points of this past exam are: Committees,, Common Member, Six Hour-Long, Lectures, Minimum Number, Part-Time Jobs, Laptops, Extension Leads, Consecutive Days, Course Fall
Typology: Exams
1 / 7
This page cannot be seen from the preview
Don't miss anything!




Semester 1 Examinations 2010/
Module Code: COMP 8011
School: Science and Computing
Programme Title: Bachelor of Science (Honours) in Software Development – Award
Programme Code: KSDEV_8_Y
External Examiner(s): Ms. A. Meagher Internal Examiner(s): Dr. J. Stynes
Instructions: Answer Question 1 and 3 others. Show all work.
Duration: 2 Hours
Sitting: Winter 2010
Requirements for this examination:
Note to Candidates: Please check the Programme Title and the Module Title to ensure that you have received the correct examination paper. If in doubt please contact an Invigilator.
Q1 Provide a graph model for each of the following problems and then solve the problem. The solution MUST be obtained by using a graph theory result.
(a) Suppose there are 8 committees, each containing 7 members. Each pair of committees has a common member, and each person is on two committees. How many people are there? (5 marks) (b) Consider the problem of scheduling six hour-long lectures L 1 , L 2 , L 3 , L 4 , L 5 , L 6. Among the potential audience there are people who wish to attend both lectures L 1 and L 2 ; L 1 and L 4 ; L 3 and L 5 ; L 6 and L 2 ; L 4 and L 5 ; L 5 and L 6 ; L 1 and L 6. What is the minimum number of hours necessary in order that the lectures can be given without any clashes? (6 marks) (c) John is in charge of assigning part-time jobs at a college. He has 25 student applications and there are 25 part-time jobs. Each applicant is qualified for at least 4 jobs but each job can be performed by at most 4 applicants. Can John assign all students to jobs for which they are qualified? (6 marks) (d) A room has 3000 laptops that must be connected to a wall socket that has 7 outlets. Connections are made by using extension leads that have 7 outlets each. What is the minimum number of extension leads required to connect all laptops to the electricity source? (7 marks) (e) Given three houses and three utility poles, can each house be connected to each utility pole in such a way that none of the connecting wires cross? (5 marks) (f) Consider the problem of scheduling 7 exams in 7 days, one exam per day and no two exams in the same course fall on consecutive days. If no course has more than 4 exams, show that this can be done. (6 marks) (g) Professor X and her spouse Y gave a party at which there were four other married couples. Some pairs of people shake hands when they meet but no married couple. shake hands with each other. At the end of the party X asks everybody how many people they had shaken hands with, and received nine different replies. How many people shook hands with Y? (5 marks)
Q5 (a) What is meant by a prefix code? Using Huffman’s algorithm, devise an optimal binary prefix code for these characters: a, b, c, d, e, f and g assuming their frequencies of occurrence are 12, 24, 6, 7, 8, 3 and 15 respectively. (8 marks) (b) Do any one of the following: (12 marks) (i) Outline the steps in the enumeration sort algorithm. Describe a parallel implementation for the algorithm and apply it to the input 18, 9, 12, 20, 3, 15. Indicate the number of processors required to implement the algorithm at each stage. Compare the complexities of the sequential and parallel implementations of enumeration sort. (ii) What is the time complexity, expressed in big-oh notation, of a recursive algorithm whose associated recurrence relation is T(1) = 1 T(n) = 2 T(n/2) + C n, n > 1 where C is a positive constant. Assume that n = 2k , k an integer > 0
10
8
4 3
1
6
6 8
2 15
18 3
C
5