A software program is designed to solve the problem. For designing software, we should create data structures (called models). We also need business logic to operate on data. The business logic should be stored in such a way that it can be changed easily. The model should not include any business logic but may contain some code to check errors. In a Top-Down approach, the complete system is designed together. In a Bottom-Up approach, first, small parts of the system are designed. After that, they are joined together.
The design may be a straight sequence, a repeating loop, branching sequences, etc. It may be structured, procedural, or object-oriented. There are various design patterns like singleton, factory method, strategy, etc. In a singleton, a single object is created. In the factory method, several objects are created, sometimes even without knowing the class to which they belong. In the strategy pattern, several algorithms are included. It is decided at runtime which algorithm to use.
An algorithm is a finite number of steps, which can be used to solve a given task. Algorithms are used for computing and other purposes as well. For example, a recipe to bake a cake is an algorithm. For several common tasks, several algorithms have been created for each task. These algorithms have different strengths and weaknesses. Depending on the circumstances, one algorithm is selected and used for the task. The developer of an algorithm needs awareness of the problem, alternative solutions, hardware, software, and various constraints.
The complexity of an algorithm depends on the resources of space and time needed when the algorithm is run. These may be linear, quadratic, or even exponential. Scientists can calculate in advance how complex an algorithm is. This can be done before the algorithm is run. Some solutions can not be calculated accurately. For these heuristic algorithms can be used. These algorithms give near enough solutions to the problems. There are some problems, like the halting problem, for which scientists have proved no algorithm can be made.
It is an interconnection of multiple devices to send and receive data. Routers and switches are used to help in the transfer of data. The network may be peer-to-peer or client-server. Peer-to-peer networks are simpler and used with fewer computers. Here all computers have equal status. Client-server computers have one server which has most of the resources. The server controls several (maybe 100 or 10000) clients. If a client needs to communicate with another client, it will go through the server. It is easy to back up data as all important data lies on the server. A router is a hardware device that can analyze and send/receive packets to other networks.
Networks can be a local area network (LAN), personal area network (PAN), metropolitan area network (MAN), a wide area network (WAN), etc. A LAN connects systems in several rooms of a building. It is quite secure. A PAN connects devices of a single person such as computers, printers, and play station. MAN can cover several buildings or an entire city. WAN can be spread over a big area like a state or a country. An extranet has a connection with at least one external network. An intranet connects only internal systems, e.g. of a company.
An operating system is a program that acts as an interface between users and the hardware. It performs some essential tasks for the system. It manages memory for different processes. It allocates and deallocates various devices to the processes running. It also manages the file system. It can ensure security by using passwords and other means. It can keep accounts of which users used how many resources. It also coordinates other software like compilers and application programs. An OS may be batch processing where users give tasks and operators run these tasks at a convenient time in absence of users. OS can be multi-tasking. Here several tasks run concurrently. They may get slices of time. In distributed processing, several processors at different places are used at the same time. A network operating system manages an entire network of devices, ensuring security and shared resources. A real-time operating system responds so quickly that it can control the environment.
Data types derived from built-in data types are independent of implementation. These include lists, arrays, stacks, and queues. Some common operations on these are traversing, inserting, deleting, searching, and merging.
Arrays hold elements of the same type. These elements are identified via indexes.
A list consists of elements that are connected via links. The start of the list called First must be known. Each link is connected to the next link. Linked lists may be singly linked, doubly linked or circular linked. A singly linked list can be traversed only forward. A doubly linked list can be traversed both forward and backward. In an ordinary linked list, the last link points to null. In a circular linked list, the last link points to the first link.
A stack is a last-in-first-out (LIFO) data type. We can access only the last inserted item. In a stack, an item can be pushed. It then becomes the top item. The top item can also be popped from the stack.
A queue is a data type open at both ends. One end is always used for insertion and the other end is always used for removal.
Theory of Computation
Theory of Computation or Automata theory deals with the mathematical treatment of computation. An alphabet is a finite set of symbols. An alphabet called Σ generally has two or more symbols in it. A string is a sequence of symbols in this alphabet. A language is a collection of strings. Sigman is the set of all strings of length n in this alphabet. Σ* is the universal language, containing strings of all lengths ( length 0, length 1, length 2,...). with If strings are formed each of length n out of an alphabet with |Σ| symbols, then the number of possible different strings is |Σ|n.
An automaton is an abstract machine that can help solve computational problems. It is used to analyze the dynamic behavior of discrete systems. Automata can take strings as input, process them into a finite number of states, and may enter into a final state. A finite automaton takes a string as input and works to process it. If the process is successful, the automaton enters the Accept state. The process can be visualized by a transition diagram.
Computer Algorithms Assignment Help