RAH pt2 Flashcards

1
Q

Variables are using _________ to
redirect them to the memory
address

A

pointers

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

pointers are acting
as a __________ so that the
variable can be connected

A

function

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

__________ are associations when an element in a Set A is
directly associated to EXACTLY ONE element in Set B

A

Functions

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

T or F

Functions are applicable in a numeric manner

A

T

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

described as equations that will yield
a value depending on another numeric input.

A

Functions

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

is a well-defined, finite sequence of steps or
instructions designed to perform a specific task or solve a
problem.

A

algorithm

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

How does Efficient algorithms save time and resources

A

Faster code –> faster execution time –> lower energy and
financial costs –> lower consumption of fossil fuels –> lower
pollution

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

Measures the time an algorithm takes to run as a function
of the size of the input

A

Time complexity

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

measures the memory an algorithm requires during its execution

A

Space complexity

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

is used to describe the upper bound of an
algorithm’s running time or space requirements in terms of
input size.

A

Big O notation

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

helps benchmark and compare the performance of
algorithms

A

Big O notation

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

Domain

A

All possible inputs in a function

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

Range

A

all possible output from a function

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

input

A

the value you put in the function

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

output

A

the result you get out of a function

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

function with two arguments is
called a

A

binary

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

like a function except that it might not be
defined for some elements

A

Partial function

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

to mean a function that is defined on all its domain

A

total function

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

this function rounds down to the closest integer

A

Floor function

⌊x⌋

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

This function rounds up to the closest integer

A

Ceiling function

⌈x⌉

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

two integers, not both zero, is the
largest integer that divides them both.

A

Greatest common Divisior

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

Formula for mod?

A

5 mod 2
5/2 = 2.5
> take the floor of 2.5 which is 2 from 2.5
2*2 = 4
5-4 = 1
5 mod 2 == 1

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

We sometimes need to compute a list of values of a function. A useful tool
to accomplish this is the

A

map function

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

if a function’s range only one element but leaves one its called

A

Injective

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
if a function's range is multiple elements its called
Surjective
26
What is a injective and surjective function called?
Injective and Surjective
27
if a function's range is all the elements its called
Bijective
28
the function for bijective is called
bijection
29
is the information needed to encipher or decipher a message.
cipher key
30
which is a cipher that replaces repeated occurrences of a character in a message by the same character from the cipher alphabet
Monoalphabetic cipher
31
is a monoalphabetic cipher that enciphers each letter by using a multiplier as a key.
Multiplicative cipher
32
is a monoalphabetic cipher that combines additive and multiplicative ciphers.
affine cipher
33
is a function that maps a set S of keys to a finite set of table indexes,
hash function
34
able whose information is found by a hash function is called a
hash table
35
When two keys map to the same table index, the result is called a
collision
36
A set is __________ if it is finite
countable
37
if there is a bijection between it and N, a set is said to be _________
countably infinite
38
If a set is not countable, it is said to be __________
uncountable
39
What is a technique to know if a set is countable?
N X N
40
real numbers are uncountable.
Diagonalization
41
nonempty set of objects in which some of the objects may be connected to each other in some way.
Graph
42
What are the circles called in graphs?
bertices, nodes, points
43
What are teh connections called in graphs??
edges, lines
44
Two vertices are __________________ if there is an edge connecting them.
adjacent (or neighbors)
45
vertex is __________ if there are no edges connected to it.
isolated
46
we say the edge is __________ to one or both of the vertices, and the vertices are _____________ to the edge
incident
47
two distinct edges are ___________ if they share a common vertex
adjacent
48
________is an edge that starts and ends at the same vertex.
loop
49
If a graph has two or more edges between some pair of vertices, the edges are said to be ______________
parallel edges
50
graph with parallel edges is called a
multigraph
51
___________ is a graph where each edge points in one direction
Directed graph (digraph for short)
52
A graph is called ___________ if each edge is assigned a number
weighted
53
A graph (V′,E′) is a ___________ of a graph (V, E) if V′⊆V and E′⊆E.
subgraph
54
A subgraph H of a graph G is an ________________ if the edges of H consist of all possible edges of G over the vertex set of H
induced subgraph
55
graph problems involve moving from one vertex to another by traversing a sequence of edges, where each edge shares a vertex with the next edge in the sequence and there are no repeated edges or vertices. What is this called?
Path
56
graph is __________ if there is a path between every pair of vertices
connected
57
A digraph is ___________ if, when direction is ignored, the resulting ___________is connected.
weakly connected undirected graph
58
digraph is ___________ if there is a directed path between every pair of vertice
strongly connected
59
is a graph that is connected and has no cycles
Tree
60
vertices and edges of a tree are called _________ and ________, respectively
Nodes and branches
61
the node at the top of a tree is called the
root
62
The nodes that hang immediately below a given node are its
children
63
the node immediately above a given node is its
parent
64
If a node is childless, then it is a
leaf
65
of a tree is the length of the longest path from the root to the leaves.
height or depth
66
_________ of a node is the length of the path from the root to the node
level
67
Any path from a node to a leaf contains ___________ of the node
descendants
68
tree with a designated root is often called a ____________,Otherwise, it is called a ___________
rooted tree free tree or an unrooted tree
69
If x is a node in a tree T, then x together with all its descendants forms a tree S with x as its root. S is called a
subtree
70
f we don’t care about the ordering of the children of a tree, then the tree is called an
unordered tree.
71
A tree is __________ if there is a unique ordering of the children of each node.
ordered
72
____________ is an ordered tree that may be empty or else has the property that each node has two subtrees, called the ___________ and the _______
binary tree left subtree right subtree,
73
Binary trees can be used to represent sets whose elements have some ordering. Such a tree is called
Binary search tree
74
for a connected graph is a subgraph that is a tree and contains all the vertices of the graph
spanning tree
75
for a connected weighted graph is a spanning tree such that the sum of the edge weights is minimum among all spanning trees
minimal spanning tree
76
constructs a minimal spanning tree for any undirected connected weighted graph
Prim’s Algorithm
77