Unit 4 - Theory of Computation Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is an algorithm?

A

A sequence of steps that can be followed to complete a task and that always terminates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is simulation?

A

Designing models of real life systems to understand behaviour and stratergies.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is enumeration?

A

Looking at all the different possibilities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is theoretical approach?

A

Finding the best way to solve a problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is trial and error?

A

Finding solutions until you find the right one

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Strategies for algorithm design

A
  • Decrease and conquer
    • Finding solution to a sequence of smaller problems
      until you get to the smallest problem and build up from
      there
    • Binary search algorithm
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is insertion sort?

A
  • Used for a small number of elements
  • One by one going through elements and moving it to correct place
  • Repeats until elements in order
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is bubble sort?

A
  • Used for small number of elements

- Swapping elements from highest to lowest until in correct order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is linear search?

A

Starts at the beginning and searches every element of the list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is binary search?

A

“Divide and conquer”

- Halving search area repeatedly until you find item

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Properties of a good algorithm

A
  • Should execute efficiently with fewest steps possible
  • Must terminate at some point
  • Should allow invalid inputs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the top-down design model?

A

Modules being broken down into sub-units

- Hierarchy charts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Benefits of structured programming

A
  • Easier to manage and program
  • Multiple people can work on different modules at the same time
  • Easier to find errors
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is modular programming?

A

Used for large complex programs, minimilses need for duplication

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the purpose of testing?

A

Helps reveal errors in the program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What does module testing do?

A

Makes sure each subroutine/ function works

17
Q

What does program testing do?

A

Makes sure the program works

18
Q

What does system testing do?

A

Makes sure the system works and that it meets its original specification

19
Q

What does hand tracing algorithms do?

A

Helps figure our how an algorithm works/ why it isnt working

-Trace tables

20
Q

What is abstraction?

A

Information HIDING, removing unnecessary info

21
Q

What is automation?

A

putting models (real world objects/phenomena) into action to solve problems

22
Q

What is functional abstraction?

A

Breaking down a complex problem into a series of reusable functions.

23
Q

What is procedural abstraction?

A

All solutions can be broken down into a series of procedures or subroutines

24
Q

What is data abstraction?

A

Organising and structuring data in a way that produces a particular view of the data that is useful for the programmer

25
Q

What is decompostion?

A

Breaking a problem into a number of subproblems

26
Q

What is composition?

A

The process of creating a working system from the abstraction created