Sunday, August 23, 2009

INDEX

LECTURE NOTES FOR COMPUTER SCIENCE STUDENTS


C++


Computer Graphics


JAVA


XML


E-Commerce

E-Commerce New


Data Structures


PROGRAMS


C Programs


C++ PROGRAMS


JAVA PROGRAMS


Computer Graphics PROGRAMS


Data Structures PROGRAMS

Data Structures using C++ Programs


Operating System Programs


General Knowledge


Questions and Answers


Aptitude


C


C++


JavaScript

Thursday, August 20, 2009

DS index for theory

Introduction to Data Structures
Primitive Data Structures
Types of Data Structures
Stack
Queue
List
Operations on the Data Structures
Stack
Definitions
Operations
Applications – Infix, Postfix, Prefix.



Queues and Lists
Introduction to Queues
Application of Queues
Type of Queues
Basic Queues Operations
Linked Lists
Application of Linked List
Basic Operation of Linked List
Types of Linked List
Simulation Using Linked lists
Simulation process
Data Structures Implementing Simulation
Other List Structures
Stack as a Circular List
Queue as a Circular List
Simulation Program




Trees
Introduction to Trees
Trees
Application of Trees
Basic Structure of Trees
Types of Trees
Introduction to Binary Trees
Binary Tree Representations
Conversion of General Tree to Binary Tree
Application of Trees
The Huffman Algorithm


Sorting
Introduction to Sorting
General Background
Exchange sort
Bubble sort
Quick sort
Selection and Tree sorting
Selection sort
Heap Sort
Insertion Sort
Simple Insertion Sorts
Shell sort
Address Calculation Sort
Merge sort
Radix Sort
Bucket Sort


Searching
Introduction to Searching
Searching
Basic Search Techniques
Sequential Search
Binary Search
Searching an Ordered Table
Indexed Sequential Search
Interpolation Search
Tree Searching
Inserting into a Binary Search Tree
Deleting from a Binary Search Tree
General Search Trees
Multiway Search Tree
Searching a Multiway Tree
Implementing a Multiway Tree
Traversing a Multiway Tree
Insertion in a Multiway Search Tree
Hashing
Hashing Tables
Handling the Collisions

DS INDEX

DATA STRUCTURES


QUESTIONS


PART - A

PART - B


QUESTION AND ANSWERS


PART-A QUESTION WITH ANSWERS

TWO MARKS QUESTIONS AND ANSWERS

DATA STRUCTURES


Previous Next



1.What is an Algorithm?
An algorithm is clearly specified set of simple instructions to be followed to solve a problem. The algorithm forms a base for program.


2.What are the properties of an Algorithm?
_ Takes zero or more inputs
_ Results in one or more outputs
_ All operations are carried out in a finite time
_ Efficient and flexible
_ Should be concise and compact to facilitate verification of their
correctness.


3.Define Program?
It is an instruction and it is written according to the instructions, which is given in the algorithm.


4. What is Complexity analysis?
It is the analysis of the amount of memory and time an algorithm requires to completion.
There are two types of Complexity
1. Space Complexity

2. Time Complexity


5. Explain the performance analysis of the algorithm?
The analysis of the performance of an algorithm based on specification is called performance analysis. It is loosely divided into
a. Priori estimates
b. Posterior Testing


6. Explain Space complexity?
Space complexity of an algorithm is the amount of memory it needs to run to completion.


7. Explain Time complexity?
Time complexity is the amount of computer time an algorithm requires to run to completion.


8. List out the components that are used for space complexity?
a. Instruction Space
b. Environment Stack
c. Data Space.


9. What do asymptotic notation means?
Asymptotic notations are terminology that is introduced to enable us to make meaningful statements about the time and space complexity of an algorithm.
The different notations are
Big – Oh notation
Omega notation
Theta notation.


10. Define Efficiency of an algorithm?
It denotes the rate at which an algorithm solves a problem of size n. It is measured by the amount of resources it uses, the time and the space.


Previous Next

TWO MARKS QUESTIONS AND ANSWERS

DATA STRUCTURES



Previous Next

11. Define Worst case of an algorithm?
It is the longest time that an algorithm will use over all instances of size n for a
given problem to produce the result.


12. Define Best case of an algorithm?
It is the shortest time that an algorithm will use over all instances of size n for
a given problem to produce the result.


13. Define average case an algorithm?
It is the average time that an algorithm will use over all instances of size n for
a given problem to produce the result.


14. Define Divide and Conquer algorithm?
Divide and Conquer algorithm is based on dividing the problem to be solved
into several, smaller sub instances, solving them independently and then combining
the sub instances solutions so as to yield a solution for the original instance.


15. Mention some application of Divide and Conquer algorithm?
a. Quick Sort
b. Merge Sort
c. Binary search


16. Define dynamic programming algorithm?
Dynamic programming algorithm is a general class of algorithms which solve
problems by solving smaller versions of the problem, saving the solutions to the
small problems and then combining them to solve the larger problems.


17. Mention application of dynamic programming algorithm?
Efficient Fibonocci number computation
Chained matrix multiplication.
Longest common subsequence problem


18. State the various steps in algorithm?
Devising the algorithm
Validating the algorithm
Expressing the algorithm
Determination of complexity of the algorithm


19. Define algorithm paradigms space of an algorithm?
Algorithmic paradigms are defined as the general approach to design and construct efficient solutions to problems.


20. Mention the various spaces utilized by a program?
a. A fixed amount of memory occupied by the space for the program code and space occupied by the variables used in the program.
b. A variable amount of memory occupied by the variable whose size is dependent on the problem being solved. This space increases or decreases depending upon whether the program uses iterative or recursive procedures.

Previous Next

TWO MARKS QUESTIONS AND ANSWERS



21. Define ADT (Abstract Data Type)?
An ADT is a mathematical model with a collection of operations defined
on that model.

22. Define Linear data structure?
Linear data structures are data structures having a linear relationship between
its adjacent elements. Eg. Linked List.

23. Define Non Linear data structure?
Non Linear data structures are data structures don’t have a linear relationship
between its adjacent elements, but had the hierarchical relationship. Ex. Graph,
Tree.

24. What are different types of Linked List?
Single linked list
Double linked list
Circular linked list

25 What are different types of Circular Linked List?
Circular Single linked list
Circular double linked list

26 List the basic operations carried out in a linked list?
a. Creation of list
b. Insertion of list
c. Deletion of list
d. Modification of list
e. Traversal of List

