0% found this document useful (0 votes)
1K views38 pages

Cit237 Programming and Algorithms Summary

Uploaded by

solomon isaac
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views38 pages

Cit237 Programming and Algorithms Summary

Uploaded by

solomon isaac
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

WINSMART ACADEMY

MOTTO: PERSONALISED TUTORING FOR LEADERS OF TOMORROW


WHATSAPP: 08024665051, 08169595996
[email protected]
CIT237 - PROGRAMMING AND ALGORITHMS SUMMARY

_____ are languages through which we can instruct the computer to carry
out some processes or tasks.
Programming languages

Programming languages are languages through which we can _____the


computer to carry out some processes or tasks.
Instruct

Programming languages are languages through which we can instruct the


______to carry out some processes or tasks.
Computer

______ languages are languages through which we can instruct the computer
to carry out some processes or tasks.
Programming

______ are designed to communicate ideas about algorithms between human


beings and computers.
Programming languages

______ can be used to execute a wide range of algorithms, that is, an


instruction could be executed through more than a procedure of execution.
Programming languages

Programming languages can be used to execute a wide range of_____, that is,
an instruction could be executed through more than a procedure of
execution.
Algorithms

Programming languages can be used to execute a wide range of algorithms,


that is, an instruction could be executed through more than a procedure
of_____.
Execution

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 1
Programming languages can be used to execute a wide range of algorithms,
that is, an _____could be executed through more than a procedure of
execution.
Instruction

A ______ is a set of codes that instructs the computer to carry out some
processes.
Program

______ is the process of writing programs.


Programming

Programming is the process of writing______.


Programs

Programs and programming languages have been in existence since the


invention of computers
True

There are _____levels of programming languages.


Three

______ is a set binary coded instruction, which consists of zeros (0) and ones
(1).
Machine language

_____ language is a set binary coded instruction, which consists of zeros (0)
and ones (1).
Machine

Machine language is a set ______coded instruction, which consists of zeros


(0) and ones (1).
Binary

Machine language is a set binary coded instruction, which consists of _____


zeros (0) and ones (1)

_____ language is peculiar to each type of computer.


Machine

Machine language is peculiar to each type of computer.


True

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 2
Machine language is peculiar to each type of______.
Computer

The first generation of computers was coded in machine language that was
specific to each model of computer

The _____ generation of computers was coded in machine language that was
specific to each model of computer
First

The first generation of computers was _____ in machine language that was
specific to each model of computer
Coded
The first generation of computers was coded in machine language that was
specific to each ______
of computer.
Model

Some of the shortcomings of the machine language were:


1. Coding in machine language was a very tedious and boring job
2. Machine language was not user-friendly. That is the user had to
remember a long list of codes, numbers or operation codes and know where
instructions were stored in computer memory.
3. Debugging any set of codes is a very difficult task since it requires going
through the program instruction from the beginning to the end.

The major advantage of machine language is that______


It requires no translation since it is already in machine language and is
therefore faster to execute.

_______ is a level of programming language which is different from the


machine language.
Low Level Language

______ consists of some symbolic codes, which are easier to remember than
machine codes.
Low Level Language

Low level programming language is also called _____


Assembly language

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 3
Low level programming language is also called assembly language
because______
It makes use of an assembler to translate codes into machine language.

An example of assembly language statement is: MOVE A1, A2 → Move the


contents of Register A2 to A1

The disadvantages of assembly language are that:


 It is specific to particular machines
 It requires a translator called an assembler.

The major advantage of the assembly language is that______


Programs written in it are easier to read and more user friendly than
those written in machine language, especially when comments are
inserted in the codes

______ programming language consists of English-like codes.


High Level Language

_____ language is independent of the computer because the programmer


only needs to pay attention to the steps or procedures involved in solving the
problem for which the program is to be used to execute the problem.
High-level

Some advantages of high-level language:


 It is more user friendly, that is, easy to learn and write
 It is very portable, that is, it can be used on almost any computer
 It saves much time and effort when used compared to any other
