Preview

01 - Introduction to Algorithms

 1. You could think of an algorithm as a ____________________ that are necessary to follow in order to solve a problem.

  series of combined brains

  series of steps

  program code

  series of problems

 2. The word algorithm itself derives from the 9th Century mathematician Muhammad bin Musa al-Khwarizmi

  True

  False

 3. In computer science, an algorithm is devised to help a programmer or computer accomplish a certain task. A _____ or pseudocode can be used to devise an algorithm.

  sequence of binary numbers

  line of ASCII code

  hexadecimal hash tag

  flowchart

 4. Babylonian clay tablets described and employed algorithmic procedures to compute the time and place of significant astronomical events.
Image source: https://scientificgems.wordpress.com
babylonian_clay_tablet_algorithm.png

  FALSE

  TRUE

 5. Interesting trivia question: How does Google Hangouts transmit live video across the Internet so quickly? And how does Google Maps figure out a route from x to y?

  Google uses a single algorithm to accomplish every task (including video streaming and path finding)

  Google does not use algorithms for this, as it is isn't algorithmic in nature

  Google uses Big O notation to accomplish both these things

  Video compression algorithm / route finding algorithm

 6. Not all algorithms are created equal - so which of the following is important for making a 'good' algorithm?
1. The algorithm should solve the problem
2. The algorithm should solve the problem efficiently
3. The algorithm should take up the maximum amount of resources
4. The algorithm should take up minimal (ideally) resources
5. The algorithm should be as slow and precise as possible
6. The algorithm should be both precise and as fast as possible

  1 and 5 only

  1,2,4 and 6

  1,2 and 5 only

  4 and 5 only

 7. In Computer science ____________________ is used to handle the issues that arise in analysing and comparing algorithms.

  karnuah mapping

  asymptotic analysis

  boolean logic

  the starred algorithm

 8. In Asymptotic Analysis, we evaluate the performance of an algorithm in terms of _____________ (we don’t measure the actual running time).
Note: We calculate, how does the time (or space) taken by an algorithm increases with the input size.

  input size

  the length of the code

  the x and y coordinates

  output

 9. Read the categorisation of algorithms below and fill in the blanks for the third category.
Usually, the time required by an algorithm falls under three types ?

Best Case ? Minimum time required for program execution.

Average Case ? Average time required for program execution.

____________???? Maximum time required for program execution.

  Scale case

  Worst case

  Zero case

  Lowest case

 10. Because an algorithm is a precise list of precise steps, the ____ of computation is always crucial to the functioning of the algorithm

  order

  input

  code

  output

 11. Algorithms can be expressed in many kinds of notation, including natural languages, pseudocode, flowcharts, drakon-charts, programming languages or control tables

  TRUE

  FALSE

 12. One of the most important aspects of algorithm design is creating an algorithm that has an efficient run-time, also known as its _____

  finite O

  Big O

  Big N notation

  scale time

 13. Decide whether the following excerpt on algorithms is true or false
Most algorithms are intended to be implemented as computer programs. 
However, algorithms are also implemented by other means, such as in a 
biological neural network (for example, the human brain implementing 
arithmetic or an insect looking for food), in an electrical circuit, 
or in a mechanical device

  TRUE

  FALSE

 14. ___________may be used to compare before/after potential improvements to an algorithm after program optimization

  Algobrains

  CPU markers

  Hallmarks

  Benchmarks

 15. This refers to the amount of data that the algorithm will manipulate.

  input size

  output size

  intractable

  minimal size

 16. Some problems cannot be solved in a time which is practical with current processing power and they are called ________ problems.

  finite

  feasible

  intractable

  miniscual

 17. This is a problem that tries to identify whether a program will eventually halt or whether it will run forever.

  humanoid spirituality problem

  turing complete problem

  artificial intelligence problem

  halting problem

 18. In any given problem, as the input size increases, there will be more resources required in terms of processor power and storage. This means:

  the processing time could grow exponentially depending on the time complexity of the algorithm

  the processing time could decrease, with the input size, as this is usually what occurs in these scenarios

  the processing time could remain exactly the same, regardless of the input

  the processing time could be reduced drastically and therefore solve the problem

 19. Many applications are _________ which means that they have to react instantly. Any delay caused by an inefficient algorithm could prevent the system from working properly

  virtual reaction algorithms

  delay critical

  time critical

  scale critical

 20. BigO is, simply put, a measure of ___________________. In a best case scenario, even the worst algorithm may be finished in one operation/iteration

  output delay

  time input collation

  algorithm complexity

  time and scalability