27 Define a stack?
Stack is an ordered collection of elements in which insertions and deletions
are restricted to one end. The end from which elements are added and /or removed
is referred to as top of the stack. Stacks are also referred as “piles” and “push-down
lists”.

28 Define a queue?
Queue is an ordered collection of elements in which insertions and deletions
are restricted to one end. The end from which elements are added and / or removed
is referred to as the rear end and the end from which deletions are made is referred
to as front end.

29 Difference between Arrays and Linked List?
Arrays Linked List
Size of any array is fixed Size of list is variable
It is necessary to specify the number of elements during declaration
It is not necessary to specify the number of elements during declaration
Insertion and deletions are difficult and costly
Insertions and deletions are done in less time
It occupies less memory than a linked list
It occupies more memory
Coding is easy Careful coding is needed to avoid memory errors.


30 What is single linked list?
It is a linear data structure which consists a pointer field that points to the
address of its next node(successor) and the data item.

TWO MARKS QUESTIONS AND ANSWERS

DATA STRUCTURES



Previous Next



31 Define HEAD pointer and NULL pointer?
HEAD It contains the address of the first node in that list. NULL It indicates the end of the list structure.


32 What is meant by dummy header?
It is ahead node in the linked list before the actual data nodes.


33 Define Circular linked list?
It is a list structure in which last node points to the first node there is no null value.


34 Write operations that can be done on stack?
PUSH and POP


35 Mention applications of stack?
a. Expression Parsing
b. Evaluation of Postfix
c. Balancing parenthesis
d. Tower of Hanoi
e. Reversing a string


36 Define Infix, prefix and postfix notations?
Infix operators are placed in between the operands
Prefix operators are placed before the operands
Postfix Operators are placed after the operands.


37 What are the conditions that followed in the array implementation of queue?
Condition Situation
REAR


38 What are the conditions that could be followed in a linked list implementations of
queue?
Condition Situation
REAR==HEAD EMPTY QUEUE
REAR==LINK(HEAD) ONE ENTRY QUEUE
NO FREE SPACE TO INSERT FULL QUEUE


39 What are the conditions that could be followed in a linked list implementations of
queue?
Condition Situation
(REAR MOD ARRAY SIZE +1
)==FRONT
EMPTY QUEUE
(REAR MOD ARRAY SIZE +2
)==FRONT
FULL QUEUE
FRONT==REAR ONE ENTRY QUEUE


40 Define Circular queue?
A circular queue allows the queue to wrap around upon reaching the end of the array.

40. a) Define double linked list?

It is linear data structure which consists of two links or pointer fieldsNext pointer points to the address of the next(successor) node.Previous pointer points to the address of the previous(predecessor) node.

Previous Next

TWO MARKS QUESTIONS AND ANSWERS

DATA STRUCTURES



41 Define tree?
Trees are non-liner data structure, which is used to store data items in a shorted sequence. It represents any hierarchical relationship between any data Item. It is a collection of nodes, which has a distinguish node called the root and zero or more non-empty sub trees T1, T2,….Tk. each of which are connected by a directed edge from the root.


42 Define Height of tree?
The height of n is the length of the longest path from root to a leaf. Thus all leaves have height zero. The height of a tree is equal to a height of a root.


43 Define Depth of tree?
For any node n, the depth of n is the length of the unique path from the root to node n. Thus for a root the depth is always zero.


44 Define Degree of a node?
It is the number of sub trees of a node in a given tree.


45 define Degree of a tree?
It is the maximum degree of a node in a given tree.


46.Define Terminal node or leaf?
Nodes with no children are known as leaves. A leaf will always have degree zero and is also called as terminal node.


47. Define Non-terminal node?
Any node except the root node whose degree is a non-zero value is called as a non-terminal node. Non-terminal nodes are the intermediate nodes in traversing the given tree from its root node to the terminal node.


48.Define sibling?
Nodes with the same parent are called siblings.


49.Define binary tree?
A Binary tree is a finite set of data items which is either empty or consists of a single item called root and two disjoin binary trees called left sub tree max degree of any node is two.


50.Define expression tree?
Expression tree is also a binary tree in which the leafs terminal nodes or operands and non-terminal intermediate nodes are operators used for traversal.

TWO MARKS QUESTIONS AND ANSWERS

DATA STRUCTURES


Previous Next




51.Construction of expression trees?
1.convert the given infix expression into postfix notation
2. Create a stack and read each character of the expression and push into the stack, if operands are encountered.
3.when an operator is encountered pop 2 values from the stack. From a tree using the operator.


52.Define lazy deletion?
When an element is to be deleted it is left in the tree itself and marked a s being deleted. This is called as lazy deletion and is an efficient procedure if duplicate keys are present in the binary search tree, because the field
that keeps count of the frequency of appearance of the element can be decremented of the element can be decremented.


53.Define AVL tree?
AVL tree also called as height balanced tree .It is a height balanced tree in which every node will have a balancing factor of –1,0,1 Balancing factor Balancing factor of a node is given by the difference between the
height of the left sub tree and the height of the right sub tree.


54.what are the various operation performed in the binary search tree ?
1.insertion
2.deletion
3.find
4.find min
5.find max


55. What are the various transformation performed in AVL tree?
1.single rotation
- single L rotation
- single R rotation
2.double rotation
-LR rotation
-RL rotation


56.General idea of hashing and what is the use of hashing function?
A hash table similar to an array of some fixes size-containing keys. The keys specified here might be either integer or strings, the size of the table is taken as table size or the keys are mapped on to some number on the hash table from a range of 0 to table size


57.what is priority queue?
A priority queue is a data structure that allows at least the following two operations: insert which does the obvious thing; and Deletemin, which finds, returns, and removes the minimum element in the priority queue. The Insert operation is the equivalent of Enqueue.


58.Applecation of priority queues?
1.for scheduling purpose in operating system
2.used for external sorting
3.important for the implementation of greedy algorithm, which operate by repeatedly finding a minimum.


59.what are the main properties of a binary heap?
1.structure property
2.heaporder property


60. Define tree traversal and mention the type of traversals?
Visiting of each and every node in the tree exactly is called as tree
traversal
Three types of tree traversal
1.inorder traversal
2.preoder traversal
3.postorder traversal.

Previous Next

TWO MARKS QUESTIONS AND ANSWERS


DATA STRUCTURES


Previous Next



61. what is insertion sort? How many passes are required for the elements to be sorted ?
one of the simplest sorting algorithms is the insertion sort. Insertion sort consist of N-1 passes . For pass P=1 through N-1 , insertion sort ensures that the elements in positions 0 through P-1 are in sorted order .It makes use of the fact that elements in position 0 through P-1 are already known to be in sorted order .


62. Write the function in C for insertion sort ?
void
insertionsort(elementtype A[ ] , int N)
{
int j, p;
elementtype tmp;
for(p=1 ; p 0 && a [ j -1 ] >tmp ;j--)
a [ j ]=a [j-1 ] ;
a [ j ] = tmp ;
}
}


63. Who invented shellsort ? define it ?
Shellsort was invented by Donald Shell . It works by comparing element that are distant . The distance between the comparisons decreases as the algorithm runs until the last phase in which adjacent elements are compared . Hence it is referred as diminishing increment sort.


64. write the function in c for shellsort?
Void
Shellsort(Elementtype A[ ],int N)
{
int i , j , increment ;
elementtype tmp ;
for(elementtype=N / 2;increment > 0;increment / = 2)
For( i= increment ; i =increment; j - =increment)
if(tmp<>


65. what is maxheap?
If we want the elements in the more typical increasing sorted order,we can change the ordering property so that the parent has a larger key than the child.it is called max heap.


66. What are the two stages for heap sort?
Stage 1 : Construction of heap
Stage 2 : Root deletion N-1 times


67. What is divide and conquer strategy ?
In divide and conquer strategy the given problem is divided into smaller Problems and solved recursively. The conquering phase consists of patching together the answers . Divide – and – conquer is a very powerful use of recursion that we will see many times.


68 . Differentiate between merge sort and quick sort ?
mergesort quicksort
1. Divide and conquer stategy Divide and conquer strategy
2. Partition by position Partition by value


69.Mention some methods for choosing the pivot element in quicksort ?
1. choosing first element
2. Generate random number
3. Median of three


70. What are the three cases that arise during the left to right scan in quicksort?
1. I and j cross each other
2. I and j do not cross each other
3. I and j points the same position

Previous Next

TWO MARKS QUESTIONS AND ANSWERS


DATA STRUCTURES



71. What is the need of external sorting?
External sorting is required where the input is too large to fit into memory. So external sorting Is necessary where the program is too large


72. Define two way merge ?
It is a basic external sorting in which there are two inputs and two outputs tapes .


73. Define multi way merge ?
If we have extra tapes then we can expect to reduce the number of passes required to sort our input. We do this by extending two way merge to a k-way merge.


74. Define polyphase merge ?
The k-way merging strategy requires the use of 2 k tapes. This could be prohibitive for some applications . It is possible to get by with only k+1 tapes.


75. What is replacement selection ?
We read as many records as possible and sort them . writing the result to some tapes. This seems like the best approach possible until one realizes that as soon as the first record is written to a output tape the memory it used becomes available for another record . if the next record on the input tape is larger than the record we have just output then it can be included in the item . using this we can give algorithm. This is called replacement selection.


76. What is sorting ?
Sorting is the process of arranging the given items in a logical order.
Sorting is an example where the analysis can be precisely performed.


77. What is mergesort?
The mergesort algorithm is a classic divide&conquer strategy. The problem is divided into two arrays and merged into single array


78. What are the properties involved in heapsort?
1. structure property
2. heap order property

79. Define articulation points.
If a graph is not biconnected,the vertices whose removal would disconnect the graph are known as articulation points.



80. Give some example of NP complete problems.
i. Hamiltonian circuit.
ii. Travelling salesmen problems
iii. Longest path problems
iv. Bin packing
v. Knapsack problem
vi. Graph colouring problem

Previous Next

TWO MARKS QUESTIONS AND ANSWERS

DATA STRUCTURES


Previous Next



81. What is a graph?
A graph consists of a set of vertices V and set of edges E which is
mathematically represented as G=(V,E).Each edge in a pair(V,W) where V,W,
belongs to E ,edges are sometimes referred to as arcs.


82. What are Directed graphs?
If a pair of vertices for any edge is ordered, then that graph is called as
Digraph or directed graph.


83. Define Path.
A path in a graph is a sequence of vertices w1,w2w,3,wN such that Wi,Wi+1 belongs to E for a value 1<=I<=N. The length of such a path is the number Edges on the path,which is equal to n-1.


84. Define Cycle.
A cycle is a path in which the first and last vertices are the same.


85. Define Acyclic graph.
A graph with no cycles is called Acyclic graph.A directed graph with no Edges is called as a directed Acyclic graph (or) DAG.DAGS are used for compiler Optimization process.


86. Define Connected graph.
An undirected graph is connected if there is a path from every vertex to Every other vertex.A directed graph with this property is called as strongly connected Connected graph.If a directed graph is not strongly connected but the underline graph Without direction is connected it is called as a weakly connected graph.


87. What are the conditions for a graph to become a tree?
A graph is a tree if it has two properties.
i. If it is a connected graph.
ii. There should not be any cycles in the graph.


88. Define a Weighted Graph.
A graph is said to be a weighted graph if every edge in the graph is
Assigned some weight or value.The weight of the edge is a positive value that
Represents the cost of moving the edge or the distance between two vertices.


89. Give the types of representation of graphs.
1.Adjacency matrix
2.Adjacency linked list
90. What is a minimum spanning tree?


A minimum spanning tree of an undirected graph G is a tree formed
from Graph edges.that connect all the vertices of G at lowest total cost.

Previous Next

TWO MARKS QUESTIONS AND ANSWERS

DATA STRUCTURES



Previous Next




91. Explain about Adjacency Matrix
Adjacency matrix consists of a n*n matrix where n is the no. of vertices
present In the graph,which consists of values either 0 or 1.


92. Explain about Adjacency linked list.
It consists of a table with the no. of entries for each vertex for each entry a
linked List is inititated for the vertices adjacent to the corresponding table entry.


93. What is a single souce shortest path problem?
Given as an input,a weighted graph,G= and a distinguished vertex ‘S’
as the source vertex.Single source shortest path problem finds the shortest
weighted path from s to every other vertex in G.


94. Explain about Unweighted shortest path.
Single source shortest path finds the shortest path from the source to each
and every vertex present in a unweighted graph.Here no cost is associated
with the edges connecting the vertices.Always unit cost is associated with
each edge.


95. Explain about Weighted shortest path


Single source shortest path finds the shortest path from the source to each
and
Every vertex present In a weighted graph.In a weighted graph some cost is
always
Associated with the edges connecting the vertices.


96. What are the methods to solve minimum spanning tree?


a) Prim’s algorithm
b) Kruskal’s algorithm


97. Explain briefly about Prim’s algorithm


Prim’s algorithm creates the spanning tree in various stages.At each stage,a
node is picked as the root and an edge is added and thus the associated
vertex along with it.


98. Define a depth first spanning tree.


The tree that is formulated by depth first search on a graph is called as depth
first spanning tree.The depth first spanning tree consists of tree edges and
back edges.


99. What is a tree edge?


Traversal from one vertex to the next vertex in a graph is called as a tree
edge.


100. What is a back edge?


The possibility of reaching an already marked vertex is indicated by a dashed
line,in a graph is called as back edge.


Tuesday, August 18, 2009

INDEX

LECTURE NOTES FOR COMPUTER SCIENCE STUDENTS

C++
Computer Graphics
JAVA
XML
E-Commerce

PROGRAMS

C Programs
C++ PROGRAMS
JAVA PROGRAMS
Computer Graphics PROGRAMS
Data Structures PROGRAMS
Operating System Programs


General Knowledge


Questions and Answers


Aptitude


C
C++
JavaScript

PART – B

DATA STRUCTURES
PART – B QUESTIONS


1.i) Write the algorithm for insertion sort and demonstrate with an example.

ii) Sort the following nos.:43,32,16,7,-10,120,45,2,54,71,96 using Radix sort.

2.i) What are the advantages and disadvantages of various basic searching methods?

ii) Write algorithm to insert a node in the binary search tree and demonstrate.


3.i) Write an algorithm to perform exchange sort procedure on the given set of integers and discuss its time complexity.

ii) Sort the following integers using heap sort procedure:
17,8,3,11,342,5,23

4i) What is binary search tree? Explain it with suitable example. Write an algorithm to search an element in the binary search tree.

ii) Explain about any two hashing functions in detail with example.

5) Explain the Quick sort algorithm. Using this algorithm sort the following numbers:
15,97,13,28,101,188,5,3,1,56,54

6.i) Differenciate between Heap sort and Radix sort.
ii) Explain insertion sort algorithm .


7.i) Explain selection sort in detail.
ii) Explain sequential search with example


8.i) Explain binary search in detail.
9. i) Discuss the various representations of a binary tree in memory with suitable example. ii).What are the basic operations can be performed on a binary tree?Explain each of them in detail with suitable example.

PART - B Questions

DATA STRUCTURES
PART - B QUESTIONS



1.What are the various operations on stack?Explain.

2.Write the functions to perform the following operations on a singly linked list.
i. Adding node at between any two nodes
ii. Deleting a node from any where.
iii. Adding node at beginning and end
iv. Deleting a first and last node.

3.i)Explain about any two applications of stack in detail with suitable example.

ii)Write the functions to perform the insert and delete operations on queue.


4.i)Give two sorted lists L1 and L2.Write a procedure to compute L1U L2 using the basic list operations.

ii)Write a program to print out the elements of a singly linked list.


5.i)Write an algorithm /program to convert infix expression to post fix expression using stack.
ii)What is meant by priority queue?

6.Explain in detail Queue data structure.

7.Explain in detail Linear Linked List.

8.Explain in detail Circularly linked list.

9.i)List the advantages of circular queue ?

ii)How to represent the queue using array?

Previous Next

PART - A Questions

DATA STRUCTURES

PART - A Questions

Previous Next

1. Define “Data Structures”.


2.Differentiate linear and nonlinear data structure?


3.What is an Array?What are row major order and column major ordering in an array?


4.Differentiate between static and dynamic data structures?


5.Define stack and various operations performed in it?


6.What is stack overflow and underflow?


7.Explain the array representation of stack?


8.What are the basic properties of Arrays?


9.Define a queue?


10.Mention any two similarities and dissimilarities between stack and queues.


11.What is Deque?


12.What is a priority queue?


13.Discuss “Circular queues” with an example.


14.Define Lists?


15.what is Linked list? List out the different types of linked lists bringing out the differences between each.


16.What are the applications of stack?


17.What are the applications of queue?


18.What are the advantages of using Doubley linked list over singly linked list?


19.Write an algorithm to count the number of nodes in a singly linked list?


20.List the disadvantages of array?

21. What are trees?


22. What is a binary tree and list out the its properties?


23. How are Binary trees represented ?


24. Define a Binary Search Tree.


25. Write algorithm for post order traversal of a Binary tree?



26. Represent the following algebraic expression into binary tree form:
A + (B-C)*(E+F)/G.


27. How to represent a binary tree in memory using an array? Mention the disadvantages of using an array to represent a binary tree.


28. What is meant by sorting?


29. How do you compute the time complexity for sorting algorithm?


30. What is meant by Internal Sorting?


31. Sort the following numbers using Merge sort 15,5,30,6,3,95.


32. What is the time complexity of Tree sorting and Merge sorting?


33. How to represent a binary tree in memory using an array?Mention the disadvantages of using an array to represent a binary tree.


34. Sort the following numbers using Radix sort:
17,220,8,45,1875.


35. What are the major differences between linear search and binary search procedures? Write their time complexity.


36. What do you mean by Hash function? Give an example.

Previous Next





Data Structures Questions

PART - A Questions








1. Define stack?


2. What are the advantages of using Doubly linked list over singly linked list


3. Write an algorithm to count the number of nodes in a singly linked list?


4. Write algorithm for post order traversal of a Binary tree?

5. What is an Array? What are row major order and column major ordering in an array?


6. What are the advantages of using Doubly linked list over singly linked list?


6. What is a binary tree and list out its properties?


7. What is the array representation of the following tree?






8. What is meant by sorting?


9. How to represent a binary tree in memory using an array? Mention the


Data Structures Questions



PART - A Questions







1. Define a queue?


2. Mention any two similarities and dissimilarities between stack and queues.


3. Define a Binary Search Tree.


4. Represent the following algebraic expression into binary tree form:
A + (B-C)*(E+F)/G.

5. Disadvantages of using an array to represent a binary tree.

6. Sort the following numbers using Merge sort 15,5,30,6,3,95.

7. What are the major differences between linear search and binary search

8. procedures? Write their time complexity

9. Define “Data Structures”.

10. What are the advantages of using Doubley linked list over singly linked list

11. Write an algorithm to count the number of nodes in a singly linked list?

12. Write algorithm for post order traversal of a Binary tree?

13. What do you mean by Hash function? Give an example.


14. Disadvantages of using an array to represent a binary tree.


Data Structures Questions

PART - B


1. Explain about any two applications of stack in detail with suitable example.





2. i)Give two sorted lists L1 and L2.Write a procedure to compute L1U L2 using the basic list operations.
ii)Write a program to print out the elements of a singly linked list.





