Final To Memorize Flashcards
(34 cards)
Relation between height and the number of leaves in an m-ary tree
m^h leaves in any m-ary tree with a height of h
n vertices mean ?? edges
of vertices-1 edges
full m-ary tree with i internal vertices = ?? vertices
m*internal vertices + 1= vertices
number of vertices = ?? int vertices, ?? leaves
vertices-1/m = int.vertices, (m-1)*vertices+1/m = leaves
number of int vertices = ?? vertices, ?? leaves
mint. vertices + 1 = vertices, (m-1)int. vertices +1 = leaves
number of leaves = ?? vertices, ?? int. vertices
mleaves - 1/m-1 = vertices, leaves - 1/ m1 = int vertices
for a decision tree, m (m-ary) = ???
The # of possible outcomes at each instance of the event
prefix
root is at far left
postfix
root is at far right
when evaluating post/prefix forms
PEMDAS still in play, but you start from the right rather than the left, and you leave the farthest right number in the equation for last
DFS
pick a vertex, create one edge at a time, if possible, to connect the vertices to each other
BFS
pick a vertex, create two edges at a time if possible to connect the vertices to each other
Prim’s algorithm for spanning trees
edges need to be added to vertices with already existing edges
Kruskal’s algorithm for spanning trees
edges need to be made from minimum value to maximum no matter if the edges touch or not when adding them in
Boolean sum will only equal 0 if…
0+0
Boolean product will only equal 1 if…
1*1
Identity Laws
x + 0 = x
or x * 1 = x
Law of double compliment
two lines over x = x
Indempotent Laws
x+x = x
or x * x = x
Domination Laws
x+1 = 1
or x * 0 = 0
Communitative Laws
x+y = y + x
or xy = yx
Associative Laws
x + (y + z) = (x + y) + z or x(y*z) = (x*y)z`
Distributive Laws
x+yz = (x + y) (x + z) or x(y + z ) = xy+xz
DeMorgen’s laws
line over (xy) = line over x + line over y or line over (x + y) = line over x * line over y