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.

$\epsilon$-NFA to Regex Translation

COMP218 Lectures

In order to make the translation simpler we take intermediary steps before reaching a regular expression: graph LR eNFA --> GNFA --> 2GNFA[2-State NFA] --> Regex --> eNFA A GNFA is a generalised non-deterministic finite automata. Simplifying $\epsilon$-NFAs To simplify an $\epsilon$-NFA we must ensure: It has only one accept...

Read More

Regular Expressions & Translation of Regex to NFA

COMP218 Tutorials

Give regular expressions for the following: The set of strings over alphabet $A=\{0,1\}$ that contains no two adjacent 1s: \[(1+\epsilon)(0^*01)^*0^*\] For the following state diagram: stateDiagram-v2 direction LR [*] --> 1 1 --> 1:a,b 1 --> 2:b 2 --> 3:a,b 3 --> 4:a,b 3 --> [*] 4 --> [*] \[(a+b)^*b(a+b)(\epsilon...

Read More

Regex to $\epsilon$-NFA Conversion

COMP218 Lectures

Regular languages such as: DFA NFA $\epsilon$-NFA Regular Expressions are all equally as powerful. They are called regular languages as they can be expressed in regular expressions. In order to convert from one to the other you can use the following flowchart: graph LR Regex --> eNFA --> NFA -->...

Read More

High Level Petri Nets

COMP201 Lectures

Classical Petri nets can have some problems: Petri nets can become too large and complex. It takes too long to model a situation. It is not possible to handle time or data. High level Petri nets include the following to handle this: Colour Time Hierarchy Colour Here is a standard...

Read More

Tutorial 2

COMP207 Lectures

This tutorial wasn’t that great. It would be much better if this was on a live database so I’ve got no idea if any of these are actually right. Part 1 Average grade: SELECT AVG(grade) FROM Enrolment WHERE s_id=1; Years of COMP207 teaching: SELECT COUNT(year) FROM CoursesInYear WHERE code='COMP207'; Students...

Read More

Requirements Engineering of Hotel Booking system

COMP201 Tutorials

Functional and non-functional requirements as well as stakeholders are covered in the lectures: Requirements Engineering Process Functional Requirements and Use Case Analysis Business Rules Buisness Rules Link a stake holder to a funciton: Guests can request a booking, only receptioning can confirm booking. This then can be used to create...

Read More

Modelling Based on Petri Nets

COMP201 Lectures

Petri nets are often used for distributed systems and for systems with resource sharing. Since there may be more than one transition in the Petri net active at a time and we don’t know which will fire first, they are non-deterministic. There are certain additions to Petri nets which make...

Read More

System Models (Mealy, Moore, Petri Nets & UML Diagrams)

COMP201 Lectures

Finite State Machines Refer to notes on Deterministic Finite Automata (DFAs) for information about finite state machines. There are several variant of finite state machines: Mealy Machines - Have actions (outputs) associated with transitions. Moore Machines - Have actions (outputs) associated with states. Nondeterministic Finite Automata (NFAs) & Epsilon-NFAs -...

Read More

System Models (Process Models, Data Flow & State Machines)

COMP201 Lectures

System models are abstract descriptions of systems. They explain the details of a system in a more technical way. System representations maintain all the information of a system. A system abstraction deliberately simplifies the system and picks the most important characteristics. System Model Weaknesses There are several weaknesses of system...

Read More

Java Socket Programming - TCP

COMP211 Lectures

Compared to UDP there are some differences: The client must contact the server: The server process must first be running. The server must have created a socket that welcomes the client’s contact. Clients contact the server by: Creating TCP socket, specifying IP address, port number of server process. When the...

Read More