Memory Addresses and Algorithms

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

1/22

flashcard set

Earn XP

Description and Tags

Prelim Module 1

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

23 Terms

1
New cards

Memory Addresses

The main memory is a a series of endless boxes organized into groups of eight. Each box holds a zero or one. Each group of eight boxes (1 byte) is assigned a unique number called a _

2
New cards

Algorithm

It is a step-by-step procedure, which defines a set of instructions to be executed in a certain order to get the desired output. _ are generally created independent of underlying languages, i.e. It can be implemented in more than one programming language.

3
New cards

Search

(Basic Categories of Algorithm)

  • An algorithm to look for an item in a data structure

4
New cards

Sort

(Basic Categories of Algorithm)

  • An algorithm to arrange items in a certain order

5
New cards

Insert

(Basic Categories of Algorithm)

  • An algorithm to put an item in a data structure

6
New cards

Update

(Basic Categories of Algorithm)

  • An algorithm to update an existing item in a data structure

7
New cards

Delete

(Basic Categories of Algorithm)

  • An algorithm to erase an existing item from a data structure

8
New cards

Unambiguous

(Characteristics of an Algorithm)

  • Each of the algorithm’s steps (or phrases), and their inputs/outputs should be clear and must lead to only one meaning. It should be clear

9
New cards

Input

(Characteristics of an Algorithm)

  • An algorithm should have 0 or more well-defined inputs

10
New cards

Output

(Characteristics of an Algorithm)

  • An algorithm should have 1 or more well-defined outputs and should match the desired output.

11
New cards

Finiteness

(Characteristics of an Algorithm)

  • Algorithms must terminate after a finite number of steps

12
New cards

Feasability

(Characteristics of an Algorithm)

  • The algorithm should be feasible with the available resources

13
New cards

Independent

(Characteristics of an Algorithm)

  • An algorithm should have step-by-step directions, which should be independent of any programming code.

14
New cards

A Priori Analysis

(Algorithm Analysis)

  • This is a theoretical analysis of an Efficiency of an algorithm, it is measured by assuming that all other factors, for example, processor speed, are constant and have no effect on the implementation.

15
New cards

A Posterior Analysis

(Algorithm Analysis)

  • This is an empirical analysis of an algorithm. The selected algorithm is implemented using a programming language. This is then executed on the target computer in this analysis, actual statistics like running time and space required, are collected.

16
New cards

Algorithm Complexity

An algorithm analysis deals with the execution or running time of various operations involved.

The complexity of an algorithm f(n) gives the running time and/or the storage space required by the algorithm in terms of n as the size of input data.

17
New cards

Space Complexity

This complexity of an algorithm represents the amount if memory space required by the algorithm in its life cycle.

18
New cards

Time Complexity

This complexity of an algorithm represents the amount of time required by the algorithm to run to completion.

Time requirements can be defined as a numerical function T(n), where T(n) can be measured as the number of steps, provided each step consumes constant time.

19
New cards

Asymptotic Analysis

This analysis of an algorithm refers to defining the mathematical foundation/framing of its run-time performance. Using asymptotic analysis, we can very well conclude the best case, average case, and worst-case scenario of an algorithm.

It mainly refers to computing the running time of any operation in mathematical units of computations. It is input bound.

20
New cards

Ο(n) notation

(Asymptotic Notations)

It is the formal way to express the upper bound of an algorithm’s running time. It measures the worst-case time complexity or the longest amount of time an algorithm can possibly take to complete

<p>(Asymptotic Notations)</p><p>It is the formal way to express the upper bound of an algorithm’s running time. It measures the worst-case time complexity or the longest amount of time an algorithm can possibly take to complete</p>
21
New cards

Ω(n) Omega Notation

(Asymptotic Notations)
It is the formal way to express the lower bound of an algorithm’s running time. It measures the best case time complexity or the best amount of time an algorithm can possibly take.

<p>(Asymptotic Notations)<br>It is the formal way to express the lower bound of an algorithm’s running time. It measures the best case time complexity or the best amount of time an algorithm can possibly take.</p>
22
New cards

θ(n) Theta Notation

(Asymptotic Notations)
It is the formal way to express both the lower bound and the upper bound of an algorithm’s running time. It is represented as follows:

<p>(Asymptotic Notations)<br>It is the formal way to express both the lower bound and the upper bound of an algorithm’s running time. It is represented as follows:</p>
23
New cards

Arrays

It is a collection of items stored in contiguous memory locations. The idea is to store multiple items of the same type together. This makes it easier to calculate the position of each element by simply adding an offset to a base value, i.e., the memory location of the first element.

It can contain primitives(int, char, etc.) as well as non-primitive reference of class.