Knowledge in Computation

RISC (computer science)

A reduced instruction set computer, or RISC, is one whose instruction set architecture allows it to have fewer cycles per instruction than a complex instruction set computer.

Multi-Processor-Parallel Processing

parallel processing: running a process on more than one processor. Multiprocessing operating systems enable several programs to run concurrently. UNIX is one of the most widely used multiprocessing systems.Multiprocessing means the use of two or more Central Processing Units (CPU) at the same time.

Time and Space Analysis of Algorithms

Time complexity of an algorithm quantifies the amount of time taken by an algorithm to run as a function of the length of the input. Similarly, Space complexity of an algorithm quantifies the amount of space or memory taken by an algorithm to run as a function of the length of the input. ... Let each operation takes time.

Introduction to Data Structure

DS introduction. A data structure is a special way of organizing and storing data in a computer so that it can be used efficiently. Array, LinkedList, Stack, Queue, Tree, Graph etc are all data structures that stores the data in a special way so that we can access and use the data efficiently.

linear data structure

Definition of Linear Data Structure The data structure is considered to be linear if the data elements construct a sequence of a linear list. ... The examples included in the linear data structure are array, stack, queue, linked list, etc. An array is a group of a definite number of homogeneous elements or data items

Stack-Reference

Stacks are a type of container adaptor, specifically designed to operate in a LIFO context (last-in first-out), where elements are inserted and extracted only from one end of the container. stacks are implemented as containers adaptors, which are classes that use an encapsulated object of a specific container class as its underlying container, providing a specific set of member functions to access its elements. Elements are pushed/popped from the "back" of the specific container, which is known as the top of the stack.

Queue-Refernced

A java.lang.ref.ReferenceQueue is a simple data structure onto which the garbage collector places reference objects when the reference field is cleared (set to null). You would use a reference queue to find out when an object becomes softly, weakly, or phantomly reachable so your program can take some action based on that knowledge. For example, a program might perform some post-finalization cleanup processing that requires an object to be unreachable (such as the deallocation of resources outside the Java heap) upon learning that an object has become phantomly reachable. To be placed on a reference queue, a reference object must be created with a reference queue. Soft and weak reference objects can be created with a reference queue or not, but phantom reference objects must be created with a reference queue: ReferenceQueue queue = new ReferenceQueue(); PhantomReference pr = new PhantomReference(object, queue); Another approach to the soft reference example from the diagram on the previous page could be to create the SoftReference objects with a reference queue, and poll the queue to find out when an image has been reclaimed (its reference field cleared). At that point, the program can remove the corresponding entry from the hash map, and thereby, allow the associated string to be garbage collected. ReferenceQueue q = new ReferenceQueue(); Reference r; while((r = q.poll()) != null) { //Remove r's entry from hash map }

Linked List-Reference

One disadvantage of using arrays to store data is that arrays are static structures and therefore cannot be easily extended or reduced to fit the data set. Arrays are also expensive to maintain new insertions and deletions. In this chapter we consider another data structure called Linked Lists that addresses some of the limitations of arrays. A linked list is a linear data structure where each element is a separate object. Each element (we will call it a node) of a list is comprising of two items - the data and a reference to the next node. The last node has a reference to null. The entry point into a linked list is called the head of the list. It should be noted that head is not a separate node, but the reference to the first node. If the list is empty then the head is a null reference. A linked list is a dynamic data structure. The number of nodes in a list is not fixed and can grow and shrink on demand. Any application which has to deal with an unknown number of objects will need to use a linked list. One disadvantage of a linked list against an array is that it does not allow direct access to the individual elements. If you want to access a particular item then you have to start at the head and follow the references until you get to that item. Another disadvantage is that a linked list uses more memory compare with an array - we extra 4 bytes (on 32-bit CPU) to store a reference to the next node.

Finite Automata

Definition of Finite Automata. A finite automaton (FA) is a simple idealized machine used to recognize patterns within input taken from some character set (or alphabet) C. The job of an FA is to accept or reject an input depending on whether the pattern defined by the FA occurs in the input. In the theory of computation, a branch of theoretical computer science, a deterministic finite automaton —also known as deterministic finite acceptor, deterministic finite state machine

Nondeterministic Finite Automata

In automata theory, a finite state machine is called a deterministic finite automaton, if each of its transitions is uniquely determined by its source state and input symbol, and reading an input symbol is required for each state transition.

Automata and Grammar

In formal language theory, a grammar (when the context is not given, often called a formal grammar for clarity) is a set of production rules for strings in a formal language. ... To describe such recognizers, formal language theory uses separate formalisms, known as automata theory.

Regular Expressions

A regular expression, regex or regexp is a sequence of characters that define a search pattern. Usually such patterns are used by string searching algorithms for "find" or "find and replace" operations on strings, or for input validation