Final To Memorize Flashcards

1
Q

Relation between height and the number of leaves in an m-ary tree

A

m^h leaves in any m-ary tree with a height of h

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

n vertices mean ?? edges

A

of vertices-1 edges

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

full m-ary tree with i internal vertices = ?? vertices

A

m*internal vertices + 1= vertices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

number of vertices = ?? int vertices, ?? leaves

A

vertices-1/m = int.vertices, (m-1)*vertices+1/m = leaves

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

number of int vertices = ?? vertices, ?? leaves

A

mint. vertices + 1 = vertices, (m-1)int. vertices +1 = leaves

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

number of leaves = ?? vertices, ?? int. vertices

A

mleaves - 1/m-1 = vertices, leaves - 1/ m1 = int vertices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

for a decision tree, m (m-ary) = ???

A

The # of possible outcomes at each instance of the event

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

prefix

A

root is at far left

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

postfix

A

root is at far right

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

when evaluating post/prefix forms

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

DFS

A

pick a vertex, create one edge at a time, if possible, to connect the vertices to each other

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

BFS

A

pick a vertex, create two edges at a time if possible to connect the vertices to each other

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Prim’s algorithm for spanning trees

A

edges need to be added to vertices with already existing edges

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Kruskal’s algorithm for spanning trees

A

edges need to be made from minimum value to maximum no matter if the edges touch or not when adding them in

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Boolean sum will only equal 0 if…

A

0+0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Boolean product will only equal 1 if…

17
Q

Identity Laws

A

x + 0 = x

or x * 1 = x

18
Q

Law of double compliment

A

two lines over x = x

19
Q

Indempotent Laws

A

x+x = x

or x * x = x

20
Q

Domination Laws

A

x+1 = 1

or x * 0 = 0

21
Q

Communitative Laws

A

x+y = y + x

or xy = yx

22
Q

Associative Laws

A
x + (y + z) = (x + y) + z
or x(y*z) = (x*y)z`
23
Q

Distributive Laws

A
x+yz = (x + y) (x + z)
or x(y + z ) = xy+xz
24
Q

DeMorgen’s laws

A
line over (xy) = line over x + line over y
or line over (x + y) = line over x * line over y
25
Q

Unit Property

A

x + line over x = 1

26
Q

Zero Property

A

x*line over x = 0

27
Q

sum-of-products expansion (DNF)

A

if evaluates to 1, part of expansion

if initial variable evaluates to 0, it gets a line over when writing out the expansion

28
Q

product-of-sum expansion (CNF)

A

if evaluates to 0, part of expansion

if initial variable evaluates to 1, it gets a line over when writing out the expansion

29
Q

AND GATE

A

is rounded

30
Q

OR GATE

A

is pointed

31
Q

INVERTER

A

is a triangle with a small circle

32
Q

how to make a set to describe a language

A

{init. symbol(pattern after init. symbol)^n| n >= 1} U …..

  • is sometime >= 0 if the init. symbol is 0 or if the pattern only includes 0’s
  • U is when there are more than 1 initial symbol, need to write separate sets for each even if they behave the same way
  • a init. symbol raised to a power means that there is a self loop
33
Q

finite state automata, when {0,1}* it means

A

when there is an * it means that the path described in the set ends in a self loop

34
Q

With the set {0, 10, 11} it lists:

A

all possible paths to the accepting/final states