programming level language.
 Codes written in this language can easily be debugged.
 High-level language is usually broken into one or more states such as:
Main programs, sub-programs, classes, blocks, functions, procedures,
etc.

The following are the levels of programming languages


 Machine language
 Low Level language
 High Level language

There are some conventional features which a programming language must


possess, these features are:
 It must have syntactic rules for forming statements.
PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION
AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 4
 It must have a vocabulary that consists of letters of the alphabet.
 It must have a language structure, which consists of keywords,
expressions and statements.
 It may require a translator before it can be understood by a computer.
 Programming languages are written and processed by the computer
for the purpose of communicating data between the human being and
the computer.

A _____ is a series of steps, each of which performs a calculation, retrieves


input, or produces output.
Procedural program

A _____ program is a series of steps, each of which performs a calculation,


retrieves input, or produces output.
Procedural

Major procedural programming languages are______


COBOL, FORTRAN, C, AND C++

The_____ program is a collection of objects that interact with each other by


passing messages that transform their state.
Object-Oriented (OO) Programming

The fundamental building blocks of_____ programming are object modelling,


classification and inheritance.
Object-Oriented (OO) Programming

Major object-oriented languages are C++, Java etc.

A _____ is a collection of mathematical functions, each with an input


(domain) and a result (range).
Functional program

Major functional programming languages are______


Lisp, Scheme, Haskell, and ML

A _____ programme is a collection of logical declarations about what


outcome a function should accomplish rather than how that outcome
should be accomplished.
Logic

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 5
A _____ is a collection of logical declarations about what outcome a function
should accomplish rather than how that outcome should be accomplished.
Logic programme

_____ programming provides a natural vehicle for expressing non-


determinism, since the solutions to many problems are often not unique but
manifold.
Logic

_____ provides a natural vehicle for expressing non-determinism, since the


solutions to many problems are often not unique but manifold.
Logic programming

The major logic programming language is _____.


Prolog

An _____ is a continuous loop that responds to events that are generated in


an unpredictable order.
event driven program

Major event-driven programming languages include ______.


Visual basic and Java

A _____ program is a collection of cooperating processes, sharing information


with each other from time to time but generally operating asynchronously.
Concurrent

A _____ is a collection of cooperating processes, sharing information with


each other from time to time but generally operating asynchronously.
Concurrent program

Concurrent programming languages include_____


SR, Linda, and High performance FORTRAN

The programming communities that represent distinct application areas can


be grouped in the following way:
 Scientific Computing
 Management Information System (MIS)
 Artificial Intelligence
 Systems
 Web-centric

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 6
_____ is concerned with making complex calculations very fast and very
accurately.
Scientific Computing

Examples of scientific programming languages include_____


Fortran 90, C, and High Performance Fortran

MIS means______
Management Information System

The _____ programming community has been active since the early 1960s.
artificial intelligence

The artificial intelligence programming community has been active since the
early_____.
1960s

______ community is concerned about developing programs that model


human intelligent behaviour, logical deduction, and cognition.
Artificial Intelligence

Examples of AI programming languages are prominent functional and logic


programming languages like______
Prolog, CLP, ML, Lisp, Scheme and Haskell

______ are those who design and maintain the basic software that runs
systems – operating system components, networks software, programming
language compilers and debuggers, virtual machines and interpreters, and
so on.
System programmers

The primary example of a system programming language is ______.


C

The most dynamic area of new programming community growth is the


______
World Wide Web

Programming languages that support Web-centric computing include_____


Perl, Tc1/Tk, Visual basic, and Java

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 7
A _____ is a program that translates another program written in any
programming language other than the machine language to an
understandable set of codes for the computer and in so doing produces a
program that may be executed on the computer.
Translator

Examples of a translator are ______ and _______


Assembler and Interpreters and Compilers

______ is a program that converts programs written in assembly or low-level


language to machine language.
Assembler

A program that converts programs written in assembly or low-level language


to machine language is called______
Assembler

______ consist of programs that convert programs in high level programming


