3

First I'm not a mathematician, (Ux designer), so please excuse the lack of technical terms.

I'm trying to convert the set of potentially conflicted business rules to propositional logic formulas then represent them in a truth table to identify the conflicted literals.

In a business production rules change all the time, to simulate this, I created the following conflicted rules:

  • R1: (if clients choose sport package then add Leather Seats and Black Console). This means if clients choose sport package then the leather seats and black console MUSt be true for this rule to true. Similarly, to get the Leather Seats and Black Console clients must select the sport package!.
  • R2: (if sport package is chosen don't add Leather Seats). This means if the client chooses sport package then the leather seats should be false!. This rule should be only true when the leather seats are false or not selected!

Here is what I did:

Truth table with equation

Truth table with equation

I'm not allowed to embed images yet :/ so sorry for the link.

(SportPackage -> (BlackConsole and LeatherSeats)) and (SportPackage -> (BlackConsole and not LeatherSeats))

Because the evaluation of rules is linear I put a logical "&" between R1 and R2.

Yet, Somehow the truth table generated from this equation is not making any sense to me. I read somewhere that the "if...then" construction is supposed to be translated to implication -> yet the table shows the equation to be true even if the "Sport package" is not true! :(

The purpose:

I'm trying to show that the literal not LeatherSeats let's call it L2 from R1 and L2 from R1 are conflicted in a truth table. What I expected to see is a total "falsum" or "contradiction" because rule one says the sport package provide the Leather Seats and rule two says clients can't have it. :(

As I have limited knowledge of this topic I wanted to ask for your help :)

Edit:

Is the formula that I wrote optimal? Or can it be shortened?

In attempt to isolate the conflict causing literal, I played around with the formula and came up with two versions please let me know if these are semantically as well syntactically correct:

  1. i tried to simplify the above mentioned formula to this (SportPackage -> ((BlackConsole and LeatherSeats) and (BlackConsole and not LeatherSeats)))
  2. then (SportPackage -> (BlackConsole and (LeatherSeats and not LeatherSeats)))

To my naive eye the table of these looked the same as above yet im not sure if this formula transformation change the semantic meaning. Could you please validate it?

Thanks in advance .

Tian Vlasic
  • 1,436
  • 1
    Which is exactly what you should've got! You have proven that your customers cannot, under any circumstances, get a "Sport Package" - the overall formula can only be true if SportPackage is false. –  Jun 26 '23 at 06:27
  • @StinkingBishop I edited the post and added more explanation. Somehow I still don't understand. :/ Please be patient I'm a designer Xd shouldn't I get some kind of Falsum (the opposite of tautology) cause these rules are conflicted? ain't it like A and not A – studentaccount13 Jun 26 '23 at 06:38
  • Opposite of tautology , your falsum , is $"A \land (A \implies B) \land (A \implies \lnot B)"$ , whereas $"(A \implies B) \land (A \implies \lnot B)"$ is not a falsum , it just indicates that $A$ can not be true. In your Case , no Customer can select SPORT PACKAGE because it will indicate leather should be selected as well as unselected. When Customer has not selected SPORT PACKAGE , there is no issue over what else was selected by Customer. Here , to get a falsum, you have to add "Customer selected SPORT PACKAGE" , which is Contradicting the Criteria. – Prem Jun 26 '23 at 06:51
  • @Prem ok thanks i think i got it but im still a bit preplxed about it. I edited the post could you please tell me if the formula transformation is valid? – studentaccount13 Jun 26 '23 at 07:52
  • If this a "real world" problem, you just need to change the wording of rules a bit. Something like: Every package has a list of options associated with it. Don't include leather seats as an option with the sport package as it is standard equipment. DO NOT confuse the user with truth tables! – Dan Christensen Jun 26 '23 at 17:20
  • When the user tries to change the list of standard equipment and options, verify that there is no overlap. – Dan Christensen Jun 26 '23 at 17:29
  • no im doing my bachelors thesis and what to showcase the ability of boolean logic and truth tables in identifying logical contradictions in business rules :) don't worry i won't try to confuse users with truth tables :) – studentaccount13 Jun 26 '23 at 23:45
  • Truth tables won't be sufficient. See the Barber Paradox. There, we have: (R1) A man in the village shall be designated the village barber. (R2) The village barber shall shave those and only those men in the village who do not shave themselves. This results in a well known contradiction that can be eliminated by simply relaxing the requirement that the barber be a man. See: https://dcproof.wordpress.com/2017/01/11/the-barber-paradox-revisited-why-we-need-sets/ – Dan Christensen Jun 27 '23 at 15:31
  • That said, since it is just a bachelor's thesis, you may be able to restrict the class of rules to be considered to those that can be expressed in propositional logic (no predicates or quantifiers). – Dan Christensen Jun 27 '23 at 16:02

