Logic involving knowing when a form is ready to be submitted

  • Context: MHB 
  • Thread starter Thread starter find_the_fun
  • Start date Start date
  • Tags Tags
    Form Logic
Click For Summary

Discussion Overview

The discussion revolves around the logic required to determine when a survey form created using IBM Form Experience Builder is ready to be submitted. Participants explore the implications of using logical operators (AND, OR, NOT) in the context of dynamic question visibility based on user responses.

Discussion Character

  • Technical explanation, Debate/contested, Conceptual clarification

Main Points Raised

  • One participant describes the need for a logical rule to display a "Survey Complete" message based on user responses, noting the dynamic nature of the questions.
  • Another participant suggests that negation is necessary to express all logical operations, indicating that AND and OR alone are insufficient for complete expression.
  • A different participant interprets the situation as requiring either (AND and NOT) or (OR and NOT) for rule matching, emphasizing the limitations of using only AND or OR.
  • Concerns are raised about the inability to express certain Boolean functions without nesting AND within OR, particularly when combining rules based on user responses.
  • Participants discuss the implications of atomic rules and their negations, suggesting that while negation exists at the atomic level, the overall structure may limit expressiveness.
  • One participant expresses uncertainty about the feasibility of their approach, seeking confirmation on whether their logic can be implemented as desired.

Areas of Agreement / Disagreement

Participants generally agree that using only AND and OR is insufficient for complete logical expression, but there is no consensus on how to effectively implement the logic for the survey form. Multiple competing views on the use of logical operators remain unresolved.

Contextual Notes

The discussion highlights limitations in expressing complex logical relationships with the available operators in IBM Form Experience Builder, particularly regarding the nesting of logical operations and the implications for Boolean functions.

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.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 40 ·
2
Replies
40
Views
8K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 57 ·
2
Replies
57
Views
7K
  • · Replies 6 ·
Replies
6
Views
2K