DATA
In computing, data is information that has been translated into a form that is
efficient for movement or processing.
Relative to today's computers and transmission media, data is information
converted into binary digital form (0 1).
It is acceptable for data (datum) to be used as plural subject or a singular
subject. Raw data is a term used to describe data in its most basic digital format.
The concept of data in the context of computing has its roots in the work of
Claude Shannon, an American mathematician known as the father of
information theory.
He helped in binary digital concepts based on applying two-value Boolean logic
to electronic circuits.
Binary digit formats motivate the CPUs, semiconductor memories and disk
drives, as well as many of the peripheral devices common in computing today.
How data is stored
Computers represent data, including video, images, sounds and text, as binary
values using patterns of just two numbers: 1 and 0.
A bit is the smallest unit of data, and represents just a single value. A byte is
eight binary digits long.
Storage and memory is measured in megabytes and gigabytes.
Data refers to facts, information, or statistics that are collected and stored for
reference or analysis.
It can be in various forms such as numbers, text, images, or any other format
that can be processed by a computer.
Data is typically raw and unorganized, and it becomes meaningful and valuable
when it is processed and interpreted to extract insights or make decisions.
In the context of computing and technology, data is fundamental to nearly
every aspect of operations, analysis, and communication.
Variables
Consider the equation:
The important thing that we need to understand is that the equation has names (x
and y) which hold values (data). That means the names x and y the are placeholders
for representing data.
A DATA TYPE in a programming language is a set of data with predefined values.
Examples of data types are: integer, floating point, unit number, character, string..
Computer memory is all filled with zeros and ones. A data type reduces the coding
effort.
System-defined data types (also called Primitive Data types) and User-defined data
types.
Data types that are defined by system are called primitive data types. The
primitive data types provided by many programming languages are: int,
float, char, double, bool, etc.
The number of bits allocated for each primitive data type depends on the
programming languages, the compiler and the operating system.
If the system-defined data types are not enough, then most programming
languages allow the users to define their own data types, called user
defined data types. (structures in C + + and classes in Java).
Data Structure is a particular way of storing and organizing data in a
computer so that it can be used efficiently. It is a special format for
organizing and storing data.
Data structure types include arrays, files, linked lists, stacks, queues, trees,
graphs and so on.
Depending on the organization of the elements, data structures are
classified into two types:
Linear Data Structures: Elements are accessed in a sequential order but it is
not compulsory to store all elements sequentially. Linked Lists, Stacks and
Queues.
Non Linear Data Structures: Elements of this data structure are stored or
accessed in a non-linear order. Trees and Graphs.
Abstract Data Types (ADTs): User-defined data types also need to define
operations. The implementation for these operations can be done when
actually use them.
User defined data types are defined along with their operations.
To simplify the process of solving problems, combine the data structures
with their operations and call this Abstract Data Types.
• An ADT consists of two parts: Declaration of data and Declaration of
operations.
• Commonly used ADTs include: Linked Lists, Stacks, Queues, Priority Queues,
Binary Trees, Dictionaries, Disjoint Sets (Union and Find), Hash Tables,
Graphs, and many others.
• An algorithm is the step-by-step unambiguous instructions to solve a given
problem.
• There are two main criteria for judging the merits of algorithms: correctness
(does the algorithm give solution to the problem in a finite number of
steps).
• And efficiency (how much resources (in terms of memory and time) does it
take to execute the).
• Goal of the Analysis of Algorithms: The main and important role of analysis
of algorithm is to predict the performance of different algorithms in order to
guide design decisions.
o The goal of the Analysis of the Algorithms to compare algorithms (or
solutions) mainly in terms of running time but also in terms of other factors
(e.g.,memory, developer effort, etc.)
o In theoretical analysis of algorithms, it is common to estimate their
complexity in the asymptotic sense, i.e., to estimate the complexity
function for arbitrarily large input. The term "analysis of algorithms" was
coined by Donald Knuth.
o Algorithm analysis is an important part of computational complexity
theory, which provides theoretical estimation for the required resourcesof
an algorithm to solve a specific computational problem.
o Most algorithms are designed to work with inputs of arbitrary length.
Analysis of algorithms is the determination of the amount of time and
space resources required to execute it.
What is Running Time Analysis?
• It is the process of determining how processing time increases as the size
of the problem (input size) increases.
• Input size is the number of elements in the input, and depending on the
problem type, the input may be of different types. The following are the
common types of inputs.
• Size of an array
• Polynomial degree
• Number of elements in a matrix
• Number of bits in the binary representation of the input
• Vertices and edges in a graph.
What is Rate of Growth?
• The rate at which the running time increases as a function of input is called Rate of Growth.
Types of Analysis
The first case is called the BEST CASE and the second case is called the WORST
CASE for the algorithm.
To analyze an algorithm need some kind of syntax, and that forms the base for
asymptotic analysis/notation. There are three types of analysis:
Worst case: Defines the input for which the algorithm takes a long time
(slowest time to complete). Input is the one for which the algorithm runs the
slowest.
Best case: Defines the input for which the algorithm takes the least time
(fastest time to complete).Input is the one for which the algorithm runs the
fastest.
Average case: Provides a prediction about the running time of the algorithm.
Run the algorithm many times, using many different inputs that come from
some distribution that generates these inputs, compute the total running time
(by adding the individual times), and divide by the number of trials.
Data Structures using java notes for MCA
Data Structures using java notes for MCA
Data Structures using java notes for MCA
Data Structures using java notes for MCA
Data Structures using java notes for MCA
Data Structures using java notes for MCA

