What is the primary purpose of genetic algorithms?
A Solving optimization problems
B Searching for patterns
C Sorting large data
D Encrypting data
Genetic algorithms are a type of evolutionary algorithm used to solve optimization problems. They mimic the process of natural selection, evolving solutions over time by using selection, crossover, and mutation operations to find the best solution.
Which of these is a common application of hashing techniques?
A Data encryption
B Sorting arrays
C Storing passwords securely
D Solving NP-Hard problems
Hashing techniques are commonly used to store passwords securely. A hash function converts the password into a fixed-length string of characters, which cannot be reversed, ensuring password security by making direct access to original passwords difficult.
Which of the following is a widely used cryptographic algorithm?
A Dijkstra’s Algorithm
B Quick Sort
C Merge Sort
D RSA
RSA is a widely used cryptographic algorithm that utilizes public and private keys for encryption and decryption. It is commonly used for securing sensitive data and ensuring secure communication over the internet.
In a genetic algorithm, what does the crossover operation do?
A Mutates solutions randomly
B Selects the best solution
C Combines solutions to produce offspring
D Reduces solution size
The crossover operation in a genetic algorithm combines two parent solutions to create offspring. This mimics biological reproduction, where genetic information is exchanged to create potentially better solutions for the problem at hand.
What is a common use of hashing in data structures?
A Compression
B Searching data
C Cryptography
D Sorting data
Hashing is commonly used in data structures like hash tables for efficient searching. A hash function maps data to a fixed-size table, enabling constant-time complexity for lookups, insertions, and deletions under ideal conditions.
Which cryptographic algorithm is most commonly used for symmetric encryption?
A AES
B Diffie-Hellman
C RSA
D SHA-256
AES (Advanced Encryption Standard) is a widely used symmetric encryption algorithm. It uses the same key for both encryption and decryption, providing fast and secure encryption for various applications, including file and data encryption.
In the context of genetic algorithms, what is mutation?
A Selecting the best solution
B Combining two solutions
C Evaluating the fitness of solutions
D Randomly changing parts of a solution
Mutation in a genetic algorithm involves randomly altering parts of a solution. This introduces diversity in the population, helping to avoid local optima and ensuring that the algorithm explores a wider solution space.
Which of the following is a disadvantage of hashing techniques?
A High encryption time
B Slow lookup time
C Collisions can occur
D High memory usage
A collision in hashing occurs when two different inputs produce the same hash value. This can lead to data retrieval issues. Properly designed hash functions minimize collisions, but they cannot eliminate them entirely.
What is the main advantage of using genetic algorithms for optimization problems?
A Works well with large search spaces
B Guarantees optimal solution
C Requires minimal computation
D Always finds a quick solution
Genetic algorithms are particularly effective for solving optimization problems with large and complex search spaces. They do not require exhaustive search and can explore a wide range of potential solutions efficiently using evolution-based principles.
Which of these cryptographic algorithms is used for creating message digests?
A Diffie-Hellman
B RSA
C AES
D SHA-256
SHA-256 is a cryptographic hash function used to generate message digests. It takes an input (message) and produces a fixed-size output (256 bits), which is used for data integrity verification, digital signatures, and blockchain technology.
What is a primary use case for public-key cryptography?
A Generating random numbers
B Digital signatures and secure key exchange
C Encrypting large files
D Storing passwords
Public-key cryptography is used for secure communication by enabling digital signatures and secure key exchange. RSA is an example of a public-key system where one key encrypts the message and a different key decrypts it.
Which of the following best describes a hash table?
A A table for key-value pairs
B Linear data structure
C Sorted data structure
D A recursive data structure
A hash table stores data in key-value pairs, where each key is hashed to determine its index in the table. This allows for fast lookups, insertions, and deletions, with an average time complexity of O(1).
In a genetic algorithm, what determines the fitness of a solution?
A The amount of data it stores
B The number of offspring it produces
C The solution’s quality or performance
D Its ability to mutate
In a genetic algorithm, the fitness function evaluates how well a solution performs in solving the problem. Solutions with higher fitness are more likely to be selected for crossover and mutation, leading to better offspring.
What is the typical key size used in AES encryption?
A 1024 bits
B 128 bits
C 512 bits
D 256 bits
AES (Advanced Encryption Standard) typically uses key sizes of 128, 192, or 256 bits. The most common key size is 128 bits, providing a balance of security and performance. Larger key sizes provide higher security but can be slower.
Which of the following hashing algorithms is most commonly used for file integrity checks?
A DES
B SHA-1
C SHA-256
D MD5
SHA-256 is commonly used for file integrity checks because it produces a unique, fixed-size hash value for any given input. It is widely used in digital certificates, blockchain, and verifying data integrity.