Академический Документы
Профессиональный Документы
Культура Документы
Computer:
(OR)
Computer is an electronic device which operates under the control of instructions stored in its
own memory and it takes the data from the user, process that data, gives the result and stores the result
for future use.
Here the user interacts with the software, and the software makes the computer hardware parts to work
for the user.
All physical components of the computer are called as computer hardware. A user can see, touch
and feel every hardware of the computer. All hardware components perform any task based on the
instructions given by the computer software.
The computer hardware is the physical part of a computer.
The computer hardware components are as follows...
1. Input Devices - These are the parts through which a user can give the data to the computer.
2. Output Devices - These are the physical components of a computer through which the computer
gives the result to the user.
3. Storage Devices - These are the physical components of a computer in which the data can be
stored.
4. Devices Drives - Using drives, user can read and write data on to the strorage devices like CD,
floppy, etc.,
5. Cables - Various cables (Wires) are used to make connections in a computer
6. Other Devices - Other than the above hardware components, a computer also contains
components like Mother board, CPU (Processor), SMPS, Fans, etc.,
Input Devices
Computer input devices are the physical components of the computer which are used to give the
data given by the user to the computer. Using input devices the user can give the data to the computer.
Output Devices
Computer output devices are the physical components of the computer which are used to give the
computer result to the User. Using output devices, the user can see the computer generated result.
Storage Devices
Computer storage devices are the physical components of the computer which are used to store
data internally or externally.
Device Drives
Computer Device drives are the physical components of the computer which are used to read and
write data of the storage devices.
Computer Cables
In a Computer, various cables are used to make connections among the various hardware
components of the computer.
Other Devices
CPU (Processor)
SMPS
Mother Board
When a user wants to communicate with the computer, the user interacts with an application. The
application interacts with the operating system, and the operating system makes hardware components
to work according to the user given instructions. The hardware components sends the result back to the
operating system, then the operating system forwards the same to the application and the application
shows the result to the user.
By using input devices, the user interacts with the application and the application uses output
devices to show the result. All input and output devices work according to the instructions given by the
operating system.
The working process of a computer is shown in the following figure...
A computer is a complex system consisting of both hardware and software components. This chapter
discusses these components.
Chapter Topics:
▪ Hardware and Software
▪ Components of a Computer System
▪ Networks
▪ World-Wide Web
▪ The word hardware is used for physical devices such as TV sets, DVD players and computers.
The word software is used for the information used with such devices: movies, music, novels,
web pages, computer programs, and data.
▪ When talking about computer systems, hardware means the physical parts of the
computer. Software means the programs and data used with the physical computer.
Components of a Computer System
Information is funny stuff. The information for the web page you are looking at is recorded on a hard
disk inside a computer located in New Britain, Connecticut. The information was copied from that
physical device to other physical devices perhaps hundreds of times before it got to your computer where
your web browser is using it to display these words on your monitor. Clearly information is something
different from the devices used to store and transmit it.
A computer system consists of both hardware and information stored on hardware. Information stored
on computer hardware is often called software.
The hardware components of a computer system are the electronic and mechanical parts.
The software components of a computer system are the data and the computer programs.
The major hardware components of a computer system are:
▪ Processor
▪ Main memory
▪ Secondary memory
▪ Input devices
▪ Output devices
For typical desktop computers, the processor, main memory, secondary memory, power supply, and
supporting hardware are housed in a metal case. Many of the components are connected to the main
circuit board of the computer, called the motherboard. The power supply supplies power for most of the
components. Various input devices (such as the keyboard) and output devices (such as the monitor) are
attached through connectors at the rear of the case.
Hardware Components
The terms input and output say if data flow into or out of the computer. The picture shows the major
hardware components of a computer system. The arrows show the direction of data flow.
A bus is a group of wires on the main circuit board of the computer. It is a pathway for data flowing
between components. Most devices are connected to the bus through a controller which coordinates the
activities of the device with the bus.
The processor is an electronic device about a one inch square, covered in plastic. Inside the square is an
even smaller square of silicon containing millions of tiny electrical parts. A modern processor may
contain billions of transistors. It does the fundamental computing within the system, and directly or
indirectly controls all the other components.
The processor is sometimes called the Central Processing Unit or CPU. A particular computer will
have a particular type of processor, such as a Pentium processor or a SPARC processor.
The processor performs all the fundamental computation of the computer system. Other components
contribute to the computation by doing such things as storing data or moving data into and out of the
processor. But the processor is where the fundamental action takes place.
Memory
A processor chip has relatively little memory. It has only enough memory to hold a few instructions of
a program and the data they process. Complete programs and data sets are held in memory external to
the processor. This memory is of two fundamental types: main memory, and secondary memory.
Main memory is sometimes called volatile because it looses its information when power is removed.
Secondary memory is usually nonvolatile because it retains its information when power is removed.
(However, it needs power when information is stored into memory or retrieved from it.)
Main memory is sometimes called main storage and secondary memory is sometimes called secondary
storage or mass storage.
▪ Main memory:
o closely connected to the processor.
o stored data are quickly and easily changed.
o holds the programs and data that the processor is actively working with.
o interacts with the processor millions of times per second.
o needs constant electric power to keep its information.
▪ Secondary memory:
o connected to main memory through the bus and a controller.
o stored data are easily changed, but changes are slow compared to main memory.
o used for long-term storage of programs and data.
o before data and programs can be used, they must be copied from secondary memory into
main memory.
o does not need electric power to keep its information.
Main Memory
Main memory is where programs and data are kept when the processor is actively using them. When
programs and data become active, they are copied from secondary memory into main memory where the
processor can interact with them. A copy remains in secondary memory.
Main memory is intimately connected to the processor, so moving instructions and data into and out of
the processor is very fast.
Main memory is sometimes called RAM. RAM stands for Random Access Memory. "Random" means
that the memory cells can be accessed in any order. However, properly speaking, "RAM" means the type
of silicon chip used to implement main memory.
When people say that a computer has "512 megabytes of RAM" they are talking about how big its main
memory is. One megabyte of memory is enough to hold approximately one million (106) characters of a
word processing document. (There will be more about bytes and megabytes later on in these notes.)
Nothing permanent is kept in main memory. Sometimes data are placed in main memory for just a few
seconds, only as long as they are needed.
Secondary Memory
Secondary memory is where programs and data are kept on a long-term basis. Common secondary
storage devices are the hard disk and optical disks.
▪ The hard disk has enormous storage capacity compared to main memory.
▪ The hard disk is usually contained inside the case of a computer.
▪ The hard disk is used for long-term storage of programs and data.
▪ Data and programs on the hard disk are organized into files.
▪ A file is a collection of data on the disk that has a name.
A hard disk might have a storage capacity of 500 gigabytes (room for about 500 x 109 characters). This
is about 100 times the capacity of main memory. A hard disk is slow compared to main memory. If the
disk were the only type of memory the computer system would slow down to a crawl. The reason for
having two types of storage is this difference in speed and capacity.
Large blocks of data are copied from disk into main memory. The operation is slow, but lots of data is
copied. Then the processor can quickly read and write small sections of that data in main memory. When
it is done, a large block of data is written to disk.
Often, while the processor is computing with one block of data in main memory, the next block of data
from disk is read into another section of main memory and made ready for the processor. One of the jobs
of an operating system is to manage main storage and disks this way.
▪ Fast ▪ Slow
▪ Expensive ▪ Cheap
▪ Low capacity ▪ Large capacity
▪ Works directly with the processor ▪ Not connected directly to the processor
With many recent computers, the functions of a device controller are integerated with the motherboard.
Some motherboards have audio, graphics, and network controllers built in.
Sometimes secondary memory devices like the hard disk are called I/O devices (because they move data
in and out of main memory). What counts as an I/O device depends on context. To a user, an I/O device
is something outside of the computer case. To a programmer, anything outside of the processor and main
memory is an I/O device. To an engineer working on the design of a processor everything outside of the
processor is an I/O device.
Embedded Systems
A computer system that is part of a larger machine and which controls how that machine operates is
an embedded system. Usually the processor constantly runs a single control program which is
permanently kept in ROM (Read Only Memory).
ROM is used to make a section of main memory read-only. Main memory looks the same as before to
the processor, except a section of it permanently contains the program the processor is running. This
section of memory retains its data even when power is off.
A typical embedded system is a cell phone. This is obvious, but there are many less obvious embedded
systems. Your car contains dozens of processors, and even more in its audio system. For instance, each
airbag is controlled by its own computer chip. Digital cameras, DVD players, medical equipment, and
even home appliances contain dedicated processors.
The overwhelming majority of processor chips are used in embedded systems. Less than 1% of processor
chips are used in the familiar desktop computer!
Software
Computer software consists of both programs and data. Programs consist of instructions for the
processor. Data can be any information that a program needs: character data, numerical data, image data,
audio data, and countless other types. The distinction between programs and data is not as clear-cut as
you might think, however.
Fundamental Idea: Both programs and data are saved in computer memory in the same way. The
electronics of computer memory (both main memory and secondary memory) make no distinction
between programs and data.
The insight that both programs and data can be saved using the same electronic methods is an important
concept in computer science. Computer systems use memory for either programs or data, as needed.
Types of Programs
There are two categories of programs. Application programs (usually called just "applications") are
programs that people use to get their work done. Computers exist because people want to run these
programs. Systemsprograms keep the hardware and software running together smoothly. The difference
between y"application program" and "system program" is fuzzy. Often it is more a matter of marketing
than of logic.
The most important systems program is the operating system. The operating system is always present
when a computer is running. It coordinates the operation of the other hardware and software components
of the computer system. The operating system is responsible for starting up application programs,
running them, and managing the resources that they need. When an application program is running, the
operating system manages the details of the hardware for it. For example, when you type characters on
the keyboard, the operating system determines which application program they are intended for and does
the work of getting them there.
Some embedded systems do not use an operating system, but run their programs directly on the
processor.
Modern operating systems for desktop computers come with a user interface that enables users to easily
interact with application programs (and with the operating system itself) by using windows, buttons,
menus, icons, the mouse, and the keyboard. Examples of operating systems are Unix, Linux, Android,
Mac OS, and Windows.
Operating Systems
An operating system is a complex program that keeps the hardware and software components of a
computer system coordinated and functioning. It is like the owner of a small shop, who keeps everything
in order by attending to customers, accepting deliveries, stocking the shelves, doing the bookkeeping,
and so on. The shopkeeper must promptly attend to tasks as they arise. Without the shopkeeper the shop
could not function.
Most computer systems can potentially run any of several operating systems. For example, most
Pentium-based computers can run either Linux or a Windows operating systems. Usually only one
operating system is installed on a computer system, although some computers have several. In any case,
only one operating system at a time can be in control of the computer system. The computer user makes
a choice when the computer is turned on, and that operating system remains in control until the computer
is turned off.
Solving Aspect
Problem solving is a creative process. It is an act of defining a problem, determining the cause of
the problem, identifying, prioritizing, and selecting alternatives for a solution and implementing a
solution.
A problem can be solved successfully only after making an effort to understand the problem. To
understand the problem, the following questions help:
_ What do we know about the problem?
_ What is the information that we have to process in order the find the solution?
_ What does the solution look like?
_ What sort of special cases exist?
_ How can we recognize that we have found the solution?
It is important to see if there are any similarities between the current problem and other problems
that have already been solved. We have to be sure that the past experience does not hinder us in
developing new methodology or technique for solving a problem. The important aspect to be considered
in problem-solving is the ability to view a problem from a variety of angles.
There is no universal method for solving a given problem. Different strategies appear to be good
for different problems. Some of the well known strategies are:
_ Divide and Conquer
_ Greedy Method
_ Dynamic Programming
_ Backtracking
_ When the program is executed, it must be able to move from one module to the next in
sequence, until the last module is executed
_ Each module should be of manageable size, in order to make the design and testing
easier
Top-down design has the following advantages:
_ Breaking up the problem into parts helps us to clarify what is to be done
_ At each step of refinement, the new parts become more focussed and, therefore,
easier to design
_ Modules may be reused
_ Breaking the problem into parts allows more than one person to work on the solution
simultaneously
ALGORITHM (DEVELOPING A SOLUTION TECHNIQUE)
An algorithm is a step-by-step description of the solution to a problem. It is defined as an ordered
sequence of well-defined and effective operations which, when carried out for a given set of initial
conditions, produce output, and terminate in a finite time. The term “ordered sequence” specifies, after
the completion of each step in the algorithm, the next step must be unambiguously defined.
An algorithm can be defined as “a complete, unambiguous, finite number of logical steps for
solving a specific problem “
An algorithm must be:
_ Definite
_ Finite
_ Precise and Effective
_Generality
_ Implementation independent ( only for problem not for programming languages)
An algorithm must possess the following properties
1. Finiteness: An algorithm must terminate in a finite number of steps
2. Definiteness: Each step of the algorithm must be precisely and unambiguously stated
3. Effectiveness: Each step must be effective, in the sense that it should be primitive easily convert able
into program statement) can be performed exactly in a finite amount of time.
4. Generality: The algorithm must be complete in itself so that it can be used to solve problems of a
specific type for any input data.
5. Input/output: Each algorithm must take zero, one or more quantities as input data produce one or
more output values. An algorithm can be written in English like sentences or in any standard
representation sometimes, algorithm written in English like languages are called Pseudo Code
Developing Algorithms
Algorithm development process is a trial-and-error process. Programmers make initial attempt to
the solution and review it, to test its correctness. The errors identified leads to insertions, deletions, or
modifications to the existing algorithm.
This refining continues until the programmer is satisfied that, the algorithm is essentially correct
and ready to be executed. The more experience we gain in developing an algorithm, the closer our first
attempt will be to a correct solution and the less revision will be required. However, a novice programmer
should not view developing algorithm as a single-step operation.
Examples:
1: Algorithm For Finding Factorial Of A Given Number
Step 1: Start
Step 2: Initialize factorial to be 1, i to be 1
Step 3: Input a number n
Step 4: Check whether the number is 0. If so report factorial is 1 and goto step 9
Step 5: Repeat step 6 through step 7 n times
Step 6: Calculate factorial = factorial * i
Step 7: Increment i by 1
Step 8: Report the calculated factorial value
Step 9: Stop
2. Suppose We Want To Find The Average Of Three Numbers, The Algorithm Is As Follows
Step 1 Read the numbers a, b, c
Step 2 Compute the sum of a, b and c
Step 3 Divide the sum by 3
Step 4 Store the result in variable d
Step 5 Print the value of d
Step 6 End of the program
3 . Write an algorithm to calculate the simple interest using the formula. Simple interest = P*N*
R/100.
Where P is principle Amount, N is the number of years and R is the rate of interest.
7. Write an algorithm which will test whether a given integer value is prime or not.
FLOWCHART:
A flow chart is a step by step diagrammatic representation of the logic paths to solve a given
problem. Or A flowchart is visual or graphical representation of an algorithm. The flowcharts are
pictorial representation of the methods to b used to solve a given problem and help a great deal to analyze
the problem and plan its solution in a systematic and orderly manner. A flowchart when translated in to
a proper computer language, results in a complete program.
Advantages of Flowcharts
1. The flowchart shows the logic of a problem displayed in pictorial fashion which felicitates easier
checking of an algorithm.
2. The Flowchart is good means of communication to other users. It is also a compact means of recording
an algorithm solution to a problem.
3. The flowchart allows the problem solver to break the problem into parts. These parts can be connected
to make master chart.
4. The flowchart is a permanent record of the solution which can be consulted at a later time. Differences
between Algorithm and Flowchart
ALGORITHM FLOW CHART
b. Input and output indicators: Parallelograms are used to represent input and output operations.
Statements like INPUT, READ and PRINT are represented in these Parallelograms.
c. Process Indicators: - Rectangle is used to indicate any set of processing operation such as for storing
arithmetic operations.
d. Decision Makers: The diamond is used for indicating the step of decision making and therefore
known as decision box. Decision boxes are used to test the conditions or ask questions and depending
upon the answers, the appropriate actions are taken by the computer. The decision box symbol is
e. Flow Lines: Flow lines indicate the direction being followed in the flowchart. In a Flowchart, every
line must have an arrow on it to indicate the direction. The arrows may be in any direction
f. On- Page connectors: Circles are used to join the different parts of a flowchart and these circles are
called on-page connectors. The uses of these connectors give a neat shape to the flowcharts. Ina
complicated problems, a flowchart may run in to several pages. The parts of the flowchart on different
pages are to be joined with each other. The parts to be joined are indicated by the circle.
g. Off-page connectors: This connector represents a break in the path of flowchart which is too large to
fit on a single page. It is similar to on-page connector. The connector symbol marks where the algorithm
ends on the first page and where it continues on the second.
3. Draw A Flowchart For Adding The Integers From 1 To 100 And To Print The Sum.
4. Draw The Flowchart To Find Roots Of Quadratic Equation Ax2+ Bx + C= 0. The Coefficients
A, B, C Are The Input Data
5. Draw A Flowchart To Find Out The Biggest Of The Three Unequal Positive Numbers.
PSEUDO CODE
Pseudo code is an informal high-level description of an algorithm that uses the structural
(data flow)
The probability of discovering errors through testing can be increased by selecting significant
test cases. It is important to design test cases for abnormal input conditions.
The Boundary (or Extreme) Cases
How does the algorithm perform at the extremes of the valid cases?
The Unusual Cases
What happens when the input data violates the normal conditions of the problem or represent
unusual condition?
The Invalid Cases
How does the algorithm react for data which are patently illegal or completely meaningless?
An algorithm should work correctly and produce meaningful results for any data. This is called Fool
proof programming.
CODING
Algorithm must be translated into a set of instructions that a computer can understand. Coding should be
simplicity and clarity. A program written by one, it must be readable and simple to understand. The
elements of coding include:
Internal documentation
Construction of statements
Generality of programs
I/O formats
Internal Documentation:
Documentation refers to the details that describe a program. Some details may be built in as an integral
part of the program. This is known as internal documentation.
Two important aspects of internal documentation are selection of meaningful variable names and the use
of comments.Selection of meaningful names is crucial for understanding the program.
EXAMPLE:
Area=breadth *length
Is more meaningful than
A=b*l;
Names that are likely to be confused must be avoided. The use of meaningful function named also in
understanding and maintenance of programs.
Descriptive comments should be embedded with in the body of source code to describe processing steps.
Guidelines help the use of comments:
• Describe blocks of statements rather than commenting on every line
• Use blank lines or indentation, so that comments are easily readable
• Use appropriate comments, an incorrect comment is worse than no comment at all
Statement Construction
The flow of logic is decided during design,the construction of individual statements is done at coding
stage. Each statement should be simple and direct. While multiple statements per line are allowed,try to
use only one statement per line with necessary indentation.
EXAMPLE:
if(quantity>0){code=0; quantity=rate;}
else{code=1;sales=0;}
reorganized as
if(quantity>0)
{
code=0;
quantity=rate;
}
Else
{
code=1;
sales=0;
}
Gudelines:
• Use one statement per line
• Use proper indentation when selection and looping structures are implemented
• Avoid heavy nesting of loops, preferably not more than three levels
• Use simple conditional tests; if necessary break complicated conditions into simple conditions
• Use parenthesis to clarify logical and arithmetic expressions
• Use spaces wherever possible to improve readability
I/O Formats
I/O formats should be simple and acceptable to users. A number of guidelines should be considered
during coding
• Keep formats simple
• Use end of file indicators, rather than the user requiring to specify the number of items
• Label all interactive input requests
• Label all output reports
• Use output messages when the output contains some peculiar results.
Generality of programs:
Care should be taken to minimize the dependence of aprogram on a particular set of data or on a particular
value of a parameter.
EXAMPLE:
For(sum=0,i=1; i<=10; i++)
Sum=sum+i;
This loop addd numbers 1,2,….10 .this can be made more general
Sum=0;
For(i=m;i<=n;i=i+step);
Sum=sum+I;
The initial value m,the final value n, and the increment size step can be specified interactively during
program exection. When m=2,n=100 and step=2,the loop adds all even numbers up to including 100
Debugging
Debugging is a process of correcting the errors. Programs may have logical errors which cannot
be caught during compilation. Debugging is the process of identifying their root causes. One of the ways
to ensure the correctness of the program is by printing out the intermediate results at strategic points of
computation.
Some programmers use the terms “testing” and “debugging” interchangeably, but careful
programmers distinguish between the two activities. Testing means detecting errors. Debugging
means diagnosing and correcting the root causes. On some projects, debugging occupies as much as 50
percent of the total development time. For many programmers, debugging is the hardest part of
programming because of improper documentation.
Maintenance
Programs require a continuing process of maintenance and modification to keep pace with
changing requirements and implementation technologies. Maintainability and modifiability are essential
characteristics of every program. Maintainability of the program is achieved by:
_ Modularizing it
_ Providing proper documentation for it
_ Following standards and conventions (naming conventions, using symbolic constants etc)
COMPUTER PROGRAMMING ENVIRONMENTS:
writing something in a text editor. Windows 95 and later versions of windows OS, iOS and Linux
operating systems are the examples for this computing environment.
Client Server Computing Environment
The client server environment contains two machines (Client machine and Server machine).
These both machines will exchange the information through an application. Here Client is a normal
computer like PC, Tablet, Mobile, etc., and Server is a powerful computer which stores huge data and
manages huge amount of file and emails, etc., In this environment, client requests for data and server
provides data to the client. In the client server environment, the communication between client and server
is performed using HTTP (Hyper Text Transfer Protocol).
Distributed Computing Environment
In the distributed computing environment, the complete functionality of a software is not on
single computer but is distributed among multiple computers. Here we use a method of computer
processing in which different programs of an application run simultaneously on two or more computers.
These computers communicate with each other over a network to perform the complete task. In
distributed computing environment, the data is distributed among different systems and that data is
logically related to each other.
Grid Computing Environment
Grid computing is a collection of computers from different locations. All these computers work
for a common problem. A grid can be described as distributed collection of large number of computers
working for a single application.
Cluster Computing Environment
Cluster computing is a collection of inter connected computers. These computers work together
to solve a single problem. In cluster computing environment, a collection of systems work together as a
single system.
Computer Languages
What is Computer Language?
Generally, we use languages like english, hindi, telugu etc., to make communication between two
persons. That means, when we want to make communication between two persons we need a language
through which persons can express their feelings. Similarly, when we want to make communication
between user and computer or between two or more computers we need a language through which user
can give information to computer and vice versa. When user wants to give any instruction to the computer
the user needs a specific language and that language is known as computer language.
User interacts with the computer using programs and that programs are created using computer
programming languages like C, C++, Java etc.,
Computer languages are the languages through which user can communicate with the computer
by writing program instructions.
Every computer programming language contains a set of predefined words and a set of rules
(syntax) that are used to create instructions of a program.
Computer Languages Classification
Over the years, computer languages have been evolved from Low Level to High Level
Languages. In the earliest days of computers, only Binary Language was used to write programs. The
computer languages are classified as follows...
execute the instructions as it does not requires any translation. Low level language is considered as the
First Generation Language (1GL).
Advantages
• A computer can easily understand the low level language.
• Low level language instructions are executed directly without any translation.
• Low level language instructions require very less time for thier execution.
Disadvantages
• Low level language instructions are very difficult to use and understand.
• Low level language instructions are machine dependent, that means a program written for a
particular machine does not executes on other machine.
• In low level language, there is more chance for errors and it is very difficult to find errors, debug
and modify.
Disadvantages
• High level language needs to be translated to low level language.
• High level language executes slower compared to middle and low level languages.
For "find" type problems, such as "find the principal and return for a given investment", UNKNOWNS,
DATA
and CONDITIONS, and
for "proof" type problems HYPOTHESIS and CONCLUSION.
For examples that illustrate these, see Example 1, and Example 3, respectively.
Be careful about hidden assumptions, data and conditions.
(2) Consult definitions for unfamiliar (often even familiar) terminologies.
(3) Construct one or two simple example to illustrate what the problem says.
EXAMP
Example 1
This is an example in which you can find a solution once you analyze and understand the unknowns and
data.
Problem: A survey of TV viewers shows the following results:
To the question "Do you watch comedies ?", 352 answered "Yes".,
To the question "Do you watch sports ?", 277 answered "Yes", and
To the question "Do you watch both comedies and sports ?", 129 answered "Yes".
Given these data, find, among people who watch at least one of comedies and sports, percentages of
people who watch at least one of comedies and sports watch only comedies, only sports, and both
comedies and sports.
Understanding the Problem: This is a "find" type problem. So we try to identify unknowns, data and
conditions.
The unknowns are the percentage of people who watch only comedies, the percentage of people who
watch
only sports, and the percentage of people who watch both comedies and sports.
The data are the three numbers: 352, 277 and 129, representing the number of people who watch
comedies,
sports, and both comedies and sports, respectively. Note that 352 includes people who watch both
comedies and
sports as well as people who watch only comedies. Similarly for 277.
The conditions are not explicitly given in the problem statement. But one can see that the percentages
must add
or similar to those in the given problem. It is also a good idea to try to recall previously solved similar
problems.
See "Some helpful tips" below for more.
To see examples that illustrate these click here.
What should I look for ?
Look for a helpful idea that shows you the way to the end. Even an incomplete idea should be considered.
Go along with it to a new situation, and repeat this process. Some helpful tips
There is no single method that works for all problems. However, there is a wealth of heuristics we can
try.
Following are some of the often used heuristics.
Add your own heuristics as you gain experience.
(1) Have I seen it before ?
That is, do I know similar or related problems ? Similar/related problems are ones with the same or a
similar unknown or unknown may be different but the settings are the same or similar. See Example 2
for example.
(2) Do a little analysis on relationships among data, conditions and unknowns, or between hypothesis
and conclusion.
(3) What facts do I know related to the problem on hand ?
These are facts on the subjects appearing in the problem. They often involve the same or similar words.
An example can be found below.
It is very important that we know inference rules.
(4) Definitions: Make sure that you know the meaning of technical terms. This is obviously crucial to
problem solving at any level. But especially at this level, if you know their meaning and understand the
concepts, you can see a solution to most of the problems without much difficulty. See for example
Example 1, and Example 2 below.
(5) Compose a wish list of intermediate goals and try to reach them.
(6) Have you used all the conditions/hypotheses ? : When you are looking for paths to a solution or trying
to verify your solution, it is often a good idea to check whether or not you have used all the
data/hypotheses. If you haven't, something is often amiss. See Example 4 for example.
(7) Divide into cases: Sometimes if you divide your problem into a number of separate cases based on a
property of objects appearing in the problem, it simplifies the problem and clear your mind. For example
if the problem concerns integers, then you may want to divide it into two cases: one for even numbers
and the other for odd numbers as, for example, you can see in Example 3 below.
(8) Proof by contradiction: If you make an assumption, and that assumption produces a statement that
does not make sense, then you must conclude that your assumption is wrong. For example, suppose that
your car does not start. A number of things could be wrong. Let us assume for simplicity's sake that
either the battery is dead or the starter is defective. So you first assume that the battery is dead and try to
jump start it. If it doesn't start, you have a situation that does not make sense under your assumption of
dead battery. That is, a good battery should start the car but it doesn't. So you conclude that your
assumption is wrong. That is the battery is not the cause.
Proof by contradiction follows that logic.
In this method we first assume that the assertion to be proven is not true and try to draw a contradiction
i.e. something that is always false. If we produce a contradiction, then our assumption is wrong and
therefore the assertion we are trying to prove is true. Example 3 below uses this method When you are
stuck trying to justify some assertion, proof by contradiction is always a good thing to try. (9)
Transform/Restate the problem, then try (1) ( 3) above.
(10) Working backward: In this approach, we start from what is required, such as conclusion or final
(desired) form of an equation etc., and assume what is sought has been found. Then we ask from what
antecedent the desired result could be derived. If the antecedent is found, then we ask from what
antecedent that antecedent could be obtained. ... We repeat this process until either the data/hypotheses
are reached or some easy to solve problem is reached. Example 4 and Example 5 below give simple
examples of this approach.
(11) Simplify the problem if possible. Take advantage of symmetries which often exist.
Example 2
This is a problem which you can solve using similar known results. Problem: Find the (length of)
diagonal of a rectangular parallelepiped given its length, width and height. Again let us try to solve this
problem following the framework presented above.
Understanding the Problem: This is a "find" type problem. So we try to identify unknowns, data and
conditions. The unknown is the diagonal of a rectangular parallelepiped, and the data are its length, width
and height. Again there are no explicitly stated conditions. But the unknown and data must all be a
positive number. Before proceeding to the next phase, let us make sure that we understand the
terminologies. First a rectangular parallelepiped is a box with rectangular faces like a cube except that
the faces are not necessarily a square but a rectangle as shown below.
Next a diagonal of a rectangular parallelepiped is the line that connects its two vertices (corner points)
that are not on the same plane. It is shown in the figure below.
Devising a Solution Plan: Here we first try to find relevant facts. Relevant facts often involve the same
or similar words or concepts. Since the unknown is a diagonal, we look for facts concerning diagonal.
Note that drawing figures here is quite helpful.
One of the facts that immediately comes to our mind in this problem is Pythagoras' theorem. It has to do
with right triangles and is shown below.
Let us try to see whether or not this theorem helps. To use this theorem, we need a right triangle involving
a diagonal of a parallelepiped. As we can see below, there is a right triangle with a diagonal x as its
hypotenuse.
However, the triangle here involves two unknowns: x and y. Since x is what we are looking for, we need
to find the value of y. To find y, we note another right triangle shown below.
ax2 + bx + c = 0 has a rational root m/n, where m and n are integers, when a, b, and c are odd integers.
We can assume without loss of generality that m and n do not have any factors in common. Then a(m/n)2
+ b(m/n) + c = 0 .
( 1) Let us try to derive a contradiction from this. First let us make this equation simpler, that is, let us
get rid of fractions. Since n is not equal to 0, multiplying the both sides of (1) by n2, we get
am2 + bmn + cn2 = 0 .
(2) Since m is an integer, it is either even or odd. We are going to consider those cases one by one. That
is "divide into cases".
Let us first consider the case when m is even.
Then n is odd, since otherwise m and n have a common factor 2. Now am2 + bmn is even, and cn2 is
odd. Hence am2 + bmn + cn2 can not be 0.
Next let us consider the case when m is odd.
By an argument similar to the previous case, we can see that n is also odd.
If m and n are odd, then am2, bmn, and cn2 are all odd, since a, b, and c are odd integers. However, the
sum of three odd numbers can not be equal to 0.
Thus by assuming that the conclusion is false, we have arrived at a contradiction, that is m/n does not
satisfy the equation. Hence our assumption must be wrong, and therefore the conclusion is correct.
Example 4
This is another proof type problem and "working backward" technique is used.
Problem: Prove that ( a + b + c )2 4( ab + bc + ca ) , if a, b, c are three sides of a triangle.
Understanding the Problem: This is a "prove" type problem. The hypothesis is that a, b, and c are three
sides of a triangle, and the conclusion is that inequality ( a + b + c )2 4( ab + bc + ca ) holds.
Devising a Solution Plan: Here we try "Working Backward" heuristic. That is manipulate the conclusion
possibly using the hypothesis and reduce it into something that is obviously true.
First by multiplying out the left hand side of the inequality, ( a + b + c )2 = a2 + b2 + c2 + 2( ab + bc +
ca ) . Hence if a2 + b2 + c2 2( ab + bc + ca ) , then the conclusion holds. Next, to see what we can try,
note that we have not used the hypothesis yet, and see if it can help here. It is well known that the sum
of two sides of a triangle is greater than the third side. Hence a + b > c , b + c > a , and c + a > b hold.
From these we can obtain c(a + b) > c2 , a(b + c) > a2 , and b(c + a) > b2 . By adding these three
inequalities, we get a2 + b2 + c2 < a(b + c) + b(c + a) + c(a + b) = 2( ab + bc + ca ) . Hence a2 + b2 +
Generation of computers
TYPES OF COMPUTER
The computer sitting on the desk in your classroom is a microcomputer. It is a small, powerful
piece of equipment. Even so, the power of the microcomputer is not enough for most large organizations.
The computer industry consists of more than just microcomputers.
Any classification of computers is somewhat arbitrary. Computer can be classified it to following basis
defined below.
· On the basis of functionality
· On the basis of Size, Speed and Cost.
ON THE BASIS OF FUNCTIONALITY:
According to functionality computer can be divided in to three types:
1. Analog
2. Digital
3. Hybrid
ANALOG COMPUTERS:
DEFINITION:
·“An analog (spelled analogue in British English) computer is a form of computer that uses
the continuously-changeable aspects of physical fact such as electrical, mechanical, or hydraulic
quantities to model the problem being solved.”
· Analog means continuity of associated quantity just like an analog clock measures time by means of the
distance traveled by the hand of the clock around a dial.
DIGITAL COMPUTERS:
DEFINITION:
· “A computer that performs calculations and logical operations with quantities represented as digits,
usually in the binary number system of “0” and “1”.
· “Computer capable of solving problems by processing information expressed in discrete form. By
manipulating combinations of binary digits (“0”, “1”), it can perform mathematical calculations,
organize and analyze data, control industrial and other processes, and simulate dynamic systems such as
global weather patterns. ”
SUPER COMPUTER
Supercomputers are the largest, fastest, most powerful, and most expensive computers made.
Like other large systems, supercomputers can be accessed by many individuals at the same time.
Supercomputers are used primarily for scientific applications that are mathematically intensive. The first
supercomputer was built in the 1960s for the United States Department of Defense.
This computer was designed to be the world's fastest and most powerful computer of that time.
The commitment to create the fastest, most powerful computer in the world is still the driving force
behind the development of supercomputers. Manufacturers produce relatively few of any one model of
supercomputer, and they spend millions of dollars on research and development of new
machines.
Note: The speed of modern supercomputers is measured in nanoseconds and gigaflop. A nanosecond is
one billionth of a second. A gigaflop is one billion floating-point arithmetic operations per second.
MAINFRAME COMPUTER
Mainframe computers are the most powerful computers. A mainframe computer may contain several
microprocessors. A single mainframe computer can be used by hundreds of people at once. Each user
has his own terminal that is connected to the mainframe. Mainframe computers are usually kept in a
special cooled, clean computer room. Minicomputers are medium-sized computers which are more
powerful than microcomputers but not as powerful as mainframes.
A mainframe computer system is usually composed of several computers in addition to the mainframe,
or host processor.
Host Processor:
The host processor is responsible for controlling the other processors, all the peripheral devices, and the
mathematics operations.
A front-end processor is responsible for handling communications to and from all the remote terminals
connected to the computer system.
FEATURES:
· Mainframe computer systems are powerful enough to support several hundred users
simultaneously at remote terminals.
· Mainframe Computers are so much faster than people, the users never notice that the computer
is handling other tasks.
· This capability to process many programs concurrently for multiple users is known
asmultiprogramming.
MINI COMPUTER
The "age of the mini" started in the late 1960s. The creation of integrated circuits suitable for
computers enabled designers to shrink the size of the computer. Minicomputers are frequently referred
to as mid-rangecomputers.
Before Digital Equipment Corporation (DEC) released the first DEC PDP-8 minicomputer in 1968,
most medium-sized organizations were priced out of the computer market because they couldn't afford
mainframe computers.
EXAMPLE:
· IBM AS/400 ·IBM SYSTEM 360 ·HP 3000 ·PRIME 9755
MICROCOMPUTER
When you are working on a multiuser computer, such as a mainframe or minicomputer, you can
control the input and see the output on the display, but you control nothing else.
A single-user computer gives you control over all the phases of computer processing: input,
processing, output, and storage. You can select the programs you want to use, and you don't have to
compete with other users to gain access to the system. A single-user system is designed to meet the
computing needs of an individual.
Single-user computers fall into two categories:
· Workstations
· Microcomputers.
WORKSTATION:
A workstation is a powerful desktop computer designed to meet the computing needs
of engineers, architects, and other professionals who need detailed graphics displays. The workstation
has sometimes been called a "super micro." The workstation looks very much like a desktop
microcomputer, but the chips inside make the difference
For example, workstations are commonly used for computer-aided design (CAD), in which
industrial designers create pictures of technical parts or assemblies. To process these complex and
detailed diagrams, the computer needs great processing power and much storage.
MICROCOMPUTERS:
It is difficult to overstate the impact of the microcomputer on the computer industry. In 1975, the
microcomputer did not exist. In 1995, sales exceeded $116 billion. Microcomputers are the fastest
growing segment of the computer industry.
The microcomputer segment of the industry is complex; there are different types of
microcomputer platforms with varying capabilities. The most common type of microcomputer is
a desktop computer, which is a non portable personal computer that fits on top of a desk. (will describe
below).
Microcomputers are the smallest and cheapest of these and are used at home, in schools and in
some businesses. Mainframe computers are the most powerful computers
This table makes some comparisons between the different types of computer:
Medium sized
Home, small
business. e.g. Large
business, on a
Where Used supermarket, businesses,
network in
traffic control universities.
a largerbusiness.
system.
Number of
1 1 – 20 Hundreds
Users
PERSONAL COMPUTER
DEFINITION:
“A small computer, intended for use by an individual. A personal computer will usually fit on a
desk.” A computer designed for use by a single user. Although other Microcomputers preceded it, the
IBM PC was the first to use the name specifically. As a result, the term PC now applies to an IBM-
compatible computer as contrasted to the Apple Macintosh, these being the two standards that emerged
from an abundance of competitors in the early 1980s.
· DesktopComputer
DESKTOP COMPUTER:
DEFINITION:
“A computer designed for desktop use; usually comprises, at a minimum, a central processing unit
(CPU), a monitor, and a keyboard as separate units, connected by special cables. Most such computers
now also include a Pointing Device.
A computer that could fit on a desk was considered remarkably small. Desktop computers come in a
variety of types ranging from large vertical tower cases to small form factor models that can be tucked
behind an LCD monitor.
"Desktop" can also indicate a horizontally-oriented computer case usually intended to have the display
screen placed on top to save space on the desktop. Most modern desktop computers have separate screens
and keyboards.
· “A laptop is a personal computer designed for mobile use, small and light enough to sit on a
person's lap while in use.”
· “A portable computer typically weighing less than 6 pounds (3 kilograms) that has a flat-panel
display and miniature hard disk drives, and is powered by rechargeable batteries.”
Laptops are capable of many of the same tasks that desktop computers perform, although they are
typically less powerful. Laptops contain components that are similar to those in their desktop
counterparts and perform the same functions but are miniaturized and optimized for mobile use and
efficient power consumption. Laptops usually have LCD displays.
Laptops generally cost around twice as much as a desktop machine of similar specification. Performance
is always lower than that of a comparable desktop because of the compromises necessary to keep weight
and power consumption low.
All devices which can carry in hand and portable, is said to be mobile
devices and computers.
DEFINITION:
PDA stands for “Personal Digital Assistant”. A small, handheld system combining in one device
multiple computing, Internet, networking, and fax/telephone features”A PDA contain following features:
· Schedule appointments
· Most PDAs are designed to accept written input by a pen; the PDA decodes what you write.
TABLETPC
DEFINITION:
· “A tablet PC is a wireless personal computer (PC) that allows a user to take notes using natural
handwriting with a stylus or digital pen on a touch screen.”
A tablet PC is similar in size and thickness to a yellow paper notepad and is intended to function as the
user's primary personal computer as well as a note-taking device.
Tablet PCs generally have two formats, a convertible model with an integrated keyboard and display
that rotates 180 degrees and can be folded down over the keyboard or a slate style, with a removable
keyboard.
The user's handwritten notes, which can be edited and revised, can also be indexed and searched or
shared via e-mail or cell phone.
· “Very small, lightweight device (such as the Palm Pilot) which provides functionality approaching
that of a laptop computer. “
Features of modern handhelds include calendar and diary organizing, word processing, data
management, remote access to firm's network, internet access, wireless access, messaging, etc
· “A laptop is a personal computer designed for mobile use, small and light enough to sit on a
person's lap while in use.”
“A portable computer typically weighing less than 6 pounds (3 kilograms) that has a flat-panel
display and miniature hard disk drives, and is powered by rechargeable batteries.”
Laptops are capable of many of the same tasks that desktop computers perform, although they are
typically less powerful. Laptops contain components that are similar to those in their desktop
counterparts and perform the same functions but are miniaturized and optimized for mobile use and
efficient power consumption. Laptops usually have LCD displays.
Laptops generally cost around twice as much as a desktop machine of similar specification. Performance
is always lower than that of a comparable desktop because of the compromises necessary to keep weight
and power consumption low.