2 ms·
> I studied algorithms for years. Who hasn't? > You're 100% WRONG on everything you wrote. Maybe you should update the wikipedia page, then all the other tex
by lelanthran 2y ago
> I studied algorithms for years.
Who hasn't?
> You're 100% WRONG on everything you wrote.
Maybe you should update the wikipedia page, then all the other textbooks, that uses a definition of brute-force that matches my understanding of it.
From https://en.wikipedia.org/wiki/Brute-force_search https://en.wikipedia.org/wiki/Brute-force_search
> Therefore, brute-force search is typically used when the problem size is limited, or when there are problem-specific heuristics that can be used to reduce the set of candidate solutions to a manageable size.
Further, in the same page
https://en.wikipedia.org/wiki/Brute-force_search#Speeding_up_brute-force_searches https://en.wikipedia.org/wiki/Brute-force_search#Speeding_up...
> One way to speed up a brute-force algorithm is to reduce the search space, that is, the set of candidate solutions, by using heuristics specific to the problem class.
I mean, the approach under discussion is literally exactly this.
Now, Mr "ACM ICPC, studied algorithms for years", where's your reference that reducing the solution space using heuristics results in a non-brute-force algorithm?
- baobabKoodaa 2y agoThis was extremely cringe worthy to read. You are confidently wrong about this. You are trying to redefine well established terminology. I don't care about whatever random wiki page you might find to "support your claims". Anybody who has worked a lot on algorithms (including myself) knows what brute force means and this is not it. Also: lol at your "who hasn't" comment. Because you clearly haven't.
- lelanthran 2y ago> You are trying to redefine well established terminology. Reference? Link, even? > don't care about whatever random wiki page you might find to "support your claims". That isn't some "random wiki" page; that's the wikipedia page for this specific term. I'm not claiming to have defined this term, I'm literally saying I only agree with the sources for this term. > Also: lol at your "who hasn't" comment. Because you clearly haven't. Talk about cringe-worthy.
- baobabKoodaa 2y ago> Reference? Link, even? Sure, here's definition for "brute force" from university textbook material written by pllk, who has taught algorithms for 20 years and holds a 2400 rating on Codeforces: https://tira.mooc.fi/kevat-2024/osa9/ https://tira.mooc.fi/kevat-2024/osa9/ "Yleispätevä tapa ratkaista hakuongelmia on toteuttaa raakaan voimaan (brute force) perustuva haku, joka käy läpi kaikki ratkaisut yksi kerrallaan." edit: Here's an English language book written by the same author, though the English source does not precisely define the term: https://cses.fi/book/book.pdf https://cses.fi/book/book.pdf In chapter 5: "Complete search is a general method that can be used to solve almost any algorithm problem. The idea is to generate all possible solutions to the problem using brute force ..." And a bit further down chapter 5: "We can often optimize backtracking by pruning the search tree. The idea is to add ”intelligence” to the algorithm so that it will notice as soon as possible if a partial solution cannot be extended to a complete solution. Such optimizations can have a tremendous effect on the efficiency of the search." Your mistake is that you for some reason believe that any search over solution space is a brute force solution. But there are many ways to search over a solution space. A "dumb search" over solution space is generally considered to be brute force, whereas a "smart search" is generally not considered to be brute force. Here's the Codeforces profile of the author: https://codeforces.com/profile/pllk https://codeforces.com/profile/pllk edit 2: Ok now I think I understand what causes your confusion. When an author writes "One way to speed up a brute-force algorithm ..." you think that the algorithm can still be called "brute force" after whatever optimizations were applied. No. That's not what that text means. This is like saying "One way to make a gray car more colorful is by painting it red". Is it still a gray car after it has been painted red? No it is not.
- killerstorm 2y agoYou're asking for a definition of exhaustive search. Exhaustive search, by definition, goes through the entire search space. That's what word exhaustive means. For a reference, check Cormen's "Introduction to Algorithms". Every mention of brute-force search is specifically to exhaustive search is which not feasible for bigger spaces. > I mean, the approach under discussion is literally exactly this. It's literally not. It DOES NOT REDUCE the candidate set. It generates most likely candidates, but it doesn't reduce anything. You lack basic understanding. Solutions are pixels grids, not Python programs. There's no search over pixel grids in the article. Not every search is exhaustive search. This is like saying theoretical physicists are "brute-forcing" physics by generating candidate theories and testing them. Ridiculous.