April 13, 2022

Uncategorized

BSD 2208  CLOUD APPLICATION DEVELOPMENT. BSD Dec

UNIVERSITY EXAMINATIONS: 2020/2021 ORDINARY EXAMINATION FOR THE DEGREE OF BACHELOR OF SCIENCE IN SOFTWARE DEVELOPMENT BSD 2208: CLOUD APPLICATION DEVELOPMENT FULL-TIME DATE: DECEMBER, 2021 TIME: 2 HOURS INSTRUCTIONS: Question ONE IS COMPULSORY, Choose TWO OTHER Questions. QUESTION ONE (20 marks) Compulsory a). Define the following terms in relation to Cloud Application Development [4marks] i). On demand functionality ii). Virtualization iii). Layer iv). Tier b). List three kinds of users in a cloud environment. [3 marks] c). Differentiate between the following terms with regard to cloud computing.[4 marks] i). Elasticity and Scalability ii). Distributed System and Cloud Computing d). Write a JavaScript Script that captures a String (The Name of a User) via a prompt on a web page and then provides an appropriate salutation based on the system time. [9 marks] QUESTION TW0 (15 marks) a). Name any three-cloud deployment models [3 marks] b). With the use of an illustration describe layers of PaaS compared to Traditional IT firm layers. [7 marks] c). Discuss five benefits of Cloud Computing [5 marks] QESTION THREE (15 marks) a). Consider the following expressions in python: 1. if x % 2 == 1: 2. if x**3 != 27: 3. x = x + 4 4. else: 5. x = x / 1.5 6. else: 7. if x <= 10: 8. x = x * 2 9. else: 10. x = x – 2 11. print(x) What does this code output if [4 marks] i). x == 8? ii). x == 5? b). Describe the Term “EUCALYPTUS” in cloud computing [4 marks] c). List five components of the EUCALYPTUS architectures [5 marks] d). Name the environment that we can use to execute JavaScript code on the server. [2 marks] QUESTION FOUR (15 marks) a). With the use of an appropriate illustration describe the cloud infrastructure architecture. [5 marks] b). Explain the role of the JavaScript language in web-based applications. [4 marks] c). Using a diagram, illustrate the DOM model that is used as an API to deploy client-side Java Scripts [6 marks] ……………………………………end………………………………………………

BSD 2208  CLOUD APPLICATION DEVELOPMENT. BSD Dec Read Post »

Uncategorized

BSD 2201  NETWORK SCIENCE THEORY.

UNIVERSITY EXAMINATIONS: 2021/2022 EXAMINATIONS FOR THE DEGREE OF BACHELOR OF SCIENCE IN SOFTWARE DEVELOPMENT BSD 2201: NETWORK SCIENCE FULL TIME/PART TIME DATE: DECEMBER, 2021 TIME: 2 HOURS INSTRUCTIONS: Answer QUESTION ONE AND ANY OTHER TWO questions. QUESTION ONE [20 Marks] a) Briefly describe the applications areas of network science (5 Marks) b) Using an illustration, describe Breadth First Search(BFS) algorithm and its importance to network science (5 Marks) c) Describe any three characteristics of network science in the modern period ( 5 Marks) d) Describe any three properties of a graph ( 5 Marks) QUESTION TWO [15 Marks] a). Given the ego network snapshot below, the highlighted cluster and the following information, suggest three nodes (ego node does not count) that could potentially reach a large audience broadcasting some kind of information concerning technology to most people in this group. Graph information: • Most people in this group are Computer Science students and use this network to many purposes that may or may not be related to technology. • The size of each node is directly proportional to each nodes’ eigenvector centralities. • The fact that two nodes are too close from each other in the representation has nothing to do with the kind of interaction they have in the network. i) What are the three nodes you selected to broadcast information? Why were they chosen? [5 Marks] ii) What kind of extra information about this network could be useful to help broadcast content about technology? [5 Marks] iii) What kinds of assumptions do you have to make in order to balance the lack of helpful information and how those assumptions can affect your strategy? [5 Marks] QUESTION THREE a) Consider the bipartite network below I. Construct its adjacency matrix. (3 Marks) II. Construct the adjacency matrix of its two projections, on the purple and on the green nodes, respectively. (4 Marks) III. Calculate the average degree of the purple nodes and the average degree of the green nodes in the bipartite network. (4 Marks) IV. Calculate the average degree in each of the two network projections. ( 4 Marks) QUESTION FOUR I. Differentiate between the following a) Tree and a Forest in a graph (2 Marks) b) Weakly connected and Strongly connected graph (2 Marks) c) in-degree and out-degree directed graphs (2 Marks) d) Directed and undirected graph (2 Marks) e) incident and degree (2Marks) II. Using an illustration, describe Depth First Search(BFS) algorithm (5 Marks)

