MHB Logic involving knowing when a form is ready to be submitted

  • Thread starter Thread starter find_the_fun
  • Start date Start date
  • Tags Tags
    Form Logic
AI Thread Summary
The discussion focuses on creating a dynamic survey using IBM Form Experience Builder, specifically regarding the logic needed to display a "Survey Complete" message based on user responses. The challenge lies in the limitation of using only AND and OR logical operators, which may not adequately express all necessary conditions for displaying the message. Participants note that while negation can be applied at the atomic level, the inability to nest AND within OR restricts the expression of certain Boolean functions. This limitation raises concerns about whether the desired logic can be achieved without compromising the survey's functionality. Ultimately, there is uncertainty about the feasibility of implementing the required logic within the constraints of the form builder.
find_the_fun
Messages
147
Reaction score
0
I am creating a form using IBM Form Experience Builder. I want to create a survey as follows (content in [] denotes possible answers)



  1. Do you still require a specified asset? [yes/no/I'm not the owner]
  2. Do you know who the owner is? [yes/no]
  3. Specify: []


Survey is complete


The questions are dynamic in the sense not all of them are shown, for example if the answer to 1. is yes 2. and 3. are hidden. The problem is creating a rule for displaying “Survey complete”. I can have an arbitrary number of rules but the relationship between them has to be all “logical or” or all “logical and”. I can specify if the message is hidden if conditions to 1., 2., 3. are met or are not met. I can't think of a way to do this but I remember learning in a math course that all logical operations can be derived from “and and not” or “or and not” which leads me to believe there is a way. Each rule can apply if a particular answer to a given question is given, or if no answer to a particular question is given (e.g. the user hasn't answered 1. yet so the rule to hide the message should apply)
 
Physics news on Phys.org
Re: logic involving knowing when a form is ready to be submited

Evgeny is your man here, but I'll just say that you have to have a method of negation, or you cannot express everything. AND and OR together are incomplete. As you mentioned, NAND and NOR are complete. It looks like you have the ability to negate, since whether your "Survey Complete" message appears can be dependent on whether a condition is or is not met.

So it seems to me that your question is this: given that from one question to the next, you have to use only AND and OR, how do you express the logic that either displays or does not display the "Survey Complete" message. Am I right?

If so, could you give us the logical expression that seems natural to you? Then maybe we can translate it into something that IBM Form Experience Builder recognizes.
 
Re: logic involving knowing when a form is ready to be submited

Ackbach said:
So it seems to me that your question is this: given that from one question to the next, you have to use only AND and OR, how do you express the logic that either displays or does not display the "Survey Complete" message. Am I right?

My interpretation of the situation is only (AND and NOT) or (OR and NOT) can be used. I say this because a rule is matched if a given condition is met or is not met, so that's negation. There can be either an AND or OR relation between all rules (e.g. a AND b AND c or a OR b OR c but not a OR b AND c). But the rest of your understanding is correct.

This is what I'd like to do but Forms Experience Builder only let's me use all [math]\vee[/math] or [math]\wedge[/math].

if
(1. matches yes $$\vee $$ 1. matches no) $$\vee $$ (1. matches I'm not owner $$\wedge$$ 2. matches no) $$\vee $$ (1. matches I'm not owner $$\wedge$$ 2. matches yes $$\wedge$$ 3. [user filled in name])
then display message
 
Re: logic involving knowing when a form is ready to be submited

It is true that OR and AND alone are incomplete, but at least in the case of yes/no questions we have negation at the atomic level. That is, the rule that checks whether an answer to some question is "no" is the negation of the rule that checks whether an answer to that question is "yes". Every Boolean function can be expressed by a formula where negations apply to variables only (not to compound formulas built from OR or AND).

find_the_fun said:
There can be either an AND or OR relation between all rules (e.g. a AND b AND c or a OR b OR c but not a OR b AND c).
This seems to be a more serious restriction. If atomic rules (the answer to some question matches, or possibly does not match, a certain answer) can be combined either only by ORs or only by ANDs, then not all Boolean functions can be expressed. Out of two-argument functions, it seems that only $p\leftrightarrow q$ and $p\oplus q$ (which are true iff the truth values of $p$ and $q$ are equal and, respectively, not equal) cannot be expressed. E.g., $p\leftrightarrow q=(p\land q)\lor(\neg p\land\neg q)$, so there are conjunctions under a disjunction. I would expect that the share of functions that cannot be expressed rises with the number of arguments.

find_the_fun said:
if
(1. matches yes $$\vee $$ 1. matches no) $$\vee $$ (1. matches I'm not owner $$\wedge$$ 2. matches no) $$\vee $$ (1. matches I'm not owner $$\wedge$$ 2. matches yes $$\wedge$$ 3. [user filled in name])
then display message
I don't see how this can be expressed without nesting AND inside OR.
 
Re: logic involving knowing when a form is ready to be submited

Evgeny.Makarov said:
It is true that OR and AND alone are incomplete, but at least in the case of yes/no questions we have negation at the atomic level. That is, the rule that checks whether an answer to some question is "no" is the negation of the rule that checks whether an answer to that question is "yes". Every Boolean function can be expressed by a formula where negations apply to variables only (not to compound formulas built from OR or AND).

This seems to be a more serious restriction. If atomic rules (the answer to some question matches, or possibly does not match, a certain answer) can be combined either only by ORs or only by ANDs, then not all Boolean functions can be expressed. Out of two-argument functions, it seems that only $p\leftrightarrow q$ and $p\oplus q$ (which are true iff the truth values of $p$ and $q$ are equal and, respectively, not equal) cannot be expressed. E.g., $p\leftrightarrow q=(p\land q)\lor(\neg p\land\neg q)$, so there are conjunctions under a disjunction. I would expect that the share of functions that cannot be expressed rises with the number of arguments.

I don't see how this can be expressed without nesting AND inside OR.

Ok thanks. It is very possible that what I'm asking for is impossible to do, I wanted to confirm it before giving up on this approach.
 
I was reading documentation about the soundness and completeness of logic formal systems. Consider the following $$\vdash_S \phi$$ where ##S## is the proof-system making part the formal system and ##\phi## is a wff (well formed formula) of the formal language. Note the blank on left of the turnstile symbol ##\vdash_S##, as far as I can tell it actually represents the empty set. So what does it mean ? I guess it actually means ##\phi## is a theorem of the formal system, i.e. there is a...

Similar threads

Back
Top