11 - EduSys

28
11

Transcript of 11 - EduSys

Page 1: 11 - EduSys

11

Page 2: 11 - EduSys

2 Class - XI-XII Eduheal Foundation

Contents

1. How Secure are you on the Internet? ............................. 3

2. Future Computers ................................................................ 9

3. Activity – Build your Computer......................................... 11

4. International Olympiad in Informatics..........................23

5. LAN Topologies ...................................................................25

6. Banjarne Stroustrup‛s on C++ ..........................................27

Page 3: 11 - EduSys

3 Class - XI-XII Eduheal Foundation

HOW SECURE ARE YOU ON THE INTERNET?

Computer Internet Security needs to be practiced by all computer users to prevent malicious codes being installed on their computer. Securing your computer against Internet threats is a priority.

Today, with the help of a computer and an Internet Service Provider (ISP), we can find information on most of the subjects that we will ever desire to know about. The Internet has become such an important part of our lives that, if you are not connected to the Internet, you are missing out on a lot of knowledge. A computer firewall, antivirus and anti­spyware software are mandatory to help to keep your computer secure.

HOW SECURE IS THE INTERNET? By using the Internet, you are sending information from computer to computer until the information you are sending reaches its destination. This allows the possibility of the information that you are sending to be viewed via unauthorized computers thereby resulting in a computer security problem.

Everyday, there are more and more viruses, trojan horses and worms being spread across the Internet and affecting numerous computers. Hackers are always ready to get your personal data.

RISKS OF AN ATTACK Most computer users do not recognize how much at risk they are to attack while using the Internet. They fail to take enough Internet security precautions thereby making themselves prime targets for Internet crooks. Being on the Internet exposes you to continuous vulnerabilities which could result in: • The loss of your personal data. • Hackers remotely accessing your computer. • Malware and other unauthorized programs affecting your computer.

Some of these vulnerabilities can allow hackers to attack your computer even if you did not click a link or open a file. Users with standalone anti­virus or anti­spyware software should install (1) a firewall with inbound and outbound protection, and (2) safe surfing protection. • Always keep your operating system and Internet browser up­to­date. • Use any other up­to­date software that will give you added protection from viruses, spyware, ad­ware, trojans and any other malicious code that is now prevalent on the Internet.

• Install anti­virus software and keep it up­to­date. • Install an Internet firewall to help to protect your computer from outside attacks. • Ensure that you have the very latest computer internet security features installed for all your computer software.

• You should consider an Internet security suite which includes firewall protection, antivirus protection along with other security and privacy features.

• Choose an Internet Service Provider (ISP) that offers security features such as virus, spam and content filters.

• If you have two or more computers connected to the Internet, use a hardware router with firewall features. Wireless routers are not as secure as wired routers.

• Never click “Yes” when a message says that you need to download ActiveX to view a Website unless you know exactly what you are downloading.

• Never e­mail your personal and financial information.

Page 4: 11 - EduSys

4 Class - XI-XII Eduheal Foundation

• Always look for the closed padlock icon or unbroken key on your browser’s status bar and ‘https’ in the address bar before submitting your personal information via a Web site. This usually confirms that you are transmitting your information via a secure site.

• You should examine your financial statements (such as your credit cards and bank account statements) as soon as they are received to determine if there are any unauthorized charges.

• If you receive a threatening email stating that your account will be closed/shut down unless you verify your billing information, you should never reply or click on any link provided. You should visit the website using the URL address that you know to be correct or contact the company by using the telephone number that you are familiar with.

• Ensure that all requests which are made for your personal and financial information are genuine. • Practice computer internet security ­ Do not download anything from unknown websites. • Always ensure that all attachments that you open are from trusted sources. • Provide your e­mail address only to sources that you trust. • Never give your User ID or password to anyone. • Select passwords that are not easy for someone else to guess and try to use different passwords for your various online accounts. You should change your passwords often and use upper and lower case letters along with a mixture of numbers and letters.

• Always remember to sign off from your online banking accounts and from any other secure Website that you visit.

• For security reasons, turn off your computer when not in use.

WHAT IS A COMPUTER FIREWALL? A Computer Firewall should be installed if you intend to be connected to the Internet. Connecting your computer to the Internet without using a firewall could result in it being hijacked by a hacker.

A computer firewall is a security (protective) system which helps to block unauthorized Internet access to your computer. It acts as a barrier (like a wall!) between your computer ports and the Internet and should close and hide (‘stealth’) all your unused ports. It allows you to control the data which passes to and from your ports.

Connecting your computer to the Internet without a firewall could result in it being hijacked by hackers. Hijackers will use malicious codes such as viruses, worms and trojan horses to gain unauthorized access to unprotected/vulnerable computers.

Software Firewalls: A software firewall is the most popular choice among individual computer users using single computers. The advantage of this firewall is that it does not require any additional hardware or computer wiring. The disadvantage of this software is that it will only protect one computer; therefore, each additional computer at your disposal will need their own software installed thereby creating additional cost.

Hardware Routers: This is the best choice for home computer networking connected to the Internet. If you are connecting more than one computers, you should install a hardware firewall. Hardware firewalls usually provide firewall protection for a number of computers and generally consist of at least four network ports to connect to other computers. The disadvantage of this type of firewall is that it will require wiring.

Wireless Routers: This allows you to connect a number of computers, peripherals and accessories without wiring. If you will be using wireless networking, you will definitely need to be using a wireless router. The disadvantage of this type of firewall is that it uses radio signals and these signals might be captured externally by someone else and used maliciously.

Page 5: 11 - EduSys

5 Class - XI-XII Eduheal Foundation

“War Driving” is among one of these malicious practices. Individuals who drive through communities in motor vehicles equipped with laptops and high gain antennas “catching” signals from various households’ wireless networks are guilty of “War Driving”.

Your Firewall Protection Guidelines: • Use a firewall from a reputable vendor and ensure that it will be able to monitor all your incoming and outgoing traffic and will alert you for permission for this traffic to access your computer.

• It should be able to hide your presence from intruders/hackers by totally blocking all access to your ports which are used to transmit your information.

• Make sure that it is properly configured. If it is improperly configured, it will not provide adequate protection and will still make your computer vulnerable for attacks.

• Select the highest security level for your Internet zone and all programs should be set to prompt you to be able to get access. This should include even programs that you use frequently.

• Do not allow access to any program until its identity is established as trusted. • Your firewall should be able to inspect each individual packet of data.

ANTIVIRUS SOFTWARE Is your Computer Running without it? Antivirus software should be installed on your computer if you intend to be connected to the Internet. This software has now become a necessity to protect your computer against viruses, worms and other types of malicious codes.

What is a Computer Virus? A Computer Virus is a program or a code that will spread itself by infecting other programs on your computer. Viruses are created to spread from computer to computer. Dealing with virus infected Computers can be expensive.

Computer viruses will load themselves onto your computer without your knowledge and can do very serious damage to your system such as altering or destroying your files. These viruses will attach themselves to program files and be activated whenever these programs are run.

Computer Viruses can exist by being: • Active in your computer memory. • Laying dormant in your files and boot records.

A Computer Virus has a three­phase existence: 1. Infection: The virus infects your computer file. Some of the ways that a virus can infect your computer are:

(i) Visiting a malicious website. (ii) Opening an infected attachment via e­mail. (iii) Via a diskette (you might have borrowed one!) (iv) A software that you downloaded (be careful of free software!). Install Antivirus Software to Protect your Computer: Antivirus software will help to protect your

computer against viruses, worms and other types of malicious codes. Viruses can infect your program files such as your operating system, spreadsheets, word processing and corrupt your files and data.

Viruses cannot do any physical damage to your disks, your monitors or keyboards; it can only infect the programs which control your monitor display or keyboard. Your write­protected disks cannot be infected.

Page 6: 11 - EduSys

6 Class - XI-XII Eduheal Foundation

Different Types of Computer Viruses: There are Different Types of Computer Viruses could be classified in (origin, techniques, types of files they infect, where they hide, the kind of damage they cause, the type of operating system or platform they attack) etc.

Computer Virus is a kind of malicious software written intentionally to enter a computer without the user’s permission or knowledge, with an ability to replicate itself, thus continuing to spread. Some viruses do little but replicate others can cause severe harm or adversely effect program and performance of the system. A virus should never be assumed harmless and left on a system. Most common types of viruses are mentioned below:

Resident Viruses: This type of virus is a permanent which dwells in the RAM memory. From there it can overcome and interrupt all of the operations executed by the system: corrupting files and programs that are opened, closed, copied, renamed etc.

Examples: Randex, CMJ, Meve, and MrKlunky. Direct Action Viruses: The main purpose of this virus is to replicate and take action when it is

executed. When a specific condition is met, the virus will go into action and infect files in the directory or folder that it is in and in directories that are specified in the AUTOEXEC.BAT file PATH. This batch file is always located in the root directory of the hard disk and carries out certain operations when the computer is booted.

Overwrite Viruses: Virus of this kind is characterized by the fact that it deletes the information contained in the files that it infects, rendering them partially or totally useless once they have been infected. The only way to clean a file infected by an overwrite virus is to delete the file completely, thus losing the original content.

Examples: Way, Trj.Reboot, Trivial.88.D. Boot Virus: This type of virus affects the boot sector of a floppy or hard disk. This is a crucial part

of a disk, in which information on the disk itself is stored together with a program that makes it possible to boot (start) the computer from the disk.

The best way of avoiding boot viruses is to ensure that floppy disks are write­protected and never start your computer with an unknown floppy disk in the disk drive.

Examples: Polyboot.B, AntiEXE. Macro Virus: Macro viruses infect files that are created using certain applications or programs that

contain macros. These mini­programs make it possible to automate series of operations so that they are performed as a single action, thereby saving the user from having to carry them out one by one.

Examples: Relax, Melissa.A, Bablas, and O97M/Y2K. Directory Virus: Directory viruses change the paths that indicate the location of a file. By executing

a program (file with the extension .EXE or .COM) which has been infected by a virus, you are unknowingly running the virus program, while the original file and program have been previously moved by the virus. Once infected it becomes impossible to locate the original files.

Polymorphic Virus: Polymorphic viruses encrypt or encode themselves in a different way (using different algorithms and encryption keys) every time they infect a system.

This makes it impossible for anti­viruses to find them using string or signature searches (because they are different in each encryption) and also enables them to create a large number of copies of themselves.

Examples: Elkern, Marburg, Satan Bug, and Tuareg.

Page 7: 11 - EduSys

7 Class - XI-XII Eduheal Foundation

File Infectors: This type of virus infects programs or executable files (files with an .EXE or .COM extension). When one of these programs is run, directly or indirectly, the virus is activated, producing the damaging effects it is programmed to carry out. The majority of existing viruses belongs to this category, and can be classified depending on the actions that they carry out.

Companion Viruses: Companion viruses can be considered file infector viruses like resident or direct action types. They are known as companion viruses because once they get into the system they “accompany” the other files that already exist. In other words, in order to carry out their infection routines, companion viruses can wait in memory until a program is run (resident viruses) or act immediately by making copies of themselves (direct action viruses).

Examples: Stator, Asimov.1539, and Terrax.1069. FAT Virus: The file allocation table or FAT is the part of a disk used to connect information and is a

vital part of the normal functioning of the computer. This type of virus attack can be especially dangerous, by preventing access to certain sections of the

disk where important files are stored. Damage caused can result in information losses from individual files or even entire directories.

Worms: A worm is a program very similar to a virus; it has the ability to self­replicate, and can lead to negative effects on your system and most importantly they are detected and eliminated by antivirus.

Examples: PSWBugbear.B, Lovgate.F, Trile.C, Sobig.D, and Mapson.

Trojans or Trojan Horses: Another unsavory breed of malicious code are Trojans or Trojan horses, which unlike viruses do not reproduce by infecting other files, nor do they self­replicate like worms.

Logic Bombs: They are not considered viruses because they do not replicate. They are not even programs in their own right but rather camouflaged segments of other programs.

Their objective is to destroy data on the computer once certain conditions have been met. Logic bombs go undetected until launched, and the results can be destructive.

NOTE: First virus was “creeper virus” it was spread all over the Arpanet and displays a message on the screen “hi! I am creeper catch me if you can!”

2. Virus Detection : If the virus is detected, your software should ‘go to work’ and move the infected file to ‘quarantine’ to prevent problems. Always keep your antivirus software enabled and up­to­date!

3. Virus Recovery: Your virus removal program should be used to remove viruses. If the virus is not removed, it will continue to infect other files with the possibility of damaging the data on your disks.

Page 8: 11 - EduSys

8 Class - XI-XII Eduheal Foundation

You should look for the following when Choosing an antivirus software Compatibility: Compatible with your hardware and software configuration. Virus Updates: You should choose a vendor who provides free daily updates from their website. This

is because viruses are continuously being created and it is, therefore, very important that your antivirus software is kept up­to­date.

Round­the­clock scanning: This software is continually running in the background, checking and monitoring your files whenever they are opened, executed or installed.

E­mail: Protection when sending and receiving email. Tips: If the software supports the creation of a recovery disk, make one since this disk could be your

only hope of recovering from an infection. Never run more than one antivirus programs at a time since this will be using up additional resources

which could result in program conflicts and false virus alerts. Use your antivirus software: Scan your entire system if you are loading it for the first time. You should continuously download software patches: There are some virus attacks that weaken your

software. Antivirus software vendors are always releasing patches on their website to take care of this. You need to keep your software up­to­date since new viruses are created everyday. Your virus protection

software should allow automatic updates and you should enable this feature. Never go online without the latest anti­virus protection. Fast­spreading mass­mailing viruses, worms and Trojans like Mydoom, Bagle and Sasser can easily infect exposed PCs over dial­up or broadband connections, forward themselves to your e­mail contacts and even help remote hackers hijack personal information.

Scan your removable media at all times: Ensure that all floppy disks, CD­ROMs, DVD­ROMs, zip drives and any other removable media are scanned before using them. Using an unscanned floppy disk that has been infected with a virus could result in a boot sector virus.

Only download files from people that you trust: Your antivirus software should be set to automatically scan all files that you download. Only download software from reputable vendors.

Install only legal copies of software on your computer: Be careful of software that you install since it can be an opening for a virus.

Backup your system on a regular basis: In case of a virus attack, your files won’t be lost. Write­protect your diskettes: After formatting, keep your floppy disks write­protected after each use.

Have an up­to­date write­protected set of rescue disks to allow your computer to recover from a virus attack.

Watch out for viruses in e­mail attachments: Do not open an attachment that you were not expecting even if it is coming from someone that you trust. Check with the sender first to ensure that they sent the message. Many viruses and worms infect address books without the person’s knowledge. Delete all files that you do not trust. Your computer should have an antivirus software installed to reduce the risk of virus infection. This software is reasonably effective if kept up­to­date and if the computer user takes all the necessary precautions such as not opening unknown documents/attachments or programs. Although virus protection software is now quite sophisticated, it will not provide you with 100% protection since the creation of computer viruses are often way ahead of the people involved in antivirus research.

Page 9: 11 - EduSys

9 Class - XI-XII Eduheal Foundation

