1. Home
  2. Explore
  3. Mathematics
  4. Graphs, Matrices, and Computation

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Graphs, Matrices, and Computation

  • 45Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Vertex Elimination

In the vertex elimination game, what happens when a vertex is selected?

45 questions

  1. 1

    In the vertex elimination game, what happens when a vertex is selected?

    1. A

      It is marked, and every unmarked neighbor is connected to every marked neighbor

    2. B

      It is removed, and its unmarked neighbors are connected only if they have no other neighbors

    3. C

      It is marked, and edges are added between all pairs of its unmarked neighbors that are not already adjacent

    4. D

      It is removed, and all of its marked neighbors are connected to one another

    Correct answer
    C

    It is marked, and edges are added between all pairs of its unmarked neighbors that are not already adjacent

    Explanation

    The selected vertex is marked, and its unmarked neighbors are made pairwise adjacent by adding any missing edges.

  2. 2

    What is the goal when choosing the order of vertices in the elimination game?

    1. A

      To finish with as few edges as possible

    2. B

      To make every vertex have the same number of neighbors

    3. C

      To maximize the number of connected components

    4. D

      To finish with as many marked vertices as possible

    Correct answer
    A

    To finish with as few edges as possible

    Explanation

    The score is determined by the number of edges in the final graph, so the goal is to minimize that number.

  3. 3

    Why does eliminating a vertex sometimes add no edges?

    1. A

      Because eliminating a vertex always deletes its incident edges

    2. B

      Because a marked vertex cannot have any unmarked neighbors

    3. C

      Because edges are added only when a vertex has exactly one neighbor

    4. D

      Because its unmarked neighbors are already pairwise adjacent

    Correct answer
    D

    Because its unmarked neighbors are already pairwise adjacent

    Explanation

    The rule adds only missing edges between unmarked neighbors. If those neighbors are already adjacent, no edge needs to be added.

  4. 4

    Which property is guaranteed for the graph produced after all vertices have been eliminated?

    1. A

      It is complete

    2. B

      It is a tree

    3. C

      It is bipartite

    4. D

      It is chordal

    Correct answer
    D

    It is chordal

    Explanation

    The final graph from vertex elimination is always chordal, regardless of the elimination order.

  5. 5

    What does it mean for a graph to be chordal?

    1. A

      Every pair of vertices is connected by exactly one path

    2. B

      Every cycle with at least four vertices has an edge connecting two nonconsecutive vertices of the cycle

    3. C

      Every vertex has the same number of incident edges

    4. D

      Every cycle has an even number of vertices

    Correct answer
    B

    Every cycle with at least four vertices has an edge connecting two nonconsecutive vertices of the cycle

    Explanation

    A chord is an edge joining nonconsecutive vertices of a cycle. A graph is chordal when every cycle of at least four vertices has such an edge.

  6. 6

    For which starting graphs can vertex elimination be performed without adding any edges, using a suitable order?

    1. A

      Exactly the connected graphs

    2. B

      Exactly the chordal graphs

    3. C

      Exactly the graphs containing no cycles

    4. D

      Exactly the bipartite graphs

    Correct answer
    B

    Exactly the chordal graphs

    Explanation

    The elimination game can be played without adding edges if and only if the initial graph is chordal.

  7. 7

    Why can’t a four-cycle be eliminated without adding an edge?

    1. A

      A four-cycle has no vertices that can be marked first

    2. B

      The game requires every cycle to be made complete before elimination starts

    3. C

      Whichever vertex is selected first, its two unmarked neighbors are not adjacent

    4. D

      A four-cycle is already chordal, but the rules forbid selecting its vertices

    Correct answer
    C

    Whichever vertex is selected first, its two unmarked neighbors are not adjacent

    Explanation

    Selecting any vertex of a four-cycle first leaves two unmarked neighbors that are not connected, so the rules require adding an edge between them.

  8. 8

    What is the computational difficulty of finding the best elimination order on a general graph?

    1. A

      Finding an optimal order is NP-hard

    2. B

      Finding an optimal order requires only sorting the vertex degrees

    3. C

      Finding an optimal order is always possible in linear time

    4. D

      Finding an optimal order is impossible because the final graph is not determined

    Correct answer
    A

    Finding an optimal order is NP-hard

    Explanation

    Determining the best play—that is, an order that minimizes added edges—is NP-hard for arbitrary graphs.

  9. 9

    How is treewidth related to the elimination game?

    1. A

      It is obtained by minimizing the size of the largest complete subgraph formed during elimination

    2. B

      It is the total number of edges added over every possible elimination order

    3. C

      It is the number of connected components in the final chordal graph

    4. D

      It is the average number of marked neighbors at each elimination step

    Correct answer
    A

    It is obtained by minimizing the size of the largest complete subgraph formed during elimination

    Explanation

    Changing the score to minimize the size of the largest complete subgraph formed in the process leads to the notion of treewidth.

  10. 10

    How does an undirected graph correspond to a matrix in the sparse factorization setting?

    1. A

      The graph corresponds to the nonzero structure of a symmetric matrix

    2. B

      The graph corresponds to the eigenvalues of a nonsymmetric matrix

    3. C

      The graph corresponds to the inverse of a dense matrix

    4. D

      The graph corresponds to the diagonal values of a triangular matrix

    Correct answer
    A

    The graph corresponds to the nonzero structure of a symmetric matrix

    Explanation

    An undirected graph can be represented by a symmetric matrix whose nonzero pattern records the graph’s edges.

  11. 11

    What matrix operation represents choosing an ordering of graph vertices?

    1. A

      Scaling every row by its vertex degree

    2. B

      Taking the matrix’s transpose without changing its rows

    3. C

      Applying the corresponding symmetric permutation to the matrix

    4. D

      Replacing the matrix with its inverse

    Correct answer
    C

    Applying the corresponding symmetric permutation to the matrix

    Explanation

    Reordering graph vertices corresponds to applying the same permutation to the rows and columns of the symmetric matrix.

  12. 12

    What does the chordal graph created by vertex elimination represent in sparse Cholesky factorization?

    1. A

      The nonzero pattern of the matrix inverse in every case

    2. B

      The set of entries that must be removed from the matrix

    3. C

      The nonzero pattern of the Cholesky factor

    4. D

      The eigenvalue distribution of the original matrix

    Correct answer
    C

    The nonzero pattern of the Cholesky factor

    Explanation

    The fill edges created during elimination correspond to the nonzero structure of the Cholesky factor.

  13. 13

    What does the elimination-degree vector record for each vertex?

    1. A

      The number of lower-numbered neighbors it has before elimination begins

    2. B

      The number of edges removed from the graph at that step

    3. C

      The number of higher-numbered neighbors it has when it is eliminated

    4. D

      The number of connected components containing that vertex

    Correct answer
    C

    The number of higher-numbered neighbors it has when it is eliminated

    Explanation

    Each entry counts the vertex’s higher-numbered neighbors, which are precisely its unmarked neighbors at the time of elimination.

  14. 14

    What does the sum of the entries in the elimination-degree vector measure?

    1. A

      The number of cycles and the number of zero entries on the factor diagonal

    2. B

      The number of vertices and the number of Cholesky pivots

    3. C

      The number of edges in the eliminated graph and the number of nonzeros in the Cholesky factor

    4. D

      The number of connected components and the number of matrix rows

    Correct answer
    C

    The number of edges in the eliminated graph and the number of nonzeros in the Cholesky factor

    Explanation

    The sum counts the edges associated with the elimination process and gives the number of nonzeros in the Cholesky factor, which determines its storage requirement.

  15. 15

    If the elimination-degree vector has entries did_idi​, what quantity describes the flop count for the factorization, according to the content?

    1. A

      The sum of the squared entries, $�24�

    2. B

      The largest entry, $�24�

    3. C

      The number of zero entries, $�24�

    4. D

      The sum of the entries, $�24�

    Correct answer
    A

    The sum of the squared entries, $�24�

    Explanation

    The work in floating-point operations is described by the second moment of the vector: the sum of the squared entries, $�24�.

  16. 16

    According to the content, how does the fast-memory requirement of the multifrontal algorithm scale with the elimination-degree vector?

    1. A

      As the sum of all its entries

    2. B

      As the number of vertices times its smallest entry

    3. C

      As the square of its largest entry

    4. D

      As the square root of its average entry

    Correct answer
    C

    As the square of its largest entry

    Explanation

    The required fast memory scales as the square of the vector’s largest entry; this largest-entry measure is also identified with treewidth in this context.

  17. 17

    Which pairing correctly matches elimination-degree summaries with the resources they describe?

    1. A

      Sum: arithmetic work; sum of squares: fast memory; largest entry squared: storage

    2. B

      Sum: fast memory; sum of squares: storage; largest entry squared: arithmetic work

    3. C

      Sum: treewidth; sum of squares: storage; largest entry squared: number of vertices

    4. D

      Sum: storage; sum of squares: arithmetic work; largest entry squared: fast memory

    Correct answer
    D

    Sum: storage; sum of squares: arithmetic work; largest entry squared: fast memory

    Explanation

    The sum measures Cholesky storage, the sum of squares measures floating-point work, and the square of the maximum entry estimates fast-memory needs.

  18. 18

    What historical contribution is associated with Harry Markowitz in the discussion of sparse matrices?

    1. A

      He is credited with first using the term “sparse matrix”

    2. B

      He introduced the GraphBLAS C API

    3. C

      He developed the Julia programming language

    4. D

      He proved that every elimination graph is chordal

    Correct answer
    A

    He is credited with first using the term “sparse matrix”

    Explanation

    Markowitz is credited with being the first to call a sparse matrix a “sparse matrix,” in work connected to portfolio theory.

  19. 19

    How did the relationship between graph algorithms and sparse matrix computation change over time?

    1. A

      Sparse matrices replaced graphs entirely, leaving graph algorithms with no computational role

    2. B

      Large-scale graph computation preceded sparse matrix methods and did not benefit from them

    3. C

      Graph algorithms and sparse matrix computation developed independently and never exchanged techniques

    4. D

      Graph methods first supported sparse matrix computation, and later sparse-matrix techniques helped compute on large graphs

    Correct answer
    D

    Graph methods first supported sparse matrix computation, and later sparse-matrix techniques helped compute on large graphs

    Explanation

    Graph techniques were used for sparse matrix computation for decades; later, graph applications increasingly benefited from the parallel-computing expertise developed by sparse-matrix researchers.

  20. 20

    What is the central idea of GraphBLAS?

    1. A

      Restrict graph processing to real-valued matrix arithmetic

    2. B

      Convert every graph into a dense matrix before computation

    3. C

      Replace graph algorithms with numerical optimization

    4. D

      Express graph computations using linear algebra operations

    Correct answer
    D

    Express graph computations using linear algebra operations

    Explanation

    GraphBLAS uses linear-algebra-style operations to express and carry out graph computations.

  21. 21

    Why can GraphBLAS use operations other than ordinary real-number addition and multiplication?

    1. A

      Ordinary arithmetic cannot represent sparse matrices

    2. B

      Alternative operations are used only to make matrices dense

    3. C

      Graph algorithms can be expressed over different semirings suited to their tasks

    4. D

      GraphBLAS requires every matrix entry to be a string rather than a number

    Correct answer
    C

    Graph algorithms can be expressed over different semirings suited to their tasks

    Explanation

    GraphBLAS can use semirings other than the usual real or complex fields, choosing operations that fit the graph problem.

  22. 22

    Which semiring approach is identified with finding shortest paths?

    1. A

      Min-plus

    2. B

      Max-times

    3. C

      Real-field addition only

    4. D

      Boolean

    Correct answer
    A

    Min-plus

    Explanation

    The min-plus semiring is given as an approach for shortest-path computations.

  23. 23

    Which algebraic approach is identified with graph connectivity?

    1. A

      Min-plus arithmetic

    2. B

      Complex-field arithmetic

    3. C

      Ordinary matrix subtraction

    4. D

      Boolean algebra

    Correct answer
    D

    Boolean algebra

    Explanation

    Boolean algebra is identified as a way to compute connectivity.

  24. 24

    In the GraphBLAS interpretation described, what roles do semiring addition and multiplication typically play?

    1. A

      Addition processes information crossing edges, while multiplication deletes information at vertices

    2. B

      Addition creates edges, while multiplication guarantees that the graph is connected

    3. C

      Addition chooses vertex labels, while multiplication determines matrix dimensions

    4. D

      Addition aggregates information at vertices, while multiplication processes information crossing edges

    Correct answer
    D

    Addition aggregates information at vertices, while multiplication processes information crossing edges

    Explanation

    The operations are interpreted according to the algorithm: addition often aggregates data at vertices, and multiplication often processes data as it crosses edges.

  25. 25

    What do values in a GraphBLAS computation commonly represent?

    1. A

      Only the positions of the matrix diagonal

    2. B

      The number of processors in the system

    3. C

      Attributes associated with vertices and edges

    4. D

      The programming language’s memory addresses

    Correct answer
    C

    Attributes associated with vertices and edges

    Explanation

    The values in the semiring can represent attributes that live on graph vertices and edges.

  26. 26

    What challenge arises when expressing generic programming patterns in the GraphBLAS C API?

    1. A

      The API can operate only on graphs with one vertex

    2. B

      C cannot represent sparse matrices at all

    3. C

      Generic operations automatically make every computation sequential

    4. D

      The resulting C interface can become complicated and messy

    Correct answer
    D

    The resulting C interface can become complicated and messy

    Explanation

    The C API is precise and capable, but expressing generic-programming ideas in C can make the interface complicated.

  27. 27

    Which statement about SuiteSparse:GraphBLAS is supported by the content?

    1. A

      It is a programming language that replaced all C libraries

    2. B

      It is a graph format that cannot be used by other software

    3. C

      It is a major implementation that can handle extremely large hyper-sparse matrices

    4. D

      It stores only dense matrices with dimensions below one thousand

    Correct answer
    C

    It is a major implementation that can handle extremely large hyper-sparse matrices

    Explanation

    SuiteSparse:GraphBLAS is described as a notable implementation, capable of handling hyper-sparse matrices with dimensions as large as 2602^{60}260 by 2602^{60}260.

  28. 28

    What relationship between SuiteSparse:GraphBLAS and RedisGraph is mentioned?

    1. A

      RedisGraph is the C API that SuiteSparse:GraphBLAS implements

    2. B

      RedisGraph converts SuiteSparse:GraphBLAS matrices into dense arrays

    3. C

      SuiteSparse:GraphBLAS operates underneath RedisGraph

    4. D

      SuiteSparse:GraphBLAS is a replacement name for RedisGraph

    Correct answer
    C

    SuiteSparse:GraphBLAS operates underneath RedisGraph

    Explanation

    The implementation is described as living underneath RedisGraph, among other software.

  29. 29

    Which set best describes the different stages of work a programming language may need to support for graph and matrix computing?

    1. A

      Developing algorithms, experimenting at small or medium scale, and implementing selected algorithms at very large scale

    2. B

      Building hardware, training users, and maintaining databases

    3. C

      Drawing graphs, writing documentation, and converting programs into machine code

    4. D

      Defining mathematical theorems, grading coursework, and managing computer networks

    Correct answer
    A

    Developing algorithms, experimenting at small or medium scale, and implementing selected algorithms at very large scale

    Explanation

    The discussion distinguishes algorithm development, exploratory experimentation at varying scales, and production implementation at the largest scale.

  30. 30

    Why was MATLAB useful for exploratory matrix computing?

    1. A

      It offered interactive use, quick turnaround, and expressive operations within its domain

    2. B

      It required every algorithm to be rewritten in assembly language

    3. C

      It eliminated the need to represent matrices explicitly

    4. D

      It was designed only for running programs on the world’s largest machines

    Correct answer
    A

    It offered interactive use, quick turnaround, and expressive operations within its domain

    Explanation

    MATLAB supported interactive, expressive exploration with fast turnaround, especially for matrices at small scales.

  31. 31

    What change made MATLAB more useful for exploring graph algorithms?

    1. A

      Sparse matrices became available, allowing graph algorithms to be expressed through linear algebra

    2. B

      MATLAB stopped supporting matrix operations and added graph drawing instead

    3. C

      Its sparse matrices forced all graph algorithms to run on a supercomputer

    4. D

      It replaced vertex data with a fixed set of real-valued labels

    Correct answer
    A

    Sparse matrices became available, allowing graph algorithms to be expressed through linear algebra

    Explanation

    Once MATLAB supported sparse matrices, graph algorithms could be explored by expressing them in the language of linear algebra.

  32. 32

    How does the discussion characterize Julia’s place in the development of exploratory computing?

    1. A

      It is limited to implementing algorithms in Fortran 77

    2. B

      It is presented as a replacement for all parallel programming languages

    3. C

      It prevents users from experimenting with matrices at different scales

    4. D

      It continues a progression toward handling tasks that earlier approaches had struggled to support

    Correct answer
    D

    It continues a progression toward handling tasks that earlier approaches had struggled to support

    Explanation

    Julia is presented as a later step in a progression of tools for exploring graphs, matrices, and other problems across scales.

  33. 33

    Why are scheduling and locality important in very large-scale parallel computing?

    1. A

      They ensure that every operation uses the same amount of memory

    2. B

      They help manage parallel work and reduce communication

    3. C

      They eliminate the need to divide work among processors

    4. D

      They make all data globally available without cost

    Correct answer
    B

    They help manage parallel work and reduce communication

    Explanation

    High performance and scale introduce scheduling and locality concerns, particularly the need to reduce communication.

  34. 34

    How did MATLAB Star-P address some parallel-computing concerns?

    1. A

      It required programmers to manage every network message directly

    2. B

      It raised the level of its primitives so implementation details could be hidden beneath them

    3. C

      It made every data structure local to one processor

    4. D

      It replaced parallel operations with sequential loops

    Correct answer
    B

    It raised the level of its primitives so implementation details could be hidden beneath them

    Explanation

    The approach raised the abstraction level of the available primitives, allowing some parallel-computing details to be hidden underneath.

  35. 35

    What does PGAS stand for, and what programming model does it suggest?

    1. A

      Programmed Global Algorithm Sequence; a model that hides all data movement

    2. B

      Parallel Graph Arithmetic System; a model that stores all graph data on one processor

    3. C

      Partitioned Graph Access Syntax; a model that eliminates remote memory

    4. D

      Partitioned Global Address Space; a shared-memory illusion in which programmers can identify what is local

    Correct answer
    D

    Partitioned Global Address Space; a shared-memory illusion in which programmers can identify what is local

    Explanation

    PGAS means Partitioned Global Address Space. It gives the illusion of shared memory while making the distinction between local and remote data visible.

  36. 36

    In a PGAS program, what is the recommended approach to data access for high performance?

    1. A

      Keep as much work and data local as possible, while tolerating occasional remote access

    2. B

      Access remote data for every operation to balance processor loads

    3. C

      Avoid local data because it cannot be shared among processors

    4. D

      Move all data to one processor before beginning computation

    Correct answer
    A

    Keep as much work and data local as possible, while tolerating occasional remote access

    Explanation

    PGAS programming encourages keeping as much as possible local; occasional remote accesses can be acceptable if they are not too frequent.

  37. 37

    Why did fine-grained global communication become less suitable for newer parallel computers?

    1. A

      Modern machines cannot communicate between processors

    2. B

      Newer machines have no local memory

    3. C

      The machines no longer handled frequent small remote interactions as effectively, making bundled messages preferable

    4. D

      Fine-grained communication requires every processor to use a different programming language

    Correct answer
    C

    The machines no longer handled frequent small remote interactions as effectively, making bundled messages preferable

    Explanation

    The discussion contrasts older machines that handled fine-grained communication well with newer systems where programmers need to bundle messages and exchange them in batches.

  38. 38

    What is the main purpose of an aggregation library such as xStack or Conveyors?

    1. A

      To collect communication requests and send them in aggregated batches

    2. B

      To replace graph data structures with dense matrices

    3. C

      To convert parallel programs into sequential ones

    4. D

      To prevent programs from accessing remote data

    Correct answer
    A

    To collect communication requests and send them in aggregated batches

    Explanation

    The aggregation approach queues work and bundles communication, helping programs avoid relying on many fine-grained remote interactions.

  39. 39

    What kind of operation is illustrated by the distributed-array example in the content?

    1. A

      A reduction that sums every element into one local value

    2. B

      A graph traversal that visits vertices in alphabetical order

    3. C

      A matrix inversion that replaces every entry with its reciprocal

    4. D

      An indexed gather that uses local indices to select entries from a distributed table

    Correct answer
    D

    An indexed gather that uses local indices to select entries from a distributed table

    Explanation

    The example is an indexed gather: a process uses its local indices to select items from a distributed array and place them in a destination.

  40. 40

    What performance characteristic was attributed to the xStack code for the applications discussed?

    1. A

      It performed well only when every graph fit on one processor

    2. B

      It minimized bandwidth by avoiding all communication

    3. C

      It was slower than direct fine-grained communication in every case

    4. D

      It was highly efficient in bandwidth use, including use of bisection and injection bandwidth

    Correct answer
    D

    It was highly efficient in bandwidth use, including use of bisection and injection bandwidth

    Explanation

    The code was described as highly efficient for the target applications and as using much of the machine’s available bisection and injection bandwidth.

  41. 41

    What trade-off was observed in the xStack implementation?

    1. A

      It improved readability by sacrificing all communication efficiency

    2. B

      It made programs shorter but prevented them from handling graphs

    3. C

      It could be very fast while still being difficult to read and unattractive as code

    4. D

      It was easy to read but could not use parallel hardware

    Correct answer
    C

    It could be very fast while still being difficult to read and unattractive as code

    Explanation

    The speaker contrasted the implementation’s strong performance with code that looked unattractive and was considered less readable.

  42. 42

    What is Bail intended to provide?

    1. A

      A new graph semiring for computing shortest paths

    2. B

      A programming language restricted to sequential matrix computation

    3. C

      A replacement for the Cholesky factorization algorithm

    4. D

      A collection of mini-applications for comparing approaches to large-scale distributed parallel programming

    Correct answer
    D

    A collection of mini-applications for comparing approaches to large-scale distributed parallel programming

    Explanation

    Bail combines aggregation-related tools with nine mini-applications and is intended to support discussion and comparison of approaches to distributed parallel programming.

  43. 43

    Why does Bail include implementations in different programming languages and styles?

    1. A

      To demonstrate that aggregation can work only in C

    2. B

      To require users to rewrite every application in every language

    3. C

      To encourage comparison and discussion of how productive large-scale parallel programs should be written

    4. D

      To prove that all languages produce identical code and performance

    Correct answer
    C

    To encourage comparison and discussion of how productive large-scale parallel programs should be written

    Explanation

    The implementations in different languages and styles are meant to serve as a vehicle for discussing productive ways to program large-scale distributed applications.

  44. 44

    What future role does the speaker expect aggregation to play in large parallel programs?

    1. A

      Aggregation will eliminate the need for algorithms and data structures

    2. B

      Aggregation will be useful only for small, single-processor programs

    3. C

      Aggregation will make communication unnecessary on distributed machines

    4. D

      Aggregation will be a necessary part of how programmers think about large-scale parallelism

    Correct answer
    D

    Aggregation will be a necessary part of how programmers think about large-scale parallelism

    Explanation

    The speaker argues that aggregation under the covers will be an important, likely necessary, way to think about future large-scale parallel programs.

  45. 45

    What programming-library gap does the speaker identify?

    1. A

      A distributed-memory aggregation library for Julia had not yet been written

    2. B

      No programming language supported distributed-memory computation

    3. C

      Julia lacked support for defining any matrix operations

    4. D

      C lacked libraries for sparse matrix factorization

    Correct answer
    A

    A distributed-memory aggregation library for Julia had not yet been written

    Explanation

    The speaker notes that, to their knowledge, nobody had written a distributed-memory aggregation library for Julia and invites someone to do so.

Question 1 of 45
Question 1 of 45

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent