13 views

Uploaded by EdnaBelegal

introduction to data structure

introduction to data structure

© All Rights Reserved

- GUI Lab Theory
- VB Functions
- Static Detection of API Calling Viruses
- Programming Exercise Solutions
- Introdjavascript tutorialuction to Classe1
- Formal Grammars Real
- Python 3
- Advanced ABAP Notes
- fp_adder
- Simado Gfx44 v1 System Manual
- IO Utility manual.pdf
- ETG2010 S R v1i0i0 EtherCATSIISpecification
- Cycle Sheet
- c
- Python Program to Find the Union of Two Lists - Sanfoundry
- String Buffer
- QBasic Summary
- 10ARRAYS1
- Image Capture for Vb
- Ayuda ArcView Calculator

You are on page 1of 28

so that it can be used efficiently.

Is a collection of data objects and a set of

legal operations to be performed on

them.

method of organizing large amounts of

data

Filing cabinets with alphabetized folders

The correct choice of data structure

allows major improvements in program

efficiency.

ALGORITHM

manipulate the data in these structures in

various ways, such as inserting anew data item,

searching for a particular item, or sorting the

items.

You can think of analgorithm as a recipe: a list

of detailed instructions for carrying out an

activity.

Step-by-step procedure used to solve a

problem

These steps should be capable of being

performed by a machine

Must eventually stop and so produce an answer

WHAT SORTS OF PROBLEMS CAN YOU

SOLVE WITH A KNOWLEDGE OF THESE

TOPICS?

theyre useful into three categories:

- Real-world data storage

- Programmers tools

- Modeling

REAL-WORLD DATA STORAGE

Some examples are a personnel record that

describes an actual human being, an inventory

record that describes an existing car part or grocery

item, and a financial transaction record.

A non-computer example of real-world data storage

is a stack of index cards.(address book or home

inventory)

PROGRAMMERS TOOLS

Not all data storage structures are used to store

real-world data.

Typically, real-world data is accessed more or less

directly by a programs user.

However, some data storage structures are not

meant to be accessed by the user, but by the

program itself.

A programmer uses such structures as tools to

facilitate some other operation.

Stacks, queues, and priority queues are often used

in this way.

REAL-WORLD MODELING

Some data structures directly model a real-world

situation.

Stacks, queues, and priority queues are often used

for this purpose.

A queue, for example, can model customers waiting

in line at a bank, whereas a priority queue can

model messages waiting to be transmitted over a

local area network

OVERVIEW OF DATA STRUCTURE

OVERVIEW OF DATA STRUCTURE

OVERVIEW OF ALGORITHM

Many of the algorithms apply directly to specific

data structures.

For most data structures, you must know how to do

the following:

Insert a new data item.

Search for a specified item.

Delete a specified item.

traverse through all the items in a data structure

Sorting

Recursion

ALGORITHM ANALYSIS

Analysis:

How to predict an algorithms performance

How well an algorithm scales up

How to compare different algorithms for a problem

Data Structures

How to efficiently store, access, manage data

Data structures effect algorithms performance

EXAMPLE ALGORITHMS

Two algorithms for computing the Factorial

Which one is better?

int factorial (int n) {

if (n <= 1) return 1;

else return n * factorial(n-1);

}

int factorial (int n) {

if (n<=1) return 1;

else {

fact = 1;

for (k=2; k<=n; k++)

fact *= k;

return fact;

}

}

EXAMPLES OF FAMOUS ALGORITHMS

Constructions of Euclid

Newton's root finding

Fast Fourier Transform

Compression (Huffman, Lempel-Ziv, GIF, MPEG)

DES, RSA encryption

Simplex algorithm for linear programming

Shortest Path Algorithms (Dijkstra, Bellman-Ford)

Error correcting codes (CDs, DVDs)

TCP congestion control, IP routing

Pattern matching (Genomics)

Search Engines

ROLE OF ALGORITHMS IN MODERN

WORLD

Enormous amount of data

E-commerce (Amazon, Ebay)

Network traffic (telecom billing, monitoring)

Database transactions (Sales, inventory)

Scientific measurements (astrophysics, geology)

Sensor networks. RFID tags

Bioinformatics (genome, protein bank)

Amazon hired first Chief Algorithms Officer

(Udi Manber)

A REAL-WORLD PROBLEM

Communication in the Internet

Message (email, ftp) broken down into IP

packets.

Sender/receiver identified by IP address.

The packets are routed through the Internet by

special computers called Routers.

Each packet is stamped with its destination

address, but not the route.

Because the Internet topology and network load

is constantly changing, routers must discover

routes dynamically.

What should the Routing Table look like?

HOW TO MEASURE ALGORITHM

PERFORMANCE

What metric should be used to judge

algorithms?

Length of the program (lines of code)

Ease of programming (bugs, maintenance)

Memory required

Running time

Running time is the dominant standard.

Quantifiable and easy to compare

Often the critical bottleneck

PRIMITIVE TYPES

are data types provided by a

programming language as basic

building blocks. Primitive types are

also known as built-in types or basic

types.

PRIMITIVE TYPES

Character

Integer

String

Double

Float

Array

SPECIAL TYPES

Character

It is a unit of information that roughly

corresponds to a grapheme, grapheme-like

unit, or symbol. Such as in an alphabet or

syllabary.

Ex. Letter

Numeral

Punctuation Mark

Integer