3. i) Discuss the various representations of a binary tree in memory with suitable example.
ii).What are the basic operations can be performed on a binary tree? Explain each of them in detail with suitable example.





4). i) Write the in-order, pre-order and post order traversal of a given Tree.


ii)Write a recursive algorithm to find the post order traversal of a tree.

iii)Write briefly about Huffman Algorithm.



5. i)Write the algorithm for insertion sort and demonstrate with an example.

ii)Sort the following nos.:43,32,16,7,-10,120,45,2,54,71,96 using Radix sort.


6. Explain the Quick sort algorithm. Using this algorithm sort the following numbers: 15,97,13,28,101,188,5,3,1,56,54




Prevous Next


Data Structures Questions

PART - B

Previous Next


7. Write the functions to perform the following operations on a singly linked list.
i. Adding node at between any two nodes
ii. Deleting a node from any where.
iii. Adding node at beginning and end
iv. Deleting a first and last node.

8. Explain in detail Circularly linked list.



9. i)Discuss the various representations of a binary tree in memory with
suitable example.
ii)Write briefly about Huffman Algorithm.

10. What is binary search tree? Explain it with suitable example. Write an
algorithm to search an element in the binary search tree.



11. i) Differenciate between Heap sort and Radix sort.
ii) Explain insertion sort algorithm .


12. i) Explain Heap Sort with example.
ii)Explain Merge sort algorithm .Using this algorithm sort the following numbers:
33,66,22,56,77,44,99,32,58.



13. i) Write the functions to perform the insert and delete operations on queue.
ii) What are the various operations on stack? Explain.


14. i) Write an algorithm /program to convert infix expression to post fix expression using stack.
ii)List the advantages of circular queue ?




15. Explain binary tree traversal with suitable example.
b)Explain binary search tree.How to insert a node into the binary tree?



16. i) What are the advantages and disadvantages of various basic searching methods?
ii) Explain insertion sort algorithm .


17. i) Explain bubblesort algorithm.
ii)Explain merge-sort algorithm with example.

Previous Next

Monday, August 17, 2009

Introduction and Concepts

At the most fundamental level the Internet is a series of standards for three basic tasks:

· Sharing of files with one or more parties

· Sharing of email with one or more parties

· Allow the user of one computer system to log onto another computer system

From these three functions, Internet applications like WWW, file transfer, telnet and others are created.

Networks and Commercial transactions- The idea of doing business electronically over network is not new. As the world becomes increasingly interconnected, particularly through Internet with its open protocols, forward looking businesses will be able to make their products available to global market without having to create and maintain their own private network for sales, delivery and customer support.

The number of businesses devoted to promoting commerce on the Internet has been growing exponentially, but they all share the goal of making commercial transactions over the Internet safe, simple and secure – and earning a profit in the process. The methods employed to achieve these ends are somewhat more various, but can be categorized as either creating secure and reliable channels to carry transactions across Internet connections or using more traditional channels to carry sensitive information.

Electronic merchants need to feel confident they can safely market and deliver their products, get paid for all products purchased and not lose any product to theft.

Electronic consumers need to feel confident they can safely select and take delivery of products, pay for them and not be concerned about compromise of payment information such as credit card or bank account numbers.

Internet and other novelties

Internet and other novelties

The Internet functions as a medium for data transmission in much the same way that the international telephone network functions as a medium for voice and other signal transmission. The telephone system consists of connections and the required supporting hardware and cabling to people, organizations and devices answering and fax machines, computers and others but does not include those things nor does it include the signals being sent over it.


The Internet can be said to consist of the connections and the required supporting hardware and cabling between network and not the data stored on and made accessible from those network. The Internet Advisory Board (IAB) provides oversight to the Internet Engineering Task Force, which is responsible for evaluating and defining Internet protocols. The Internet protocols are also known as TCP/IP the 2 most central protocols defining inter network transmissions. If you are using a computer connected to a network that conforms to the Internet protocols and is connected to global Internet, we can exchange data with any other computer connected to global Internet as long as that computer also conforms to Internet protocols.

Networks and Electronic transactions today- With wide spread use of credit cards, consumers and merchants have been happily transacting business over telephone network for many years. Once participants in electronic market understand the mechanisms set up for transacting business across the Internet, buying and selling online will be at least as simple and trusted a method as buying by phone or in person.

A model for commercial transactions- Understanding the ways in which commercial transactions take place online across Internet requires understanding the way in which any commercial transaction takes place. There will be different types of transactions and differences also.

Establishing trust-Before any purchase can be made from retail store, a customer must enter it. The merchant may control access to the goods it offers in several different ways. It can sell to any and all come through an open storefront, or it can restrict its sales to a certain client. The customer also makes choices prior to entering a store. The degree to which the merchant will restrict access to its products will vary depending on the type of business.
The merchant and consumer each establish a level of trust in the other. The merchant trust that the customer is a potential purchases, capable of selecting and paying for some product offered the consumer trusts that the merchant may be offering the desired product and will be capable of delivering that the product if needed.
There are other identity issues that both buyer and seller are concerned with when first initiating contact. Many products have distribution limits. For example,
Prescription drugs may not be dispensed to anyone without a legitimate prescription
Alcoholic beverages may not be sold to minors and may be subject to other sales restrictions depending on the locality
Firearms and ammunition are subject to a wide range of restrictions varying by locality
Tobacco products may not be sold to minors
Adult entertainment products may be subject to local restrictions on sales to minors
Establishing trust between parties in a commercial transaction that takes place across a public network is difficult. Online transactions require mechanisms for establishing trust between prospective buyers and sellers.

Negotiating a deal-Determining the item to be purchased and the price to be charged are trivial matters in most retail stores. The buyer selects the desired item, and the price is usually clearly marked either on the item itself or near its display area. In most cases, this is all that is necessary. When we order products by phone from a catalog, we can refer to the price in the catalog. Ordering products over the Internet does not offer an explicit method to reference the offering price, nor does it offer an explicit method to reference the original order. Neither the buyer nor the seller should be able to repudiate the offered price or the products ordered, mechanisms to accomplish this are available for electronic commerce.

Payment and settlement- In store the transaction is completed as soon as the buyer pays for an item. The vendor takes a smaller risk when selling online, since credit cards can be authenticated through automated connections to settlement companies.

The Internet environment- Electronic Funds Transfer (EFT) is another field that is now reaching a mass market as ATMs, gas stations and supermarkets increasingly accept credit and debit cards.

Internet advantage- Despite Internet’s long existence as a non commercial research
network, its commercialization owes its apparent success to several factors:

The Internet is an open system

The Internet itself does not belong to anyone.

The WWW is Internet’s ‘killer app’

The Internet is open-

The Internet is open

All Internet protocols are open and public and anyone can use them to write software implementations that can interoperate with other computers and network running Internet protocols. Most of the competition between vendors of internet and TCP/IP software is based on performance, ease of use and compatibility.

Local Area Network (LAN) operating system vendors such as Novell and Microsoft have traditionally kept their product specifications private and incompatible; but have lost the benefits of having entire community of researchers and developers working on interoperable implementations as has happened with Internet protocols.

Because of this openness, a wide range of implementations are available from freeware and shareware versions of Internet application and networking software through high performance function versions of Internet. Software sold by companies like FTP software and Sunsoft.

The Internet does not belong to anyone- Connectivity through Internet allows any connected individual to browse any freely available content, without regard to memberships. At least as important is that anyone with dedicated Internet connection and a computer can be not just an information consumer but also as information provider. And instead of communicating with an online service population, people with Internet connectivity can potentially communicate with anyone else connected to Internet.


World Wide Web

World Wide Web and killer app of the Internet

Most Internet applications were developed by computer scientists more often concerned with performance and extensibility than with usability. Applications such as telnet (for running terminal sessions on remote computers), FTPs (File Transfer Protocol) for transferring files between two computers) require from the user a high level of awareness about the operating systems of the local and remote computers. While not entirely unusable by less technically sophisticated those applications nevertheless had a sufficiently high cost of entry to turn off many potential users.

No serious contender for a killer application appeared until the World Wide Web began and graphical browser became available. It has become hassle to track down sources of information on Internet; connect to server and attempt to locate the desired data. The WWW offers improvements in both to end user who can point and click to navigate the web and locate interesting or necessary information and to information providers who can offer access to their own data as well as other related providers to a much wider audience. The result was an application that appealed to a huge potential user base: those wanting access to free or cheap information and entertainment, but without the hassles of figuring out how to work all the different computers and programs.

WWW standards

WWW standards

The World Wide Web is defined by a handful of protocol specifications. Software developers use those specifications to implement the web browser and web server programs. The interaction between browser and server is by Hypertext Transfer Protocol (HTTP). Web browsers send messages conforming to this protocol to web server, this in turn return requested information.


The Uniform Resource Locator (URL) protocol specifies how individual resources are to be identified within the WWW. Web browsers use these URLs in HTTP requests to remote servers. They identify to the server exactly what resource is being requested.


Hypertext markup language (HTML) tags which define the different functional pieces of each document. HTML documents consist of plain text (ASCII) files and may point to graphics files, other types of multimedia files like audio or video files stored in standard formats or other network resources (URLs).


The Common Gateway Interface (CGI) specifies mechanisms for passing information from the person browsing your web server to other resources available through that server, in particular by collecting information from remote user in web forms and then passing that information along to the other resource. CGI provides the link between the web server and the rest of the commercial process. The security protocols relevant to WWW include Secure Sockets Layer (SSL) and Secure Hypertext Transfer Protocol(S-HTTP). They add security to existing protocols between the browsers and servers that support them.

Browsers and Servers-

Web browsers or clients must be able to send HTTP requests and receive HTTP replies from servers. Browser functions can also be integrated into more complete network or communications packages or even into operating systems like IBM’s OS/2 Warp.
Web servers are set up on higher performance systems with higher performance connections to the internet.

Security Technologies

Security Technologies

To keep secrets we have social security numbers, credit card accounts, Personal Identification Number (PIN) for accessing practically everything with computers to keep records and collect data, the informed person is examining what information has to be shared and what is kept private.

Why Internet is unsecured- The Internet is simply an implementation of protocols, rules of operation or standards that define the way connected computers communicate with each other. Connected systems can even be connected to different types of network but as long as they all run the Internet protocols they will be able to interoperate people who use Internet need easy-to-use interfaces and secure operations have long been missing from Internet protocol suite implementations.

The Internet is definitely an open network. Once data is transmitted beyond organizations network it may be handled by any one of different intermediate computers called routers which make sure the data is delivered to its intended environment.

Network managers and administrators take great care before connecting any corporate systems on Internet, implementing elaborate and extensive filtering system and firewalls.

Application layer
Handles interaction between applications running on communicating systems
Transport layer
Handles connection between processes running on communicating system

Internet layer(best effort layer)
Handles connection between system communication across an inter network

Link layer(network layer)
Handles connection between system communicating across a local area network or other link.
Risks- Some serious risks when we transmit data across the Internet are:
Interception by third party
(some one other than the intended recipient reads mail you send)
Forgery( someone sends mail and signs your name)
Modification(someone intercepts your mail, changes it, and sends it on to its final destination)

Interception of your network traffic is only a problem when we send sensitive information like credit card numbers or e-cash.

Forgery can be a much more serious risk.
The nature of email protocols makes it a relatively simple matter for someone to send a message that appears to be coming from someone else.Another insidious (dangerous) threat is that someone will intercept transmissions, modify them and send them onto their destinations.

Internet security holes- If we are linked through an organizational Internet connection, our system may actually be visible to anyone else connected to the Internet; more likely, though, our organizational Internet connection will sit on the other side of firewall system. Firewall gateways function by hiding organizational systems from the rest of the Internet, while still providing access for approved applications to send and receive data. The larger issue is what happens to your Internet transmissions when they leave or before they arrive at the computer. Anyone with access to the router through which we receive our Internet traffic or the network to which it is connected has the ability to eavesdrop on our sessions. Security depends on the integrity of participating network and system managers as well as on their ability to keep out intruders.
The security risk exists at every inter connection so if you purchase your Internet service from a local reseller chances are that our transmissions get passed from local company to regional company who passes them onto Internet backbones.

A bigger risk- Security methods that use digital signatures and encryption can in general consider secured. Customers must take care in protecting the passwords to their secure commerce services as they would in protecting their own wallets:

· The password should not be easy to guess

· The password should not be written down near the computer from which it will be used.

· The user should not give out the password to anyone, ever

· The user should not leave an active session running on an unattended, unprotected system

· Passwords should be changed periodically










Introduction to cryptography

A brief introduction to cryptography

Modern cryptography offers solutions to problems of an operation network.

Cryptography- If we want to protect sensitive communication we use some kind of code or cipher, replacing the “real” words with code words or shifting characters to hide the real meaning of our messages. Governments and military organizations have always needed to protect their communications.

Objective: keeping the secrets secret.