2 Answers2

2

Converting Comment to Answer format , because it is becoming too long & because OP has included additional query.


Opposite of tautology , your falsum , is $A \land (A \implies B) \land (A \implies \lnot B)$ , whereas $(A \implies B) \land (A \implies \lnot B)$ is not a falsum , it just indicates that $A$ can not be true.

In your Case , no Customer can select SPORT PACKAGE because it will indicate leather should be selected as well as unselected at the same time.
When Customer has not selected SPORT PACKAGE , there is no issue over what else was selected by Customer.
Here , to get a falsum, you have to add "Customer selected SPORT PACKAGE" , which is Contradicting the Criteria.

[[ BlackConsole is irrelevant here ]]


When you try to formulate it is Different ways , you should check whether you get Different truth values , because Equivalent formulations should have Equivalent truth values.

$(SportPackage \implies ((BlackConsole \land LeatherSeats) \land (BlackConsole \land \lnot LeatherSeats)))$

This is a Single Implication $A \implies B$ where $B$ is a falsum : Here $B$ is claiming that $LeatherSeats$ is true as well as false !

It is Equivalent to $(SportPackage \implies (BlackConsole \land (LeatherSeats \land \lnot LeatherSeats)))$ which is $(SportPackage \implies (BlackConsole \land (false)))$ which is eventually $(SportPackage \implies ( false))$
Thus $SportPackage$ can not be true.

Prem
  • 14,696
2

(SportPackage -> (BlackConsole and LeatherSeats)) and (SportPackage -> (BlackConsole and not LeatherSeats))

I tried to simplify the above mentioned formula to this (SportPackage -> ((BlackConsole and LeatherSeats) and (BlackConsole and not LeatherSeats)))

then (SportPackage -> (BlackConsole and (LeatherSeats and not LeatherSeats)))

Yes, these three formulae are tautologically equivalent to one another—and in fact to just not SportPackage.

the truth table generated from this equation is not making any sense to me... it shows my equation to be true even if SportPackage is not true!

Your truth table shows your logic sentence to be true precisely when SportPackage is false; in other words, it shows that your two rules are collectively inconsistent with SportPackage, that is, your two rules and SportPackage can never be simultaneously satisfied. (This is what you set out to prove, isn't it?)

  • R1: (if clients choose sport package then add Leather Seats and Black Console). Similarly, to get the Leather Seats and Black Console clients must select the sport package!

Side point: the boldfaced chunk means (L and B)→S, which I don't think you actually mean.

ryang
  • 44,428
  • which I don't think you actually mean.

    @ryang regarding the side point. I think you are right i didn't mean (L and B)->S. Looking at the English text now I should have written "the Leather Seats and Black Console are only added if the clients have already chosen the sport package" which to my naive eye sounds like S ->(L and B) right? Would this wording be less confusing as the wording that you marked in bold?

    – studentaccount13 Jun 26 '23 at 14:17
  • @studentaccount13 Your above boldfaced suggestion means (L and B)→S (no confusion about it), while your new suggestion could mean (L and B)→S or (L and B)↔S. Neither suggestion possibly translates as S→(L and B). This answer might be of interest. – ryang Jun 26 '23 at 14:41
  • Thanks for taking the time to answer. I'm super confused now and as a designer im wayyy out of my knowledge depths. XD

    All what I ask now does the English phrase "if clients choose sport package then add Leather Seats and Black Console" directly translate to S ->(L and B)?

    Plus, Could you please edit your answer explaining the differences between (L and B)→S, ``(L and B)↔S, andS ->(L and B)`

    – studentaccount13 Jun 26 '23 at 14:56
  • @studentaccount13 Yes, of course, to your query. Not editing because 1) this is a whole other question/topic 2) it's unclear which aspect you want clarification on 3) the link I offered contains a more detailed explanation than you probably require (click on it) 4) none of this is really relevant to your original goal (I did say "side point"). – ryang Jun 26 '23 at 15:09
  • Totally understandable. Thanks a bunch. :) – studentaccount13 Jun 26 '23 at 15:13