CS1005

0.0(0)
studied byStudied by 10 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/166

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:59 PM on 11/18/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

167 Terms

1
New cards

Chinese Abacus

Way of mechanising adding

2
New cards

Babbage's Difference Engine

Automatic mechanical calculator designed to tabulate polynomial functions

3
New cards

Babbage's Analytical Engine

Decimal computer with notion of sequential instructions

4
New cards

Ada Lovelace

Created the first algorithm intended to be carried out by such a machine

5
New cards

Analogue

Continuously varying value, as in analogue signal

6
New cards

Digital

Varies in discrete steps

7
New cards

What is a computer?

A device that can be instructed to carry out arbitrary sequences of arithmetic or logical operations automatically

8
New cards

Z3 (Zuse)

First working electromechanical programmable, fully automatic digital computer.

Z3 was Turing complete

9
New cards

Colossus

The first programmable, electronic, digital computer.

Not Turing complete

10
New cards

Functions

Is a correspondence between a collection of possible input values and a collection of possible output values so that each possible input is assigned a single output

11
New cards

Turing machine

-Theoretical model of computer hardware

-Exists only as a description 'on paper'

-Given any computer algorithm, a TM machine can be designed to simulate that algorithm

12
New cards

Computing a function

Determining the output value associated with a given set of input values

13
New cards

Components of a Turing machine

-Infinite tape

-Read-write head

-A State register

-A finite table of instructions

14
New cards

What can Turing machines calculate?

-Computable numbers

-Computable Functions

15
New cards

What can't a Turing machine do

-Halting problem

16
New cards

Halting problem

A function that returns true if it halts

17
New cards

Automata theory

-Deals with the logic of computation with respect to simple machines, f

18
New cards

Automatons

are abstract models of machines that perform computations on an input by moving through a series of states or configurations

19
New cards

Characteristics of Automated machines

-Inputs

-Outputs

-States

20
New cards

Types of Automated machines

-Turing machine

-Finite state machines

21
New cards

State Transition Diagram

A diagram that indicates the possible states of automaton and the allowable transitions between such states.

-circles(nodes) represent a state

-arrows represent state transitions

-each arrow also represents one instruction

22
New cards

Universal Turing Machine(UTM)

A Turing machine which can stimulate an arbitrary input

reads from its own tape

-The definition of the TM being simulated

23
New cards

Finite state machines

-They are the simplest model of computation

-Small computer or controller

-They have a start state

-They can be used to accept or generate strings

24
New cards

State machine for Turing

-It is a finite state machine

-it has an initial state

-Final states where we stop computation

-The machine may enter into a loop where we do not stop

-It is a deterministic machine: every state has one transition we can take

25
New cards

Compilers

-Program source code compiled to machine code all at one time before program executes

-Fast = Especially because loops are compiled once

-Compiled for specific machines (Have to make compilation for each platform)

-Machine code is sold(Don't give away source code)

26
New cards

Interpreter

-Program source code translated to machine code line by line as program executes

-Slow = Especially because loops have to be translated many times

-The source code is what is sold

27
New cards

AUB

Union

28
New cards

A n B

Intersection of A and B

29
New cards

Cardinality

The size of a set, number of elements (members in a set)

30
New cards

A'

Not A

31
New cards

|A|

cardinality of A

32
New cards

Set

Is a collection of definite

33
New cards

Alphabet

A finite set of fundamental units

34
New cards

Language

A set of strings of symbols from the alphabet, plus rules specific to the language

35
New cards

Words

Those (finite) strings that are permissible in the language

36
New cards

Two kinds of rule sets

-Test valid words

-Generate all the words in the language

37
New cards

Concatenation

Join together

38
New cards

Reversing strings

Same string of letters in reverse order. Just because you reverse a word, doesn't mean it will be in your language.

39
New cards

Palindromes

Same word forwards and backwards

40
New cards

Closure * Kleene star

Make all combinations possible out of given characters.

41
New cards

Search and find

-Given a regular expression

-Search through a set of strings

-Find all of the matching instances

-Report what has been found, optionally with their location

42
New cards

Regular grammars

A regular grammar is left or right regular grammar, and defines a regular languages.

43
New cards

Left grammar

In a left regular grammar is a format grammar

B ::= a

B ::= Ca

B ::= E

44
New cards

Right grammar

Is a formal grammar such that all the production rules in P are one of the following forms:

B ::= a

B ::= aC

B ::= E

45
New cards

Backus-Naur form

Proposed a meta language to describe the syntax of the new high-level programming language. terminals are in <> and ::= is an arrow

::=

46
New cards

Grammars

are defined by (N, E, P, s)

-N = Set of non-terminals (rule names)

-E = Set Of terminals (input character)

-N and E are disjoint (have no members in common)

-P is a set production rules

-S is a starting non-terminal, and is a member of N

47
New cards

Logic

Is the science of valid reasoning.

48
New cards

Reasoning

about situations means constructing argument about them, so that the arguments are valid whether certain conclusion follow from some given assumptions.

49
New cards

Application

-Deductive systems

-Expert systems

-Correctness of programs

50
New cards

Proposition logic

-Concerned with propositions

-A proposition is an atomic sentence that can be either true or false, but not both or neither

51
New cards

Representing propositions

To represent propositions, propositional variables are used e.g p,q,r,t

52
New cards

Logical connectives

Used to combine simple if it cannot be broken up into sub-propositions

53
New cards

logical expression trees

To capture ordering of statements we can use logical expression

54
New cards

Truth table

Can help us to express complicated proposition and also to combine them.

55
New cards

Tautology

a statement that is always true

56
New cards

Contradiction

Invalid truth table.

57
New cards

Argument

A sequence of statements (known as premises) ending in a conclusion.

58
New cards

Validity of arguments

-To test the validity of an argument we use truth tables.

- Argument = valid if all conclusions are true.

59
New cards

Fallacy

An error in reasoning that results in an invalid argument.

60
New cards

Converse error

p ->q p therefore p

61
New cards

Inverse error

p ->q 'p therefore 'q

62
New cards

Hypothetical syllogism

if p -> q

q ->r

------------

p ->r

63
New cards

Modustollens (method of denying)

if p -> q

'q

---------

'p

64
New cards

Predicate logic

To overcome two limitations that we have in proposition logic.

Predicates describe either a property of a thing or a relationship between things.

65
New cards

Predicate

-Is a statement that contains variables.

-It becomes a proposition when the individual variables are bound to specific values, resulting to either true or false.

66
New cards

Combining predications

Since predications evaluate to truth values they maybe combined together using the logical connectives that were introduced in the propositional logic lecture.

67
New cards

Predicate calculus

The result of combining predicates and logical connectives.

68
New cards

Universes

Our logic deals with classes of things. They are referred to as the universe of discourse or universe or the domain of discourse.

69
New cards

Quantifiers

-Existential

-Universal

70
New cards

Existential quantifier

There exists, meaning at least one member of the universe.

71
New cards

Universal quantifier

For all (∀) meaning all members of the universe.

72
New cards

Universal conditional statements (UCS)

Using quantifiers

73
New cards

Inverse

If not p, then not q

74
New cards

Converse

If q, then p

75
New cards

Contrapositive

If not q, then not p

76
New cards

logically equivalent

is a universal conditional statement logically equivalent to its: inverse; converse; Contrapositive.

77
New cards

Computational modelling

Use of computers to stimulate and study the behaviour of complex systems using mathematics, physics and computer science.

78
New cards

Black box model

accurate, but no explaination

79
New cards

Glass box model

Less accurate, but explanation.

80
New cards

Petrinets

-Model of parallel & distributed systems

-Basic idea is to describe state changes in a system with transitions.

81
New cards

Types of petrinets

-Qualitative

-Quantitative

82
New cards

Bipartite graph

2 sets of nodes and 2 sets of arcs

83
New cards

Nodes

places(circles) and transitions (squares)

84
New cards

arcs

(arrows) from places to transitions, or from transitions to places.

-Arcs in both directions are permitted

-Arc weights by default are 1 but other values can be associated.

85
New cards

Discrete models

Where individuals are modelled using tokens

86
New cards

Continuous

results in smoothed behaviour

87
New cards

Stochastic

'Jumpy' curves based on random firing of transitions

88
New cards

Arithmetic progression

There is a constant difference between any two successive members of the sequence.

89
New cards

Geometric progression

Where there is a constant multiplier r to generate a new term. (common ratio)

90
New cards

Static linear data structures Advantages

Easy to create, easy to access items

91
New cards

Static linear data structures Disadvantages

Fixed size

-Need to set aside max space in memory that could be needed

-Can't extend/reduce size during computation

92
New cards

Dynamic data structure (list) Advantages

-Can increase/decrease size

-Can reclaim space

93
New cards

Dynamic data structure (list) Disadvantages

More complex and time consuming

94
New cards

Stacks

Special list where you can only insert and delete from one end. Items are added on a last-in-last-out basis.

Push (add)

Pop (remove & return)

95
New cards

Reverse Polish notation (RPN)

-Does not need any parenthesis as long as each operator has a fixed number of operands

96
New cards

RPN advantages

- Gets rid of need for brackets in expressions

- Speed advantages

- Faster than algebraic notation

- May be due to smaller number of key strokes

97
New cards

RPN Disadvantages

more difficult to learn

98
New cards

Queues

- First in, first out

- Items are inserted at one end (rear)

99
New cards

Enqueue

Insertion

100
New cards

Dequeue

Delete