Data Structures using java notes for MCA

  • 3.
    DATA In computing, datais information that has been translated into a form that is efficient for movement or processing. Relative to today's computers and transmission media, data is information converted into binary digital form (0 1). It is acceptable for data (datum) to be used as plural subject or a singular subject. Raw data is a term used to describe data in its most basic digital format. The concept of data in the context of computing has its roots in the work of Claude Shannon, an American mathematician known as the father of information theory. He helped in binary digital concepts based on applying two-value Boolean logic to electronic circuits. Binary digit formats motivate the CPUs, semiconductor memories and disk drives, as well as many of the peripheral devices common in computing today.
  • 4.
    How data isstored Computers represent data, including video, images, sounds and text, as binary values using patterns of just two numbers: 1 and 0. A bit is the smallest unit of data, and represents just a single value. A byte is eight binary digits long. Storage and memory is measured in megabytes and gigabytes. Data refers to facts, information, or statistics that are collected and stored for reference or analysis. It can be in various forms such as numbers, text, images, or any other format that can be processed by a computer. Data is typically raw and unorganized, and it becomes meaningful and valuable when it is processed and interpreted to extract insights or make decisions. In the context of computing and technology, data is fundamental to nearly every aspect of operations, analysis, and communication.
  • 6.
    Variables Consider the equation: Theimportant thing that we need to understand is that the equation has names (x and y) which hold values (data). That means the names x and y the are placeholders for representing data. A DATA TYPE in a programming language is a set of data with predefined values. Examples of data types are: integer, floating point, unit number, character, string.. Computer memory is all filled with zeros and ones. A data type reduces the coding effort. System-defined data types (also called Primitive Data types) and User-defined data types.
  • 7.
    Data types thatare defined by system are called primitive data types. The primitive data types provided by many programming languages are: int, float, char, double, bool, etc. The number of bits allocated for each primitive data type depends on the programming languages, the compiler and the operating system. If the system-defined data types are not enough, then most programming languages allow the users to define their own data types, called user defined data types. (structures in C + + and classes in Java). Data Structure is a particular way of storing and organizing data in a computer so that it can be used efficiently. It is a special format for organizing and storing data. Data structure types include arrays, files, linked lists, stacks, queues, trees, graphs and so on.
  • 8.
    Depending on theorganization of the elements, data structures are classified into two types: Linear Data Structures: Elements are accessed in a sequential order but it is not compulsory to store all elements sequentially. Linked Lists, Stacks and Queues. Non Linear Data Structures: Elements of this data structure are stored or accessed in a non-linear order. Trees and Graphs. Abstract Data Types (ADTs): User-defined data types also need to define operations. The implementation for these operations can be done when actually use them. User defined data types are defined along with their operations. To simplify the process of solving problems, combine the data structures with their operations and call this Abstract Data Types.
  • 9.
    • An ADTconsists of two parts: Declaration of data and Declaration of operations. • Commonly used ADTs include: Linked Lists, Stacks, Queues, Priority Queues, Binary Trees, Dictionaries, Disjoint Sets (Union and Find), Hash Tables, Graphs, and many others. • An algorithm is the step-by-step unambiguous instructions to solve a given problem. • There are two main criteria for judging the merits of algorithms: correctness (does the algorithm give solution to the problem in a finite number of steps). • And efficiency (how much resources (in terms of memory and time) does it take to execute the). • Goal of the Analysis of Algorithms: The main and important role of analysis of algorithm is to predict the performance of different algorithms in order to guide design decisions.
  • 10.
    o The goalof the Analysis of the Algorithms to compare algorithms (or solutions) mainly in terms of running time but also in terms of other factors (e.g.,memory, developer effort, etc.) o In theoretical analysis of algorithms, it is common to estimate their complexity in the asymptotic sense, i.e., to estimate the complexity function for arbitrarily large input. The term "analysis of algorithms" was coined by Donald Knuth. o Algorithm analysis is an important part of computational complexity theory, which provides theoretical estimation for the required resourcesof an algorithm to solve a specific computational problem. o Most algorithms are designed to work with inputs of arbitrary length. Analysis of algorithms is the determination of the amount of time and space resources required to execute it.
  • 11.
    What is RunningTime Analysis? • It is the process of determining how processing time increases as the size of the problem (input size) increases. • Input size is the number of elements in the input, and depending on the problem type, the input may be of different types. The following are the common types of inputs. • Size of an array • Polynomial degree • Number of elements in a matrix • Number of bits in the binary representation of the input • Vertices and edges in a graph.
  • 12.
    What is Rateof Growth? • The rate at which the running time increases as a function of input is called Rate of Growth.
  • 14.
    Types of Analysis Thefirst case is called the BEST CASE and the second case is called the WORST CASE for the algorithm. To analyze an algorithm need some kind of syntax, and that forms the base for asymptotic analysis/notation. There are three types of analysis: Worst case: Defines the input for which the algorithm takes a long time (slowest time to complete). Input is the one for which the algorithm runs the slowest. Best case: Defines the input for which the algorithm takes the least time (fastest time to complete).Input is the one for which the algorithm runs the fastest. Average case: Provides a prediction about the running time of the algorithm. Run the algorithm many times, using many different inputs that come from some distribution that generates these inputs, compute the total running time (by adding the individual times), and divide by the number of trials.