QUANTUM COMPUTER A quantum computer is a device for computation that makes direct use of distinctively quantum mechanical phenomena, such as superposition and entanglement, to perform operations on data. In a classical (or conventional) computer, information is stored as bits; in a quantum computer, it is stored as qubits (quantum binary digits). The basic principle of quantum computation is that the quantum properties can be used to represent and structure data, and that quantum mechanisms can be devised and built to perform operations with this data.

Although quantum computing is still in its infancy, experiments have been carried out in which quantum computational operations were executed on a very small number of qubits. Both practical and theoretical research continues with interest, and many national government and military funding agencies support quantum computing research to develop quantum computers for both civilian and national security purposes, such as cryptanalysis. If large­scale quantum computers can be built, they will be able to solve certain problems much faster than any of our current classical computers (for example Shor's algorithm). Quantum computers are different from other computers such as DNA computers and traditional computers based on transistors. Some computing architectures such as optical computers may use classical superposition of electromagnetic waves. Without some specifically quantum mechanical resources such as entanglement, it is conjectured that an exponential advantage over classical computers is not possible.

Classical computer has a memory made up of bits, where each bit holds either a one or a zero. A quantum computer maintains a sequence of qubits. A single qubit can hold a one, a zero, or, crucially, a quantum superposition of these; moreover, a pair of qubits can be in a quantum superposition of 4 states, and three qubits in a superposition of 8. In general a quantum computer with n qubits can be in up to 2n different states simultaneously (this compares to a normal computer that can only be in one of these 2n states at any one time). A quantum computer operates by manipulating those qubits with a fixed sequence of quantum logic gates. The sequence of gates to be applied is called a quantum algorithm. An example of an implementation of qubits for a quantum computer could start with the use of particles with two spin states: "up" and "down" (typically written and , or and ). But in fact any system possessing an observable quantity A which is conserved under time evolution and such that A has at least two discrete and sufficiently spaced consecutive eigenvalues, is a suitable candidate for implementing a qubit. This is true because any such system can be mapped onto an effective spin­1/2 system

CHEMICAL COMPUTER A chemical computer, also called reaction­diffusion computer, BZ compter or gooware computer is an unconventional computer based on a semi­solid chemical "soup" where data is represented by varying concentrations of chemicals. The computations are performed by naturally occurring chemical reactions. So far it is still in a very early experimental stage, but may have great potential for the computer industry.

Rationale The simplicity of this technology is one of the main reasons why it in the future could turn into a serious competitor to machines based on conventional hardware. A modern microprocessor is an incredibly complicated device that can be destroyed during production by no more than a single airborne microscopic particle. In contrast a cup of chemicals is a simple and stable component that is cheap to produce.

In a conventional microprocessor the bits behave much like cars in city traffic; they can only use certain roads, they have to slow down and wait for each other in crossing traffic, and only one driving field at once can be used. In a BZ solution the waves are moving in all thinkable directions in all dimensions, across, away and against each other. These properties might make a chemical computer able to handle billions of times more data than a traditional computer. An analogy would be the brain; even if a microprocessor can transfer information much faster than a neuron, the brain is still much more effective for some tasks because it can work with a much higher amount of data at the same time.

Basic Principles The wave properties of the BZ reaction means it can move information in the same way as all other waves. This still leaves the need for computation, performed by conventional microchips using the binary code transmitting and changing ones and zeros through a complicated system of logic gates. To perform any conceivable computation it is sufficient to have NAND

FUTURE COMPUTERS

The Bloch sphere is a representation of a qubit, the fundamental building

block of quantum computers

Page 10: 11 - EduSys

10 Class - XI-XII Eduheal Foundation

Molecular Computing Section

Computations performed with DNA as input/output data; DNA reactions, capture of DNA results and DNA detection all performed automatically.

Electronic Computing Section

Information processing program performed; output includes DNA reaction calcu lations and an analysis of results.

gates. (A NAND gate has two bits input. Its output is 0 if both bits are 1, otherwise it's 1). In the chemical computer version logic gates are implemented by concentration waves blocking or amplifying each other in different ways.

DNA COMPUTING DNA computing is a form of computing which uses DNA, biochemistry and molecular biology, instead of the traditional silicon­based computer technologies. DNA computing, or, more generally, molecular computing, is a fast developing interdisciplinary area. R&D in this area concerns theory, experiments and applications of DNA computing.

History This field was initially developed by Leonard Adleman of the University of Southern California, in 1994. Adleman demonstrated a proof­of­concept use of DNA as a form of computation which solved the seven­point Hamiltonian path problem. Since the initial Adleman experiments, advances have been made and various Turing machines have been proven to be constructible. In 2002, researchers from the Weizmann Institute of Science in Rehovot, Israel, unveiled a programmable molecular computing machine composed of enzymes and DNA molecules instead of silicon microchips. On April 28, 2004, Ehud Shapiro, Yaakov Benenson, Binyamin Gil, Uri Ben­Dor, and Rivka Adar at the Weizmann Institute announced in the journal Nature that they had constructed a DNA computer[5]. This was coupled with an input and output module and is capable of diagnosing cancerous activity within a cell, and then releasing an anti­cancer drug upon diagnosis.

Capabilities DNA computing is fundamentally similar to parallel computing in that it takes advantage of the many different molecules of DNA to try many different possibilities at once.

For certain specialized problems, DNA computers are faster and smaller than any other computer built so far. But DNA computing does not provide any new capabilities from the standpoint of computability theory, the study of which problems are computationally solvable using different models of computation. For example, problems which grow exponentially with the size of the problem (EXPSPACE problems) on von Neumann machines still grow exponentially with the size of the problem on DNA machines. For very large EXPSPACE problems, the amount of DNA required is too large to be practical. (Quantum computing, on the other hand, does provide some interesting new capabilities).

DNA computing overlaps with, but is distinct from, DNA nanotechnology. The latter uses the specificity of Watson­Crick basepairing and other DNA properties to make novel structures out of DNA. These structures can be used for DNA computing, but they do not have to be. Additionally, DNA computing can be done without using the types of molecules made possible by DNA nanotechnology (as the above examples show).

MOLECULAR COMPUTERS Molecular computers are massively parallel computers taking advantage of the computational power of molecules (specifically biological).

Molectronics specifically refers to the sub­ field of physics which addresses the computational potential of atomic arrangements.

Page 11: 11 - EduSys

11 Class - XI-XII Eduheal Foundation

Computer Parts that you will need These are mandatory if you are building your own computer: • Computer Case • Power Supply • Processor(CPU) along with the Heatsink/Fan • Motherboard • Cooling Fans • Hard Drive • Memory ­ Part • • Memory ­ Part 2 • Keyboard and Mouse • DVD Drive • CD Drive • Floppy Drive • PCI Card • USB Port • FireWire Port • Monitor • Operating System • Graphics Card/Video Card • Sound Card/Audio Card • Modem

Additional Computer Components that are Recommended Although these parts are not mandatory but they are still important and recommended: • Network Card/Network Interface Card (NIC) • Wireless Router/Access Point • Wireless Network Card • Video Capture Card

Protection Equipment and Security Software Protecting your computer from viruses and hackers is extremely important. You should also prepare for possible loss of your electricity supply by purchasing a UPS backup system: • Internet Security Software • Antivirus software • Firewall • Surge Suppressor or UPS Backup System • Computer Internet Security

Tools: Your sensitive computer components will need to be protected from static electricity and you will need tools to repair or build your computer .These kits are available at any good electrical shop. • Anti­Static Equipment • Computer Tool Kit You should also get the following: • Plastic tie wraps to tie cables together. • Some cardboard sheets to use as a working surface to prevent static electricity damage while you are building the computer

Accessories Here are some accessories that will really make you enjoy your computer! You will be able to listen to your music, scan and print documents, take and print pictures with your digital camera, speak to and see your family and friends with your Web camera, view your favorite DVD movies, etc. • Printer • Speaker • Cheap Headphone • DVD Drive • Scanner • Digital Camera • Web Camera (Webcam)

ACTIVITY – BUILD YOUR COMPUTER

Page 12: 11 - EduSys

12 Class - XI-XII Eduheal Foundation

More Computer Tips • The software might sometimes show both the Minimum and Recommended system requirements. Using the recommended requirements make more sense.

• Get a fast enough processor (preferably Dual Core ) for the future upgrading of your system. • Get as much memory as you possibly can afford to enhance your computer’s performance. • If you are purchasing a computer system or building your own, get more hard disk space than you have determined that you will need now. Buy as large a hard drive as you can possibly afford. This is to allow for future expansion. Taking the time to evaluate your needs before making your final selection will save you both money

and regrets in the long run. Do not ‘cut corners’ on your main system unit such as your processor, memory and hard drive. You

would not want to be running out of memory or disk space shortly after purchasing a complete computer system or building your own!

Delay the buying of some of the software applications that are not critical for you to get now until at a later date. You might want to be using this computer for a few years; therefore, you should ensure that you now have enough memory, CPU, hard drive, etc.

Your Operating System Software A computer must have an operating system (OS) installed since it enables the computer to perform its tasks. A computer is useless without an operating system.

Computers are usually sold with an OS pre­loaded; the most popular of which is the Microsoft Windows family.

You might now be asking: ‘Where do I buy my computer’? Go to a reputable computer parts dealer of your city to purchase parts for building your computer

Here are some tips and safety precautions before starting to build your cheap computer: • Ensure that the parts that you are purchasing are compatible with the system that you are planning to build.

• Never take your computer parts out of their anti­static bags until you are ready to fit them into place. Keeping them in the bags will reduce static electricity damage to them.

• Never force computer parts into place ­ If you have to force a part into place, it is possible that you are inserting the wrong component or installing it improperly. STOP and check to see what you are doing wrong before you continue to build your cheap computer.

• Never open the power supply ­ The power supply has extremely high voltage inside which can be extremely dangerous.

• Never work on your computer with the power on ­ Doing so can cause electrical surges that can damage your cheap computer parts.

Steps to Build Your Own Computer using Computer Parts 1. Acquire Computer Part 2. Prepare the Computer Case 3. Examine Computer Motherboard 4. Install Computer Processor (CPU) and Heat Sink/Fan 5. Install Computer Memory 6. Install Computer Internal Drives

Page 13: 11 - EduSys

13 Class - XI-XII Eduheal Foundation

7. Install Computer Motherboard in Computer Case 8. Connect Computer Front Panel Switches/LEDs/Speaker, etc. 9. Connect ATX 20 or 24­Pin Power Supply Cable to Motherboard 10. Install Computer Video Card 11. Install Computer Sound Card 12. Connect Computer Peripheral to Back Panel 13. Post Assembly Check 14. Configure Motherboard Bios 15. Test Run Your Cheap Computer System 16. Partition and Format Hard Drive 17. Install Computer Operating System

Step 1: Acquire Computer Parts Computer components are readily available at many stores in your city,you just have to search for them.

Step 2: Prepare the Computer Case Computer cases come in different designs and form factors. Your choice of these computer cases will depend on your available space and preference. It could either be a desktop or a tower case. A desktop case usually sits on the top of the desk while a tower case sits underneath or beside the desk.

Remove the case from the box and examine it for dents or any other visible damage. Ensure that all relevant hardware is present.

NOTE: Ensure that the case came with the computer front panel switches, LEDs and speaker; otherwise, replace case.

If everything is O.K. remove the case cover. If the case comes with a power supply, thoroughly inspect power supply and power supply cables. Clean case to remove any dust. Install legs and all necessary hardware.

If case does not come with fans, install one on the front vent and the other at the rear. Ensure that the front fan is installed to draw air into the case ­ not blow out. Also, make sure that the rear one is installed to draw air out of the case. This helps to increase the circulation of air through the system case.

If you are into heavy gaming, your system will require maximum cooling; therefore, ensure that the case you are purchasing has sufficient cooling fan ports. Similarly, ensure that the case has sufficient external and internal drive bays. Remove plates from the drive bays that you intend to use. Your case is now ready for installation of components.

Step 3: Examine Computer Motherboard Before removing motherboard (mainboard) from box and anti­static packaging, protect it from static electricity by using an Anti­Static Wrist Strap. • Remove computer mainboard from box and anti­static packaging making sure to hold it by the edges.

• Check to see that system board is intact and that there are no damaged components.

• Ensure that the mainboard manual is present and also all mounting hardware. An ATX Mainboard is recommended because it is the

standard being used now by most computer manufacturers. A Typical ATX Motherboard

Page 14: 11 - EduSys

14 Class - XI-XII Eduheal Foundation

Step 4: Install Computer Processor (CPU)and Heat Sink/Fan Assembly Install Computer Processor (CPU): In this article, we are demonstrating an Athlon 64 X2 Socket 939

CPU. Processors (CPUs) are delicate components so handle them gently. To install the CPU, lift the lever on the socket straight up to the open position, then properly align processor with socket and carefully insert, taking care not to bend any pins.

Install the computer processor (CPU) into the socket, taking care not to bend any pins. The CPU should just drop into the socket without any resistance. This socket is called a Zero Insertion Force (ZIF) socket.

Diagram A below displays the computer processor (CPU) and socket. Ensure that the CPU is sitting properly in the socket and then lock the lever back down. (See diagram B below). Diagram B also shows the ZIF socket lever being lowered.

B

Install the Heat Sink/Fan Assembly: After the installation of the processor (CPU), install the heat sink/fan assembly. If the heat sink came with a thermal pad or tape on it, you do not need to use thermal compound.

In the event that it does not come with a thermal pad or tape, you need to use thermal compound due to its low electrical conductivity and good heat transfer properties.

Apply a small amount (but sufficient) to the core of the processor (CPU). Use enough to cover the core but not too much that it spills all over the CPU and motherboard. (See diagram C). To install the heat sink/fan assembly, start by placing the fan flat against the CPU and clip one side of the heat sink/fan assembly to the socket.

Clip the other side with a screwdriver to secure. Keep the heat sink flat on the processor (CPU) ­ not at an angle.

EXTREME CAUTION: It is extemely easy to damage CPUs while installing the heat sink/fan assembly. (See diagram D).

You have now installed the heat sink/fan assembly (See diagram D). Plug the fan into its appropriately marked header (CPU1) on the motherboard.

Page 15: 11 - EduSys

15 Class - XI-XII Eduheal Foundation

Step 5: Install Computer Memory It is now time to install your Cheap Computer Memory (RAM) To continue to build Your Own Cheap Computer, get your Motherboard Manual and determine into which slot Memory should be first installed. Ensure that your Memory type is supported by your Motherboard.

Memory modules come in different types such as 168­pin PC100 and PC133 SDRAM. These have now become obsolete and are being replaced by 184­pin and 240­pin DDR and DDR2 SDRAM modules which have faster access times.

These newer DDR and DDR2 modules can now be operated in dual­channel configuration which enhances performance. Dual­ channel means two identical memory modules being used at the same time.

Place the Computer Memory modules into the slots with the correct orientation and carefully press the Memory into the slot until it is securely locked in place with the clips.(See diagram).

Step 6: Install Computer Internal Drives (Hard Drive, Floppy Drive, CD­ROM Drive/DVD­ROM Drive) When installing these computer internal drives, never use a magnetized screwdriver.

Install Hard Drive: Before actually installing the hard drive, I recommend that you install a hard drive cooler to keep your hard drive cool. You should install your boot hard drive on the primary IDE channel and set it as ‘Master’.

There is a jumper located on the rear of the drive showing the different positions such as ‘Master’, ‘Slave’ and ‘Cable Select’. Install the jumper on the pins marked ‘Master’. (See diagram A).

Among the computer internal drives, the hard drive is the largest non­removable storage and it is the primary device that a computer uses to store data.

When installing this computer internal drive, always use the screws provided with the drive since other screws could be too long and damage the internal components.

Install hard drive in internal 3.5 inch drive bay and install all four retaining screws securely to prevent vibration of drive. Check to see that drive is secure.

After securing hard drive, it is now time to connect your IDE cable to your hard drive. This cable is indexed and can only fit one way into the drive and the motherboard.

The cable used to connect the hard drive is an 80­conductor cable. This cable is distinguishable from the 40­conductor cable because the 80­conductor cable uses very fine wires and the 40­ conductor cable uses relatively thick wires. If it is impossible to see where the cable is indexed, remember that the red stripe on the IDE cable corresponds with Pin 1 on the IDE drive and Pin 1 is the closest to the drive’s power connector.

Master / Slave Jumper Setting

IDE Cable Installation

Page 16: 11 - EduSys

16 Class - XI-XII Eduheal Foundation

Connect the IDE cable into the Primary IDE channel connector on the motherboard and the other end into the connector on the drive. Ensure that the cable is properly inserted. (See diagram B).

Finally, plug power cable to drive ensuring that it has the correct orientation. (See Diagram C).

Install CD­ROM Drive/DVD­ROM Drive: Having installed the hard drive as ‘MASTER’ on the primary IDE channel, you should now install the DVD­Rom drive as ‘SLAVE’ on the same IDE channel.

Install your CD­ROM drive/DVD­ROM drive in an available 5.25 inch drive bay and properly secure screws on both sides to prevent vibration. Vibration can damage internal components of Drives.

Whichever drive you choose, align this drive so that it is flush with the front case bezel.

NOTE: Follow the same installation procedure as the hard drive to install IDE and power cables.

Connect the remaining end of the primary IDE cable to the drive ensuring that the red line on the cable aligns with Pin 1 on the drive connector.

Connect the power cable from the power supply to the drive. Lastly, connect the audio cable to the drive and the sound card. This allows your computer’s speakers

to play sound from DVD­ROM discs.

NOTE: If possible, avoid ribbon cables since they tend to restrict air flow inside the computer; instead use rounded IDE cables.

Step 7: Install Computer Motherboard in Computer Case Before starting your installateion, make sure that you wear an antistatic wrist strap that is properly grounded to protect Motherboard from static electricity.

Firstly, in mounting the motherboard (mainboard), match the mounting holes in the mainboard with the holes in the computer case.

The brass or aluminium standoffs that came with your case mounting hardware should be used to support the motherboard at the corners and in the center.

Install the standoffs in the appropriate spaces and ensure that they are properly tightened but not over­tightened. (See diagram A).

Note: Sometimes it’s more convenient to install the processor (CPU) and heat sink assembly on the motherboard before installing the motherboard itself due to space restrictions.

Notice the anti­static wrist strap being worn! Install motherboard with screws supplied. After installation, check to ensure that the mainboard is not

touching the case and that there are no metal standoffs or screws left on the motherboard or anywhere that could cause a short circuit on power­up. (See diagram B).

Power Cable Installation

Installing Computer Motherboard Standoffs

Page 17: 11 - EduSys

17 Class - XI-XII Eduheal Foundation

Step 8: Connect Computer Front Panel Switches/LEDs, Speaker, USB Connectors This step may seem very simple but to build your own computer properly, you need to have these Switches, LEDs, speaker and USB ports properly connected.

There are two switches ­ the power switch and the reset button.

These switches and LEDs are part of the computer case.

Before doing your connections, consult your computer motherboard manual and examine motherboard to decide where to make these connections.

If you connect them backwards, you won’t hurt anything but the lights and switches won’t work. Simply, reverse the connections if you have this problem. (See diagram).

Step 9: Connect ATX 24/20­Pin Computer Power Supply Cable to Motherboard Align the clip of the ATX 24/20­pin connector with the notch in the plug and safely and firmly clip it in place. The motherboard recommended in this tutorial is an Athlon motherboard and uses the 20­pin connector.

The Pentium 4 computer motherboard uses an extra small 4­pin 12V connector for extra power needed by the CPU. It will, therefore, be necessary to also attach that connector if you are building a Pentium 4 system.

NOTE: An incorrectly installed plug will ‘burn’ your computer. (See pic.).

Step 10: Install Computer Video Card Diagram A shows PCI Express X16 Video Card Expansion slot. Remove the expansion slot cover from the computer case. (See diagram B).

Most newly manufactured video cards now use the PCI Express (X16) technology which replaces the AGP (8X). This new technology produces advanced performance over its predecessor.

The Video/Graphics card is installed in the PCI Express (PCI­E X16) slot. On most Motherboards, the PCI Express X16 slot is usually blue in color and it is always situated further in than the PCI slots from the edge of the Motherboard.

The Card and the slot are keyed so it is almost impossible to insert the card incorrectly.

Install Video Card in the PCI Express X16 slot. Press down firmly and evenly across the top

Installation of Front Panel Switches, LEDs and Speaker

Installation of ATX 20­Pin Connector

Video Card Expansion Slot

A

Removal of Expansion Slot Cover from the Computer Case

B

Page 18: 11 - EduSys

18 Class - XI-XII Eduheal Foundation

of the Card until it is securely seated in the PCI­E X16 slot, taking care not to damage the card or the slot. (See diagram C).

Secure the Card to the computer case using a small screw. (See diagram D).

Step 11: Install Computer Sound Card Remove the expansion slot cover from the computer case. (See Diagram A). The sound card is installed in the PCI slot. On most motherboards, the PCI slots are usually white in colour.

Due to the heat generated by the video card, place the sound card in a PCI slot away from the video card. The card and the slot are keyed so it is almost impossible to insert the card incorrectly.

Install the card in the PCI slot. Press down firmly and evenly across the top of the card until it is securely seated in the PCI slot, taking care not to damage the card or the slot. (See diagram B).

Secure the sound card to the computer case using a small screw. (See diagram C).

Finally, connect the audio cable to the DVD­ROM drive and the sound card.

Video Card Insertion Securing Video Card to Computer Case

Expansion Slot Cover Removal

Sound Card Insertion Secure Sound Card to Computer Case

Page 19: 11 - EduSys

19 Class - XI-XII Eduheal Foundation

Step 12: Connect Computer Peripheral to Back Panel You have followed the Build Your Own Computer tutorial and you have installed the internal components. You are now ready to install the external peripherals. • (A) Power Connector: The power connector is a 3­prong male connector which enables you to connect a power cable to the computer Port A to obtain power from an electrical outlet. (See diagram).

• (B) Power Supply Fan: The power supply fan provides adequate ventilation for the power supply by exhausting hot air from it.

• (C) Mouse Port: The mouse is a pointing device that enables you to move and select items on the screen. It is the most commonly used pointing device. The mouse is connected to Port C. (See diagram). This port is also called a mini­DIN or PS/2 connector.

• (D) Keyboard Port: The keyboard is one of the input devices that allows you to enter instructions and information into a computer. The keyboard is connected to Port D. (See diagram). This port is also known as the mini­DIN or PS/2 connector. The older computers came with a larger port known as a DIN connector.

• (E) USB Port: (USB) Acronym for Universal Serial Bus. This Port is an external bus that supports data transfer rates of up to 12 Mbps. This port can connect up to 127 peripherals (such as mice, modems, keyboards, etc.) all at once. It also enables hot­swapping which is being able to connect and disconnect peripherals without powering down the PC.

• (F) Parallel Port (Printer Port): The parallel port is a 25­pin female connector (DB­25). It is an interface for connecting external devices such as a printers and computers that require relatively high bandwidth. It supports bi­directional communications.

• (G) Serial Port (COM Port): This port is an interface for serial communication being transmitted at one bit at a time. This port can be used to connect a computer peripheral such as a modem, mouse, etc.

• (H) Game Port: The game port is a 15­pin female analog port used to connect game controllers such as joysticks. It can also be used as a Musical Instrument Digital Interface (MIDI) Port for connecting a computer peripheral such as a synthesizer and is located on the sound card.

• (I) Monitor Port: The monitor is a very important computer peripheral that displays images and text generated by the computer. The monitor is connected to Port I which is a 15­pin female connector called a VGA Port. (See diagram above).

• (J) Ethernet Port (RJ­45): The ethernet port accepts an ethernet cable which allows you to communicate on a network that runs Transmission Control Protocol/Internet Protocol(TCP/IP). This port resembles a regular phone jack but is slightly wider and is generally located on the Network Interface Card (NIC) or integrated on the motherboard.

• (K) Modem: The word ‘Modem’ is a contraction of the words Modulator­Demodulator. It is typically used to send digital data over a phone line. If you want to be able to surf the Internet or send or receive e­mail, your computer system will need one.

Step 13: Post Assembly Check After you build your own computer, you need to make a comprehensive Post Assembly Check. You should check the following:

Computer Rear Panel Connectors

Page 20: 11 - EduSys

20 Class - XI-XII Eduheal Foundation

• All drive cables and power cables are properly connected. • The CPU heat sink/fan is properly attached and connected to the motherboard. • Check to see that the memory modules are firmly seated in their sockets. • The Power Supply is properly connected to Motherboard. • The 110/220V switch is set to the proper voltage for your country. • Ensure that Video Card and Sound Card are properly installed in slots. • No wires or cables are pinched between components. • Ensure that there are no screws or metal parts stuck on the Motherboard to cause a short­circuit. • Ensure that the peripherals such as keyboard, mouse and monitor are properly connected to computer and power source. First Time System Boot Up: It is now the moment of truth! You are now ready to power up your

computer. Plug your A/C power cord into a Surge Suppressor or, better yet, A UPS backup system. A surge protector will protect your computer from power surges.

A UPS (Uninterruptable Power Supply) is a backup system which will constantly provide power to your computer system and will also protect it against surges, spikes and brown­outs. If you have a UPS, you do not need a surge protector.

1, 2, 3 ...... Go! The power to your computer is now on... You hear whirring sounds of fans and see the blinking lights of the drives. After all this, you also hear a single beep and you should see a BIOS screen on the Monitor.

The term BIOS means Basic Input Output System and is the software that has all the instructions on how the operating system should communicate with the hardware.

If your Post Assembly Check and First Time System Boot Up were successful, you should now continue with the other steps....

Step 14: Configure Motherboard Bios You need to configure the BIOS.

Firstly, power up your monitor and then the computer. Observe the screen and listen for any beeps from the system. The system should automatically go through a ‘Power On Self Test’ (POST) which consists of checking video BIOS, RAM test and sometimes installed component report.

If any fatal errors occur during the POST, you may not see anything on the screen and the system might beep several times indicating a specific problem. Check your motherboard or the BIOS documentation to determine what the beep codes mean. If there are no fatal errors, you should see the POST display on the screen.

Depending on the type of BIOS, such as AMI, Phoenix, Award, etc., you need to press a key or series of keys to interrupt the normal boot sequence and get to the Setup screen that enables you to configure the system.

Most often, the system indicates which key to press to activate the BIOS setup during the POST but, if not, check your motherboard manual for information on which key(s) to press for entering your BIOS.

Common keys used to enter the BIOS setup are F1, F2, F10, ESC, INS and DEL. While the Setup program is running, use the Setup program menus to enter the current date and time,

your hard drive settings, floppy drive types, video cards, keyboard settings, etc. Most newer BIOSes can auto­detect the hard drive so you should not have to manually enter any parameters for it.

Entering hard drive information is most critical when you building your own computer.

Page 21: 11 - EduSys

21 Class - XI-XII Eduheal Foundation

Most newer BIOSes feature an auto­detect setting for the drive. If that feature is available, I recommend you choose it. This enables the BIOS to read the settings directly from the drive which eliminates any chance for errors.

These parameters include Cylinder Head Sector (CHS), specifications and transfer speed and translation settings. Most systems allow you to set a user­definable type which means the cylinder head and sector counts for this Drive are entered manually.

If you set a user­definable type, (not normally recommended unless you don’t have ‘auto’ as a choice) it is important to document the exact settings you used because this information might be very difficult to recover if it got lost. In building your own computer, you most likely purchased a SATA drive. These modern SATA drives are easily set up since they do not require “master” or “slave” jumper configurations.

Another important setting in BIOS setup is the Virus Protection/Warning. At startup, this will scan your hard drive boot sector for viruses and warn you if any is present. This feature should be enabled. In addition to this feature, I recommend that you purchase a proprietary anti­virus software.

Now monitoring your PC’s health is very important; therefore, you should configure the PC Health setting. This feature monitors the CPU temperature, voltage levels and fan speed, etc. You can choose an automatic shutdown temperature that if the CPU goes above this temperature, the system automatically shuts down.

When you have made a final check over all the settings in the BIOS setup, follow the on­screen instructions to save the settings and exit the setup menu.

Occasionally, you will need to update your system’s Bios. If and when this need arises, you will need to log on to the appropriate Website of the Bios manufacturer to download this update. You will need to follow the accompanying instructions exactly since a failed Bios update can render your system useless.

These BIOS settings should be quite sufficient at this time to get your computer up and running. You can now shut down your computer.

Step 15: Test Run Your Computer System • Re­boot the system and, during boot­up, check front panel to ensure that all drive lights and power­on light are working properly. If these lights do not work, try reversing the leads on the motherboard.

• Check hard drive to ensure that it is running properly. • Check all fans such as CPU, power supply, case and video card (if it has a fan) to ensure that they are working properly.

• Check CD­ROM drive/DVD­ROM drive to ensure that it has power by ejecting the DVD tray. • Also, check the reset button to verify that it is operational. It is important when you are building your own computer that you allow your system to run for about 30 minutes to make the following check:

• Turn off computer and, while using an anti­static wrist strap to protect your computer from static electricity, check CPU and hard drive for excessive temperature. They both can be warm to the touch but should never be too hot especially the CPU. If the CPU is too

hot, this shows that it requires a better heat sink/fan assembly. These temperatures can be monitored by the PC Health feature in your BIOS.

Step 16: Partition and Format Hard Drive After you build your own computer, you need to partition and format the hard drive to install the Operating System. You will require a Windows Operating System disk.

Page 22: 11 - EduSys

22 Class - XI-XII Eduheal Foundation

Partitioning a hard drive means that you are creating the boot sector as well as dividing the hard drive into other logical drives (C, D, E, etc.).

You need to think about the number of partitions that you intend to make on your hard drive or if you want one large partition for the complete drive.

With a modern operating system (such as Windows XP or Windows Vista) you should use the NTFS file system.

You are now ready to start! Firstly, you need to have your system booting from the CD ROM drive. To enable CD ROM as the first

boot drive, you will need to enter the system BIOS by tapping the relevant key during the boot process. Insert the operating system CD in the CD drive and re­boot computer. After a brief moment, you will

be taken to the “setup” screen. Carefully follow the on­screen prompts to install the operating system. During installation, individual

input will be required from time to time. Also, your PC will re­boot many times ­ this is normal. Do not panic!

Formatting will be performed during this period with a choice of FAT32 or NTFS. During this period, you can partition the drive if you so desire. Follow the menus to create either a

single partion for the whole drive or multiple partitions. The first partition must be made active to make it bootable.

Sit back and allow your PC to complete the operating system installation. New systems now come with an operating system such as Windows XP or Vista preloaded.

Step 17: Install Computer Operating System The choice is yours but the most commonly used is the Windows Operating System. Computer operating systems (OS), employ a set of programs that instruct the computer how to perform various tasks such as accepting and interpreting information from input devices such as the keyboard and mouse. Without operating systems, computers are unable to recognize input from keyboards or display videos on monitors.

It is the first software, which will automatically be loaded into the computer memory when it boots up. It is the core of the computer’s operation.

During the boot process of the computer, if everything goes well, the system should end up displaying the operating system’s opening screen on the monitor.

Computer operating systems allow the computer hardware to communicate and operate with the computer software and peripherals.

A computer would be useless without an operating system. The operating system (OS) enables the computer to perform tasks such as: • Permitting applications such as web browsers, word processors and e­mail clients to perform tasks and be able to use other system resources.

• Continuously organize applications, which are running on the computer. • Ensuring that hardware such as keyboards, disk drives, etc. communicate correctly. • Advising of error messages. • Validating the types of software that you will be able to install. • Performing security updates. • Install and uninstall computer software.

Page 23: 11 - EduSys

23 Class - XI-XII Eduheal Foundation

IOI ­ What is it? The International Olympiad in Informatics is one of the most prominent computer science competitions in the world. The Competition Tasks are of an algorithm nature, however the contestants have to show basic skills as problem analysis, design of the algorithm needed, data structures, as well as programming and testing of their solutions. The winners of the IOI belong, no doubt, to the best young computer scientists of the world.

The IOI is one of eight International Science Olympiads. The other seven are: Mathematics IMO (since 1959), Physics IPhO (since 1967), Chemistry IChO (since 1968), Biology IBO (Since 1990), Astronomy IAO (since 1996), Geography IGEO (since 1996), and The International Linguistic Olympiad ILO (since 2003). All of them are open to High School students, younger than 20 years of age.

Each country participates at the IOI with a National Delegation, consisting of four Contestants, headed by a Delegation Leader and a Deputy Leader.

A Contestant is a student who was enrolled at a school for secondary education, in the Country they are representing, during the period September to December, and is not older than twenty years

19 th International Olympiad in Informatics was held in Croatia in the month of August 2007. Srivatsan Balakrishnan of India received the Bronze medal in it.

20 th International Olympiad in Informatics will be held in Egypt. Let’s have a look at a sample questions of International Olympiad in Informatics

SAMPLE QUESTION

CHIP A chip is being produced on a square silicon plate. The chip contains a number of power junctions, each described with a pair of integer coordinates. The first coordinate increases from left to right, while the second increases from bottom to up. The lower left corner of the chip is marked (0,0).

For the chip to function properly, each power junction must be connected to one of the four sides of the chip using a single straight horizontal or vertical wire segment. Additionally, no two wires may overlap, interesect, or even touch.

(3,5) (4,4) (5,4)

(3,1) Samples 6×6 chip with

4 power junctions Connecting the power junctions

to the chip's sides using 5 units of wire

TASK You will be given the length of the sides of the chip and the locations of all power junctions. Find a way to connect the junctions to the sides, so that the total length of wire used is the smallest possible.

This is an output­only task. You will be given 10 input files and only need to produce the matching output files. You may download the input files from the contest system, on the page labeled “Tasks”. See URL to download http://www.hsin.hr/ioi2007/index.php?page=tasks

INTERNATIONAL OLYMPIAD IN INFORMATICS

Page 24: 11 - EduSys

24 Class - XI-XII Eduheal Foundation

You need to submit each output file separately on the contest system. When submitting, the contest system will check the format of your output file. If the format is valid, the output file will be graded; otherwise, the contest system will report an error.

INPUT The first line of input contains a single integer A (2 ≤ A≤ 30), the length of the side of the chip. The second line contains an integer N (1 ≤ N ≤ 50), the number of power junctions. Each of the following N lines contains two integers X and Y (1 ≤ X,Y≤ A­1), the coordinates of a power junction. No two power junctions will occupy the same position.

You may assume that there exists a solution for each input file.

OUTPUT The first line of the output should contain the total length of wire used. The following N lines should describe the connections. For each power junction, in the order in which they were given in the input, output one of “up”, “down”, “left” or “right”, the direction in which were runs from that power junction.

If there is more than one optimal solution, output any one of them. Examples

Input Input Output Ouput 6 10 5 13 4 4 down down 3 1 5 1 up right 3 5 5 2 right down 5 4 4 3 up right 4 4 6 3

SOLUTION Because the task is output­only, a well­implemented backtracking solution will be fast enough to run locally and solve all test cases. The task was originally batch, with a time limit of 1 second. The remainder of this text shows how to efficiently solve the problem.

First, sort the power junctions in increasing order by the x­coordinate. We will connect junctions to sides in that order. Now, suppose we’ve already connected the first K junctions and consider our options for connecting the junction K + 1 : • Connecting to the right. Since all K junctions already connected have x­coordinate less than or equal to this junction, we can always do this.

• Connecting to the left : Some of the previous junctions that are connected up or down might get in our way. Of all junctions connected up we only have to check the one with the lowest y­coordinate, and of all junctions connected down we only have to check the one with the highest y­coordinate. No other junctions is relevant in determining if we can connect junction K + 1 to the left.

• Connecting up or down : Some previous junctions that are connected right might get in our way. Of all such junctions we have to check only the one with the highest y­coordinate if we want to connect junction K + 1 up, and the one with the lowest y­coordinate if we are connecting junction K + 1 down. No other junction is relevant in determining if we can connect this junction up or down. These five parameters (K, lowest y­coordinate of all junctions connected up, highest y­coordinate of all

junctions connected down, lowest y­coordinate containing of all junctions connected to the right, highest y­ coordinate of all junctions connected to the right) define all possible states we can encounter in the process of connecting junctions. These states, along with value transitions between them, form directed acyclic graph. We can calculate the optimal configuration using dynamic programming. The time complexity of this algorithm is O (N.A + ).

Page 25: 11 - EduSys

25 Class - XI-XII Eduheal Foundation

Local Area Network (LAN) is a small data network covering a limited area, such as a building or group of buildings. Most LANs connect workstations or personal computers. This allows many users to share devices, such as laser printers, as well as data and information.

The layout of the network is referred to as its topology. A topology can be described by the way the workstations are physically connected to the network, or by the way the data appear to flow through the network­­its logical topology.

Various ways in which computers may be connected physically together (i.e. topology ) are described in the following subsections .These topologies are named as linear bus , circular , star , tree and graph or mesh topologies .Standard models for topologies are the ring, star and bus.

Different Topologies used in LANs.

STAR TOPOLOGY A star topology is one in which all branches of the network are connected through a hub. A logical star topology is one in which the hub contains all of the intelligence of the network and directs all network transmissions.

Advantage This topology has the advantage of minimum data traffic along the cables (nodes to server only), thus providing optimum performance. But because a single machine must co­ordinate all the data communications, this topology requires an extremely powerful and expensive file server.

RING TOPOLOGY This layout is similar to the bus topology, except that the nodes are connected in a circle using cable segments .A ring topology is one in which all branches of the network are connected to a loop. In a logical ring, data flow from one node to the next in an ordered sequence. When the data reach the last node, they are returned to the originating node.

Performance is faster on this system because each portion of the cabling system is handling only the data flow between two machines.

LAN TOPOLOGIES

Star Topology

Ring Topology

Page 26: 11 - EduSys

26 Class - XI-XII Eduheal Foundation

BUS TOPOLOGY A bus topology connects all networked devices to a single continuous cable. Data may pass directly from one station to another without first going through a hub or around the ring. In a logical bus topology all network communications are broadcast to the entire network. This topology has the advantage of not requiring that every computer be up and running in order for the network of function. But because a single cable is dedicated to all the information traffic, performances can be slow at times.

TREE TOPOLOGY In tree topology, the top most node is called the root. The root may have zero or more children of its own. The root is the parent, node to its children. Each node can in turn have zero or more children of its own .Every node in tree has exactly one parent node and all nodes in the tree are descendants of the root node. These relationships ensure that there is always one and only one path from one node to any other node in the tree.

A Tree Structure suits best when the network is widely spread and vastly divided into many branches. Like any other topologies, the Tree Topology has its advantages and disadvantages. A Tree Network may not suit small networks and it may be a waste of cable to use it for small networks. Tree Topology has some limitations and the configuration should suit those limitations.

Tree Network Topology Benefits • A Tree Topology is supported by many network vendors ad even hardware vendors. • A point to point connection is possible with Tree Networks. • All the computers have access to the larger and their immediate networks. • Best topology for branched out networks.

Tree Topology Limitations • In a Network Topology the length of the network depends on the type of cable that is being used. • The Tree Topology network is entirely dependant on the trunk which is the main backbone of the network. If that has to fail then the entire network would fail.

• Since the Tree Topology network is big it is difficult to configure and can get complicated after a certain point. Thus, the hierarchical of tree topology is similar as tree, so its called the tree topology .

MESH TOPOLOGY A type of network setup where each of the computers and network devices are interconnected with one another, allowing for most transmissions to be distributed, even if one of the connections go down. This type of topology is not commonly used for most computer networks as it is difficult and expensive to have redundant connection to every computer. However, this type of topology is commonly used for wireless networks. Below is a visual example of a simple computer setup on a network using a mesh topology.

Bus Topography

Tree Topology

Mesh Topology

Page 27: 11 - EduSys

27 Class - XI-XII Eduheal Foundation

Q. What prompted the development of C++? I needed a tool for designing and implementing a distributed version of the Unix kernel. At the time, 1979,

no such tool existed. I needed something that could express the structure of a program, deal directly with hardware, and be sufficiently efficient and sufficiently portable for serious systems programming.

Q. Was there a particular problem you were trying to solve? The two problems that stick in my mind were to simulate the inter­process communication infrastructure for

a distributed or shared­memory system (to determine which OS services we could afford to run on separate processors), and [the need] to write the network drivers for such a system. Obviously ­ since Unix was written in C ­ I also wanted a high degree of C compatibility. Very early, 1980 onwards, it was used by other people for simulations of various network protocols and traffic management algorithms.

Q. Where does the name C++ come from? As “C with Classes” (my ancestor to C++) became popular within Bell Labs, some people found that name

too much of a mouthful and started to call it C. Q. What are the main differences between the original C with Classes and C++? Most of the differences were in the implementation technique. C with Classes was implemented by a

preprocessor, whereas C++ requires a proper compiler. It was easy to transcribe C with Classes programs into C++, but the languages were not 100% compatible. From a language point of view, the major improvement was the provision of virtual functions, which enabled classical object­oriented programming. Overloading (including operator overloading) was also added, supported by better support for inlining. It may be worth noting that the key C++ features for general resource management, constructors and destructors, were in the earliest version of C with Classes. On the other hand, templates (and exceptions) were introduced in a slightly later version of C++ (1989); before that, we primarily used macros to express generic programming ideas.

Q. What is the most interesting program that you’ve seen written with C++? I can’t pick one and I don’t usually think of a program as interesting. I look more at complete systems ­ of

which parts are written in C++. Among such systems, NASA’s Mars Rovers’ autonomous driving sub­system, the Google search engine, and Amadeus’ airline reservation system spring to mind. Looking at code in isolation, I think Alexander Stepanov’ STL (the containers, iterators, and libraries part of the C++ standard library) is among the most interesting, useful, and influential pieces of C++ code I have ever seen.

Q. Do you see this leading to the creation to a new generation of general purpose languages? Many of the “scripting languages” provide facilities for managing state in a Web environment, and that is

their real strength. Simple text manipulation is fairly easily matched by libraries, such as the new C++ regular expression library but it is hard to conceive of a language that is both general­purpose and distributed. The root of that problem is that convenient distributed programming relies on simplification and specialization. A general­ purpose language cannot just provide a single high­level distribution model.

I see no fundamental reason against a general­purpose language being augmented by basic facilities for distribution, however, and I (unsuccessfully) argued that C++0x should do exactly that. I think that eventually all major languages will provide some support for distribution through a combination of direct language support, run­time support, or libraries.

Q. Where do you envisage C++’s future lying? Much of where C++ has had its most significant strength since day 1: applications with a critical systems

programming component, especially the provision of infrastructure. Today, essentially all infrastructures (including

BANJARNE STROUSTRUP’S ON C++ THE MAN WHO DEVELOPED C++

Page 28: 11 - EduSys

28 Class - XI-XII Eduheal Foundation

the implementation of all higher­level languages) are in C++ (or C) and I expect that to remain the case. Also, embedded systems programming is a major area of use and growth of C++; for example, the software for the next generation US fighter planes are in C++. C++ provides the most where you simultaneously need high performance and higher­level abstractions, especially under resource constraints. Curiously, this description fits both an iPod and a large­scale scientific application.

Q. What are you proudest of in terms of the language’s initial development and continuing use? I’m proud that C++ has been used for so many applications that have helped make the world a better place.

Through C++, I have made a tiny contribution to the human genome project, to high energy physics (C++ is used at CERN, Fermilab, SLAC, etc.), space exploration, wind energy, etc. I’m always happy when I hear of the language being put to good use.

Secondly, I’m proud that C++ has helped in improving the level of quality of code in general ­ not just in C++. Newer languages, such as Java and C#, have been used with techniques that C++ made acceptable for real­ world use and compared to code 20 years ago many of the systems we rely on today are unbelievably reliable and have been built with a reasonable degree of economy. Obviously, we can and should do better, but we can take a measure of pride in the progress we have made so far. In terms of direct personal contribution, I was pleased to be able to write the first C++ compiler, Cfront, to be able to compile real­world programs in 1MB on a 1MHz machine. That is of course unbelievably small by today’s standard, but that is what it took to get higher­level programming started on the early PCs. Cfront was written in C with Classes and then transcribed into (early) C++.

Q. Do you have any advice for up­and­coming programmers? Know the foundations of computer science: algorithms, machine architectures, data structures, etc. Don’t just

blindly copy techniques from application to application. Know what you are doing, that it works, and why it works. Don’t think you know what the industry will be in five years time or what you’ll be doing then, so gather a portfolio of general and useful skills. Try to write better, more principled code. Work to make “programming” more of a professional activity and less of a low­level “hacking” activity (programming is also a craft, but not just a craft). Learn from the classics in the field and the better advanced textbooks; don’t be satisfied with the easily digested “how to” guides and online documentation ­ it’s shallow.