Classical Defintions Flashcards

1
Q

A function is computable if

A

given any input the computer provides the output within a finite amount of time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Edge decision problem

A

The input is a nondirected graph. The output is 1 if the number of edges in the graph is larger or equal than m, and it is 0 if the graph has a number of edges smaller than m.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Intuitively, what is the complexity of a function?

A

The complexity is the minimal amount of elementary operations that a computer needs to evaluate a function as a function of the input size n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Define a Boolean function

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define an m-valued Boolean function

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define a basis

A

A basis is a set of Boolean functions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

De Morgan basis

A

AND, OR, NOT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Monotone basis

A

AND, OR

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Define a logic circuit of n inputs

A

A logic circuit of n inputs is defined as a directed, acyclic graph
G = (V, E) for which each vertex v in V satisfies one of the following:
• v has indegree (fan-in) 0 and is called an input xi for some i in {1,2,…,n};
• v has in degree k > and is labelled with g in B , where g is a k-ary Boolean function and with an ordering on the incoming edges to v.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Axiom of Boolean Algebra: closure

A

There exists a domain Bn having at least two distinct element and two binary operations (and, or), such that if x and y are in Bn, so are (x and y) and (x or y)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Axiom of Boolean Algebra: identity elements

A

x or 0 = x
x and 1 = x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Axiom of Boolean Algebra: commutativity

A

x and y = y and x
x or y = y or x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Axiom of Boolean Algebra: distributivity

A

x or ( y and z ) = (x or y) and (x or z)

x and ( y or z ) = (x and y) or (x and z)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Axiom of Boolean algebra: complementation

A

If x is in B there exists x bar in b such that x and x bar is 0 and x or x bar is 1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

x and 1 =

A

x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

x or 0 =

A

x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

x bar bar =

A

x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

x or x =

A

x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

x and x =

A

x

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Theorem of Boolean algebra: associativity

A

x or ( y or z) = (x or y) or z = x or y or z

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Theorem of Boolean algebra: de Morgan’s law

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Write an expression for the XOR gate in terms of Boolean algebra

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Define a complete basis

A

A basis B is complete if any Boolean function can be computed in an B-circuit

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Define a min term

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Prove that the de Morgan basis is complete

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Define the size or complexity of a logic circuit

A

The size or complexity of a logic circuit S equals the number of its logic gates, and we denote this number by C(S)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Define the circuit complexity of a Boolean function

A

The circuit complexity CB (f ) of a Boolean function f with respect to a basis B is the smallest number of gates in a circuit over the basis B that computes f.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Define the depth of a logic circuit

A

The depth D(S) of a logic circuit S is the number of gates of the longest path of the circuit

30
Q

Define the depth of a function

A

The depth DB(f) of a function f with respect to the basis B is the minimal depth of a logic circuit with respect to B that computes f.

31
Q

Prove that if we have two complete bases one creates an upper bound on the depth and complexity of the other

32
Q

Asymptotic notation: big O

33
Q

Asymptotic notation: big Omega

34
Q

Asymptotic notation: big Theta

35
Q

Asymptotic notation: little o

36
Q

Asymptotic notation: little omega

37
Q

Fill in this table

38
Q

Shannon’s claim

39
Q

Graph colouring problem

A

given a nondirected graph and q colours. Can you colour the nodes of the graph so that no adjacent nodes have the same colour

40
Q

Hamiltonian cycle problem

A

given a nondirected graph. Does it have a Hamiltonian cycle? A Hamiltonian cycle is a cycle that passes through each vertex exactly once.

41
Q

Definition of a finite automaton

42
Q

Accept conditions of a finite automaton

43
Q

What does it mean for a finite automaton to recognise a language?

44
Q

Definition of regular operations

45
Q

Definition of regular expression

46
Q

Define a regular language

A

A language described by a regular expression is called a regular language.

47
Q

Theorem of regular

48
Q

Theorem of regular languages

A

