Re: main connective in SL

From: G. Frege (no_spam_at_aol.com)
Date: 08/26/04


Date: Thu, 26 Aug 2004 22:58:45 +0200

On Thu, 26 Aug 2004 17:27:16 +0000 (UTC), hbe@sonia.math.ucla.edu (H.
Enderton) wrote:

>>
>> what's the main connective in these two logic strings, how can the main
>> connective be determined?
>>
>> (~P ? (Q -> ~P)) ? Q
>> ~((P ? Q) v R) & ~S
>>
>
> Perhaps you are seeking an algorithm that counts the left and
> right parentheses, and locates the main connective in an arbitrary
> well-formed string.
>
> Textbooks generally either give such an algorithm, or have an
> exercise asking for one.
>

How about this intuitive "solution":

        Try to parse the wff A in either of the 3 ways:

        1. A is a propositional letter
        2. A is of the form ~B, where B is a wff
        3. A is of the form A <connective> B, or
            (A <connective> B) where A and B are wffs,
            and <connective> is a binary connective
            (i.e. "->", "&", "v", or "<->").

        In case 1, there is n o main connective.
        In case 2, the "~" in front of the wff B is
        the main connective.
        In case 3, the <connective> between the wffs
        A and B is the main connective.

Given this method we might try to answer the questions of the OP:

        (~P ? (Q -> ~P)) ? Q

obviously can be parsed into:

        
        (~P ? (Q -> ~P)) ? Q
        ------------------ ^ -
                A c B

        ---> The main connective is the "?" occurring between A and B.

Next one:

        ~((P ? Q) v R) & ~S

obviously can be pares into:

        ~((P ? Q) v R) & ~S
        --------------- ^ --
                A c B

        ---> The main connective is the "&" occurring between A and B.

F.



Relevant Pages

  • Re: main connective in SL
    ... >whats the main connective in these two logic strings, ... Perhaps you are seeking an algorithm that counts the left and ...
    (sci.logic)
  • Re: Can this be written more concisely in a functional style
    ... > conciseness of. ... I think that in seeking to make it more concise, ... If you want to hide the algorithm, do so inside a helper function. ... explicit semantics where the algorithm is implemented. ...
    (comp.lang.python)
  • Estimating the condition of an upper triangular matrix
    ... algorithm to estimate the condition (i.e. the ratio of the largest and ...
    (sci.math.num-analysis)
  • Re: How to take in a string of any size?
    ... On Mon, 23 Aug 2004, josh wrote: ... >> There's a minor benefit of that it makes the algorithm Oinstead ... > Counting and seeking back to the start would be O(even if seeking itself ...
    (comp.lang.c)
  • Re: Essay on PID Motor control
    ... I still did not get the basic information I'm seeking, to wit: ... > 1) Is the algorithm as published not the same as the one tested? ...
    (comp.robotics.misc)