Recursive Definition of Formula Length: Learn the Basics | Logics Course Help

  • Thread starter blackdvl666
  • Start date
In summary, the conversation discusses a question about defining the length of a well-formed formula in a logic course. It is determined that the length of an atomic formula is 1, and examples are given for creating new well-formed formulas from existing ones.
  • #1
blackdvl666
1
0
ok guys this is from my logics course!

this question may be very simple but i am just gettin stuck

give a recursive definition of the length of a well formed formula that is of the number of the symbols occurring in it. For example length of (p^(~q)) is 8.
 
Physics news on Phys.org
  • #2
OK, so if p is an atomic formula, the length is 1.
What possibilities do you have to make a new wff out of two wffs p and q?
For example, if p is a wff of length n, then (~p) is one of length n + 3.
If p and q are wff's of length n and m, respectively, then (p^q) is of length m+n+3.
 
  • #3


A recursive definition is a way of defining a mathematical object or concept in terms of itself. In this case, we can define the length of a well-formed formula as follows:

1. The length of a variable (e.g. p, q) is 1.
2. The length of a logical constant (e.g. ^, ~) is 1.
3. The length of a well-formed formula that is a combination of two or more well-formed formulas (e.g. p^(~q)) is defined as the sum of the lengths of the individual formulas, plus 1 for each logical constant used to combine them.

Using this definition, we can see that the length of (p^(~q)) is calculated as follows:

length(p^(~q)) = length(p) + length(~q) + 1
= 1 + (length(q) + 1) + 1
= 1 + (1 + 1) + 1
= 4 + 1
= 5

Therefore, the length of (p^(~q)) is 5, as expected.

It is important to note that this recursive definition can be applied to any well-formed formula, no matter how complex it may be. It also allows us to easily calculate the length of a formula without having to manually count the symbols, which can be helpful in more complicated formulas.

I hope this helps clarify the concept for you. If you have any further questions, don't hesitate to ask your instructor or classmates for assistance. Good luck with your studies!
 

1. What is a logic question?

A logic question is a type of question that requires reasoning and critical thinking skills to solve. It often involves understanding and manipulating logical relationships between different pieces of information.

2. Why are logic questions important?

Logic questions help develop analytical and problem-solving abilities, which are crucial skills for success in many fields, including science. They also help improve logical reasoning and decision-making skills.

3. Are there different types of logic questions?

Yes, there are many types of logic questions, including deductive reasoning, inductive reasoning, syllogisms, and logical puzzles. Each type requires a slightly different approach to solve.

4. How can I improve my logic skills?

One way to improve logic skills is to practice solving different types of logic questions. You can also read books or take classes on logic and critical thinking. Additionally, regularly challenging yourself with brain teasers and puzzles can also help improve logical reasoning abilities.

5. Can logic questions have multiple solutions?

Yes, some logic questions may have more than one correct solution. This is because logical reasoning involves making connections between different pieces of information, and there can be different ways to arrive at the same conclusion.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
7
Views
3K
  • STEM Academic Advising
Replies
12
Views
1K
Replies
6
Views
1K
Replies
2
Views
1K
  • Special and General Relativity
5
Replies
144
Views
6K
  • STEM Academic Advising
Replies
10
Views
885
  • Science and Math Textbooks
2
Replies
38
Views
6K
  • Science and Math Textbooks
Replies
4
Views
1K
  • Set Theory, Logic, Probability, Statistics
2
Replies
40
Views
6K
Back
Top