A language a regular language if and only if some finite automaton recognises it.

49
Q

Define a non-deterministic finite automaton

50
Q

Acceptance conditions for a non deterministic finite automaton

51
Q

Compare a finite automaton and a Turing machine

A

The Turing machine is a generalisation of a finite automaton with the important difference that the automaton has an infinite tape on which it can write. This tape gives the machine a memory that it can use to perform more powerful computations than finite automata.

52
Q

What are the 4 components of a Turing machine?

A

We define a single tape Turing machine. The components of a Turing machine are visualised in Fig. 12. These consists of (a) a tape, which acts like a computer memory; (b) a read-write tape head that moves along the tape and can read and write symbols; (c) a state control that functions as a ”microprocessor” that coordinates the processes on the machine; (d) a program that contains instructions on what the tape head should do, and is akin to a computer program.

53
Q

What 3 things determine the state of a Turing machine at a given moment?

A

The state of the Turing machine at a given moment in time is determined by (a) the internal state of the state control; (b) the sequence of symbols that are present on the tape; (c) the position of the read-write tape-head. Every time instance, these three components are altered as determined by a line in the program, which constitute the elementary operations of this model of computation.

54
Q

Define a Turing machine

55
Q

How many Turing machines are there?

A

Since the sets constituting the states and the alphabets are finite, there exist a countable number of Turing machines

56
Q

Non deterministic Turing machine

A

We define the Nondeterministic Turing ¡achine similarly as we defined the nondeterministic finite automaton. The transition function is replaced by a transition function of the form below denoting the different possible transitions. If one path of the computation halts
in the accept state, then the machine accepts the input.

57
Q

Definition of a decider

A

We call a Turing Machine a decider if it halts on all inputs.

58
Q

Definition of a Turing decidable language

A

We call a language Turing-decidable if some Turing machines decides it

59
Q

Definition of a Turing recognisable language

A

We call a language Turing-recognisable if some Turing machines recognises it.

60
Q

Chomsky hierarchy of languages

61
Q

Definition of running time or time complexity of a Turing machine

A

Let M be a deterministic Turing machine that halts on all in- puts. The running time or time complexity of M is the function f : N -> N, where f(n) is the maximum number of steps that M uses on any input of length n.

62
Q

Definition of time complexity class

A

Let t : N -> R+ be a function. The time complexity class TIME(t(n)) is the collection of languages that are decidable by an O(t(n)) time Turing machine.

63
Q

Definition of class P

A

P is class of languages that are decidable in polynomial time on a deterministic single-tape Turing machine

64
Q

2 examples of languages in P

A

RELPRIME = {x, y|x and y are relatively prime}
Every regular language

65
Q

Define the running time of a non deterministic Turing machine

A

Let M be a nondeterministic Turing machine that is a decider. The running time of M is the function f : N ->N, where f(n) is the maximum number of steps that M uses on any branch of its computation on any input of length n.

66
Q

Define the nondeterministic time complexity class

A

The nondeterministic time complexity class NTIME(t(n)) is the collection of languages L that are decided by an O(t(n)) time nondeterministic Turing machine.

67
Q

Define NP

A

A language is in NP if and only if it is decided by some nondeterministic polynomial time Turing machine

68
Q

Examples of NP problems

A

the graph colouring problem
the Hamiltonian path problem

70
Q

Isomorphism between binary numbers and integers

72
Q

Explain the half adder and full adder circuits

A

The half adder has inputs A,B and outputs the direct sum (A + B) using XOR and the carry (A . B) using AND.

The full adder has inputs A,B and Cin (the carry-in) and has outputs the sum (A+B+Cin) and the carry (A.B) + (Cin.(A+B))

We use these to add multi-bit numbers, use the half adder on the least significant bits and use the carry there as the carry in for the first full adder on the next bits. Keep going until it’s done.

Write out the sums bitwise with the least significant bits at the end. If there is a carry out left over at the end add it to the front as it means there were not enough bits to represent the sum