language into machine language.
Interpreters and Compilers

The major difference between interpreters and compilers is that______


A compiler converts the entire source program into object code before
the entire program is executed while the interpreter translates the
source instructions line by line.

The following are the features of Translators


 They exist to make programs understandable by the computer
 There exist different translators for different levels and types of
programming languages
 Without them, the programs cannot be executed.

An _____ allows a program to be retrieved from the disk and amended as


necessary.
Editor

An editor allows a program to be retrieved from the _____ and amended as


necessary.
Disk

In order to type any program on the keyboard and save the program on a
disk, it will be necessary to run a program called an_____.

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 8
Editor

______ translates a program written in high level language stored in a text


mode on a disk to the program stored in a machine-oriented language on a
disk.
Compiler

A _____ picks up the machine-oriented program and combines it with any


necessary software (already in machine oriented form) to enable the program
to be run.
linker/loader

Before a compiled program can be run or executed by the computer it must


be______
Converted into an executable form

______ are languages through which we can instruct the computer to carry
out processes and tasks.
Programming languages

A ______ is a set of codes that instructs the computer to carry out some
processes while programming is the act of writing programs.
Programme

There are _____ levels of the programming language


Four

There are four levels of the programming language


 machine language
 low level language
 assembly language
 high level language

There are basically _____types of translators


two

There are basically two types of translators: assembler and______.


interpreters and compilers

There are basically two types of translators______.


assembler and interpreters and compilers

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 9
There are basically two types of translators: _____ and interpreters and
compilers.
assembler

The major five stages involved in developing an efficient program are:


 Problem Analysis
 Design
 Coding
 Testing and Debugging
 Documentation

_____ is where the clear statement of the problem is stated.


Problem analysis

The _____ must be sure that he understands the problem and how to solve
it.
Programmer

The planning of the solution to the problem in the first stage takes place in
_____ stage.
Design

The planning consists of the process of finding a logical sequence of precise


steps that solve the problem. Such a sequence of steps is called an_____.
Algorithm

The three popular methods used to develop the logic plan are:
 Flowcharts
 A pseudo code
 A top-down chart

The three popular methods used to develop the logic plan are:_____
Flowcharts, a pseudo code, and a top-down chart

Translation of the algorithm in stage two into a programming language takes


place here. The process for writing the program is called______.
Coding

The ______uses the algorithm devised in the design stage along with the
choice of the programming language he got from stage three.
programmer

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 10
The programmer uses the ______ devised in the design stage along with the
choice of the programming language he got from stage three.
algorithm

The programmer uses the algorithm devised in the design stage along with
the choice of the programming language he got from stage______.
three

_____ process involves the location and removal of error in the program if
any.
Testing and Debugging

______ is the process of checking if the program is working as expected and


finding errors in the program, and debugging is the process of correcting
errors that are found
Testing

An error in a program is called a_____.


Bug

______ is the final stage of program development that consists of organising


all the material that describes the program.
Documentation

The ______ of the program is intended to allow another person or the


programmer at a later date, to understand the program.
Documentation

_____ remarks consist of statements in the program that are not executed,
but point out the purpose of various parts of the program.
Internal documentation

The normal program execution consists of _____ stages


Four (4)

The program execution stages are explained below:

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 11
______ is the coded instruction given to the computer in a particular
programming language in order to accomplish a given task.
The Program (Source Code)

The process of _____ involves reading the source code, checking for errors in
the source code and converting it to an executable format (machine code) if
no error is detected, else the process of compilation is aborted and an error
is reported.
Compilation

The ______ is the result of the compilation process


object code

The object code is also called the _____


target code

The object code is dependent on the programming language chosen.


True

The last stage is for the computer to give the______.


Result

The following represent the major considerations in writing good programs


 Naming Conventions
 File Naming and Organisation
 Formatting and Indentation
 Comments and Documentation
 Classes

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 12
 Functions
 Using STL
 Pointers and References
 Minimising Bugs by Testing

The name of a _____ should communicate its purpose.


Class

