Sunday, March 8, 2009

SEARCHED

DATA STRUCTURE
A 1.] Perssonal
Data structure ia a collection of information that can ba created, process, and stored. This is usually in the form of images, text document, video and etc. In data structure , "structure" is done first followed by the "data".One good example of this situation is the giving or a man distributing a mongo seeds. Structure represents for the "basket" and data represents for the mongo "seeds". If the man distribute the mongo seeds to the other man it is obvious that the basket would be ask first for the man distributing befor he will give or distribute the mongo seeds to the other person.
As a conclusion, data is a process information that can be kept stored in the structure.
In programming, the term data structure refers to scheme for organizing related pieces of information. The basic types of data structure includes:
* files
* list
* arrays
* records
* tree
* tables.
Each of this basic stuctures has many variations and allows different operations to be performed on the data.
Data structures is an organization of information, usually in memory, for better algorithm efficiency, such as queue, stack, linked list, heap, dictionary, and tree or conceptual unity, such as the name and address of a person. It may include redundant information such as length of the list or number of nodes in a subtree.
Data stucture is an organization in software of data that allows more optimal searching, categorizing, or storage of information.
A data structure ia a specialized format for organizing and storing data. General data structure types include the array, the file, the record, the table, the tree, and so on. Any data structure is designed to organized data suit a specific purpose so that it can be accesed and work with in appropriate ways. In programming, a data structure maybe selected on designed to store data for the purpose of workinf on it witrh various alogorithms.
Data structure is the way were data is encoded by a computer. it is not usually the concern of the user. However, in certain cases, eg. when the user tries to read a textfile produced by a different word process he or she may become aware of the fact thet similar screen display does not necessarily mean identical data structure for the computer.
Data structure is a means of representing a real-life entity(such as an invoice) inside a computer. Computer programmers create data structures to model real world entities.
Data structure is an logical relationship among data elements that is designed to support specific data manipulation functions.
A data structure is an aspect of data type expressing the naature of values that are composite. The nonatomic value have constituent parts and the data structure expresses how constituents may nbe combined to form a compound value or selected from a compound value.
Data structure in computer science is a way of storing data in a computer so that it can be used efficiently. It is an organization of mathematical and logical concepts of data. Often a carefully chosen data structure will allow the most efficient algorithm to be used. The choice of the data structure often begins from the choice of an abstact data type. A well-designed data structure allows a variety of critical operations to be performed, using a few resources, both execution time and memory space, as possible. Data structure are implemented by a programming language as data types and the reference and operations they provide.
Other Types of Data Structure
B 1.] Heap Data Structure - is a specialized tree-based data structure that satisfies the heap property: if B is a child node of A, then key(A) ≥ key(B). This implies that an element with the greatest key is always in the root node, and so such a heap is sometimes called a max heap. (Alternatively, if the comparison is reversed, the smallest element is always in the root node, which results in a min heap.) This is why heaps are used to implement priority queues. The efficiency of heap operations is crucial in several graph algorithms.
The operations commonly performed with a heap are:

☺ delete-max or delete-min: removing the root node of a max- or min-heap, respectively

☺ increase-key or decrease-key: updating a key within a max- or min-heap, respectively

☺ insert: adding a new key to the heap

☺ merge: joining two heaps to form a valid new heap containing all the elements of both
Heap Applications
Heaps are a favorite data structures for many applications.

Heapsort: One of the best sorting methods being in-place and with no quadratic worst-case scenarios.

Selection algorithms: Finding the min, max or both of them, median or even any k-th element in sublinear time[citation needed] can be done dynamically with heaps.

