Naïve algorithm
It is proposed that this article be deleted because of the following concern:
If you can address this concern by improving, copyediting, sourcing, renaming, or merging the page, please edit this page and do so. You may remove this message if you improve the article or otherwise object to deletion for any reason. Although not required, you are encouraged to explain why you object to the deletion, either in your edit summary or on the talk page. If this template is removed, do not replace it. This message has remained in place for seven days, so the article may be deleted without further notice. Find sources: "Naïve algorithm" – news · newspapers · books · scholar · JSTOR Nominator: Please consider notifying the author/project: {{subst:proposed deletion notify|Naïve algorithm|concern=In essence, this page just tells that a naïve algorithm is a [[wikt:naïve|naïve]] [[algorithm]]. An analogous page could be written for any commonly used combination of an adjective + a noun; rather [[WP:NOT|not]]. (Please note that, e.g., [[naive Bayes classifier]] is different, as it is a term with a very specific meaning.) Moreover, the page is unreference and some claims sound a bit OR to me.}} ~~~~ Timestamp: 20090826191826 19:18, 26 August 2009 (UTC) Administrators: delete |
A naïve algorithm is typically a very simple solution to a problem, which represents the intuitive approach taken by one unfamiliar with the problem domain. It is meant to describe a suboptimal algorithm compared to a "clever" (but less simple) algorithm. Naïve algorithms usually consume larger amounts of resources (time, space, memory accesses, ...), but are simple to devise and implement.
An example of a naïve algorithm is bubble sort, which is only a few lines long and easy to understand, but has a O(n2) time complexity. A more "clever" algorithm is quicksort, which, although being considerably more complicated than bubble sort, has a O(n log n) average complexity. For instance, sorting a list of 100 items with bubble sort requires 10,000 iterations, while sorting the same list with quicksort requires approximately 1000 iterations, making quicksort a much faster algorithm than bubble sort.
As demonstrated above, naïve algorithms are mostly used for prototyping purposes, as they are often not acceptable in production-level software products.
Another sense of the term implies an algorithm which may have certain bugs, or fail to account for corner cases; for instance, the naïve implementations of various operations on linked lists and binary trees either leak memory or corrupt data based on incorrect pointer arithmetic.