Can someone please explain the difference between formula in general and well-formed formula? Is it possible to determine the truth value of an ill-formed formula?
The validity of a formula, or its truth value (or more generally its evaluation), can only be assessed if the formula is well formed with respect to a given set of syntax rules.
So a formula in general, and in the context of math or logic, means well-formed formula.
Strictly speaking, you can say that if your symbols include '+' | '(' | ')' | 'a'-'z'
, a formula, in the strict sense, is any string formed by these symbols. For example, a((++z
is a formula.
But one must also look at the rules of construction of a formula. And if the rules are, for example
F,E ::= F + E | (F) | 'a'-'z'
then your formula is not well formed.