Frenemies of TalkRational:
Nontheist Nexus |  Rants'n'Raves |  Secular Cafe |  Council of Ex-Muslims |  The Skeptical Zone |  rationalia |  Rational Skepticism |  Atheists Today | 
TalkRational Archive  

FAQ Rules Staff List RSS
  TalkRational Archive > Discussion > Mathematics


Mathematics constants, variables and stuff

 
 
Thread Tools Display Modes
09-20-2015, 09:39 PM   #2564185  /  #26
uncool
Senior Member
Plasmatron Champion
 
: Jul 2008
: 15,106
uncool

That's the conjunctive normal form version; if you want disjunctive normal form:

(A and C) or (A and not D) or (C and not B).
  topbottom
09-20-2015, 09:58 PM   #2564187  /  #27
fleet-footed Urban Youth
ZA... WARUDO!!
RnR/TR Official Historian
 
fleet-footed Urban Youth's Avatar
 
: Jun 2008
: 42,699
fleet-footed Urban Youth

:
Another, somewhat simpler expression:
(A or C) and (A or not B) and (C or not D)
yeah when i was working through the restrictions i labor under (the weird order of operations) i eventually arrived at this. because:

(A and (C or not D)) or (C and not B) =
(A OR C) AND ((C or !D) OR C) AND (A OR !B) AND ((C or !D) OR !B)

but, as it turns out,

((C OR !D) OR C) = (C OR !D)

and

(C OR !D) = (C OR !D) AND ((C OR !D) OR !B)

so i came to the same thing you did: (A OR C) AND (A OR !B) AND (C OR !D)

from there i started really looking at the system this represents because i had the feeling there was a circumstance under which (C or !D) would be sufficient, which would be great for efficiency. i think my method was sorta like what you were talking about in reverse, and this is what i came up with:

:
where X = "what i want"

A | B | C | D | X | (C OR !D)
------------------------------
1 | 1 | 1 | 1 | 1 |     1
1 | 1 | 1 | 0 | 1 |     1
1 | 1 | 0 | 1 | 0 |     0
1 | 1 | 0 | 0 | 1 |     1
1 | 0 | 1 | 1 | 1 |     1
1 | 0 | 1 | 0 | 1 |     1
1 | 0 | 0 | 1 | 0 |     0
1 | 0 | 0 | 0 | 1 |     1
0 | 1 | 1 | 1 | 0 |     1
0 | 1 | 1 | 0 | 0 |     1
0 | 1 | 0 | 1 | 0 |     0
0 | 1 | 0 | 0 | 0 |     1  
0 | 0 | 1 | 1 | 1 |     1
0 | 0 | 1 | 0 | 1 |     1 
0 | 0 | 0 | 1 | 0 |     0
0 | 0 | 0 | 0 | 0 |     1
in the first place, as i said, none of this conditional shit matters if the user does not have A and actually absolutely needs it. so i could ignore every row representing that (i.e. begins 0 and then 1). the user would never get this far if that's true. from there i realized that C OR !D is fine unless all the conditions are false. so what's the problem there? the user does not have A, does not need A, does not have C, and does not need both C and A. but i always want them to have at least one of the two. requiring both rather than just one or the other is an option the user can set. if i make sure that D is always true when B is not, by making it so the option to turn D off is only possible if the check represented by B is on, then i can ignore any situation where the user doesn't need A and doesn't need both A and C: any row where B and D are false.

in that case, C OR !D does exactly what i need, and the design of the program will preclude the user reaching any other state.

thank you for all your help mathemagicians!
__________________
OH MY GOD!
  topbottom
09-20-2015, 10:33 PM   #2564202  /  #28
el jefe
Senior Member
TR Pundit
 
el jefe's Avatar
 
: Oct 2008
: 30,945
el jefe

:
I was just about to say, in engineering we had to map this shit all the time.

Eta (what hh posted)
ditto. I also was thinking I vaguely remembered there being some nice, standard procedure for turning tables like this into boolean expressions. i think we learned it in digital logic.

and, yeah, i think I was thinking of the thing hh posted.
  topbottom
09-20-2015, 10:39 PM   #2564206  /  #29
el jefe
Senior Member
TR Pundit
 