The whole point of cryptography is to keep information out of hands of anyone but its intended recipient. Even if the message gets intercepted the meaning won’t be apparent to the interceptor unless the interceptor is able to decipher it.

Cryptography uses encryption to transform plain texts into encrypted texts. The idea behind modern encryption methods is to make it so costly in time and resources for an interceptor to interpret a message that is not practical to even attempt it, while keeping it easy for an authorized recipient to read.

Coders and ciphers- A code actually uses some method of interchanging vocabularies so that each code word represents some other non code words. Codes require special code books which act like dictionaries, if the code book is lost, anyone having the code book can read encoded text.

Ciphers are the basis of encryption schemes. Traditional ciphers use a single key, which the sender and recipient share and try to keep secret from anyone else. The sender runs the algorithm using the key to turn the plain text message into an encrypted message and the recipient runs the same algorithm in reverse to decrypt the message. This is known are symmetric cryptography.

Breaking encryption schemes- Cryptographers accept that all ciphers are vulnerable to brute force attacks and they design ciphers with this in mind. The key to security is usually the cipher key size. A cipher key can be compared to a combination lock; if you have a correct key you can unlock the message. But the 3 digit lock is easily traceable.

Increasing the size of the key is important and makes it more secure over a longer period of time.

Data Encryption Standard- One widely distributed secret key solution is DES. The US, National Bureau of Standards published DES in late 1970s for commercial uses. For instance automatic teller machine networks use DES to encrypt consumers’ PINs when they are transmitted through shared network and data communication lines.

DES is considered safe against all but brute force attacks which are considered to be impractical against DES for all but the very largest and most determined organizations. DES can be implemented reasonably efficiently for bulk encryption like that required by electronic commerce applications.

Sunday, August 16, 2009

Public key encryption


Public key encryption

By choosing two large prime numbers and properly manipulating them, we can extract two keys, multiply them to get the number to evaluate the modular expressions. We can encrypt a message by chopping it up into small chunks, converting those chunks to numbers raising those numbers to the power of one of the keys and calculating the result modulo the sum of the two original primes. As a result these two keys work together to create an encryption algorithm. We can encrypt a message with one of the keys; use another key to decrypt it, doing the same process on encrypted text.



Encrypting with one key cannot be reversed without the other key. One of the keys is called a public key and can be safely distributed publicly; the other key is called a private or secret key and is not for distribution.

The idea behind the dominant public key encryption scheme is simple. Named for its inventors, Ron Rivest, Adi Shamir and Len Adleman, RSA was patented and it is now owned by RSA Data Security,Inc.(RSADSI).

Very simply we got public and private keys you can communicate securely and reliably. Encryption of the key is done with recipient’s public key only the recipient is able to decrypt that transmission.

If the numbers we select as keys are too small, someone could intercept our encrypted messages and apply a brute force attack with some chance of success.

Trusted key distribution and verification

With wider application of public key cryptography for the purpose of commerce, mechanisms for trusted publication and distribution of public keys are necessary. Simply having a customer send a copy of public key will not do since a forger could send her own public key while pretending to be someone else.

cryptographic applications

Three cryptographic applications

Encryption
Digital signature
Non repudiation and message integrity


Encryption- Requiring the use of a key to unlock data is called encryption. The key can be a secret key used symmetrically or it can be one of a public key pair used asymmetrically. The longer the key the less likely it is that a brute force attack on encrypted data will be successful.
Public key pairs include a private and a public key. When sending a public key encrypted message the sender encrypts the message with the recipient’s public key. The resulting message can now only be decrypted using recipient’s private key.

Public key cryptography is very secure but very costly in terms of computer resources. As a result it is often combined with secret key cryptography. For example a sender can use public key encryption to encrypt a secret key to be used for bulk encryption purposes. Both participants could use a single secret key or they could use a single key to generate some other set of keys to use for their communication. The exchange of secret key uses the very secure public key encryption while the bulk encryption of remainder of the communication could use some other encryption method.

As eavesdropper could capture the encrypted communication and thereby attempt to break the encryption. However by using very long secret keys using them only for one communication session and not reusing them, this method can be made quite secure.


Digital signature- If the sender encrypted data using sender’s own private key, the resulting message could be decrypted by anyone who had the sender’s public key. This process can’t be considered a way to protect the message from anyone since anyone with access to sender’s public key can decrypt it. However it does offer a method of signing a document digitally.

Encrypting a message in this way will ensure that it can only have come from a person whose public key will decrypt it – however it also ensures that every such message must be decrypted. As mentioned since public key encryption uses lots of resources this becomes impractical. Also there is the problem of keeping track of and certifying public keys.

A better option for digital signatures is to use a digest function to summarize the contents of a particular message in a smaller more manageable chunk of data. This chunk can then be encrypted using sender’s private key and appended to the message. The recipient can then use the same digest function on received message and use the sender’s public key to decrypt the digest included by the sender. If the two digest results matches, then the message has been certified as signed. If it doesn’t match, the message cannot be certified as signed.

Non repudiation and message integrity- There are two by-products of the use of digital signatures. Non repudiation is a cryptographic term describing the situation when the originator of a message cannot deny having sent it. Normal electronic mail is deniable, since it is relatively easily forged and modified. Email that has been digitally signed however is non repudiable. If the digital signature checks out properly the owner of the signature is the only entity capable of having signed the message.

The other important by-product of digital signatures is a guarantee of message integrity. If a message has been digitally signed and transmitted, verifying the signature also verifies that the message has been received, unchanged from the source. A signed message that has been intercepted, modified and forwarded onto its original destination will not produce a verified signature. The ability to verify a digital signature also confirms that the signed message was delivered intact and unchanged. Furthermore the person signing cannot later deny having sent it.

Electronic payment methods

Updating traditional transactions

Typical modern consumer uses different methods to pay for goods and services like cash, credit and personal checks. Internet based electronic commerce methods also focus on secure transmission of credit card information, electronic checking and digital currencies.

Adapting existing methods
- Credit cards are the easiest method of the three to adapt to online transactions in part because people are already accustomed to using them remotely, whether for telephone transactions or for mail orders. Credit card transactions simply require that the consumer provide a valid credit card number and expiration date when placing an order that information can be and often has been provided through standard Internet applications like e-mail. This exposes credit card to eavesdropper monitoring for sequences of digits specific to credit cards along the message’s route.

Adapting cash for user over an open network is considerably harder in part because most people associate cash with the physical exchange of currency but doing so makes it possible to spend anonymously.

