New answers tagged

2 votes

Can we create a decision tree for any comparison sorting algorithm even if it is very complicated?

The procedure below can be used to explicitly build the decision tree of any comparison-based algorithm: generate all permutations of the array $[1, 2, \cdots n]$. for every permutation, run the ...
  • 5,215
1 vote

Can we create a decision tree for any comparison sorting algorithm even if it is very complicated?

In theory, yes you should be able to create a decision tree for every comparison based sorting algorithm. You can write a program that will do so (for a fixed comparison-based sorting algorithm of ...
  • 293
1 vote
Accepted

Can we create a decision tree for any comparison sorting algorithm even if it is very complicated?

In general, a decision tree would enumerate all possible permutations $(N!)$ for given input of $N$ elements, out of which only $1$ would be desirable. A sorting algorithm doesn't generate all ...
  • 512

Top 50 recent answers are included