el jefe's Avatar
 
: Oct 2008
: 30,945
el jefe

:
That's the conjunctive normal form version; if you want disjunctive normal form:

(A and C) or (A and not D) or (C and not B).
is this the same as "product of sums" vs. "sum of products"? all of this understood to be strictly boolean arithmetic of course, with OR = + and AND = ×.
  topbottom
09-20-2015, 10:49 PM   #2564211  /  #30
uncool
Senior Member
Plasmatron Champion
 
: Jul 2008
: 15,106
uncool

:
:
That's the conjunctive normal form version; if you want disjunctive normal form:

(A and C) or (A and not D) or (C and not B).
is this the same as "product of sums" vs. "sum of products"? all of this understood to be strictly boolean arithmetic of course, with OR = + and AND = ×.
Eh, it's close. "Sums" doesn't quite work for OR; if you want a full ring, you need to use XOR. But it's close - you do have a version of distributivity, which is what you need to turn an arbitrary expression into a "sum of products".
  topbottom
09-20-2015, 11:08 PM   #2564217  /  #31
Preno
TRIGGER WARNING
Resident Overlord
 
Preno's Avatar
 
: Mar 2008
: 10,991
Preno

Mathematics is about reducing complicated problems to simpler ones.

A Boolean function which outputs 1 in one row (say, the row A = 1, B = 0, C = 1) and 0 everywhere else is easy to produce: A and not B and C. Likewise, a Boolean function which outputs 0 in one row (say, the row A = 1, B = 0, C = 1 again) and 1 everywhere else is easy to produce: not A or B or not C.

If you know how to produce a Boolean function of n variables which outputs 1 in one row and 0 everywhere else, then you know how to produce any Boolean function: take a suitable disjunction of such functions. Likewise, if you know how to produce a Boolean function of n variables which outputs 0 in one row and 0 everywhere else, then you also know how to produce any Boolean function: take a suitable conjunction of such functions.
  topbottom
09-21-2015, 12:05 AM   #2564230  /  #32
fleet-footed Urban Youth
ZA... WARUDO!!
RnR/TR Official Historian
 
fleet-footed Urban Youth's Avatar
 
: Jun 2008
: 42,699
fleet-footed Urban Youth

noted
__________________
OH MY GOD!
  topbottom
09-22-2015, 10:56 AM   #2564759  /  #33
Heinz Hershold
Superior Member
 
Heinz Hershold's Avatar
 
: Sep 2011
: 2,727
Heinz Hershold

:
we have conditions A, B, and C. using only the operators AND, OR, and NOT, can we combine them in such as way as to produce this outcome:

:
A   B   C      Result desired
0   0   0      0
0   0   1      0
0   1   0      1
0   1   1      0
1   0   0      1
1   0   1      0
1   1   0      1
1   1   1      1
but perhaps more importantly, is there some program or tool that will automate the construction of of such a combination and spare us all more contact with the devil's language, mathematics, than needed? or is this way more obvious than i think and i'm just a moron? (yes)
You will like this!

The Product of Sums output is: y = (A + B) (A + !C) (B + !C)

same as BD's answer.
  topbottom
 

  TalkRational Archive > Discussion > Mathematics







X vBulletin 3.8.6 Debug Information
  • Page Generation 0.12325 seconds
  • Memory Usage 3,910KB
  • Queries Executed 35 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (8)add_ignore_user_to_postbit
  • (2)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (57)mysmilies_imagebit
  • (1)navbar
  • (3)navbar_link
  • (1)navbar_mini
  • (1)navbar_noticebit
  • (55)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (8)postbit_legacy
  • (8)postbit_onlinestatus
  • (8)postbit_reputation
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper
  • (2)v3arcade_award_bit
  • (2)v3arcade_postbit_userid_popup_menu
  • (2)v3arcade_postbit_userid_trophy 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/functions_notice.php
  • ./mobiquo/smartbanner.php
  • ./mobiquo/smartbanner/head.inc.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php 

Hooks Called:
  • init_startup
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • reputation_image
  • postbit_imicons
  • bbcode_parse_start
  • fetch_userinfo_query
  • fetch_userinfo
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete