6 ms·
Any sorting algorithms that use deep learning?
by senatorobama 8y ago
Any sorting algorithms that use deep learning?
- KMag 8y agoYou could of course write one. Presumably you're talking about using deep learning to decide the order in which to compare elements, but this would be difficult to ensure both always terminated and always gave correct results, to say nothing of likely being very inefficient. The difficulties in sorting algorithms aren't difficulties in recognizing patterns, so it's difficult to see what deep learning brings to the table. That being said, knock yourself out; surprise me!
- pouta 8y agoMaybe finding in the input data.
- KMag 8y ago"Finding" what in the input data as a part of sorting?
- neolefty 8y agoFor creating custom comparators? "Sort these web pages in order of quality."
- KMag 8y agoI've never seen a reference text that considers the comparator part of the sorting algorithm. Timsort, quicksort, mergesort, introsort, smoothsort, etc. don't include the comparator as part of the algorithm definition.
- jogjayr 8y agoYou mean like a search engine? :-) I believe ML is used in search engines nowadays.
- dmichulke 8y agoYou could always just write out all permutations and train a network on recognizing the sorted one ;-)
- Sohcahtoa82 8y agoA storage requirement of O(n!) Sorting a mere 13 items of 1-byte each would require 6.2 GB of storage.
- senatorobama 8y agoGood interview question ;)
- dmichulke 8y agoWe just generate them on the fly - after all we're not stupid ;-) https://en.wikipedia.org/wiki/Permutation#Algorithms_to_generate_permutations https://en.wikipedia.org/wiki/Permutation#Algorithms_to_gene... .. and there "Generation in lexicographic order" This algorithm only requires you to hold the last permutation in memory to obtain a new (distinct) one.