hirhs Flashcards
(37 cards)
Application of Breadth First Search
Shortest path for an unweighted graph
Application of Depth First Search
Generating a Maze
Application of Pre-Order
Copying a tree
Application of In-Order
Binary Search tree outputting contents in ascending order
Application of Post-Order
Infix to RPN conversion
Time Complexity of Linear Search
O(n)
Time complexity of Binary Search
O(logn)
Time complexity of Binary Tree Search
O(logn)
Time complexity of bubble sort
O(n^2)
Time complexity of Merge Sort
O(nlogn)
What is an algorithm
A sequence of steps that can be followed to complete a task and that always terminates
What is representational abstraction
- A representation arrived at by removing unnecessary details
What is generalisation or catorgerism abstraction
- A grouping by common characterisctics to arrive at a hierarchical relationship of the “is a kind of” type
What is automation
- Putting models into action to solve problems
How is automation achieved (4)*
- Creating Algorithms
- Implementing the algorithms in code
- Implementing the models in data structures
- Executing the code
RegEx *
0 or more repititions
RegEx +
1 or more repititions
RegEx ?
0 or 1 repititions
What is a regular language
A language that can be represented by RegEx
Why can BNF represent some languages RegEx cant
- BNF can use recursion to represent languages which RegEx cannot
How many permutations for n distinct objects
n!
What is a tractable problem
- Problems that have polynomial (or less) time solution
What is a intractable problem
- Problems that have no polynomial (or less) time solution
When are Heuristic Methods used
- When tackling intractable problems
- Heuristic methods will trade off correctness for speed