Data Structures

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

1/42

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

43 Terms

1
New cards

algorithm

a sequence of unambiguous instructions for solving a problem

2
New cards

algorithmics

the core of computer science

3
New cards

What is required for an algorithm?

finiteness

definiteness

input

output

effectiveness

4
New cards

What are the algorithm design strategies?

brute force

decrease and conquer

divide and conquer

transform and conquer

greedy approach

dynamic programming

space and time tradeoffs

5
New cards

brute force algorithms

straightforward approach to solving a problem, usually directed based on the problem’s statement and definitions of concepts involved

6
New cards

brute force algorithm examples

O(N²) quadratic sorting algorithms (selection and bubble sort)

sequential searching a list

string pattern matching

7
New cards

decrease and conquer algorithms

exploiting relationship between solution to a given problem instance and a solution instance of the same problem

8
New cards

decrease and conquer algorithm examples

insertion sort

depth and breadth first searching (trees and graphs)

9
New cards

divide and conquer algorithms

a problem’s instance is divided into several (often two) smaller instances of the same problem (type of decrease and conquer)

10
New cards

divide and conquer algorithm examples

mergesort

quicksort

O(N log_2 N)

binary search

binary tree traveralst

11
New cards

transform and conquer algorithms

a problem’s instance is modified to be more amenable to solution

12
New cards

transform and conquer algorithm examples

presorting

gaussian elimination (solving systems of equations)

balanced search trees (AVL, 2-3 trees)

heaps (priority queues)

heapsort

13
New cards

space and time tradeoffs

well-known issue to computer scientists

14
New cards

space and time tradeoff examples

sorting by counting

hashing

b-trees

15
New cards

dynamic programming

optimizing multistage decision processes

16
New cards

dynamic programming examples

computing binomial coefficients

warshall’s algorithm (transitive closure in digraphs)

optimal binary search trees

17
New cards

greedy technique

solving problem by reducing the remaining amount the most

18
New cards

greedy technique examples

spanning trees (Prim and Kruskal MSTs)

Dijkstra’s Algorithm (single-source shortest-path through graph)

Huffman trees (variable-length encoding, files compression, optimal external sorting)

19
New cards

Euclid’s Algorithm for GCD

gcd(m,n) = gcd(n,m mod n) until m mod n = 0

20
New cards

time efficiency

how fast the algorithm runs

analyzed by determining the number of repetitions of the basic operation as a function of input size

21
New cards

space efficiency

how much extra memory is needed

22
New cards

simplicity

easier to understand and program resulting in fewer bugs

23
New cards

generality

for problem and for range of inputs

24
New cards

important computational problem types

sorting

searching

string processing

graph problems

combinatorial problems

geometric problems

numerical problems

25
New cards

sorting problems

rearranging items of a given list in ascending order

key is specifically chosen to piece of information to guide sorting

26
New cards

searching problems

finding a given value in a given set

27
New cards

string processing problems

applications dealing with non-numerical data

string is sequence of characters from some alphabet

string matching problems

28
New cards

graph problems

oldest area in algorithmics

vertices and edge

transportation and communication networks

graph traversal algorithms

29
New cards

combinatorial problems

permutation or combination that satisfies certain constraints and has some desired property

typically grows extremely fast with increase in problem size n

30
New cards

geometric problems

computer graphics, robotics, computer vision, image processing

31
New cards

numerical problems

mathematical objects

majority can be solved only approximately

difficulty because dealing with real numbers

leading to accumulation of round-off error which can distort output

focus shifted in recent times to business applications

32
New cards

set

unordered collection of distinct items called elements

explicit listing of elements or specifying property that all elements must satisfy

33
New cards

abstract data types (ADT)

set of abstract objects representing data items with collection of associated operations that can be performed on them

34
New cards

O(g(n)) (Big-O)

class of functions f(n) that grow no faster than g(n)

35
New cards

ϴ(g(n)) (Big-Theta)

class of functions f(n) that grows at same rate as g(n)

36
New cards

Ω(g(n)) (Big-Omega)

class of functions f9n) that grow at least as fast as g(n)

37
New cards

O-notation

a function t(n) is said to be O(g(n)), denoted t(n)∈O(g(n)), if t(n) is bounded above by some constant multiple of g(n) for all large n

38
New cards

Ω-notation

a function t(n) is said to be Ω(g(n), denoted t(n)∈Ω(g(n)), if t(n) is bounded below by some positive multiple g(n) for all large n

39
New cards

ϴ-notation

a function t(n) is said to be ϴ(g(n)), denoted t(n)∈ϴ(g(n)), if t(n) is bounded both above and below by some constant multiples of g(n) for all large n

40
New cards

time efficiency of non-recursive algorithms creation steps

decide on parameter(s) n indicating input size

identify algorithm’s basic operation

determine worse, average, and best case input of size n

set up summation for c(n) reflecting algorithm’s loop (iteration) struction

simplify summation using standard formulas

41
New cards

O-notation is bounded

above

42
New cards

Ω-notation is bounded

below

43
New cards

ϴ-notation is bounded

both above and below