Skip to content
UoL CS Notes

Home

This website houses notes from my studies at the University of Liverpool. If you see any errors or issues, please do open an issue on this site's GitHub.

Introduction to C and Memory Management

COMP281 Lectures

Hello, world! A “Hello, world!” program would look something like so: #include <stdio.h> int main(void) { printf("Hello, World!\n"); return 0; } You can then compile and run with the following commands: $ gcc hello.c $ ./a.out Hello, world! Properties of C Advantages C is almost a portable assembly language. It...

Read More

Asymptotic Notation

COMP202 Lectures

This type of notation allows for the characterisation of the main factors affecting running time. Big-O Notation Given two positive functions (algorithms) $f(n)$ and $g(n)$, defined on non-negative integers, we say: \[f(n) \text{ is } O(g(n))\] or equivalently: \[f(n) \in O(g(n))\] if there are constants $c$ and $n_0$ such that:...

Read More

CASE - Testing & Debugging Tools

COMP285 Lectures

In-Circuit Emulator (ICE) This does all the functions of a software debugger but at the machine instruction level. ICE replaces the CPU in the target motherboard. Very useful for embedded debugging: Smartphones DVD Players ICE Features Breakpoint before instruction execution. Breakpoint on complex conditions: Write particular data value to a...

Read More

Introduction to Scripting Languages

COMP284 Lectures

Scripting Languages Scripts are user-readable and user-modifiable programs that perform simpler operations and control the operation of other programs. They have the following properties: Program code is present at run time and the starting point of execution: Compilation is not needed. Compilation to intermediary languages may be performed behind the...

Read More

Algorithm Analysis Introduction

COMP202 Lectures

An algorithm is a sequence of steps for performing a task in a finite amount of time. The following properties of algorithms are in order of importance: Running Time (Time Complexity) Memory Usage (Space Complexity) Optimality of the output solution. Experimental Analysis of Algorithms This is the collection of empirical...

Read More

Introduction to CASE Tools

COMP285 Lectures

Computer-aided software engineering is the application of computer-assisted tools and methods in software development to ensure a high-quality and defect-free software. Why Tools are Used Software tools are used for the following reasons: Productivity Cost Accuracy Quality Safety When CASE is used properly: You will become a better software engineer....

Read More

The Chomsky Hierarchy

COMP218 Lectures

This is the order of how powerful various languages are in comparison to each-other. Unrestricted Grammars These grammars are made of a string of variables and terminals that lead to a string of variables and terminals like so: \[\begin{aligned} S&\rightarrow aBc\\ aB&\rightarrow cA\\ Ac&\rightarrow d \end{aligned}\] This is very similar...

Read More

Undecidability of CFG Ambiguity

COMP218 Lectures

Post Correspondence Problem Given an infinite set of tiles the the following form: graph LR subgraph tile bab cc end This is like a domino but the top and bottom could also include the empty string. Undecidability of PCP \[PCP = \{\langle T\rangle \vert T \text{ is a collection of...

Read More

Market Basket Model

COMP207 Lectures

This is a basic technique for data-mining. Market-Basket Data Data can be described by: A set of items $I$. A set of baskets $B$: Each basket $b\in B$ is a subset of $I$. For example: Purchase ID Items Bought 101 milk, bread, cookies, juice 792 milk, juice 1130 milk, bread,...

Read More

Data-Mining

COMP207 Lectures

This is a more general form of OLAP. They refer to the discovery of patterns or knowledge in data Applications of Data-Mining Deviation Detection - Identifying anomalies such as intruders. Link Analysis - Trying the discover links between attributes. These can be used to make association rules. Predictive Modelling -...

Read More