Graph algorithms: By using heaps as internal traversal data structures, run time will be reduced by an order of polynomial. Examples of such problems are Prim's minimal spanning tree algorithm and Dijkstra's shortest path problem.
2.] Hash Table Data Sructure - is a data structure that associates keys with values.
The operation used in Hash Table Data Structure
* look-up
* deletion
* insetion
How are data stored in Hash Table Data Structure
A hash table is an array in which data is stored. The element of the array--that is, the index position--used to store a particular piece of data is determined by hashing the data's key value--that is, giving the key value to a function, referred to as a hash function, that returns as its value an integer value in the range of valid index values for the array.
How are data retrieved in Hash Data Structure
Hash tables store data in pseudo-random locations, so accessing the data in a sorted manner is a very time consuming operation. Other data structures such as self-balancing binary search trees generally operate more slowly (since their lookup time is O(log n)) and are rather more complex to implement than hash tables but maintain a sorted data structure at all times. See a comparison of hash tables and self-balancing binary search trees.
3.] Set Data Structure- set is a collection (container) of certain values, without any particular order, and no repeated values. It corresponds with a finite set in mathematics. Disregarding sequence, and the fact that there are no repeated values, it is the same as a list. A set can be seen as an associative array(partial mapping) in which the value of each key-value pair is ignored. Data structure is a container for grouping a collection of data into a single object. We have seen some examples already, including pstrings, which are collections of characters, and pvectors which are collections on any type.
How are data stored in set data structure
Sets can be implemented using various data structures. Ideal set data structures make it efficient to check if an object is in the set, as well as enabling other useful operations such as iterating through all the objects in the set, performing a union or intersection of two sets, or taking the complement of a set in some limited domain. Any associative array data structure can be used to implement a set by letting the set of keys be the elements of the set and ignoring the values. Because of the similarity to associative arrays, sets are commonly implemented in the same ways, namely, a self-balancing binary search tree for sorted sets (which has O(log n) for most operations), or a hash table for unsorted sets (which has O(1) average-case, but O(n) worst-case, for most operations). A sorted linear hash table may be used to provide deterministically ordered sets.Other popular methods include arrays. In particular a subset of the integers 1..n can be implemented efficiently as an n-bit bit array, which also support very efficient union and intersection operations. A Bloom map implements a set probabilistically, using a very compact representation but risking a small chance of false positives on queries.However, very few of these data structures support set operations such as union or intersection efficiently. For these operations, more specialized set data structures exist.
How are data retrieved in set data structure
Disjoint-set data structures model the partitioning of a set, for example to keep track of the connected components of an undirected graph. This model can then be used to determine whether two vertices belong to the same component, or whether adding an edge between them would result in a cycle.This data structure is used by the Boost Graph Library to implement its Incremental ConnecteD Components functionality. It is also used for implementing Kruskal's algorithm to find the minimum spanning tree of a graph.Note that the implementation as disjoint-set forests doesn't allow deletion of edges — even without path compression or the rank heuristic, this is not as easy, although more complex schemes have been designed that can deal with this type of incremental update.

Wednesday, February 25, 2009

116B Survey KH34

Stack Data Structure

- a stack is a limited version of an array. New elements or nodes as they are often called, can be added to a stack and removed from a stack only from one end. For this reason, a stack is referred to as a LIFO structure (Last-In First-Out).

Explainations on the steps involve in consicutively accomodating the stack data structure:

1. Stack can be stored in a static or dynamic data structure.
2. Create your stack.
3. When you put/push data 1 in a stack, the isFULL operation will check if there is still a space for the data 2 and data 3 that you'll going to push after data 1.
4. Next add data 2 in the stack.
5. The total++ operation will total how many data that you push.
6. Add data 3 in the stack.
7. The total++ operation will total how many data that you push.
8. Now by following the LIFO(Last In First Out), you are going to pop the data 3 that you push last. The operator isEMPTY will check if your stack is empty.
9. After removing the data, the stack total will update your total stack.

Example:

create stack
push A onto stack
push F onto stack } you're stack have data A, F, and X
push X onto stack
pop item from stack=> pop data A from your stackpush B onto stackpop item from stackpop item from stack

116B Survey KH21

Kinds of Data Structure

Linear Data Structure
-a data structure is said to be linear if its elements form asequence or a linear list.

Types:
1.A list is an ordered collection of entities/items
2.An associative array (also associative container, map, mapping, hash, dictionary, finite map, and in query-processing an index or index file) is an abstract data type composed of a collection of unique keys and a collection of values, where each key is associated with one value.



Non Linear Data Structure
-it does not form a sequence

Types:
1. A graph is a kind of data structure, specifically an abstract data type (ADT), that consists of a set of nodes (also called vertices) and a set of edges that establish relationships (connections) between the nodes.
2.A tree is a widely-used data structure that emulates a hierarchical tree structure with a set of linked nodes.

116B Survey KH14


Structure of the Earth

The interior structure of the earth is layered. The earth has an outer silicata solid crust, a highly viscous mantle, a liquid outer core that is much less viscous than the mantle, and a solid inner core. Scientific understanding of Earth's internal structure is based on extrapolations of physical evidence which has come from the first few kilometres of earth's surface, samples brought to the surface from deeper depths by volcanic activity and analysis of seismic waves that pass through it.The structure of Earth can be defined in two ways: either chemically or by mechanical properties. Chemically, Earth can be divided into the crust, upper mantle, lower mantle, outer core, and inner core. Mechanically, it can be divided into lithosphere, asthenosphere, mesosphere, outer core, and the inner core. Structure of an EggThe egg is a biological structure intended by nature for reproduction. It protects and provides a complete diet for the developing embryo, and serves as the principal source of food for the first few days of the chick's life. The egg is also one of the most nutritious and versatile of human foods. It has an outer covering which is color white.It serves as the protector or the shell.It has also the second layer which is the egg white and the third one is the eggyolk.

Structure of the Egg

The egg is a biological structure intended by nature for reproduction. It protects and provides a complete diet for the developing embryo, and serves as the principal source of food for the first few days of the chick's life. The egg is also one of the most nutritious and versatile of human foods. It has an outer covering which is color white.It serves as the protector or the shell.It has also the second layer which is the egg white and the third one is the eggyolk.

116B Survey #01

A. Computer System
- it is a working computer that includes notonlythe computer hardware but also its software.
- it is nessesary to make the computer function.

B. Components of Computer Hardware
1. Input
2. Process
3. Output
4. Storage