Re: What is the complexity classification of sat(..) ?

Liste des GroupesRevenir à c theory 
Sujet : Re: What is the complexity classification of sat(..) ?
De : wyniijj5 (at) *nospam* gmail.com (wij)
Groupes : comp.theory
Date : 16. May 2024, 09:10:55
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <6e5dd99246a10aa8c04f05512441c3de49071976.camel@gmail.com>
References : 1 2
User-Agent : Evolution 3.50.2 (3.50.2-1.fc39)
On Thu, 2024-05-16 at 00:23 -0600, Jeff Barnett wrote:
On 5/11/2024 12:00 AM, wij wrote:
  typedef unsigned int UInt;
  typedef bool (*Func)(UInt);
 
  // [Ret] true, if ∃c, 0<=c<=n, f(c)==1 and f is a P-time function.
  //       false, otherwise.
  //
  bool sat(Func f, UInt n) {
    for(Uint c=0; c<=n; ++c) {
      if(f(c)) return true;
    }
    return false;
  }
 
  Q: If it is NPC, what is the proof? If it it not, what is the complexity
     classification of sat(..)?
 
In normal CS Speak:
 
Problems have complexity: essentially defined as the worst case behavior
as problem size grows. One then minimizes this over all algorithms that
"solve" the problem as specified.
 
An Algorithm has runtime: essentially what is the worst case runtime for
each problem size.
 
You seem to be asking for complexity of an algorithm. It's easy to see
that the above algorithm is exponential (or worse depending on f). One
can assume that f, in worst case, has runtime that is a polynomial in
the length of n. However, these observations say absolutely nothing
about the complexity of the SAT problem.
--
Jeff Barnett

You said "...the above algorithm is exponential". But, it is just an assertion.
The question Q asks for the complexity of the problem sat(..) tries to solve
and its supporting proof.



Date Sujet#  Auteur
11 May 24 * What is the complexity classification of sat(..) ?9wij
13 May 24 +* Re: What is the complexity classification of sat(..) ?5immibis
13 May 24 i`* Re: What is the complexity classification of sat(..) ?4wij
13 May 24 i +* Re: What is the complexity classification of sat(..) ?2immibis
14 May 24 i i`- Re: What is the complexity classification of sat(..) ?1immibis
17 May 24 i `- Re: What is the complexity classification of sat(..) ?1wij
16 May 24 `* Re: What is the complexity classification of sat(..) ?3Jeff Barnett
16 May 24  `* Re: What is the complexity classification of sat(..) ?2wij
16 May 24   `- Re: What is the complexity classification of sat(..) ?1Ben Bacarisse

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal