COMP3 Revision Definitions

Embed Size (px)

DESCRIPTION

COMP3 Revision Definitions

Citation preview

  • AQA Computing

    Revision guide

    Comp 3 Most of the things you need to know for the Comp 3 exam (AQA exam board). Mostly key terms and definitions, taken from the official book and mark schemes of past papers.

    Key words & definitions from past paper mark schemes.

    revision

  • UniFinder 2012 http://www.universityfinder.org.uk

    Word Definition

    1.1 Information hiding and abstraction

    Interface A boundary between the user and the internal operation of the machine.

    Abstraction A representation that is arrived at by removing unnecessary details. Two methods: Generalisation/classification (Grouping complex things into more simple categories). Data representation (removing details until it is possible to solve).

    1.2 Comparing algorithms

    Algorithm A sequence of unambiguous instructions for solving a problem. (It can be represented as a Turing machine program).

    Computational complexity of an algorithm

    How economical an algorithm is in terms of space and time.

    Time complexity of an algorithm

    How fast a program runs.

    Space complexity of an algorithm

    How much memory an algorithm needs.

    Complexity of a problem

    The worst-case complexity of the most efficient algorithm that solves the problem.

    Order of growth How much execution time increases when the size of the input increases.

    Asymptotic behaviour of f

    The behaviour of the function f(n) for very large values of n.

    Order of complexity The big O complexity.

    Big O in increasing order of complexity

    O(n0)

    O(log n)

    O(n) linear time

    O(n log n)

    O(n2)

    O(nk) Polynomial Growth

    O(2n) Exponential Growth

    O(3n) Exponential Growth

    O(n!)

    Higher complexity (less efficient)

    Lower complexity (more efficient)

  • UniFinder 2012 http://www.universityfinder.org.uk

    1.3 Finite state machines

    State Transition diagram

    A directed graph where an edge represents a transition and nodes represents a state.

    Finite State Machine (FSM)

    Has a set of input & output symbols, a finite set of states and a transition function.

    Transition function Maps input symbol and current state to an output symbol and next state.

    Deterministic FSM Where there is only one next state for any input in a state, hence no choice where to go.

    Non-deterministic FSM

    Where a given input could lead to more than one possible next state.

    Halting state A state that has no outgoing transition.

    Mealy machine An FSM that determines its outputs from the present state and from the inputs. The transition creates the output.

    Moore machine An FSM that determines its outputs from the present state only. The state is the output. E.g. Traffic lights.

    Finite State Automation (FSA)

    An FSM that produces no output while processing but generates a yes or no answer when it has finished processing. The state with a double circle indicates the accepting state.

    1.4 Turing machines

    Turing Machine An FSM that controls one or more tapes, where at least one tape is infinitely long.

    Equivalent Turing machine

    All other types of computing machine are reducible (broken down) to an equivalent Turing machine. This is because a Turing machine does the most basic of operations.

    Power of a Turing machine

    No physical computing device can be more powerful than a Turing machine

    Universal Turing Machine

    A Turing machine that can execute/simulate the behaviour of any other Turing machine using its instructions and data. The UTM acts as an interpreter. (Asked for in June 2011 exam)

    Interpreter Works its way through a set of instructions, identifying the next instruction and then executing it.

    Principle of universality

    A universal machine is capable of simulating any other machine.

    1.5 Intractable Problems

  • UniFinder 2012 http://www.universityfinder.org.uk

    Non-Computable An algorithmic problem that admits no algorithm.

    Decision problem A yes or no answer problem.

    Decidable A problem that is a decision problem & can be solved using an algorithm.

    Undecidable A problem that is a decision problem & cannot be solved using an algorithm.

    Intractable A problem for which no reasonable (polynomial) time solution has yet been found.

    Heuristic An approach that uses past experience and knowledge to make informed guesses that assist in finding a polynomial time solution to an intractable problem.

    Halting problem Is it possible to create a program that can tell given any program and its inputs, whether the program will halt?

    1.6 Regular expressions, BNF and RPN

    Natural language Like English or French - A set of words, governed by rules that define which order the words are put together to create speech.

    Formal language Defined using its Alphabet and its rules of syntax e.g. The hardness of lead in pencils: Alphabet {H, B, 2, 3, 4} examples{3B, H, 4H} etc.

    Regular language Any language that an FSM will accept.

    Regular expression Definition: A notation for defining all the valid strings of a formal language or a special test string for describing a search pattern. A regular expression is equivalent to an FSM. a - matches a string just of a ab - matches a string just of ab a* - matches zero or more as a+ - one or more as abb? - The character before is optional. So ab or abb is ok. a|b - a or b

    Quantifiers for regular expressions:

    ? The preceding element is optional * Zero or more of the preceding element (not string) + Zero or more of the preceding element (not string)

    .an Matches and string with an in anywhere.

    Backus-Naur form (BNF)

    A notation for expressing the rules for constructing valid strings in a regular language. e.g. ::= HB | | ::= 0|1|2|3|4|5|6|7|8|9|

  • UniFinder 2012 http://www.universityfinder.org.uk

    BNF is used to define the syntax of a programming language.

    Recursive definition One that is defined in terms of itself.

    Syntax diagram Another way to define the syntax of a programming language.

    etc.

    Reverse polish notation (RPN) Also known as Postfix

    Infix: 36 + 4 * 3 Reverse Polish (RPN) or Postfix: 36 4 3 * + This eliminates the need for brackets in arithmetic expressions, making it easier to evaluate expressions.

    2.1 Programming Paradigms

    Imperative Programming

    Programs are written as a sequence of instructions, executed in the order the programmer designed. Java is an example language.

    Functional Programming

    Programs define mathematical functions. A solution to a problem consists of a series of function calls. Just made up of lists and functions. Haskell is an example language

    Logic Programming A set of facts and rules. Then the program will use this knowledge to answer queries. Prolog is an example language.

    Event-driven programming

    Instead of all the program instructions being executed in order, subroutines (event handlers) are run as a response to an event, such as clicking on a button. Java is an example language.

    Object-oriented programming

    Combines routines and the data they operate on into a single unit called a class. The data items stored for a class are called fields properties. The routines that operate on these fields are called methods. When a programmer wants to use a class, they declare an instance of it called an object. This is called instantiation.

    Object An instance of a class.

    Instantiation An object is defined based on a class

    Class definition A pattern or template that can be used to create objects of that class.

    Encapsulation Combining a record with the procedures and functions that manipulate it to form a new data type: a class.

  • UniFinder 2012 http://www.universityfinder.org.uk

    Inheritance Defining a class and then using it to build a hierarchy of descendant classes with each descendant inheriting access to all its ancestors code and data.

    Polymorphism Giving an action one name that is shared up and down a class hierarchy. Each class in the hierarchy implements the action in a way appropriate to itself.

    2.2 Recursion

    Recursive routine A routine defined in terms of itself.

    General case The solution in terms of itself for a value of n.

    Base case A value that has a solution which does not involve any reference to the general case.

    Stack frame The locations in the stack area used to store the values referring to one invocation of a routine.

    2.3 Lists and pointers

    Abstract data type A data type whose properties are specified independently of any programming language.

    Pointer A type of variable that contains an address. The pointer points to the location with that address.

    Null pointer A pointer that does not point to anything, usually represented by a -1

    Heap The memory locations available to application programs for dynamic allocation.

    Dynamic allocation Memory space is only allocated when required at runtime.

    Memory leakage Successive calls to allocate memory space are made, but memory locations that are no longer required are not released. Eventually there is no memory left in the heap.

    2.4 Stacks and queues

    Dynamic data structure

    The memory taken up by the data structure varies at runtime.

    Static data structure The memory required to store the data structure is declared before run time.

    Stack A last-in first-out abstract data type. Methods are push and pop (push pseudo code came up in June 2011 exam).

    Queue A first-in first-out abstract data type (A queue came up in June 2011 exam).

    Circular queue When the array element with the largest possible index has been used, the next element to join the array reuses the vacated location at the beginning of the array.

    Linear queue Elements join the queue at one end and leave the queue at the other end.

  • UniFinder 2012 http://www.universityfinder.org.uk

    Priority queue Each element of a priority queue has an associated priority.

    2.5 Graphs and trees

    Graph A diagram consisting of circles, called vertices, joined by lines, called edges or arcs. Each edge joins exactly two vertices.

    Neighbours Two vertices are neighbours if they are connected by an edge.

    Degree of a vertex The number of neighbours of a vertex. (The number of edges connected to it).

    Labelled or Weighted graph

    A graph in which the edges are labelled or given a value called a weight.

    Automation Turning an abstraction into a form that can be processes by a computer.

    Directed graph or digraph

    A graph in which the edges are directed.

    Simple graph An undirected graph without multiple edges and in which each edge connects two different vertices.

    Explorers problem The solution finds a route that traverses each road exactly once before returning to the starting point.

    Travellers problem The solution finds a route that visits each city exactly once before returning to the starting point.

    Closed path or circuit

    A sequence of edges that starts and ends at the same vertex and such that any two successive edges in the sequence share a vertex.

    Cycle A closed path in which all the edges are different and all the intermediate vertices are different.

    Tree A connected undirected graph with no cycles.

    Rooted tree A tree in which one vertex has been designated as the root and every edge is directed away from the root.

    2.6 Searching and Sorting

    Linear search O(n)

    Starts at the beginning and checks each element one by one until the end of the list is reached.

    Bubble Sort O(n2)

    Each pass swaps any values where the neighbour needs swapping. Keeps passing until a pass without swaps.

    Binary search O(log n)

    1. Look in the middle of the list. 2. If the middle name is not the name sought, discard the half of the list

    that cant contain it. 3. Repeat the method with the other half of the list.

    Only works for an ordered list. Takes minimum of log2(n) checks where n is

  • UniFinder 2012 http://www.universityfinder.org.uk

    the number of elements in the list. (Always round up - you cant have half a pass)

    Insertion sort O(n2) (likely to be in the exam)

    To start with, only the 1st element is sorted. Take the next element and put is above or below the 1st element as required, this is now in the sorted part of the list. Repeat until all elements are sorted.

    Quicksort Split the list into two parts, one part containing values less than a pivot value, the other containing values greater than this pivot value. The pivot value can be arbitrarily chosen. The same process is now applied to each part list until the whole list is sorted.

    2.7 Simulation

    Model An abstraction of an entity in the real world.

    State history Consists of state descriptions at each or a chronological succession of instants.

    Entities The components that make up a system.

    Attributes A property of an object e.g. colour.

    Pseudo-random numbers

    A series of numbers generated by a computer with apparent randomness.

    3.1 Real numbers

    Real number A number with a fractional part.

    Scientific notation A real number represented by a sign, some significant digits and a power of 10.

    Floating point notation

    A real number represented by a sign, some significant digits and a power of two.

    Normalisation Making a number so that just one digit comes before the decimal point which is non-zero (in binary floating point format. This can be a zero for positive numbers in twos complement format). The exponent ensures the correct magnitude, whilst the mantissa loses as few significant bits as possible.

    Converting Real numbers to Floating

    See page 86 of green revision guide.

  • UniFinder 2012 http://www.universityfinder.org.uk

    point

    Precision The maximum number of significant bits that can be represented.

    Absolute error The difference between the actual number and the nearest representable number.

    Relative error The absolute error divided by the actual number.

    Underflow The value is too small to be represented using the available number of bits.

    Overflow The value is too large to be represented using the available number of bits.

    4.1 Operating systems

    System program A program that manages the operation of a computer (e.g. an operating system).

    Operating system The software that hides the complexities of the hardware from the user and manages the hardware resources (memory, processor, IO etc.).

    Virtual machine The apparent machine that the operating system presents to the user, achieved by hiding the complexities of the hardware behind the layers of system software.

    Application programming interface

    A layer of software that allows application programs to call on the services of the operating system.

    4.2 Operating system classification

    Interactive operating system

    An operating system in which the user and the computer are in direct two way communication.

    Real-time operating system

    Inputs are processed in a timely manner so that the output can affect the source of the inputs. E.g. Mobile phone base stations.

    Network operating system

    A layer of software is added to the operating system of a computer connected to the network to seamlessly redirects requests to remote resources in a way that is transparent to the user.

    Embedded computer system

    A dedicated computer system with limited or non-existent user interface, designed to operate completely or largely autonomously from within other machinery.

    Sandbox A tightly controlled set of resources for guest programs to run in.

    Desktop operating system

    An operating system that allows a user to carry out a broad range of general purpose tasks.

    Client-server system A system in which some computers, the clients, requests services provided by other computers, the servers.

  • UniFinder 2012 http://www.universityfinder.org.uk

    Server operating system

    An operating system optimised to provide one or more specialised services to networked clients.

    5.1 Conceptual data modelling

    Conceptual model A representation of the data requirements of an organisation constructed in a way that is independent of any software used to construct the database.

    Entity An object, person, event or thing of interest about which data is recorded.

    Relationship An association or link between two entities.

    Degree of relationship

    Between two entities refers to the number of entity occurrences of one entity which are associated with just one entity occurrence of the other, and vice versa.

    Entity occurrence The details of one instance of the entity.

    5.2 Database Design

    Relation A set of attributes and tuples, modelling an entity (a table).

    Attribute A property or characteristic of an entity (a column).

    Tuple A set of attribute values (a row).

    Primary key An attribute that uniquely identifies a tuple.

    Relational database A collection of tables.

    Composite key A combination of attributes that uniquely identify a tuple.

    Foreign key An attribute in one table that is the primary key in another table.

    Referential Integrity If a value appears in a foreign key in one table, it must also appear in the primary key of another table.

    Normalised entities A set of entities that contain no redundant data.

    Normalisation A technique used to produce a set of normalised entities.

    1st Normal form All of the data values are atomic values - no repeating groups of attributes.

    2nd Normal form If it is in 1st normal form and contains no partial key dependencies.

    3rd Normal form If it is in 2nd normal form and contains no non-key dependencies.

    5.3 Structured Query Language

    DDL (Data Definition Language)

    CREATE TABLE tableName ( ItemCode CHAR(4) PRIMARY KEY, UnitPrice FLOAT, )

  • UniFinder 2012 http://www.universityfinder.org.uk

    DML (Data Manipulation Language)

    INSERT INTO db.tableName(ItemCode, UnitPrice) VALUES (1, 20.5); SELECT ItemCode, UnitPrice FROM db.tableName WHERE itemCode = 1 ORDER BY itemCode ASC

    6.1 Communication Methods

    Serial data transmission

    Single bits are sent one after another along a single wire. Used for long-distance data transmission because it needs only one signal pathway each way, this makes it easy to regenerate the signal & saves on costs of cabling.

    Parallel data transmission

    Bits are sent down several wires simultaneously. Used over short distances due to skew. Expensive to cable.

    Guided data transmission

    Using a cable - twisted pairs, optic fibres. Uses E-M waves.

    Unguided data transmission

    Wireless networking, also uses E-M waves.

    Baud rate Number of line signal changes per second. (Asked for in June 2011 exam).

    1 Baud One signal change per second.

    Bit rate The number of bits transmitted per second. Bit rate can be higher than baud rate if more than one voltage level is used to encode the bits.

    Bandwidth The range of signal frequencies that the transmission medium may transmit. The greater the bandwidth, the greater the bit rate.

    Latency The time delay between the moment that something is initiated and the moment the first effect begins.

    Asynchronous serial data transmission

    The arrival of data cannot be predicted by the receiver so a start bit is used to signal the arrival of data and to synchronise the transmitter and the receiver temporarily, followed by a stop bit. The start bit and stop bit are different values (1/0).

    Communication protocol

    A set of pre-agreed signals, codes and rules to be used for data and information exchange computers, or a computer and a peripheral device, such as a printer, that ensures the communication is successful.

  • UniFinder 2012 http://www.universityfinder.org.uk

    Handshaking protocol

    A data transmission protocol that involves an exchange of signals.

    Baseband Whole bandwidth of medium dedicated to one channel at a time. Used in LANs where they offer high performance at low cost.

    Broadband A multiple data channel system in which the bandwidth of the transmission medium carries several data streams at on time. Used for long distance data communication e.g. the internet because WANs are expensive to install/maintain so more cost effective to share medium.

    Local area network (LAN)

    Linked computers in close proximity.

    Wide area network (WAN)

    A set of links that connect geographically remote computers and local area networks. The internet is a collection of LANs and computers that are interconnected by a WAN.

    Topology The shape, layout or structure of the connections that connect devices to the LAN.

    Network adapter A computer communicates on the network using a network adapter/network interface card. The data is received from the motherboard using parallel transmission, into an area called the buffer and the data is called a block. This block is then given a checksum, source address and a destination address. This is now called a frame and sent along the transmission medium using serial data transmission.

    Bus topology All computers are connected to a linear transmission medium or bus (normally using a coaxial cable). Carrier Sense Multiple Access Collision Detection (CSMA/CD) is a commonly used bus protocol in case two signals are sent along the wire at the same time. The rules for this are:

  • UniFinder 2012 http://www.universityfinder.org.uk

    1. If the bus is quiet, transmit a frame. 2. If the bus is busy, continue to listen until the bus is idle then transmit

    a frame. 3. If there is a collision is detected, transmit a brief jamming signal to

    alert all computers of the collision, then stop transmitting. 4. Wait a random amount of time before attempting to transmit again,

    starting from step 1. Advantages: Less expensive as reduced cabling requirement. No reliance on central node as data does not all travel through one node.

    Star topology All computers/workstations (nodes) are connected to a central switch. The switch creates a temporary connection via the backbone, between two or more nodes as required. The switch ensures that collisions do not occur, if a collision is about to occur, the switch stores the frames in a buffer until the backbone becomes free. Advantages: Improved security as: data only travels down one link and therefore does not visit every node. Improved reliability as if one link fails the other links/nodes are not affected.

    Segmentation Bus networks are often split into smaller parts called segments because each computer that is added to the network slows it down considerably due to more collisions. A segment is one string of computers. Segments are connected together by bridges or routers. A bridge contains a table of addresses of the Ethernet interface cards of the computers in the network. A router holds a table of IP addresses of the computers (and users) in the network. Reason for segmentation: to reduce network congestion by reducing the number of stations/computers connected to each section of cabling.

    Thin client network A network where all the processing takes place in a central server, the clients are dumb terminals with little or no processing power or local hard disk storage.

    Comparison of star and bus networks

    In a star network each client is connected directly to the other without passing the other computers so is hence more secure from eavesdropping. If the cable in a bus network breaks the whole network stops working. If the switch in the star network stops working, the whole network goes down. Buffers in switches may overflow in high volume traffic.

    Peer to peer network

    A network that has no dedicated servers, every computer is equal, so they are called peers. A peer to peer LAN is useful where there are fewer than 10 users, all located in the same area and where security is not an issue. A peer-to-peer WAN is useful to distribute large files. The file only needs to be sent out once by the source and the peers can download pieces of the file. Each peer can download pieces from any other peer in the network. Hence there was less bandwidth demand on the source.

  • UniFinder 2012 http://www.universityfinder.org.uk

    Client A computer that uses the services provided by a server.

    Server A computer that provides shared resources to network users.

    Server-based network

    A network in which resources, security and administration and other functions are provided by dedicated servers.

    Web 2.0 Providing software as a service, accessed over the internet.

    Web services Self-contained modular applications that can be described, published and invoked over a network, generally the web.

    Saas Software as a service, a model of software deployment where an application is hosted as a service provided to customers across the internet. E.g. facebook.

    Web services architecture

    Where all components in the system are services.

    Ajax A web technology that allows only part of the web page to be fetched from the web server without reloading the page.

    Wireless network Any type of LAN in which the nodes (computers or computing devices) are not connected by wires but user radio waves to transmit data between them.

    Wi-Fi Trademarked technologies that support wireless networking of home and business networks.

    Bluetooth A wireless protocol for exchanging data over short distances from fixed and mobile devices.

    Router A device that receives packets from one host or router and uses the destination IP address the packets contain to pass them correctly to another host or router.

    IP address Defines where a host is on the internet. Routable IP addresses are used for locating hosts worldwide. Non-routable IP addresses are used for private networks e.g. home / work / school. Ranges are as follows: 10.0.0.0 to 10.255.255.255 172.16.0.0 to 172.31.255.255 192.168.0.0 to 192.168.255.255

    Gateway A device used to connect networks using two different protocols so that data can be passed from one system to another. A LAN is connected to the internet using a gateway.

    Subnet mask Subnetting enables the network administrator to further divide the host part of the IP address into two or more subnets. To do this, a part of the host address is reserved to identify the particular subnet. If asked what subnet mask should be used on a small network put 255.255.255.0

  • UniFinder 2012 http://www.universityfinder.org.uk

    DNS Servers DNS servers map domain names to IP addresses.

    6.3 Server side scripting

    Server side script Sequence of instructions / program / code, executed/run/interpreted when a web page is requested and hence generates dynamic web pages.

    Web server extension

    A program that is written by a programmer that is interpreted by an interpreter running on the web server, that extends the functionality of the web server and allows it to generate content at the time of the HTTP request.

    CGI (Common gateway interface)

    A gateway between the web server and the web server extension that tells the server how to send information to a web server extension, and what the server should do after receiving the information from a web server extension. The gateway consists of two objects, the Request object and the Response object.

    Dynamic web page content

    Content that is generated when the web browser request is received.

    6.4 Internet Security

    Virus Malicious self-replicating programs which attach to other programs.

    Spam Unsolicited junk email.

    Worm Malicious self-replicating programs which replicate across networks using security vulnerabilities.

    Remote Login Ability to login to a computer via Internet.

    Trojan A malicious program hidden inside another program // masquerading as another program.

    Phishing Attempts to get users to divulge personal information.

    Pharming Misdirecting users to a fake website by changing DNS entries.

    Spyware Program that collects information from a user's computer without user knowing.

    Denial of Service Attack (DDoS)

    Repeated requests/pings from the Internet could overwhelm (parts of) the network.

    Firewall A hardware device or program that controls traffic between the internet and a private network. Two methods: Packet Filtering - The firewall analyses the packets against a set of filters & allows them through or blocks them accordingly. Proxy Server - When a user in the network requests information from the internet, the proxy server retrieves the information the passes it on to the requesting computer.

  • UniFinder 2012 http://www.universityfinder.org.uk

    Encryption Using an algorithm and a key to convert message data into a form that is not understandable without the key to decrypt the text.

    Plain text Message data before it is encrypted.

    Cipher text Message data after it has been encrypted.

    Decryption Using an algorithm and a key to convert encrypted message data into its plain text form.

    Cryptography The science of designing cipher systems.

    Cryptanalysis Trying to find the plain text from the cipher text without the decryption key.

    Asymmetric encryption / public key encryption

    Both parties that want to communicate securely have 3 keys, their private key and 2 public keys (one is theirs and one is their partners). If A encrypts the data with Bs public key, only Bs private key can decrypt it, and vice versa.

    Digital signature A hash (digest) is created from the original message, encrypted using As private key, B can open it using As public key. This proves that the message came from A because only A has their private key. B then produces the digest and compares it to the original digest, if they match, the message has not been tampered with.

    Antivirus software A scan is performed on files and compares them to a dictionary of known viruses. If a virus is found, the antivirus scanner will try to delete the virus from the file. If this fails, the infected file will be quarantined where it cannot infect other files. The dictionary must be regularly updated to detect new threats.

    Authentication To verify that a user of a computer system is a legitimate user. Methods include passwords, biometric data & digital signatures.

    Authorisation The level of permissions a user has and controlling what resources they can access. Used to keep data secret from unauthorised persons.

    Accounting Keeping logs to make it easier to identify parts of the system that have been compromised in the event of a security breach.