The name of a class should communicate its_____.


Purpose

The name of a class should communicate its purpose.


True

STL means______
Standard Template Library

______ is where the clear statement of the problem is stated.


Problem analysis

______ involve using representative data to test the logic of the algorithm by
hand to ensure that it is correct.
Planning

The process for writing the program is called_____.


Coding

______ process involves the location and removal of errors ( if any) in the
program .
Testing and debugging

______ is the final stage of program development; it consists of organising all


the material that describes the program.
Documentation

The normal program execution consists of _____ stages.


four (4)

The _______ is the result of the compilation process


Object code

A class name should start with an ______letter.

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 13
Uppercase

An _____ is a finite sequence of unambiguous instructions for solving a


problem, i.e., for obtaining a required output for any legitimate input in a
finite amount of time.
Algorithm

A _____ is a specification of the desired input-output relationship.


computational problem

An ______ of a problem is all the inputs needed to compute a solution to the


problem.
instance

An _____ is a well defined computational procedure that transforms inputs


into outputs, achieving the desired input-output relationship.
algorithm

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 14
A correct algorithm halts with the correct output for every input instance.
We can then simply say that an ______ is a procedure for solving
computational problems
Algorithm

The following are the major considerations in the design of algorithms


 An algorithm must have a beginning and an end
 The non ambiguity requirement for each step of an algorithm cannot
be compromised.
 The range of inputs for which an algorithm works has to be specified
carefully
 The same algorithm can be represented in several different ways
 Several algorithms for solving the same problem may exist
 Algorithms for the same problem can be based on very different ideas
and can solve the problem with dramatically different speeds
 It must terminate at a reasonable period of time.

The _____ phase is the testing phase whereby the programmer confirms that
the algorithm yields the desired result for the right input that is in a
reasonable amount of time.
Algorithm evaluation

In_____ phase, we check the efficiency of the algorithm in terms of time and
space which are termed as time efficiency and space efficiency respectively.
Algorithm analysis

Most algorithms finally transit into computer programs.


True

There are _____ types of algorithm


Two

The two types of Algorithms are_____


non-recursive algorithms and recursive algorithms

______ are algorithms that do not recall back the same algorithm or function.
Non-recursive algorithms

______ are algorithms that have the same function calling themselves.
Recursive algorithms

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 15
In this algorithm, we can see functions like F (I-1), F (I), F (I-2) calling /
referring to the same algorithm. This case is also referred to as a ______.
Recursion

A _____ consists of special geometric symbols connected by arrows.


Flowchart

A flowchart consists of special _____ symbols connected by arrows.


Geometric

A flowchart consists of special _____ connected by arrows.


Geometric symbols

A flowchart consists of special geometric symbols connected by_____.


Arrows

The arrows connecting the symbols are called_____


flow lines

_____ should “flow” from the top of the page to the bottom.
Flowcharts

Flowcharts should _____ from the top of the page to the bottom.
Flow

Flowcharts should “flow” from the_____


Top of the page to the bottom

ANSI means______
American National Standards Institute

The main advantage of using a flowchart to plan a task is that_____


It provides a pictorial representation of the task which makes the logic
easier to follow.

The major disadvantage with flowcharts is that______


When a program is very large, the flowcharts may continue for many
pages, making them difficult to follow and modify.

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 16
PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION
AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 17
PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION
AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 18
A ______ is an abbreviated version of an actual computer code (hence, the
term pseudo code).
pseudo code

The geometric symbols used in flowcharts are replaced by _____ statements


that outline the process.
English-like
The _____ allows the programmer to focus on the steps required to solve a
problem rather than on how to use the computer language.
pseudo code

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 19
______ is an integral component of software development and it is performed
to determine the existence, quality, or genuineness of the attributes of the
program of application.
Program testing

______ is done in a way that the program is run on some test cases and the
results of the program’s performance are examined to check whether the
program is working as expected.
Program testing

The testing process normally begins with selecting the _____


test factor(s)

The ______ determine whether the program is working correctly and


