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.
List Recursion Examples In this section we will be re-implementing the built in functions for operating on lists. take take' 0 list = [] take' n [] = [] take' n (x:xs) = x : take' (n - 1) xs With the two base cases the program will end in...
List Recursion Lists have a head and a tail. We use these command and pattern matching to recurse lists. Generally list recursions use the empty list [] as part of the base case. Consuming Lists sum' [] = 0 sum' (x:xs) = x + sum' xs The base case is...
More Examples of Direct Proof $\forall\ n$ if $n$ is an integer then $n$ is rational. Proof: Suppose that $n$ is a particular but arbitrarily chosen integer. $n=\frac{n}{1}$ By definition of a rational number $\frac{n}{1}$ is rational. $\forall\ r$ and $s$, if $r,s$ are rational then $r+s$ is rational. Proof:...
The seminar opened with a catch-up of the lectures that had been released during the week including:
Systems Development Life-Cycle
Requirement Elicitation
Gathering information from people.
Assignment
An overview of the assignment requirements and materials provided.
More effort should be put into accrediting team members in the meeting minutes.
More Complex Recursion and Guards Multiple Base Cases Each base case represents a different stopping position: isEven 0 = True isEven 1 = False isEven n = isEven (n - 2) fibonacci 0 = 0 fibonacci 1 = 1 fibonacci n = fibonacci (n - 1) + fibonacci (n -...
Recursion There is no such thing as a while loop in Haskell so you must use recursion to complete the same task. This links into Assignment 1 as it leans heavily on recursion. Factorial A recursive function is one that calls itself: factorial n = if n > 1 then...
Proving Existential Statements An existential statement is a statement in the form: \(\exists x\ Q(x)\) This means that there exists a value to which the function $Q(x)$ holds true. This may be under additional parameters. The easiest way to prove this is to find an $x$ that makes the function...
Notion of Proof Types of Numbers Natural numbers $\mathbb{N}$ are whole numbers that start from 0. Integers are whole numbers including negatives. Rational numbers are any number that can be represented as fractions without a denominator of 0. Real numbers are any decimal number that can be presented on a...
The process of obtaining, through systematic research the requirements of a system form the various users, customers and other stakeholders. Needs a principle approach as it is often hard for users to articulate their need or their business problems. Any system that doesn’t meet the users need is neither useful...
SAD seeks to understand what humans need to analyse data input or data flow systematically, process or transform data, store data, and output information in the context of a particular organisation or enterprise. Information - A Key Resource Information needs to be managed correctly. Managing computer-generated information differs from handling...