Checking across a network is conceptually simpler to grasp because the check itself is simply a document with very specific information (bank, account number, payee and amount) which has been signed by account holder. Turning a hard copy check into an electronic check requires that it must be transmitted securely and signed digitally. In some ways the process is similar to digitizing cash but is simpler because there is no need to even consider the anonymity of person writing the check.




Building a commercial environment

Building a commercial environment An online commerce environment must do beyond simple transmission of payment information but it must start here usually with an Internet server capable of transmitting data securely. Security goes beyond encryption of ordering information, however, and it is necessary to guard against criminals who masquerade online as merchants authorized to accept consumer credit card information. Even more important is to secure the merchant’s server system, where credit information is collected.

As an entire solution the commerce environment should be as flexible as possible accepting different payment methods consisting with market and business. Some merchants will be able to do business on the Internet simply by purchasing and installing a secure World Wide Web server and manually processing orders received over Internet in the same way they process mail or telephone orders. Merchant should collect information about customer and should be integrated into general business environment generating actions to be taken as a result of the order:

product delivery instructions
transaction settlement
account activity reports
confirmations
order status reports
gathering of marketing information

Offline and online transactions


In general direct commerce solutions that use Internet directly to transmit transaction information protect that information with some kind of encryption method. It is not strictly necessary to transmit any sensitive information over open network when there are much more secure channels that can be used to carry sensitive information. Telephone conversations, sending fax, postal mails are chances for illegal taps. Barring the relatively extreme instances of those whose business is under government scrutiny, personal conversations inspire a high level of confidence that no one is listening in eavesdroppers in most cases would most likely be noticed. The result is that there are other channels across which sensitive information can be sent. Some Internet commerce solutions take advantage of the relatively security of these alternative media to eliminate the need for software security solutions. These solutions require that the consumer make a telephone call, send a fax, or send a hard copy with sensitive information like credit card numbers, consumer names and billing and shipping addresses.

Secure online transaction models

Secure online transaction models
-The simplest method of doing direct business online on Internet is to set up a secure world wide web server then create content pages and program forms to take orders.
Secure web servers

A secure web server must by definition support some type of security protocol. The two most important are secure hypertext transfer protocol (S-HTTP) and secure sockets layer (SSL), which was initially developed by Netscape and offered to the Internet community as a proposed standard in 1995. However, one of their primary advantages is their relative unobtrusiveness to the consumer using an SSL or S-HTTP enabled browser.

Secure server purchasing
The consumer browses through graphical and textual descriptions of the merchants’ products selects a purchase and usually clicks on a button that says “buy now” to make a purchase. If consumer is using a secure browser supported by secure server, that button will produce a form on consumer’s screen which the consumer must complete. Delivery and payment information has been provided the product will be delivered. If the customer is using a browser that is not secure or that uses a protocol not supported by the server, then some other method must be employed to consummate the transaction. Delivery information represents name, address, delivery address, email address and any other information necessary to deliver the product.
If product is a physical item, then a physical destination, preferred shipper and telephone number may be necessary.If product is a digital item, then it may be transmitted directly to consumer via the browser by e-mail or through some other application such as file transfer.

Secure server selling
- First the merchant needs to publish product offerings on Internet with secure server. Servers are available that support SSL, S-HTTP and both. Because the Internet is an open network based strictly on proper and widespread implementation of standards, it doesn’t make sense for merchants to limit their potential customers by using only one standard.

The merchant must go beyond merely setting up the server. As with mail orders there must be a mechanism for processing the information contained on an order form. Most often the merchant will use interfaces of some type to automate transactions. Companies selling physical products over Internet use email confirmations and shipping notices to keep customers up to date on status of orders and all merchants can use network applications to notify their internal organization of orders.

Required facilities

Required facilities

The merchant must understand that purchasing products over Internet requires a significant investment in software, hardware and services. The majority of Internet merchants will be unlikely to set up their own secure servers, because doing so can be complicated for the Internet novice, and also because there are so many companies now offering such services. However, merchants who are aware of what their options are can be smarter consumers of these services, and customers who are aware of how their online orders are processed can be smarter online consumers.


Hardware

Any computer that can run an implementation of TCP/IP and that can be connected to Internet can be a www server. The system should have more processing power, should have sufficient hard disk to store all information fast, Internet connection to support maximum expected load, security features to protect system from unauthorized access.


Some organizations using Internet may prefer to simply get a server and an Internet connection and leave their internal networks out of the loop. Some kind of firewalls is necessary to protect their network from intruders.


Software

TCP/IP implementation is necessary for web server. This may be built in to the operating system, or it may be a part of web server package. System administrators make sure that there is no other software on Internet servers. This guarantees that if an intruder should compromise that system, no network is available to intruder for further mischief. This is the software that responds to requests from browsers on the Internet and sends out the desired information. Security should be a part of the operating system.

Services

Services

The raw materials are relatively cheap, but the knowledge of how to put it all together is expensive. And there are quite a handful of different things that need to get done to set up a server.

Obtain Internet service
Administer Internet link and servers
Create web server content
Process transactions


Obtaining Internet services is simply the process of getting connected to Internet and keeping that access up and running. In some ways it is comparable to getting a telephone connection – the ISP simply offers connectivity, not content.

Some Internet service providers will also manage your link and your server hardware. This should mean they will keep the systems up and running and manage access to and from those systems. This often includes security and firewall services.

Creating and managing web server content is critical and is a task often formed out to consultants. While this approach may be effective for getting a web site online quickly, maintaining and updating content must be an ongoing task.

Transactions using credit cards must be settled. Most people will be familiar with the swipe machines used in stores where credit cards are accepted.

Electronic malls

Electronic malls

Setting up a web site for buying and selling can be complicated and expensive, it is not for everyone. However some companies have been setting up electronic or vital or online malls. The shopping mall is a familiar and comfortable model for consumers and merchants and it is relatively straightforward to simulate using the World Wide Web. Mall operators allow individual merchants to rent space on the mall. The financial arrangements may vary but include some monthly charge, charge for storage space required and charge for each transaction. As part of the ability to sell products electronically, the online commercial environment should provide at least some of the following abilities:


· Automatically process transactions received through the Internet and send payment information to credit card authentication services also via the Internet.


· Automatically process responses from the credit card authentication service.


· Get digital signatures or other proof of approval of the order from the customer


· Generate necessary transaction tracking information, including electronic receipts, customer statements and internal documentation of orders.


· For non electronic material. Have a link to the delivery company for delivery status between the vendor and the customer.


· Be able to handle occasional telephone or fax transactions as well as online transactions.