2023 m/j 31 Flashcards
explain the problem occured in part(a) when representing a number in 8 bits
— the mantissa in system 2 does not have enough bits to store the whole
binary number // 10 bits required and only 8 bits available
— so precision is lost / the number is truncated
define supervised learning
enables learning by mapping an input
to an output based on example input-output pairs
define reinforcement learning
enables learning in an interactive
environment by trial and error using
its own experiences
define deep learning
simulates the data processing
capabilities of the human brain to
make decisions
define unsupervised learning
enables learning by allowing the
process to discover patterns on its
own that were previously undetected
describe the purpose of both the A* algorithm and the dijstras algorithm
— to find the optimal / shortest / most cost-effective route
— between two nodes in a
— based on distance / cost / time.
describe what happens in relation to the storage of retrieval of a record in the file when the calculated hash value is a duplicate of a previously calculated hash value or a different record key
1- A collision occurs when the record key doesn’t match the stored record
key
2 - this means the determined storage location has already been used
for another record.
If the record is to be stored
3- Search the file linearly
4 - to find the next available storage space (closed hash)
5- Search the overflow area linearly
6- to find next available storage space (open hash)
If the record is to be found
7- search the overflow area linearly (open hash) until the matching
record key is found
8- search linearly from where you are (closed hash) until the matching
record key is found
9- If not found record is not in file
state,with a reason, where it would be appropriate to use circuit switching
— Circuit switching is used where a dedicated path needs to be sustained
throughout the call / communication // where the whole bandwidth is
required // where a real time communication is used.
— A typical application is standard voice communications / video streaming /
private data networks
give two benefits and two drawbacks of circuit switching
— Whole of bandwidth is available
— Dedicated communication channel increases the quality of transmission
— Data is transmitted with a fixed data rate
— No waiting time at switches
— Suitable for long continuous communication
— Fast method of data transfer
— Data arrives in the same order as it was sent
— Data can’t get lost
— Data all follows the same path / route
— Better for real-time
— Simple method of data transfer.
One mark per drawback (Max 2)
— A dedicated connection makes it impossible to transmit other data even
if the channel is free
— Not very flexible
— No alternative route in case of failure
— The time required to establish the physical link between the two stations
can be too long
— The need to establish a dedicated path for each connection can have
cost implications
— Dedicated channels require the whole bandwidth / bandwidth can’t be
shared
outline the characteristics of massively parallel computers
— A large number of computer processors / separate computers
connected together
— simultaneously performing a set of coordinated computations //
collaborative processing
— network infrastructure
— communicate using a message interface / by sending messages.
describe the purpose of asymmetric key cryptography
— To provide better security
— by using two different keys / a public key and a private key
— One of the keys is used to encrypt the message
— the matching key is used to decrypt the message.
identify two benefits and two drawbacks of quantum cryptography
— Provides security based on laws of physics rather than mathematical
algorithms, so more secure.
— To protect the security of data transmitted over fibre optic cables.
— Virtually unhackable.
— The performance of quantum cryptography is continuously improved,
making it suitable for most valuable government/industrial secrets.
— Longer keys can be used
— Eavesdropping can be detected
One mark per drawback (Max 2)
— Lacks many vital features such as digital signature, certified mail, etc.
— High cost of purchasing / maintaining equipment required.
— Currently only works over relatively short distances.
— Error rates are relatively high as technology is still being developed.
— Polarisation of light can change during transmission.
— Allows criminals and terrorists to hide their communications.
file-handling pseudocode
DECLARE Account : STRING
OPENFILE “ActiveFile.txt” FOR READ
OPENFILE “ArchiveFile.txt” FOR WRITE
WHILE NOT EOF(“ActiveFile.txt”)
READFILE “ActiveFile.txt”, Account
IF Account = “” THEN
WRITEFILE “ArchiveFile.txt”, “Account not present”
ELSE
WRITEFILE “ArchiveFile.txt”, Account
ENDIF
ENDWHILE
CLOSEFILE “ActiveFile.txt”
CLOSEFILE “ArchiveFile.txt”
write the pseudocode to declare maxsize, frontpointer, rearpointer, length and queue.
CONSTANT MaxSize = 60
DECLARE Queue : ARRAY[1:60] OF STRING // DECLARE Queue :
ARRAY[0:59] OF STRING // DECLARE Queue : ARRAY[1:MaxSize]
OF STRING // DECLARE Queue : ARRAY[0:MaxSize - 1] OF
STRING
DECLARE FrontPointer : INTEGER
DECLARE RearPointer : INTEGER
DECLARE Length : INTEGER
FUNCTION Dequeue RETURNS STRING
DECLARE Item : STRING
IF Length > 0 THEN
Item Queue[FrontPointer]
FrontPointer<=FrontPointer + 1
Length Length – 1
IF Length = 0 THEN
CALL Initialise // procedure to reset the
pointers
ELSE
IF FrontPointer > MaxSize THEN
FrontPointer <= 1
ENDIF
ENDIF
ELSE
OUTPUT “The print queue was empty – error”
Item <= “”
ENDIF
RETURN Item
ENDFUNCTION
study