BSD 2201  NETWORK SCIENCE THEORY. Read Post »

Uncategorized

BSD 1308 ASSEMBLY PROGRAMMMING.

UNIVERSITY EXAMINATIONS: 2021/2022 EXAMINATION FOR DEGREE IN BACHELOR OF SCIENCE IN SOFTWARE DEVELOPMENT BSD 1308: ASSEMBLY PROGRAMMMING MODE: PART TIME/FULL TIME/DISTANCE LEARNING ORDINARY EXAMINATIONS DATE: DECEMBER.2021 TIME: 2 HOURS INSTRUCTIONS: Answer QUESTION ONE and any other TWO QUESTION TWO [20 MARKS] – COMPULSORY a). Differentiate between a one-pass and a two-pass assembler 4 Marks b). Explain the difference between register and immediate addresses in assembly. 4 Marks c). In assembly language, a procedure is described as a collection of instructions to which we can direct the flow of the program and once the execution of the instructions is completed, the control is given back to the next line to the process of the code that called the procedure. Write an assembly program, assuming you are working with the following procedures: • Main: This procedure will receive the radius of a circle then pass the value to procedure called Circumference and another procedure called Area. • Circumference: This procedure receives the value of the radius then calculates the circumference and displays it in 2 decimal places. • Area: This procedure receives radius then calculates and displays the area of a circle in 3 decimal places. Assume PI (π=3.14) is a constant. 12 Marks QUESTION TWO [15 MARKS] a). Differentiate a conditional and unconditional jump in assembly. 4 Marks b). You are required to develop a guessing game where the user has to guess a secret number. If the guess is right then the program will display a message for the score but if wrong, the program will display message that the player has lost. i). From the case above draw a flowchart to show the program design. 4 Marks ii). Implement the design in a) using assembly language. 7 Marks QUESTION THREE [15 MARKS] An array is defined as a data structure that stores elements that are homogenous in contiguous locations. Assuming you have 10 scores obtained by students in a test: 50,65,77,58,95,81,75,63,50 and 72. Write an assembly program to accomplish the following tasks: a) Display the addresses of the last three scores 7 Marks b) Display the sum of all the scores 8 Marks QUESTION FOUR [15 MARKS] a). Briefly describe the following flags as used in assembly programming: i). Parity flag ii). Zero flag iii). Overflow flag 6 Marks b). Write an assembly program to receive a number keyed in by the user then print all odd numbers (without duplicates) that are less or equal to that number and display these numbers in ascending order 9 Marks

BSD 1308 ASSEMBLY PROGRAMMMING. Read Post »

Uncategorized

BSD 1208  COMPUTATIONAL THINKING THEORY.