Is used to refer a data type which

represents some finite subset of

mathematical integers.

Also known as integral data types.

Integral Types:

Unsigned

Signed

Binary Coded Decimal

It is another representation of

integer which is commonly used

in mainframe financial

applications and in database.

String

Is an ordered sequence of symbols.

Binary string

Byte string

Are used to suggest strings

in which the stored data does

not represent text.

Double

Double precision is a computer

numbering format that occupies two

adjacent location in computer

memory.

Double

or

Double precision number

Defined to be

an integer,

fixed point, or

floating point.

Float

describes a system for numerical

representation in which a string of

digits (or bits) represents a real

number.

The term floating point refers to the

fact that the radix point (decimal point,

or, more commonly in computers,

binary point) can "float": that is, it can

be placed anywhere relative to the

significant digits of the number

Array

Is a data structure consisting of a

group that are accessed by

indexing.

Classification of Array

Fixed-sized arrays

Dynamic arrays

DIFFERENT ALGORITHMS FOR

SAME PROBLEM

Devise an algorithm to find the solution to a number

raised to a positive power

eg 4

5

or 10

3

ie number

power

1 set answer to 1

2 Loop 1 to power times

2.1 answer becomes answer * number

3 report answer

Notice the

layout and

numbering

FIND THE RESULT OF NUMBER

POWER

1 Set answer to 1

2 Loop for 1 to 5 times

2.1 answer becomes answer *

2

3 Report answer

Answer Loop

1 1

2 2

4 3

8 4

16 5

32 ?

2

5

3

4

1 Set answer to 1

2 Loop for 1 to 4 times

2.1 answer becomes answer *

3

3 Report answer

Answer

Loop

1 1

3 2

9 3

27 4

81 ?

- GUI Lab TheoryUploaded bysayyan
- VB FunctionsUploaded byabhinavgupta2010
- Static Detection of API Calling VirusesUploaded byWesley Jin
- Programming Exercise SolutionsUploaded byelibun
- Introdjavascript tutorialuction to Classe1Uploaded byRheinjohn Sampang
- Formal Grammars RealUploaded byromeofatima
- Python 3Uploaded byyupal
- Advanced ABAP NotesUploaded bymy291287
- fp_adderUploaded bySumeet Saurav
- Simado Gfx44 v1 System ManualUploaded bywaves communications
- IO Utility manual.pdfUploaded byPt Publisher
- ETG2010 S R v1i0i0 EtherCATSIISpecificationUploaded byAnonymous gii7Jntcpi
- Cycle SheetUploaded byAbhas Tandon
- cUploaded bySunita Raturi
- Python Program to Find the Union of Two Lists - SanfoundryUploaded byRavinderRavi
- String BufferUploaded byMahesh Sanjiva
- QBasic SummaryUploaded byinge68m
- 10ARRAYS1Uploaded byreddypavan
- Image Capture for VbUploaded byEllaine Balibalos
- Ayuda ArcView CalculatorUploaded bytocalli01py
- The Ring programming language version 1.5.3 book - Part 23 of 184Uploaded byMahmoud Samir Fayed
- bitstream_1668024Uploaded byyekych
- LabVIEW Lecture 2Uploaded byb_sisco
- bpj lesson 7Uploaded byapi-307095237
- bpj lesson 7-2Uploaded byapi-307094458
- RR Submitted2013Uploaded byavi0341
- Modicon MODBUS Ethernet User's GuideUploaded byjesus
- Least significant bit..Uploaded byAabdullah Muhammed
- General TressUploaded byVikki Pang
- binaryUploaded byapi-417400228

- Home Automation on ESP8266.pdfUploaded byflaviorochaavila
- Logon Load BalancingUploaded byMakesh Malayappan
- SEO Report Studio CharretteUploaded bySara
- Advanced Excel Duration 30 DaysUploaded byMonica Saini
- Class 3Uploaded byاحمد العيسى
- Siproxd GuideUploaded byLakshmanan Sivalingam
- libhttpdUploaded byEftakhar Chowdhury Pallab
- Cake Php CookbookUploaded byGabriel Stuparu
- Orcad InstructionUploaded byPrince Alen
- DSALab UTCNUploaded byAndreea Todasca
- 6-00360-25 StorNext Install Guide RevAUploaded byMarcos Vera
- Alphabetical List of Library RoutinesUploaded byBruno Marques
- L06Uploaded byAliya Sarun
- Info About Java and Its AdvantagesUploaded byVinay Felix
- OpenSSLK14534Uploaded bySatish Govindappa
- Software Project DocumentationUploaded byapi-3718877
- 4 InterconnectUploaded bySiana Shams
- uol6Uploaded byemailparausogeral4577
- Subnetting Made SimpleUploaded byzian666
- Dbexpress TutorialUploaded byrdorw
- servlUploaded byro
- How to Make Charge Account Segment Read OnlyUploaded byInfosource SA
- Klm MappingUploaded byCabana Chukwunonye
- Mobile Store Management.docxUploaded bygsrawat123
- D81599GC10_1000263_ESA.pdfUploaded bycquirozp
- Introduction to JIRAUploaded bytintojames
- Pic Attack1Uploaded byceliaesca
- UntitledUploaded byejazmasud
- 17_Micro-Programmed Control Edited NewUploaded bypra_zara2637
- dell pc for 3d applicationsUploaded byblueskiesokie