CS 242, Section 002 Sonoma State University Spring, 2026
 
Discrete Structures for Computer Science
Instructor: Henry M. Walker

Lecturer, Sonoma State University
Professor Emeritus of Computer Science and Mathematics, Grinnell College

Notes:


Assignment 11 (Probability and Graphs)

  1. The California Lottery Powerball Game, Revisited: To play the California Lottery Powerball Game, you "pick 5 numbers between 1 and 69 and 1 Power Number between 1 and 26." You win the jackpot if the first five numbers picked match the first five numbers drawn and the sixth number matches the sixth number drawn.

    1. What is the probability that all five numbers drawn are odd numbers and the sixth number is even?
    2. What is the probability that the five numbers drawn, reordered if needed, are consecutive integers? (For example, if the 5 numbers drawn were 46, 43, 44, 45, 42, then these could be reordered as the consecutive sequence 42, 43, 44, 45, 46.)
    3. The official Powerball Web site (link above) indicates that the chances that none of the numbers picked by a person are selected in the drawing is 1 in 39. Show a computation to demonstrate this probability is correct (after rounding).
  2. Adjacency Matrices: Consider the following adjacency matrix S for a weighted graph. (Note: 0 means there is no edge.)

     A B C D E F G H
    A 0 3 0 0 4 7 0 0
    B 0 0 5 0 0 0 0 0
    C 0 0 0 0 0 0 0 0
    D 2 0 0 0 8 0 0 0
    E 0 0 0 0 0 0 0 5
    F 0 0 0 0 0 0 3 0
    G 0 0 0 0 0 0 0 7
    H 0 8 0 5 0 0 0 0
    1. Draw a picture of the graph represented by this adjacency matrix S, including the weights.
    2. Can this graph be interpreted as being directed? Explain.
    3. Can this graph be interpreted as being undirected? Explain.
    4. Extra Credit: List the vertices in depth-first order beginning with vertex A.
    5. Extra Credit: List the vertices in breadth-first order beginning with vertex A.

A Graph Specified by Sets

  1. A Graph Specified by Sets: Consider the following graph, specified in terms of sets of vertices and directed edges.

    1. Write the adjacency matrix for this graph, based upon the alphabetical ordering of the vertices given.
    2. Draw the adjacency list representation for this graph.
    3. Can this graph be interpreted as being directed? Explain.
    4. Can this graph be interpreted as being undirected? Explain.
    5. Extra Credit: List the vertices in depth-first order beginning with vertex A.
    6. Extra Credit: List the vertices in breadth-first order beginning with vertex A.

created October 25, 2025
revised October-November, 2025
revised Maay 4, 2026
Valid HTML 4.01! Valid CSS!
For more information, please contact Henry M. Walker at walker@cs.grinnell.edu.