S04- Theory of Computation

0.0(0)
studied byStudied by 3 people
0.0(0)
full-widthCall with Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/52

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

53 Terms

1
New cards

Finite set

A set whose elements can be counted off by natural numbers up to a particular number

2
New cards

Infinite set

A set which has no end value

3
New cards

Cardinality

The number of elements in a finite set

4
New cards

Cartesian product

Set of all ordered pairs (a,b) where a is a member of set A and b is a member of set B

5
New cards

Proper subset

If A is a subset of, but not equal to B

6
New cards

Set

An unordered collection of values or symbols in which each value or symbol occurs at most once

7
New cards

Countable

A set which can be counted off against a subset of natural numbers

8
New cards

Countably infinite set

A set where you can count the elements off against the set of natural numbers

9
New cards

Subset

If every member of A is also a member of set B

10
New cards

Regular language

Language that can be expressed with a regular expression

11
New cards

Turing machine

A theoretical concept that can carry out any computer algorithm no matter how complex

12
New cards

Behaviour of a turing machine and why

Behaves like an interpreter, it reads one instruction at a time, executes these instructions, instructions are stored on the tape

13
New cards

Characteristics of a Turing machine

Has a finite set of states in a state transition diagram. A finite alphabet of symbols. An infinite tape with marked-off squared. A sensing read-write head that can travel along the tape, one square at a time.

14
New cards

Halting state

State with no outgoing transitions, causes the program to stop

15
New cards

States that a Turing machine must have

Start state, halting state (causes it to halt for some inputs)

16
New cards

Contorller

A Finite State Machine which tells the machine what to do next. Read, Erase/Write, Move

17
New cards

Transition function

delta(current state, input symbol)=(next state, output symbol, head move)

18
New cards

Universal Turing Machine

Turing Machine that can execute/simulate the behaviour of any other Turing machine, can compute any computable sequence.

19
New cards

How does a Universal Turing Machine work

Faithfully executes operations on the data precisely as the simulated Turing Machine does. Instructions of TM and its inputs are stored on the UTM’s tape

20
New cards

What did the invention of UTM lead to

Idea of the stored program computer

21
New cards

Context-free grammar

Set of recursive rules used to generate patterns; it is used to describe context free languages. They include regular languages but not vice-versa

22
New cards

Disadvantages of regular expressions

Regex can be used to describe simple “languages” and to match patterns in text, but it is time-consuming to define a valid identifier using regex

23
New cards

Why do we need BNF

  • An instruction for a computer must not be ambiguous in any way

  • A programming language requires strict and precise rules

  • BNF can be used by compiler writers to represent the precise syntax of a programming language instructions

24
New cards

Size of a problem

Could be the magnitude of the input (if a number) or the size of input list

25
New cards

Execution time vs problem size

Always a trade-off, can’t have both

26
New cards

Time complexity

How fast an algorithm runs

27
New cards

Space complexity

How much memory its variables need

28
New cards

Time-efficient problem

If its execution ends in max polynomial time

29
New cards

Constant complextiy

O(n), the best time complexity

30
New cards

Logarithmic complexity

O(logn)

31
New cards

Linear complexity

O(n)

32
New cards

Polynomial complexity

O(n2)

33
New cards

Exponential complexity

O(n!), the worst time complexity

34
New cards

Bubble sort time complexity

O(n2)

35
New cards

Merge sort time complexity

O(nlogn)

36
New cards

Computable problem

If there is an algorithm that can solve every instance of it in a finite number of steps

37
New cards

Halting problem

Determining if, for a given input, a program will finish running or continue forever

38
New cards

Tracetable problems

Problems that have a polynomial-time solution (or better)

39
New cards

Intractable problems

Problems that have no polynomial (or less) time solution

40
New cards

Heuristic solutions

Large number of heuristic solutions are used to tackle intractable problems

41
New cards

Computational problem

A problem that can be solved in an algorithm

42
New cards

Representational Abstraction

The process of removing unnecessary details so that only information that is required to solve the problem remains

43
New cards

Abstraction by generalisation/categorisation

The concept of reducing problems by putting similar aspects of a problem into hierarchial categories

44
New cards

Information hiding

The process of hiding all details of an object that don’t contribute to its essential characteristics

45
New cards

Procedural abstraction

Concept that all solutions can be broken down into a series of procedures or subroutines; basis of top-down design

46
New cards

Top-down design

Related to modular approach, this starts with the main system at the top and breaks it down into smaller and smaller units

47
New cards

Functional abstraction

Breaking down a complex problem into a series of reusable functions

48
New cards

Data abstraction

Hiding how data is represented so that it is easier to build a new kind of data object

49
New cards

Problem abstraction/reduction

Removing unnecessary details in a problem until the underlying problem is identified to see if this is the same as a problem that has already been solved

50
New cards

Decomposition

Breaking large complex tasks or processes down into smaller, more manageable tasks; abstraction techniques will be used to decompose the system requirements

51
New cards

Composition

Process of creating a working system from the abstraction

52
New cards

What does composition involve?

  • Writing all the procedures and linking them together to create compound procedures

  • Creating data structures and combining them to form compound structures

53
New cards

Automation

Process of creating computer models of real-life situations and putting them into action