Study

284 - Final Review

  •   0%
  •  0     0     0

  • What is the goal of breadth first traversal and what type of structure is required for this algorithm?
    breath first traversal iterates across all nodes in a collect to make sure they are systematically visited. It can be executed on any graph.
  • Is matrix B a linear operator for matrix A?
    yes
  • T or F? It's possible to multiply two vectors and get a matrix as the solution.
    True
  • Suppose we are adding 4 bit twos complement binary numbers. Indicate the solution or say that overflow occurs.
    0011 (ignore the extra bit)
  • What's the kernel of D?
    (0,0)
  • Suppose B = false and A is unknown. What is the truth value of B => A
    true
  • Kelly wants to check 3 things off her bucket list this summer. She made this list of options. How many different ways can she check 3 things off if she cares about the order in which the items are accomplished?
    8!/((8-3)! = 336
  • What is the goal of binary search and what type of structure is required for this algorithm?
    binary search is looking through a structure to determine that a value is (or isn't) in the structure. It requires that the structure is a binary search tree.
  • how many rows will be in the truth table for this expression:
    8
  • Solve this.
    [[-1/12, 5/12], [ 1/3, -2/3]]
  • T or F? It is possible to solve a linear system of equations in a single line of code in Python.
    True
  • T or F? Matrix multiplication is commutative (so A * B = B * A in all cases)
    False
  • Kelly wants to do 3 fun activities this summer. She wants to do 1 item from her outdoor list, 1 item from her entertainment list, and 1 item from her visit list. How many ways can she select the 3 items?
    3*2*3 = 18
  • convert the base 10 number 1010 to 12-bit twos complement base 2
    0011 1111 0010
  • convert the base 10 number -55 to 8-bit twos complement base 2
    1100 1001
  • Describe the effect of this linear operator
    Stretch x value by 5 and rotate it 90 degrees around the y axis
  • Suppose we are adding 4 bit unsigned binary numbers. Indicate the solution or say that overflow occurs.
    overflow
  • Kelly wants to do 3 fun activities this summer. She made this list of options. How many ways can she choose 3 activities if she doesn't care about the order in which she does the activities??
    8!/((8-3)! 3!) = 112
  • Convert the base 16 number 4119 to base 10
    16,665 = (4096*4) + (256*1) + (16*1) + (1*9)
  • T or F In Python, to perform matrix multiplication you can either use the .dot() function or the * operator.
    False
  • Find the inverse of matrix C
    Does not exist