efficiently.
test factors

______ is generally focused on two areas: internal efficiency and external


effectiveness.
Testing

Testing is generally focused on _____ areas


Two

Testing is generally focused on two areas:______ and______.


internal efficiency and external effectiveness

The goal of external effectiveness testing is______


To verify that the software is functioning according to system design,
and that it is performing all the necessary functions or sub-functions.

The goal of internal testing is______


To make sure that the computer code is efficient, standardised, and
well documented.

______ is designed to verify that the developed system and programs work
correctly.
Structural System Testing

The components of Structural System Testing include:


 Stress testing
 Recovery testing

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 20
 Compliance testing
 Execution testing
 Operations testing
 Security testing

______ is designed to ensure that the system requirements and specifications


are achieved.
Functional System Testing

The components of Functional System Testing include:


 Requirement testing
 Error-handling testing
 Inter-systems testing
 Parallel testing
 Regressing testing
 Manual-support testing
 Control test

______ is the procedure of including illustrations or comments to explain


lines or segments within the program.
Program documentation

The two major reasons for documentation are:_____ and ______


Clarity and extensibility

______ makes the program to be clear and understandable to the


programmers.
Clarity

The following are the reasons why program maintenance is necessary:


1. Changes in nature of business
2. Dynamics of operation
3. Changes in technology
4. Improving the size and efficiency of code – refactoring

Most programs are designed to manipulate data in order to get an______.


Output

Major standard integer data types are:


• Bytes
• Shortint
• Integer
PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION
AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 21
• Word
• Long int

______ consist of positive and negative whole valves.


Integers

Examples, are 500, - 112, 77 etc.

______ consist of valves with fractional parts. Examples are 257.29, 20.10,
11.00, etc.
Real numbers
The standard real data types are:
• Real
• Single
• Double
• Extended

______ are valves that are not numbers in nature.


Non-Numeric Data Types

______ consists of representations of individual characters using the


American Standard Code for Information Interchange (ASCII).
Character Data Type This

ASCII uses _____-bits to represent each character.


7

ASCII means______
American Standard Code for Information Interchange

A _____ consists of a sequence of characters enclosed in single or double


quotation marks depending on the programming language.
String

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 22
Numeric data types are either integers or real numbers.
True

There are basically _____types of data types


Two
______ is a means of organising related data items.
Data structure

There are _____ basic types of data structures


Two

There are two basic types of data structures_____


Linear data structures and non-linear data structures

An ______ can be defined as sequences of objects all of which are of the same
type that are collectively referred to by the same name.
Array

There are _____ types of arrays


Two

There are two types of arrays______


One dimensional array and multi dimensional arrays

A _____ is a sequence of zero or more elements called nodes, each containing


two kinds of information
Linked list

A linked list is a sequence of zero or more elements called______, each


containing two kinds of information
Nodes

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 23
In every linked list, there is a special pointer which is called the _____ which
is used to indicate the absences of a node successor.
Null

A _____ is a data structure in which insertion and deletion can only be done
at one end (called the TOP).
Stack

A stack is a data structure in which insertion and deletion can only be done
at one end called the_____.
TOP

In a stack, there are two major processes called_____.


PUSH and POP

______ is the process of adding elements to the stack


PUSH

______ is the process of deleting elements from the stack.


POP

LIFO means______
Last-In-First-Out

______ are used in implementing recursive algorithms.


Stacks

A _____ operates a First-In-First-Out (FIFO) scheme.


Queue

Unlike the stack, a ______ is a data structure with two ends, in which an
insertion is made at a end (REAR) and a deletion is done at the other end
(FRONT).
Queue

______ are used for several graph problems.


Queues

______ is a partially ordered data structure that is used in implementing


priority queues.
Heap

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 24
A _____ is a set of items with an orderable characteristic called an item's
priority.
priority queue

A priority queue is a set of items with an orderable characteristic called


an_____.
item's priority

A ______can also be defined as a binary tree with keys assigned to its nodes.
Heap

A graph consists of two things______


A set V whose elements are called vertices, points or nodes and a set E
of unordered pairs of distinct vertices, called edges.

A graph can be pictorially (imaginarily) defined as a connection of points in a


plane called vertices or edges, some of which are connected line segments
called______.
edges or arcs

A _____ is a connected a cyclic graph.


Tree

______ is a means of organising related data items.


Data structure

A data structure could be either______.


linear or non-linear

The basic linear data structures available are


 Array
 Linked list
 Stack
 Queue
 Heap

The basic non-linear data structures are _____ and trees.


Graph

The basic non-linear data structures are graph and_____.


Trees

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 25
The basic non-linear data structures are______.
graph and trees

The _____ are used to analyse the performance of algorithms.


efficiency attributes

There are _____ types of algorithm efficiency attributes.


Two

_____ indicates how fast an algorithm runs.


Time Efficiency

_____ deals with the space required for an algorithm to run efficiently.
Space Efficiency

The third symbol of the language of asymptotic is the______.


‘θ’

The _____ efficiency of an algorithm is an input (or inputs) of size n for which
the algorithm runs the fastest among all possible inputs of that size.
best-case

The ______ efficiency seeks to provide information on random input.


average-case

_______ is calculated by dividing all instances of size n into several classes so


that for each instance of the class, the number of times the algorithm’s basic
operation is executed is the same.
Average-case

Problems that can be solved in polynomial time are called _____


Tractable

Problems that cannot be solved in polynomial time are called______.


Intractable

______ classifies problems according to their inherent difficulty.


Computational complexity

Class P is a class of decision problems that can be solved in polynomial time


by (deterministic) algorithms. This class of problems is called_____.
Polynomial

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 26
The problem of vertex colouring with m colours is called the _____
m-colouring problems

The answer to this question turns out to be no. In fact, some decision
problems cannot be solved at all by any algorithm. Such problems are
called______.
Undecidable

Alan Turing gave a famous example in_____.


1936

The problem in question is called the ______ : given a computer program and
an input to it, determine whether the program will halt on that input or
continue working indefinitely on it.
Halting problem

The classic monograph by ______ contains a list of several hundred such


problems from different areas of computer science, mathematics, and
operations research.
M. Garey and D. Johnson (GJ79)

A _____ takes both I and S as its input and outputs yes if S represents a
solution to instance I.
deterministic algorithm

A nondeterministic algorithm is said to be _____ if the time efficiency of its


certification stage is polynomial.
nondeterministic polynomial

Class NP is the class of decision problems that can be solved by


nondeterministic polynomial algorithms. This class of problems is
called_____.
nondeterministic polynomial

A decision problem D is said to be NP-complete if


1. it belongs to class NP
2. every problem in NP is polynomially reducible to D.
The class of decision problem that can be solved in polynomial time by
(deterministic) algorithms are called _____
Polynomial problems

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 27
Decision problems that cannot be solved at all by any algorithm are called
______ problems.
Undecidable

Decision problems that cannot be solved at all by any algorithm are


called______.
undecidable problems

Problems that can be solved in polynomial time are called ______


Tractable

Problems that which cannot be solved in polynomial time are ______


Intractable

The following are the significance of sorting


 For orderly analysis and presentation of items
 For locating an item or items within a set
 For finding duplicate values or nearest pair within a set
 For finding the intersection or union of two or more sets
 Sorting is also used as a part of many geometric algorithms (eg convex
hull, nearest pair of points in the plane).

______ is an example of an application that adopts the strategy of the divide-


and-conquer technique.
Merge sort

Merge sort adopts the strategy of_____.


divide-and- conquer

Merge sort algorithm is divided into:______


The merge sort (for splitting and sorting halves ) and the merger( for
merging two halves together).

Merge sort algorithm is divided into ______


Two

______ divides the input elements according to their respective values.


Quick sort

The ______ is a remarkably efficient algorithm for searching in a sorted


array.
binary search

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 28
______ is an optimisation technique which belongs to the family of local
search.
Hill climbing