UNIVERSITY EXAMINATIONS: 2020/2021 EXAMINATION FOR THE DEGREE OF BACHELOR OF SCIENCE IN SOFTWARE DEVELOPMENT BSD 1208: COMPUTATIONAL THINKING THEORY FULL-TIME ORDINARY EXAMINATION DATE: DECEMBER, 2021 TIME: 2 HOURS INSTRUCTIONS: Question ONE IS COMPULSORY, Choose TWO OTHER Questions QUESTION ONE (20 marks) Compulsory a) Explain the following terminologies as used in algorithms. i). Definiteness (1 mk) ii). Sequential (1 mk) b) Build a truth table for the proposition P ∨¬(P ∧Q) (5 mks ) c) Explain three principles of Computational Thinking (6 mks) d) Write a simple Expert System using a programming language of your own choice. Ensure that the systems has the following. (7 mks) i). A knowledge bases with a least one fact with an arity of one, two and three ii). At least one Rule iii). A Query with the expected result from the system QUESTION TW0 (15 marks) a) Explain the two A’s of Computational Thinking (2 mks) b) Draw a table of the five operators by names, their symbols and an example in each case as used in problem solving (5 mks) c) Explain the following terminologies as used in Computational Thinking i). Coding (2 mks) ii). Problem Solving (2 mks) iii). Algorithm (2 mks) d) Distinguish between parameters and arguments as used in problem solving (2 mks) QESTION THREE (15 marks) a) Illustrate the truth table of conjunction as used in Computational Thinking (5 mks) b) Discuss two ways of controlling algorithm execution (4 mks) c) Write a program that prompts the user to enter arbitrary five subjects through the keyboard and calculate the total of numbers and average on the console screen. (6 mks) QUESTION FOUR (15 marks) a) A network of Friend can be represented in a conceptual graph. Study the vertices and the edges given below to answer the questions that follows: V : ={ 1, 2, 3, 4, 5, 6} E : ={{1,2},{1,5},{2,3},{2,5},{3,4},{4,5},{4,6}} i). Draw a graph data structure to represent the friendship network (4mks) ii). Identify the most influential friend in the network created in a(ii) (1 mk) iii). Identify the least influential friend in the network created in a(ii) (1 mk) b) Outline any three axes of computational thinking (3 mks) c) Write an algorithm to calculate the area and the perimeter of a rectangle using both Pseudocode and flowchart ` (6 mks)

BSD 1208  COMPUTATIONAL THINKING THEORY. Read Post »

Uncategorized

DCM104 COMPUTER PRINCIPLES.

UNIVERSITY EXAMINATIONS: 2014/2015 EXAMINATION FOR THE DIPLOMA IN COMPUTER MAINTENANCE DCM104: COMPUTER PRINCIPLES DATE: NOVEMBER, 2014 TIME: 1½HOURS INSTRUCTIONS: Answer any THREE Questions. QUESTION ONE (a) Using appropriate examples, explain the following terms: – [12 Marks] i. Data ii. Information iii. System iv. Peripheral devices v. Hardware vi. software (b) Highlight five advantages and three disadvantages of computer networks to an organization [8 Marks] QUESTION TWO (a) With the aid of diagrams, describe the following network topologies: – [9 Marks] i. Bus topology ii. Ring topology iii. Star topology (b) Highlight three major functions of RAM [3 Marks] (c) Outline five characteristics of computer systems [5 Marks] (d) Briefly explain three features of computer systems [3 Marks] QUESTION THREE (a) Using a well labelled diagram, show that a computer is a system of hardware devices organized according to the following functions: – [10 Marks] i. Input ii. Processing iii. Output iv. Storage v. Output vi. Control (b) Distinguish between LAN and WAN [4 Marks] (c) Discuss the characteristics of that good information should possess in order to aid management in the performance of the key functions of planning, control and decision making [6 Marks] QUESTION FOUR (a) List and briefly describe four factors you would consider while buying computer software’s [8 Marks] (b) Using examples, distinguish between the following terms:- i. Application software and system software ii. Internal computer hardware and external hardware iii. Input and output devices [6 Marks] (c) i. Define the term ‘Internet’ [2 Marks] ii. List and briefly describe four benefits of the Internet to an organization [4 Marks] QUESTION FIVE (a) Give appropriate applications of the following computer devices:- i. Bar code reader ii. MICR iii. OMR iv. SIMM cards v. Kimball tag reader [5 Marks] (b) List and briefly describe any four utility programs you are familiar with [4 Marks] (c) Highlight six functions of computer operating systems [6 Marks] (d) What do the following abbreviations stand for:- [5 Marks] i. ROM ii. GB iii. MHZ iv. RAM v. OCR 3

DCM104 COMPUTER PRINCIPLES. Read Post »

Uncategorized

DCM 115 E-WASTE MANAGEMENT.

UNIVERSITY EXAMINATIONS: 2014/2015 EXAMINATION FOR THE DIPLOMA IN COMPUTER MAINTENANCE DCM 115: E-WASTE MANAGEMENT DATE: NOVEMBER, 2014 TIME: 1½HOURS INSTRUCTIONS: Answer any THREE Questions. QUESTION ONE (a) Define i. Sustainable Innovation ii. E-Waste iii. Reuse iv. Recycle (4 Marks) (b) Briefly discuss why E-Waste is growing and why it matters (6 Marks) (c) Outline any four objectives of E-Waste recycling (4 Marks) (d) Discuss the three levels of toxic emissions which got a severe impact on health and environment (6 Marks) QUESTION TWO (a) Technology transfer in developing countries embraces different key aspects that should be kept in mind to prevent boundary conditions from hampering the aim of the transfer itself. Briefly discuss the aim of technology transfer for e-waste recycling (4 Marks) (b) Technology transfer should not merely be reduced to the setting up of recycling infrastructure without taking into account economic and social boundary conditions. Discuss (12 Marks) (c) Briefly discuss the aim of dismantling and preprocessing in the recycling chain for EWaste (4 Marks) QUESTION THREE (a) Using an example, discuss the subsequent steps in recycling chain for E-Waste(10 Marks) (b) Compare Technology and Technique within E-Waste (4 Marks) (c) Discuss the 3R( Reduce, Reuse ,Recycle) Principle of recycling (6 Marks) QUESTION FOUR (a) Assuming you are an entrepreneur and would like to venture into e-waste management here in Kenya. What would you do different from what is done and bring out a successful ewaste management business that has a sustainable impact on the society/environment. (10 Marks) (b) Briefly discuss the criteria used to compare innovation technologies along the element of sustainability (10 Marks) QUESTION FIVE (a) Discuss the barriers of sustainable e-waste recycling technologies terms of policy and legislation, technology and skills and business and financing in the following countries (20 Marks) i. Kenya ii. South Africa iii. India iv. Brazil v. Uganda

DCM 115 E-WASTE MANAGEMENT. Read Post »

Uncategorized

DCM 112 ANALOGUE CIRCUITS AND FAULT DIAGNOSIS.

UNIVERSITY EXAMINATIONS: 2014/2015 EXAMINATION FOR THE DIPLOMA IN COMPUTER MAINTENANCE DCM 112: ANALOGUE CIRCUITS AND FAULT DIAGNOSIS DATE: NOVEMBER, 2014 TIME: 1½HOURS INSTRUCTIONS: Answer any THREE Questions QUESTION ONE a) Three resistors namely R1 = 4Ω, R2 = 12Ω and R3 = 8Ω are connected to form a circuit across and voltage source V = 15V. If R1 is in series with the parallel combination of R2 and R3, calculate i) The current from the source [3 Marks] ii) The potential drop (p.d) across R2 [3 Marks] iii) The current flowing through R3 [2 Marks] b) With the aid of a labeled diagram, describe the full wave bridge rectifier and clearly differentiate the negative half cycle from the positive half cycle [8 Marks] c) Give the units of the following electronic quantities i) Power ii) Current iii) Capacitance iv) Inductance [4 Marks] QUESTION TWO a) With the aid of a diagram, derive the impedance formula for a series R-L-C circuit [4 Marks] b) A circuit having a resistance of 4Ω, an inductance of 0.05H and a capacitance in series is connected across a 100V, 50Hz supply. Calculate i) The capacitance to give resonance [4 Marks] ii) The voltages across the inductance and capacitance [4 Marks] iii) The Q factor of the circuit [2 Marks] c) Briefly describe the three bipolar junction transistor configurations [6 Marks] QUESTION THREE a) Describe the operation of the following waveform generator circuits i) CR phase shift [4 Marks] ii) Hartley [4 Marks] b) State the purpose and operation of the following voltage regulators i) Series [4 Marks] ii) Shunt [4 Marks] c) Differentiate the triac from the thyristor [4 Marks] QUESTION FOUR a) State Kirchoff’svoltage and current laws [4 Marks] b) For the circuit shown in the figure below where R1 = 10Ω, R2 = 20Ω and V1 = 30V. Calculate i) The current through R1 ii) The current through R2 d) For the circuit shown below, calculate the currents shown using superposition theorem Assume that R1 = 4Ω, R2 = 10Ω, R3 = 8Ω, V1 = 20V and V2 = 15V [8 Marks] QUESTION FOUR a) A 5.0V stabilized power supply is required to be produced from a 12V DC power supply input source. The maximum power rating of the zener diode is 2W. With the aid of a zener diode regulator circuit calculate i) The maximum current flowing through the zener diode ii) The minimum value of the series resistor connected to the diode iii) The load current if a load resistor of 1kΩ is connected across the zener diode. iv) The zener current at full load [8 Marks] b) Describe the three possible biasing conditions for the standard P-N junction diode [6 Marks] c) Draw the symbols for the following electronic devices i) Operational amplifier ii) P-N junction diode iii) N-P-N transistor 3 iv) A.C voltage source [6 Marks] 4

DCM 112 ANALOGUE CIRCUITS AND FAULT DIAGNOSIS. Read Post »

Uncategorized

DCM 111 DIGITAL ELECTRONICS-III.

UNIVERSITY EXAMINATIONS: 2014/2015 EXAMINATION FOR THE DIPLOMA IN COMPUTER MAINTENANCE DCM 111: DIGITAL ELECTRONICS-III DATE: NOVEMBER, 2014 TIME: 1½HOURS INSTRUCTIONS: Answer any THREE Questions. QUESTION ONE (a) Give four flip-flops and their truth tables [8 Marks] (b) Design a four bit ring counter using the simple flipflop [8 Marks] (c) Give the disadvantages of ring counters [4 Marks] QUESTION TWO (a) Define the term synchronous counter [2 Marks] (b) Give two advantages of synchronous counters [2 Marks] (c) Design a synchronous mod-9 counter. Show all your working. Idicate your choice of flipflop [16 Marks] QUESTION THREE (a) Give on advantage and one disadvantage of Asynchronous counters [2 Marks] (b) Design an asynchronous mod-11 counter. Show all your working. Give the reason for the flipflop choice you have made [10 Marks] QUESTION FOUR (a) Define the term clock as used in digital electronics [2 Marks] (b) Describe the circuit and operation of the 555 timer [8 Marks] (c) Give the difference between combinational logic and sequential logic [2 Marks] (d) Using a NAND gate circuit show the operation of a JK flipflop [8 Marks] QUESTION FIVE (a) Outline the basic components and operation of a microprocessor [8 Marks] (b) Outline the use of programmable logic devices, giving examples [6 Marks] (c) Name three instruments used in making measurements in digital electronics and what they measure [6 Marks]

DCM 111 DIGITAL ELECTRONICS-III. Read Post »

Uncategorized

DCM 105 MICROCOMPUTER SYSTEMS INSTALLATION AND MAINTENANCE.

UNIVERSITY EXAMINATIONS: 2014/2015 EXAMINATION FOR THE DIPLOMA IN COMPUTER MAINTENANCE DCM 105: MICROCOMPUTER SYSTEMS INSTALLATION AND MAINTENANCE DATE: NOVEMBER, 2014 TIME: 1½HOURS INSTRUCTIONS: Answer any THREE Questions QUESTION ONE a) Describe the following hard drive partitions i) Primary partition [2 Marks] ii) Extended partition [2 Marks] b) Describe any five health and safety rules that need to be observed when assembling and using computers [10 Marks] c) Briefly describe the following motherboard components i) USB port [1 Mark] ii) RAM slots [1 Mark] iii) IDE controller [1 Mark] iv) CMOS Battery [1 Mark] v) Processor socket [1 Mark] vi) PCI slot [1 Mark] QUESTION TWO a) After installing the networking components, the Windows XP Setup Wizard automatically starts the final step in the installation process. Required: Describe the tasks performed by the Setup Wizard to complete the installation [10 Marks] b) Describe how you can disassemble a computer system [6 Marks] c) Name any four external computer components [4 Marks] QUESTION THREE a) Differentiate static RAM (SRAM) from dynamic RAM (DRAM) [6 Marks] b) Briefly describe the following CPU components i) Registers ii) External data bus iii) Clock [6 Marks] c) Describe any two power supply problems [4 Marks] d) Differentiate between online UPS and offline UPS [4 Marks] QUESTION FOUR a) Describe the three factors to consider when choosing a monitor [6 Marks] b) Give any six common printer problems [6 Marks] c) Describe any four portable computing devices [8 Marks] QUESTION FIVE a) Describe the common symptoms of the following failed devices i) Flash drive [2 Marks] ii) Microprocessor [2 Marks] iii) Power supply unit [2 Marks] b) Describe how you can perform the following using windows XP i) Modify regional settings [3 Marks] ii) Remove Microsoft word program from a computer [3 Marks] c) Explain what is meant by motherboard form factor and differentiate between AT and ATX motherboard form factors [8 Marks]

DCM 105 MICROCOMPUTER SYSTEMS INSTALLATION AND MAINTENANCE. Read Post »

Uncategorized

DCM 102 ELECTRICAL AND ELECTRONIC PRINCIPLES.

UNIVERSITY EXAMINATIONS: 2014/2015 EXAMINATION FOR THE DIPLOMA IN COMPUTER MAINTENANCE DCM 102: ELECTRICAL AND ELECTRONIC PRINCIPLES DATE: NOVEMBER, 2014 TIME: 1½HOURS INSTRUCTIONS: Answer any THREE Questions QUESTION ONE (a) Using a simple diagram explain the free electrons found in materials [6 Marks] (b) Discuss the three main types of electrical materials [6 Marks] (c) Calculate the colour code for the following resistor values [4 Marks] i. 200 Ohms +/-10% ii. 6.3 KOhms +/-5% (d) “The total resistance in a parallel circuit is less than that of the smallest resistor in the network.” Explain. [4 Marks] QUESTION TWO (a) Give three instruments used in electronics and the use of each [6 Marks] (b) Convert the following to the corresponding values [6 Marks] i. 11000V to KV ii. 0.0098A to mA iii. 560000 to KOhms (c) Given the following colour codes calculate the minimum and maximum values of the resisitors [6 Marks] i. red, red, black, gold ii. green, blue, orange (d) Give the difference between a circuit breaker and a fuse [2 Marks] QUESTION THREE (a) State Ohms Law [2 Marks] (b) Using simple diagrams compare and contrast series and parallel circuits [4 Marks] (c) Name 2 types of capacitors, inductors and resistors [6 Marks] (d) In Q3 (b) above show the various parameters that should be consider when selecting the devices for an application [3 Marks] (e) Give the construction and operation of one of the devices in Q3(b) QUESTION FOUR (a) List the four main components of an electric circuit [2 Marks] (b) Define the terms below [6 Marks] i. current ii. resistance iii. power (c) For the circuit below calculate [12 Marks] i. total resistance ii. current through R1, R2 and R6 iii. voltage across R3, R4 and R5 QUESTION FIVE (a) Briefly explain how dc voltage is produced by dry cells. Neat diagrams may be drawn. [6 Marks] (b) Explain the operation of a simple half wave rectifier. The schematic diagram and waveforms must be drawn. [8 Marks] (c) Two resistors of equal resistance are connected in series and the current measured (Is). They are now connected in parallel and total current (Ip) measured. Calculate the ratio of Ip to Is and explain your answer. [6 Marks]

DCM 102 ELECTRICAL AND ELECTRONIC PRINCIPLES. Read Post »

Uncategorized

DCM 101 DIGITAL ELECTRONICS.

UNIVERSITY EXAMINATIONS: 2014/2015 EXAMINATION FOR THE DIPLOMA IN COMPUTER MAINTENANCE DCM 101: DIGITAL ELECTRONICS DATE: NOVEMBER, 2014 TIME: 1½HOURS INSTRUCTIONS: Answer any THREE Questions QUESTION ONE (a) Fill the following table by doing the number conversions [12 Marks] Binary Decimal Octal Hexadecimal (b) Using diagrams show the difference between analogue and digital systems [4 Marks] (c) Give two advantages of digital systems [4 Marks] QUESTION TWO (a) Using proper diagrams show how analogue signals can be changed into digital signals [8 Marks] (b) Name the three basic logic gates. Give hteir symbols and truth tables [9 Marks] (c) Give meaning to the terms gate, truth table and bit [3 Marks] QUESTION THREE (a) A circuit has three inputs (A,B,C) and one output (F). F is high if any two inputs are low. Develope the truth table for this, the resulting expression and logic circuit [9 Marks] (b) Give the truth table and symbols of the NAND and NOOR gates [4 Marks] (c) Show how AND and NOT gates ca be constructed from NAND gates only [5 Marks] QUESTION FOUR Design a half adder circuit using NAND gates only. Show all your working [20 Marks] QUESTION FIVE (a) Design a Binary to BCD converter. Show all your working [14 Marks] (b) Give the reasons for using number codes such as BCD and gray code [2 Marks] (c) Giving examples show the difference between digital and analogue quantities [4 Marks]

DCM 101 DIGITAL ELECTRONICS. Read Post »

Uncategorized

DBIT 305 DIT 307 DATA STRUCTURES AND ALGORITHMS.

UNIVERSITY EXAMINATIONS: 2013/2014 ORDINARY EXAMINATION FOR THE DIPLOMA IN INFORMATION TECHNOLOGY DBIT 305 DIT 307 DATA STRUCTURES AND ALGORITHMS DATE: AUGUST, 2014 TIME: 1½HOURS INSTRUCTIONS: Answer Any Three Questions. QUESTION ONE (a) An algorithm is defined as sequence of instructions for solving a given problem. A good algorithm must meet a number of properties. Discuss four of those characteristics. [4 Marks] (b) You are required to design an algorithm that reads three different values entered by the user through the keyboard then compares all of them and displays the smallest. Use a pseudo code to design this program. [6 Marks] (c) A queue is an ordered collection of data elements in which elements are added from one end called the rear and removed from another end called front. In this regard explain the output of the following sequence of operations. 1. s.push(10); 2. s.push(4); 3. s.push(8); 4. s.pop(); 5. s.push(6); 6. s.push(5); 7. s.pop(); 8. s.push(13); [8 Marks] (d) A heap is a binary tree which is complete and satisfies the heap order property. In this regard, differentiate between completeness and order property of a heap. [2 Marks] QUESTION TWO (a) Design an algorithm to add a new node at the mid position of a linked list. [2 Marks] (b) Discuss the following algorithms for traversing a graph: [i]. Breadth first search [6 Marks] [ii]. Depth first search [6 Marks] (c) Describe the three tree traversal techniques below: [i]. In order traversal [3 Marks] [ii]. Post order traversal [3 Marks] QUESTION THREE (a) Define the following terminologies as used in tree data structures. [i]. Root. [2 Marks] [ii]. Edge. [2 Marks] [iii]. Leaf. [2 Marks] [iv]. Path. [2 Marks] (b) Construct a hash table to store the integers 13, 2, 34, 56, 77,21,33,82 using a suitable hash function that adequately resolves any conflict an ensures that all values are stored in the hash table. [12 Marks] QUESTION FOUR (a) You are given the following elements stored in an array. Discuss how you can use bubble sort to arrange these elements in an ascending order. 12 6 18 33 1 3 14 13 32 9 [6 Marks] (b) Design an algorithm that locates the integer in index 6 in the array below. Index 0 1 2 3 4 5 6 7 8 Element 12 18 9 11 32 14 13 19 7 [8 Marks] (c) Design an algorithm that calculates and displays the factorial of an integer. [6 Marks] QUESTION FIVE (a) A linked list is a linear data structure which consists of collection of nodes with each node in the list consisting of two basic components. Describe these two components. [4 Marks] (b) With help of a code snippet, describe the following types of linked lists: [i]. Singly linked list. [4 Marks] [ii]. Doubly linked list. [4 Marks] (c) Describe the procedure for constructing a binary search tree (BST). [8 Marks]

DBIT 305 DIT 307 DATA STRUCTURES AND ALGORITHMS. Read Post »

Scroll to Top