Wednesday, November 7, 2012

Definition of Queues



A queue is defined as a special type of data structure where elements are inserted from one end and elements are deleted from other end.

The end from where the elements are inserted is called rear end (r) and the end from where elements are deleted called front end (f). In a queue always elements are inserted from the rear end and elements are deleted from the front end.

Queue is a linear list for which all insertions are made at the end of the list; all deletions (and usually all accesses) are made at the other end. So queue is also called First in First out (FIFO) data.

Different types of queues

  1. Ordinary queue
  2. Double ended queue
  3. Circular queue
  4. Priority queue


1. Ordinary queue

 

Definition of Queues



This queue operates on the first come first serve basis. Items will be inserted from one end and they are deleted at the other end in the same order in which they are inserted. A queue can be represented by using an array by using an array as shown in the figure.


The operations that can be performed on these queues are

  • Insert an item at the rear end
  • Delete an item from the front end
  • Display the contents of the queue


Disadvantage of Ordinary queue


In an ordinary queue, as an item is inserted, the rear end identified by r is incremented by 1. Once r reaches QUEUE_SIZE-1, we say queue is full. Note that even if some elements are deleted from queue, because the rear end identified by r is still equal to QUEUE_SIZE-1, so item cannot be inserted into the queue.


2. Double ended queue (Deque)


Another type of queue called double ended queue also called Deque. Deque is a special type of data structure in which insertions and deletions will be done either at the front end or at the rear end of the queue. The operations can be performed on Deques are

  • Insert an item from front end
  • Insert an item from rear end
  • Delete an item from front end
  • Delete and item from rear end
  • Display the contents of queue


3. Circular queue


In an ordinary queue, as an item is inserted, the rear end identified by r is incremented by 1. Once r reaches QUEUE_SIZE-1, we say queue is full. Note that even if some elements are deleted from queue, because the rear end identified by r is still equal to QUEUE_SIZE-1 item cannot be inserted. But this disadvantage is overcome using circular queue. In circular queue an item can be published circularly. This can be achieved using the statement r = (r+1)%QUEUE_SIZE


The operations can be performed on circular queue are.

  • Insert an item from rear end
  • Delete an item from front end
  • Display queue contents


4. Priority queue

Such a queue where a job is processed based on the priority is called a priority queue

Related Posts

Monday, November 5, 2012

Fundamental of data structures

Fundamental of data structures

What is data Structure?

A data Structure is the organization of data in computers memory or in a file.

Some examples of data structures are: array, stack, queue, link list, binary tree hash table, heap and graph. Data structures are often used to build databases. Typically, data structures are manipulated using various algorithms.

Based on the concept of Abstract data types (ADT), we define data structure by the following three components.

1.       Operations: Specifications of external appearance of data structure.
2.     Storage Structures: Organizations of data implemented in lower-level data structures.
3.       Algorithms: Description on how to manipulate information in the storage structures to obtain the results defined for operations.

Implementation of Data Structure


There are three levels of implementation of data structure which are:
1. The Abstract Level: The abstract (or logical) level is the specifications of the data structure the “What” but not “how”. At this level. The user or data structure designer is free think outside the bounds of anyone programming language.

2. Application Level: At the application or user level, the user is modeling real-life data in a specific context.

3.  Implementation Level: The implementation level is where the model becomes compatible, executable code.

Abstract data types


                The data structure can only be accessed with defined operations. This set of operations is called interface and abstract data type is exported by the entity. An entity with the properties just described is called an abstract data type (ADT).

Properties of an abstract data type


Abstract data type is characterized by the following Properties.
1.       It exports a type.
2.       It exports a set of operations. This set is called interface.
3.       Operations of the interface are the one and only access mechanism to the type’s data structure.
4.       Axioms and preconditions define the application domain of type.

Parts of ADT description


1.       Data: This part describes the structure of the data used in the ADT in an informal way.
2.       Operations: This part describes valid operations for this ADT; hence, it describes its interface. We use special operation constructor to describe the actions which are to be performed once an entity of this ADT is created and destructed to describe the actions which are to be performed once an entity is destroyed.

You Might also view the following Related Posts

For more other Posts: Click Here

Programming Language Definition

Programming Language Definition


Programming Language Definition: A sequence of instructions that a computer can interpret and execute to complete task is called computer program. The language which is used to develop a computer program is called programming language. There are two types of programming language which are procedure oriented programming language and object oriented programming language.
1.       Procedure Oriented programming:Conventional programming, using high level languages such as COBOL, FORTAN and C is commonly known as procedure oriented programming (POP). In the procedure oriented approach, the problem is viewed as a sequence of things to be done such as reading, calculating and printing. Procedure oriented programming basically consists of writing a list of instructions (or actions) for the computer to flow and organizing these instructions into groups known as functions.

Characteristics of Procedure Oriented Programming
i)        Emphasis is on doing things (algorithms)
ii)       Large Programs are divided into smaller Programs Known as functions.
iii)     Most of the functions share global data
iv)     Data move openly around the system from function to function.
v)      Functions transform data from one to another.
vi)     Employs top-down approach in program design.

Drawbacks of Procedure Oriented Programming
i)        In large program it is very difficult to identify what data is used by which function. In case we need to revise an external data structure, we also need to revise all functions that access the data. This provides an Opportunity for bugs to creep in.
ii)       With the procedural approach is that it does not model real world problems very well. This is because functions are action oriented and do not really corresponding to the elements of the problem.

2.       Object-oriented Programming: Object oriented programming treats data as a critical element in the program development and does not allow it to flow freely around the system. It ties data more closely to the functions that operate on it, and protects it from accidental modification from outside functions. OOP allows decomposition of a problem into a number of entities called objects and then builds data and functions around these objects.

Characteristics of Object-Oriented programming
i)        Emphasis is on data rather than procedure.
ii)       Programs are divided into what are known as objects.
iii)     Data structures are designed such that they characterize the objects.
iv)     Functions that operate on the data of an object are tied together on the data structure.
v)      Data is hidden and cannot be accessed by external functions.
vi)     Objects may communicate with each other through functions.
vii)   New data and functions can be easily added whenever necessary. Follows bottom up approach is program design.

Benefits of Object Oriented Programming
i)        Through inheritance we can eliminate redundant code and extend the use of existing classes.
ii)       We can build programs from the standard working modules that communicate with one another, rather than having to start writing the code from scratch. This leads to saving of development time and higher productivity.
iii)     The principle of data hiding helps the programmer to build secure programs that cannot be invaded by code in other parts of the program.

Some terms used in Object Oriented Programming

Ø  Objects: Objects are basic run-time entities in an object oriented system.
Ø  Classes: A class is a collection of objects of similar type.
Ø  Data Abstraction and Encapsulation: The wrapping up of data and functions into a single unit is known as encapsulation.
Abstraction refers to the act of representing essential features to the act of representing essential features without including the background or explanations.
Ø  Inheritance: Inheritance is the process by which objects of one class acquire the properties of objects of another class.
Ø  Polymorphism: Polymorphism is another important OOP concept. Polymorphism, a Greek term means the ability to take more than one form. The operation may exhibit different instances the behavior depends upon the types of data is the operation.
Ø  Dynamic Binding: Binding refers to the linking of a procedure call to the code to be executed in response to the call. Dynamic binding (also known as late binding) means that the code associated with a given procedure call is not known until the time of the call at run time.
Ø  Message passing: A message for an object is a request for execution of a procedure and therefore will invoke a function (procedure) in the receiving object that generates the desired result.
 


Thursday, November 1, 2012

Network Topology

Network Topology

Network topology describes the layout or appearance of a network that is, how the computers, cables and other components within a data communication network are interconnected, both physically and logically. The physical topology describes the way in which a network is physically laid out, and the logical topology describes how data actually flow through the network. In data communication network, two or more devices are connected to from a link whereas two or more links from a topology. The topology of a network is the geometric representation of the relationship of all the links connecting the devices.

Types of Network Topology:


1.      Bus Topology: A bus topology is a multipoint data communication circuit that makes it relatively simple to control data flow between and among the computers because this configuration allows all stations to receive every transmission over the network. 

          The bus topology is usually used when a network installation is small, simple or temporary. On a typical bus network, the cable is just one or more wires, with no active electronics to amplify the signal or pass it along from computer to computer. 

         The speed of the bus topology is slow because only one computer can send a message at a time. A computer must wait until the bus is free before it can transmit. The bus topology requires a proper termination at both ends of the cable. Since, the bus is passive topology; the electrical signal from a transmitting computer is free to travel the entire length of the cable. Without termination when the signal reaches the end of the cable, it returns back and travels break up the cable. 

Advantages of Bus Topology


i) The bus topology is easy to understand, install and use for small networks.

ii) The cabling cost is less as the bus topology requires the least amount of cable to connect the computers.

iii) The bus topology is easy to expand by joining two cables with a BNC barrel connector.

iv) In the expansion of bus topology, repeaters can be used to boost the signal and increase the distance.

Drawbacks of Bus Topology


i) Heavy network traffic slows down the bus speed. In bus topology, only one computer can transmit and         others have to wait till their turn comes and there is no co-ordination between computers for reservation of transmitting time slot. 

ii) The BNC connectors used to expansion of the bus attenuates the signal considerably. 

iii) A cable breaks or loses BNC connector causes reflection and brings down the whole network causing all network activity to stop.

2. Ring Topology: In a ring topology, each computer is connected to the next computer, with the last one connected to the first. Rings are used in high-performance networks where large bandwidth is essential, e.g. time attractive features such as video and audio. In other words, a ring topology is a multipoint data communication network where all stations are interconnected is series to form a closed loop or circle. A ring topology is sometimes called a loop. Each station is the loop is joined by point-to-point links to two other stations. 

        The messages flow around the ring in one direction. There is no termination because there is no end to the ring. Some ring networks do token passing. A short message called a token is passed around the ring until a computer wishes to send information to another computer. That computer modifies the token, adds an electronic address and data and sends it around the ring. Each computer is sequence receives the token and the information and passes them to the next computer until either the electronic address matches the address of a computer or the token returns to its origin. The receiving computer returns a message to the originator indicating that message has been received. 

Advantages of Ring Topology


i) No one computer can monopolize the network because every computer is given equal access to the token.

ii) The fair sharing of the network allows the network continue function in a useful, if slower, manner rather than fail once capacity is exceeded as more users are added.

Drawbacks of Ring Topology


i) Failure of one computer on the ring can affect the whole network.

ii) It is difficult to troubleshoot the ring.

iii) Adding or removing the computers disturbs the network activity.

3. Star Topology: In star topology, all the cables run from the computers to a central location where they are all connected by a device called a hub. Stars are used to concentrated networks, where the endpoints are directly reachable from a central location when network expansion is expressed and when the greater reliability of a star topology is required. 

           Each computer on a star network communicates with a central hub that re-sends the message either to all the computers is a broadcast star network or only to the destination computer in a switched star network. The hub is a broadcast star network can be active or passive. An active hub generates the electrical signal and sends it to all the computers connected to it. This type of hub is usually called a multiport repeater. Active hubs require external power supply. A passive hub is a wiring panel or punch down block which acts as a connection point. It does not amplify or regenerate the signal. Passive hubs do not require electrical power supply. Several types of cables can be used to implement a star network. 

Drawbacks of Star Topology


i) If the central hub fails, the whole network fails to operate.

ii) Many star networks require a device at the central point to rebroadcast or switch the network traffic.

iii) The cabling cost is more since cables must be pulled from all computers to the central hub.

4. Mesh Topology: In a mesh topology, every device has a dedicated point-to-point link to every other device. The term dedicated means that the link carries traffic only between two devices if connects. A fully connected mesh network therefore has n(n-1)/2 physical channels to link hn devices. To accommodate those links, every device on the network must have n-1 input/output ports. 

Advantages of Mesh Topology


i) The use of dedicated links guarantees that each connection can carry its own data load, thus eliminating traffic problems.

ii) A mesh topology is robust because the failure of single computer does not bring down the entire network.

iii) It provides security and privacy because every message sent travels along a dedicated line.

iv) Point to point links make fault diagnose easy.

Drawbacks of Mesh Topology


i) Since every computer must be connected to every other computer installation and configuration is difficult.

ii) Cabling cost is more.

iii) The hardware required connecting each link input/output and cable is expensive.

5. Tree Topology: A tree topology is the variation of a star. As in a star, nodes in a tree are linked to a central hub that controls the traffic to the network. However, not every computer plugs into the central hub, majority of them are connected to a secondary hub which, in turn, is connected to the central hub. The central hub in the tree is an active hub which contains repeater. The repeater amplifies the signal and increases the distance a signal can travel. The secondary hubs may be active or passive. A passive hub provides a simple physical hub provides a simple physical connection between the attached devices.

Advantages of Tree topology


i) It allows more devices to be attached to a single hub and can therefore increase the distance of a signal can travel between devices.

ii) It allows the network to isolate and priorities communications from different computers.

Drawbacks of Tree Topology

i) If the central hub fails, the system breaks down.

ii) The cabling cost is more.


You Might also view the following Related Posts

For more Posts: Click Here

Tuesday, October 30, 2012

Networking Fundamental


Network Definition:


                A network is a set of devices often referred to as nodes connected by media links. A node can be a computer, printer or any other device capable of sending or receiving data generated by other nodes on the network. The basic aim of networking is to be able to exchange data such as text, audio and video from one point to another in the world.

Basic communication model 


                The fundamental purpose of a communication system is the exchange of data between two points of parties. Depending upon the basic communication model, the figure given below shows one particular example, which establishes communication between a workstation and a server over a public telephone network.



Networking Fundamental



The above figure can be described as under.

i)           Source:- This device generates the data to be transmitted. Two examples can be telephone and personal computers.
ii)          Transmitter:­­- A transmitter transforms and encodes the information in such a manner so as to produce electromagnetic waves or signals. These electromagnetic signals can be transmitted across some sort of transmission systems.
iii)        Transmission System:- A transmission system can be a single transmission line or a complex network connecting source and destination.
iv)        Receiver:- The receiver accepts the signal from the transmission system and converts it into a form which can be handled by the destination device.
v)         Destination:- A destination takes the incoming data from the receiver.

Introduction to computer networks


                A computer Network is a collection of two or more computer and peripheral device(the network components) connected by communication links that allow the network components to work together which may be located at different location or within same office.  The network performs the following operations.
  • Sharing files and data
  • Sharing resources
  • Sharing programs
  • Communication
  • Backup

Types of computer network: According to distance covered by a network, or from geographical point of view, network is classified into three classes.

      Local Area Network(LAN): The computer network system that are confined within local area such as a single room, inside a building or buildings, complex, campus area etc. known as LAN. It a Local Area Network(LAN) is used to connect a variety of computers over a limited geographical

Advantages / Features of LAN:


i)        Data transmission rate is fast compared to MAN and WAN, which is about 100 Mbps or even more.
ii)       Installation of computer in a network is very simple.
iii)     It provides high security of data.
iv)     Dissimilar types of systems can easily be interconnected with the computers.

    Metropolitan Area Network (MAN): It is used to connect computers that cover an entire city. It generally doesn’t exceed more than 100 Km. This types of network consist of both bound and unbound media. It comprises of dissimilar system and computers with dissimilar operating system. It is relatively slow compared to LAN but faster than WAN.

Advantages / Features of MAN:


i)        It covers larger geographical area compared to LAN.
ii)       Dissimilar system can be integrated.
iii)     Supports both bound and unbound media.
iv)     It is very good in hosting FTP sites especially for internet.

     Wide Area Network (WAN): When computers are connected globally using both bound and unbound media, then we call it a WAN. The rate of transmission of data is relatively slow below 1 Mbps. WAN are characterized by the fact that they are owned by different organizations.  There is no central controlling system for WAN. WAN generally uses private satellites to connect large number of computers over a large geographical area. WAN is simply a LAN of LAN’s where different types of networks are connected.

Advantages / Features of WAN:


i)        It supports dissimilar transmission media.
ii)       It supports all types of hardware that vary from network to network.
iii)     E-business (E-commerce) has been possible just because of WAN.

Sunday, October 14, 2012

Challenges and Opportunities for Developing a Successful E-Government

Challenges and Opportunities for Developing a Successful E-Government

E-government initiatives aimed at raising the level of government performance in general, where the proper application of these initiatives lead to upgrade the governmental services provided to citizens and the private sector and enhance the effectiveness of government work internally, in addition to broadening the participation of citizens in decision-making process. However, many studies indicate that a large proportion of initiatives to implement E-government around the world did not succeed in achieving these promised goals. There are, in fact, global consensuses on the existence of the need for deeper studies to understand the real reasons behind this failure, but in spite of higher percentage E-government projects that failed to achieve its goals globally, the world is witnessing a comprehensive consensus recognizes that failed to achieve its goals globally, the world is witnessing a comprehensive consensus recognizes that there is still the possibility of E-government initiatives to fulfill their all promises, but the underlying potential of these initiatives will only be achieved through access to a better understanding of the obstacles they faced and therefore to work out ways to overcome these obstacles. The most challenges that are expected to be faced during the implementation of an E-government program have been summarized below. 

1. Infrastructure Development: All countries implementing E-government have struggled to develop a basic infrastructure to take advantage of new technologies and communications tools. Many developing countries, even if possessing the will, do not have the infrastructure necessary to immediately deploy E-government services throughout their territory. 

Recommendations: 
  • Develop projects that are compatible with the nation’s telecom infrastructure. 
  • Introduce telecom competition and lift regulation on wireless and other digital technologies to accelerate their deployment. 
  • Consider the government’s current use of technology and learn from past success and failures. 
  • Establish and action framework at the beginning of the process to allow for a rational and coordinated investment effort downs the road. 

2. Law and Public Policy: The application of information Technology and Communication (ICT) to government may encounter legal or policy barriers. Legislatures must ensure the laws are updated to recognize electronic documents and transactions. Policy makers implementing E-government must consider the impact of law and public policy. 

Recommendations: 
  • Consult with stakeholders to access how existing laws may impede the desired results. 
  • Give legal status to online publication of government information. 
  • Clarify laws and regulations to allow electronic filings with government agencies. 
  • Reform processes by simplifying regulations and procedures. 

3. Digital Divide: The digital divide is the gap between people who have access to the Internet and those who do not. Those without access cannot access information that can provide economic opportunities, and cannot share in the benefits of E-government. 

Recommendations: 
  •  Provide communal access through village computer centers. 
  •  Combine access with training. 
  •  Provide incentives to the private sector to donate equipment and training. 
  •  Emphasize local language and content tailored to different communities. 
  •  Use for-profit entrepreneurs to build and sustain access points in small communities. 

4. E-Literacy: E- Literacy refers to marginalized groups who are unable to make use of information and communication technologies because they are not computer literate. With the digital revolution there is a very real danger that the world will be divided into the “information rich” and the “information poor”. E-government has the potential of either equalizing access to government and its services or increasing the barriers to participation. 

Recommendations: 
  •  Ensure that content is in local languages and that interfaces are easy to use. 
  •  Develop applications that use speech or pictures in addition to, or instead of, written text. 
  •  Include and educational component in E-government projects. 
  •  Create programs that include traditional media, like radio programs or newspaper columns, where citizens can learn about E-government. 
  •  Special attention should be given to groups difficult to integrate (women, elderly, immigrants).

You may also wanted to view the following related posts


Thursday, October 11, 2012

Definition of E-Government

Definition of E-Government

E-government is an idea raised by former U.S. vice president (AI Gore), within his vision of linking the citizen to the various agencies of government for getting all kinds of government services in an automated way, in addition to the completion of the government working itself depending on information and communication with network to reduce costs improve performance, speed of delivery and effectiveness of implementation.

Electronic government as government use of information communication technologies to offer for citizens and business the opportunity to interact and conduct business with government by using different electronic media such as telephone touch pad, fax, smart cards, self-service kiosks, e-mail/Internet, and EDI. It is about how government organizes itself; its administration, rules, regulation and frameworks set out to carry out service delivery and to co-ordinate, communicate and integrate process within itself.

Another definition of E-government was presented by United Nation’s website to be “E-government refers to the use of information and communication Technologies (ICT) Such as Wide Area Networks, the Internet, and mobile computing by government agencies”. While OECD noted that Electronic government refers to the use of information and communication technologies, and particularly the Internet, as a tool to achieve better government.

Maturity of E-Government

In the concept of government in general, as well as of E-government, we can distinguish between 3 groups’: citizens, business and services, and government and citizen, G2B denote the transaction between different government units. Most of the governments begin to provide information across direct on-line, but the public needs require quick more services and usually take this form gradually. E-government becomes more widespread; one is beginning to see the progress through six stages. Not all governments will reach all stages, and there will be much diversity within a government, with different agencies at different stages. The stages are:
1. Using internal network and setting up and email system.
2. Enabling inter-organizational and public access to information
3. Allowing 2-way communication
4. Allowing exchange of value
5. Digital democracy
6. Joined-up government

Implementing E-government is a continuing process, and most often the development is conceptualized in stages. The widely known maturity model suggested by Layne and Lee (Layne and Lee, 2001), who sees E-government as an evolutionary phenomenon, from which E-government initiatives should be derived and implemented. They assume four stages of growth model for E-government:

1. Cataloguing:
  • Online Presence
  • Catalogue Presentation
  •  Downloadable Forms
2. Transaction:
  • Services and Forms Online
  • Working Database
  •  Supporting Online Transactions
3. Vertical integration:
  •  Local System linked to higher level system within similar functionalities.
4. Horizontal integration:
  •  System integrated across different functions
  •  Real one stop shopping for citizens

You may also wanted to view the following related posts