Hill climbing is an optimisation technique which belongs to the family


of_____.
local search

______ can be used to solve problems that have many solutions but where
some solutions are better than others.
Hill climbing

An example of a problem that can be solved with hill climbing is the______.


Travelling salesman problem

Hill climbing is used widely in ______fields, for reaching a goal state from a
starting node.
artificial intelligence

A _____ (or any other grid) is a sequence of moves by a knight chess piece
(which may only make moves which simultaneously shift one square along
one axis and two along the other) such that each square of the board is
visited exactly once.
knight's tour of a chessboard

______ proposed an algorithm that finds a path without any backtracking by


computing ratings for "successor" steps at each position.
Warnsdorff (1823)

______ discovered another linear time algorithm and proved that it solves the
Hamiltonian path problem for all n ≥ 5.
Conrad et al. (1994)

_____is a series of steps, each of which performs a calculation


procedural program

______ is the result of the compilation process


object code

______ is where the clear statement of the problem is stated


Problem Analysis

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 29
There are_____ levels of the programming language
Four

______ generation of computers was coded in machine language


first

______ allows a program to be retrieved from the disk


An editor

______ program is a continuous loop that responds to events that are


generated in an unpredictable order
Event driven

Some advantages of high-level language are as follows except______


Used on few computer

______ is a program that converts programs written in assembly


Assembler

______ stages are involved in developing an efficient program.


Five

Partition-Exchange Sort is also known as______


Quicksort

Which of the options divide its input's elements according to their position
in the array?
Mergesort

Which of the options divide its input's elements according to their value?
Quicksort

Which of the following algorithms works by recursively breaking down a


problem into two or more sub-problems of the same type?
divide and conquer

Which of the following sorting algorithms maintain the relative order of


records with equal keys?
Stable

______ is a finite sequence of unambiguous instructions

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 30
an algorithm

______ allows a program to be retrieved from the disk


An editor

______ is a program that converts programs written in assembly


Assembler

The artificial intelligence programming community has been active since the
early______
1960s

Programming_____ are languages through which we can instruct the


computer to carry out some processes or tasks
Languages

A_____ is a program that translates another program written in any


programming language other than the machine language
Translator

______ allows a program to be retrieved from the disk


An editor
______ program is a continuous loop that responds to events that are
generated in an unpredictable order
event driven

______ is a program that converts programs written in assembly


Assembler

______ system testing is designed to ensure that the system requirements


and specifications are achieved
Functional

COBOL, FORTRAN, C, C++ are examples of a (an)_____


Procedural Programming

Another name for assembly language is_____


Low-level language

The two efficiency attributes used to analyze the performance of an


algorithm are time and_____
Space

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 31
The two efficiency attributes used to analyze the performance of an
algorithm are _____ and space
Time

______ (1823) proposed an algorithm that finds a path without any


backtracking
Warnsdoff

The full meaning of the acronym ANSI is______


American National Standards Institute

______ attributes is used to analyse the performance of algorithm


Efficiency

Source code is the coded instruction given to the computer in a______


language in order to accomplish a given task
Programming

______ is the fifth stage of algorithm design


Evaluation

Another name for nondeterministic stage is_____


Guessing

______ algorithms require dividing problems into subinstances


divide-andconquer

_______ sort can compare adjacent elements of the list and exchange them if
they are out of order
Bubble

______ complexity classifies problems according to their inherent difficulty.


Computational

The _____ allows a program to be retrieved from the disk and amended as
necessary.
Editor

______ sort divide its elements according to their values


Quick

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 32
Among all elementary sorting methods, ______ sorting is an inferior choice
Bubble

The more frequently used natural measures of size for a situation where the
choice of a parameter indicating an input size is not really a factor is called
______ order n.
Matrix

The ______-case efficiency seeks to provide information on random input


Keywords

A loader _____ or ensures the running of a machine-oriented program by


combining it with any necessary software also in machine-oriented form
Linker

______ is the process of adding elements to the stack


PUSH

A procedure for solving computational problems is called an______


