## Questions and Answers

What is the time complexity of the Floyd-Warshall algorithm?

$O(n^3)$

Which type of problems does the Floyd-Warshall algorithm address?

All pairs shortest path problems

What is a key feature of the Floyd-Warshall algorithm compared to Dijkstra's algorithm?

Supports negative edge-weights

In what form can an edge-weighted graph be represented for the Floyd-Warshall algorithm?

Signup and view all the answers

What is a limitation of Dijkstra's algorithm compared to the Floyd-Warshall algorithm?

Signup and view all the answers

What is a random variable?

Signup and view all the answers

When is a random variable called discrete?

Signup and view all the answers

What does the notation $X : S → R$ denote?

Signup and view all the answers

What are the possible values of the random variable X in the given example?

Signup and view all the answers

In a statistical experiment, what is often important regarding outcomes?

Signup and view all the answers

## Study Notes

### Algorithmic Complexity

- The time complexity of the Floyd-Warshall algorithm is O(n^3).

### Graph Problems

- The Floyd-Warshall algorithm addresses all-pairs shortest path problems in weighted graphs.

### Comparison to Dijkstra's Algorithm

- A key feature of the Floyd-Warshall algorithm is that it can handle negative edge weights, unlike Dijkstra's algorithm.

### Graph Representation

- An edge-weighted graph can be represented as an adjacency matrix for the Floyd-Warshall algorithm.

### Limitations of Dijkstra's Algorithm

- A limitation of Dijkstra's algorithm is that it cannot handle negative edge weights, unlike the Floyd-Warshall algorithm.

### Random Variables

- A random variable is a variable whose possible values are determined by chance.

### Discrete Random Variables

- A random variable is called discrete if it can only take on specific, distinct values.

### Notation

- The notation $X : S → R$ denotes a random variable X with a sample space S and a range of real numbers R.

### Random Variable Values

- In the given example, the possible values of the random variable X are the values in the sample space S.

### Statistical Experiments

- In a statistical experiment, what is often important regarding outcomes is the probability of each outcome occurring.

## Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

## Description

Test your knowledge on graph algorithms, paradigms of algorithms, types of problems, and database concepts. Topics include Floyd-Warshall algorithm, brute force, greedy algorithm, divide and conquer, dynamic programming, P, NP, NP-Hard problems, and SQL.