Graphs and Hashing Data Structures

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

1/43

flashcard set

Earn XP

Description and Tags

Comprehensive fill-in-the-blank practice flashcards covering graph data structures, representations, traversals (BFS & DFS), hashing components, collision resolution methods, and practical applications.

44 Terms

1
New cards

A graph can be viewed as a cyclic tree where the vertices maintain complex relationships instead of a __________ relationship.

parent-child

2
New cards

In a directed graph, an edge from vertex AA to vertex BB designates vertex AA as the initial node and vertex BB as the __________ node.

terminal

3
New cards

In an undirected graph, the ordered pair (u,v)(u, v) and the pair __________ are considered identical.

(v,u)(v, u)

4
New cards

In graph theory, a path is called a closed path if the initial node is identical to the __________ node.

terminal

5
New cards

A path that contains no repeated edges or vertices, except for the first and last vertices, is defined as a __________.

cycle

6
New cards
<p>In graph terminology, an edge that is associated with the exact same end points is called a __________.</p>

In graph terminology, an edge that is associated with the exact same end points is called a __________.

loop

7
New cards

A vertex in a graph that has a degree of zero is termed an __________ node.

isolated

8
New cards

According to the graph degree theorem, the sum of the degrees of all vertices equals twice the number of __________.

edges

9
New cards
<p>The complete graph shown in the diagram containing 4 vertices is denoted as __________.</p>

The complete graph shown in the diagram containing 4 vertices is denoted as __________.

K4K_4

10
New cards

A complete graph containing nn vertices contains exactly __________ edges.

n(n−1)2\frac{n(n-1)}{2}

11
New cards

An adjacency matrix represents a graph with VV vertices using a binary matrix of dimensions __________.

V×VV \times V

12
New cards

In an adjacency matrix representation of a graph, querying whether an edge exists between two vertices takes __________ time.

O(1)O(1)

13
New cards

A major disadvantage of an adjacency matrix is that adding a new vertex takes __________ time.

O(V2)O(V^2)

14
New cards
<p>The graph representation depicted in the figure, which uses an array of linked lists corresponding to vertex neighbors, is an __________.</p>

The graph representation depicted in the figure, which uses an array of linked lists corresponding to vertex neighbors, is an __________.

adjacency list

15
New cards

An adjacency list representation of a graph saves space by requiring a total space complexity of __________.

O(∣V∣+∣E∣)O(|V| + |E|)

16
New cards

Breadth-First Search (BFS) explores vertices level by level using a __________ data structure.

queue

17
New cards

To prevent infinite loops during graph traversal caused by cycles, algorithms maintain a boolean __________ array.

visited

18
New cards

The network flow algorithm that utilizes BFS to find the maximum flow in a capacitated network is the __________ algorithm.

Ford-Fulkerson

19
New cards

A graph whose vertices can be partitioned into two independent sets UU and VV such that no edge connects vertices of the same set is called a __________ graph.

bipartite

20
New cards

Depth-First Search (DFS) explores paths as deeply as possible before backtracking and inherently relies on a __________ data structure.

stack

21
New cards

A linear ordering of all vertices in a Directed Acyclic Graph (DAG) such that vertex uu appears before vv for every edge (u,v)(u, v) is called __________.

topological sorting

22
New cards

For finding Strongly Connected Components in a directed graph, Kosaraju's Algorithm requires __________ passes of DFS.

two

23
New cards

Tarjan's Algorithm identifies Strongly Connected Components (SCCs) in a directed graph using a __________ pass of DFS.

single

24
New cards

The transformation of variable-sized input data into a fixed, small-sized index value is known as __________.

hashing

25
New cards

The three fundamental components of hashing are the key, the hash function, and the __________.

hash table

26
New cards

In the division method of hashing with table size MM, the hash formula is given by h(k)=h(k) = __________.

k mod Mk \bmod M

27
New cards

The hash function method that squares the key and extracts the middle digits is the __________ method.

mid-square

28
New cards

The hash function method that partitions a key into parts and adds them modulo the table size is the __________ method.

folding

29
New cards

For secure data storage, passwords are saved as non-reversible __________ rather than plain text.

fingerprints

30
New cards

In blockchain technology, blocks are linked via hashes to guarantee permanent __________.

immutability

31
New cards

The string-matching algorithm that uses hashing to compare pattern segments rapidly against text segments is the __________ algorithm.

Rabin-Karp

32
New cards
<p>The memory-efficient probabilistic data structure depicted below, which tests set membership with a small margin of error using a bit array, is a __________.</p>

The memory-efficient probabilistic data structure depicted below, which tests set membership with a small margin of error using a bit array, is a __________.

Bloom filter

33
New cards

In image processing, __________ hashing produces a compact signature of visual features to identify duplicate images despite resizing or compression.

perceptual

34
New cards

Compilers organize identifiers, variable names, and scope information in a hash-based structure known as a __________.

symbol table

35
New cards

In 3D computer graphics, objects are placed into grid cells using __________ hashing to accelerate collision detection.

spatial

36
New cards

In separate chaining, multiple keys hashing to the same slot are stored within a singly-linked list called a __________.

chain

37
New cards

If a chain in separate chaining becomes excessively long, the search time in the worst case degrades to __________.

O(n)O(n)

38
New cards

In open addressing, all elements reside within the hash table itself, requiring the table size to be __________ the total number of keys.

greater than or equal to

39
New cards

The open addressing technique that sequentially searches for the next adjacent slot when a collision occurs is called __________ probing.

linear

40
New cards

While linear probing offers the best cache performance, its primary drawback is that it suffers from __________.

clustering

41
New cards

In quadratic probing, the algorithm resolves clustering by searching for the __________ slot in the ithi\text{th} iteration.

i2’thi^2\text{'th}

42
New cards

In double hashing, the offset for the ithi\text{th} probe rotation is computed using the formula __________.

i×hash2(x)i \times \text{hash}_2(x)

43
New cards
<p>The process shown in the diagram, in which a hash table is expanded and its entries are redistributed into new slots, is called __________.</p>

The process shown in the diagram, in which a hash table is expanded and its entries are redistributed into new slots, is called __________.

rehashing

44
New cards

The decisive parameter that determines when to rehash, defined as the number of stored items divided by the table size, is the __________.

load factor