WFF's in Polish Notation

A horizontal string of symbols is called a formula.  Every formula is either well formed or not well formed.  Those that are well formed conform to the rules of syntax (sentence construction) for a given language.

Definition of a Well-Formed Formula (a WFF):

A statement letter is a WFF

An N followed by a WFF is a WFF

A binary connective (C,A,K,E) followed by two WFF's is a WFF

Every well formed formula (wff), one that follows the rules of syntax for a given language, is either simple or compound.  A formula that consists of a single statement letter ('p', 'q', 'r', or 's') is simple.  A formula that links one or more statement letters with one or more of the five sentential connectives (C,A,K,E,N) is compound.  The first statement letter that occurs in a compound formula is called the dominant operator (or the main connective).  What follows the dominant operator are the subordinate wff's.  Each of the binary connectives (C,A,K,E) contain exactly 2 subordinate wff's,  while negation (N) has one subordinate wff.  The subordinate wff's can be called w1 and w2.  For instance, in the formula Cpq, 'p' is w1 and 'q' is w2; and in the formula CKpqArNs 'Kpq' is w1 and 'ArNs' is w2.  For each of the following formulas, underline w1 with a single underling and underline w2 with a double underline as follows CKpqArNs.

Hint--In order to identify the subordinate wff's in a formula, remember that you have a wff when and only when the number of statement letters exceeds the number of binary connectives by 1.    Since a subordinate wff is a wff (by definition) simply move one space to the right of the dominant operator and then identify the first wff you can.  That will be w1.  Everything else will be w2.

1)         CKprApr

2)         ENCprKAprs

3)         ACpNqAqs

4)         KNCpAqrErNKpNs

5)         KCpNArsCKpqNAKprs

6)         CKpArsq

7)         ENApqKNpNq

8)         NACpqKrs

9)         ECprKArsCpq

10)       CNKpAqrNCpArs