cse 2321 final

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/24

flashcard set

Earn XP

Description and Tags

help

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

25 Terms

1
New cards

for what values of m and n are Km,n contains an Euler circuit?

for even integers and m, n >=1 will Km,n contain a Euler circuit. for all vertices to have even degrees, m must be even so vertices on the n-side have even degree m, and vice versa for n.

2
New cards

why is every tree a bipartite graph?

since trees are acyclic, trees can always be partitioned into two sets of vertices where no two vertices within the same set are connected by an edge, making the tree bipartite.

3
New cards

how do you determine the number of edges in an adjacency graph of G if G is a simple graph

add up the sum and divide by 2

4
New cards

what is a DAG

directed acyclic graph

a directed graph where no cycle exists

5
New cards

what is BFS

breadth-first search

an algorithm for traversing or searching tree or graph data structures

6
New cards

what is DFS

depth-first search

an algorithm for traversing or searching tree or graph data structures

7
New cards

difference between bfs and dfs?

dfs searches the longest path from 1 vertex before backtracking while bfs looks at all the neighbors before moving onto the next

8
New cards

what is topological sort

sort vertices of a directed acyclic graph so that for every edge (vi, vj), vertex vi precedes vj

9
New cards

hamilton path

a simple path in a graph that passes through every vertex exactly once

10
New cards

hamilton circuit

simple circuit in a graph that passes through every vertex exactly once

11
New cards

hamiltonian

graph which contains hamilton circuitthe

12
New cards

theorem for Euler circuit

let G be directed. G has Euler circuit iff indeg(v) = outdeg(V) for all V
simple terms: connected multigraph with at least two vertices has a circuit iff each of its vertices has even degree

13
New cards

theorem for Euler path

let G be directed. there are exactly 2 vertices for which indeg ≠ outdeg
simple terms: connected multigraph has exactly two vertices of odd degree

14
New cards

why are quantifiers necessary for a predicate? explain with an example

quantifiers make predicates into full true or false statements. they’re necessary to show the extent of which the predicate true. for example, P(x): x > 0, but what x? the universal quantifier∀x∈R clarifies what x values are being discussed.

15
New cards

explain why A x ∅ is an empty set. (A is a set)

cartesian product A x B is the set of all ordered pairs where a∈A and 𝑏∈𝐵. in this case b ∈ ∅. there is no b pair with any a, thus no pairs can be formed. thus A x ∅ = ∅

16
New cards

explain why n2/3(logn)2 is asymptotically more powerful than (logn)100

(logn)100 is only logarithmic growth while n2/3(logn)2 has a power growth of 2/3. any power growth is more powerful than just a log growth.

17
New cards

write the difference between an axiom and a theorem. provide an example of each.

an axiom is a statement that’s assumed to be true that’s used in a proof to establish the truth of a theorem while a theorem is a statement that can be proven.
ex axiom: for any real number a, a=a
ex theorem: for all real numbers a and b, if a = b, then b = a.

18
New cards

(T/F) if all birds can win, then 9 + 1 = 11

true since both propositions are false

19
New cards

(T/F) 12 is a prime number or 2 + 3 = 5

true since at least one proposition is true (2 + 3 = 5)

20
New cards

(T/F) if 5 + 3 = 10, then the sun rises in the west

true since both propositions are false

21
New cards

(T/F) 4 < 2 if and only if 6 > 3

false because one proposition is false

22
New cards

(T/F) 5 is a prime number and 14 is a multiple of 17

true because both propositions are true

23
New cards

asymptotic running time of insertion sort

θ(n2)

24
New cards

asymptotic running time of binary search

θ(log n)

25
New cards

asymptotic running time of linear search

θ (n)