Chapter 1_Introduction to Algorithms

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

1/25

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.

26 Terms

1
New cards

algorithm

is a finite sequence of well-defined steps to solve a specific problem or perform a computation.

2
New cards

input,

output,

finiteness,

definiteness,

effectiveness

key property of algorithms (5)

3
New cards

input

zero or more quantities provided externally.

4
New cards

Output

at least one result produced.

5
New cards

Finiteness

terminates after a finite number of steps.

6
New cards

Definiteness

each step is precisely defined.

7
New cards

Effectiveness

steps are basic enough to be carried out

8
New cards

natural language description,

pseudocode,

flowchart,

programming language

4 mediums of algorithm

9
New cards

Natural language description

plain English

10
New cards

Pseudocode

structured, programming-like representation

11
New cards

Flowcharts

graphical representation with symbols

12
New cards

Programming languages

actual code, e.g., Python, C, Java

13
New cards

Bubble Sort,

Insertion Sort,

Merge Sort

examples of Sorting Algorithms (3)

14
New cards

Linear Search, Binary Search

examples of Searching Algorithms (2)

15
New cards

Dijkstra's Shortest Path, Breadth First Search (BFS)

examples of Graph Algorithms (2)

16
New cards

time, memory,

alternative solutions,

scalability,

formal analysis,

trade-offs

importance of designing and analyzing an algorithm (5)

  • ensures efficiency in terms of _____ and _____,

  • allows comparison between _____,

  • helps identify _____ of solutions for large inputs,

  • provides correctness guarantees through _____,

  • balances _____ (e.g., time vs. space)

17
New cards

problem definition,

algorithm specification,

choose a design paradigm,

refinement

steps in designing an algorithm (4)

18
New cards

Problem Definition

understand input, output, and constraints.

19
New cards

Algorithm Specification

describe solution steps (pseudocode/flowchart).

20
New cards

Choose a Design Paradigm

• Divide and Conquer

• Greedy

• Dynamic Programming

• Backtracking

21
New cards

Refinement

simplify or optimize steps

22
New cards

correctness,

space complexity,

time complexity,

asymptotic analysis

analysis of an algorithm (4)

23
New cards

Correctness

Verify algorithm produces valid output.

24
New cards

Space Complexity

Measure memory usage.

25
New cards

Time Complexity

Count fundamental operations as function of input size.

Best Case,

Average Case,

Worst Case

26
New cards

Asymptotic Analysis

Big-O notation,

Omega Ω notation,

Theta Θ notation