Question
Dijkstra's algorithm, used for finding the shortest
paths from a single source to all other vertices in a graph with non-negative edge weights, is an example of which algorithmic paradigm?Solution
Dijkstra's algorithm is a greedy algorithm. At each step, it selects the unvisited vertex with the smallest known distance from the source and marks it as visited, then updates the distances of its neighbors. This locally optimal choice (picking the closest unvisited vertex) leads to a globally optimal solution for shortest paths in graphs with non-negative edge weights.
Using all the letters of the word RELIAN, how many words start with a vowel but end with a consonant?
Find total number of ways in which the word “ACCOMMODATE” can be arranged.
- A group consists of 9 boys and 8 girls. In how many ways can 3 boys and 5 girls be selected from the group?
From the digits 1, 2, 3, 4, 5, 6 and 7, how many 4‑digit even numbers can be formed without repetition?
In how many different ways can the letters of the word “INCORPORATION” be arranged so that the vowels comes together?
In how many different ways can the letter of the word CHESTNUT is arranged so that vowels always occur together?
In a bag there are 4 red balls, 3 green balls, and 5 blue balls. If one ball is drawn at random from the bag, what is the probability of drawing a green...
- Six people out of which 3 are brothers and the rest are strangers are to be seated in a row. Find the number of ways in which all three brothers are not si...
How many arrangements of the word COMMITTEE are possible if the vowels are always together?
A team of 7 researchers is to be formed from 6 biologists and 4 chemists. Find the number of ways to form the team if it must include at least 5 biologi...