Algorithm

Decision problems that cannot be solved at all by any algorithm are


called_____ problems
Intractable

The_____ function is used in most programming languages to get a


remainder when a number is divided by another number
MOB

Algorithms that do not recall back the same algorithm or function are
referred to as being______
Non-recursive

Real numbers consist of values with ______ parts


Fractional

______ analysis is the first stage involved in developing an efficient program


Problem

The major standard integer data-types are real, single, double and______
Extended

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 33
_______ sort scan the entire given list to find its smallest element
Selection

The object code is the result of the compilation process and it is also
referred to as the_____ code
Target

The search that is based on both a recursive and nonrecursive algorithms is


called______ search
Binary

Class NP is the class of decision problem that can be solved by_____


polynomial algorithms
Nondeterministic

A ______ is a partially ordered data structure that is used in implementing


priority queues
Heap

A_____ Tree is a connected graph.


Acyclic

______ is a fast and easy way to transverse an array of a given set of


elements
Bubble sort

A graph with no cycle is called_____


Forest

A programming language must have______ rules for forming statements


Syntactic

Sorting is the arrangement of items in a_____ order


Predetermined

The two major reasons for documentation are _____ and extensibility
Clarity

The two major reasons for documentation are clarity and ______
extensibility

The two major reasons for documentation are _____

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 34
clarity and extensibility

The fundamental building blocks of object-oriented programming are object


modelling, classification and______
Inheritance

______ is a sequence of zero or more elements called nodes


Linked list

Low level programming is also called______


Coding

______ efficiency seeks to provide information on random input


average-case

______ consist of positive and negative whole values


Integers

______ is a means of organising related data items


Data structure
There are_____ levels of the programming language
Four

This is the final stage of program development______


Documentation

_____ is the result of the compilation process


Object code

The normal program execution consists of_____ stages


Four

_____ is a finite sequence of unambiguous instructions


an algorithm

______ is a data structure in which insertion and deletion can only be done
at one end
Stack

______ is an optimisation technique which belongs to the family of local


search
Hill climbing

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 35
______ is designed to communicate signal between CPU and the monitor
Vitual Graphic Interface

VGA means______
Vitual Graphic Interface

______ generation of computers was coded in machine language


Fourth

_____ programming language is also called assembly language


low level

A graph can be pictorially defined as a connection of points in a plane called


______ or edges
vertices

A graph can be pictorially defined as a connection of points in a plane called


vertices or _____
Edges

Languages can be used to execute a wide range of______


Algorithms

_______is a data structure in which insertion and deletion can only be done
at one end
Stack

_______this indicates how fast an algorithm runs


Time efficiency

_______programmers are those who design and maintain the basic software
that runs the system
System

The three popular methods used to develop a logic plan are


flowcharts,______ and a top-down chart
pseudo-code

_______ is the path that starts and ends at the same vertex and passes
through all the other vertices exactly once
Hamiltonian circuit

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 36
A data structure in which insertion and deletion can only be done at one
end is called a______
Character

A finite sequence of unambiguous instructions for solving a problem is


called_____
Source Code

Java is an example of a (an)______


Object Oriented Programming

The languages through which we can instruct the computer to carry out
some processes is called_____
Programming

A set of codes that instructs the computer to carry out some processes is
called_____
A program

Programming languages are languages through which we can instruct______


the computer

______ is a program that converts programs written in assembly


Assembler

There are_____ levels of programming languages


Three

_____ is an optimisation technique which belongs to the family of local


search
Hill climbing

Low level programming is also called______


Assembly language

______ efficiency seeks to provide information on random input


Average-case

______ is a sequence of zero or more elements called nodes


Linked list

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 37
______ is a means of organising related data items
Data structure

______ is the process of writing programs


Programming

______ program is a collection of cooperating processes


Concurrent

PLEASE PATRONISE US FOR MORE EXAM SUMMARY, PAST QUESTION


AND TMA (30/30) - WHATSAPP 08024665051, 08169595996 Page 38

You might also like