Everyone knows De Morgan's laws, but do you also know De Morganan's laws?
πŸ‘︎ 8
πŸ’¬︎
πŸ‘€︎ u/lukaseder
πŸ“…︎ Dec 06 2021
🚨︎ report
TIL of De Morgan's Law by accident

It's a helpful law to shorten by a bit your booleanic expressions.
De Morgan's Law:
Given two statements A, B we can say the following -
(not A) and (not B) = not (A or B)
(not A) or (not B) = not (A and B)

Before the story I need to mention that I have yet to take a proper programming course, I learned through online videos and trial and error.

I was doing some boolean comparisons and my code started getting messy. I was basically doing "not A and not B" and wondered if I could take the not outside and have the same result. I drew a quick truth table and tested "not (A and B)". The result was not the same, but I saw a pattern and something told me to change the "and" to an "or". I did and it was a perfect match. Happy with my discovery I sent this to a friend who actually just finished studying CS in a university and he wrote to me: "Classic De Morgan's" and I was like WHAT?

He told me someone already discovered it a two hundred years ago and was surprised I discovered that by mistake. He knew of it through a course he took related to boolean algebra and said it's a very basic thing. We laughed about it saying that if I were a mathematician in 1800 I would be revolutionary.

πŸ‘︎ 130
πŸ’¬︎
πŸ‘€︎ u/roomram
πŸ“…︎ Jul 31 2021
🚨︎ report
Question about De Morgan’s Law

To prove (A U B)’ = A' ∩ B', for A' ∩ B' my book explains,

β€œSuppose x ∈ A’ ∩ B’, meaning that x∈ A’ and x ∈ B’. Since x ∈ A’ we know x βˆ‰ A, and similarly x βˆ‰ B. This means that x βˆ‰ A U B, so x ∈ (A U B)’ as required.”

This is the part were I’m confused:

It says x ∈ A’, and part of B is the complement of A, how is it that x is excluded from B?

Hopefully my question is worded properly haha.

πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/smoothbraint
πŸ“…︎ Jul 18 2021
🚨︎ report
Automation space saving trick using De Morgan's laws reddit.com/gallery/kp3tq5
πŸ‘︎ 565
πŸ’¬︎
πŸ‘€︎ u/maneatingape
πŸ“…︎ Jan 02 2021
🚨︎ report
Have you ever used De Morgan's Law in conditional expressions?

It can improve the readability of your code a lot.

Here are some examples from me, if you have any share it with us :)

not (A and B) == (not A) or (not B)

not (A or B) == (not A) and (not B)

!(a < 10) && !(b <= 5) == (a >= 10) && (b > 5)

!(a > b || b != a) == (a <= b && b == a)

(!A && !B && !C) == !(A || B || C)

(!A || !B || !C) == !(A && B && C)

πŸ‘︎ 28
πŸ’¬︎
πŸ‘€︎ u/NemanjaVas
πŸ“…︎ Oct 02 2020
🚨︎ report
Can someone explain how De Morgan's law was used to get from this proposition to that proposition?

https://imgur.com/a/mpHQTYY

I'm really having a tough time trying to figure out how all you need is De Morgan's Law to get from step 11 to step 12. It looks like so much more happened

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/Missing_Back
πŸ“…︎ Oct 07 2020
🚨︎ report
[REQUEST] Is it possible to prove distributive law using de morgan law?

Is it possible to verify A ∩ (B βˆͺ C) = (A ∩ B) βˆͺ (A ∩ C) without using distributive law but de morgan law?

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/zawarudioda
πŸ“…︎ Oct 14 2020
🚨︎ report
Help prove using De Morgan's law and properties of union/intersection of sets.
  1. (A' βˆͺ B' ) ' βˆͺ (A' βˆͺ B) ' = A 
    
  2. (A βˆͺ B)(AB)' = AB' βˆͺ BA'
    

Help would be much appreciated!

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/mathewlivit
πŸ“…︎ Sep 14 2020
🚨︎ report
It's giving summer in the middle of a snow storm ✨✨✨ blue is Garden Variety by Essie, Neon Green is Spear Me by Law Beauty Essentials, and topper is Lots of Dots by Morgan Taylor
πŸ‘︎ 29
πŸ’¬︎
πŸ‘€︎ u/sarawithoutan_h
πŸ“…︎ Jan 24 2022
🚨︎ report
One of many coins from my Father-in-Law’s collection. Several Morgan’s and Peace dollars, tons of foreign (immigrated from Canada a couple generations ago) reddit.com/gallery/s7zvdr
πŸ‘︎ 46
πŸ’¬︎
πŸ‘€︎ u/DMFG
πŸ“…︎ Jan 19 2022
🚨︎ report
I almost made it to noon....time to shitpost some banks. Got a Franklin and Morgan from the Father in Law for Christmas :) Happy holidays all!
πŸ‘︎ 177
πŸ’¬︎
πŸ‘€︎ u/SnooCookies1360
πŸ“…︎ Dec 18 2021
🚨︎ report
Simplify(?) AND circuits using De Morgan's law

Sometimes we want to use more state detectors in our slightly more complicated logic circuit. However if we want to chain a lot of AND then it becomes messy really quick thanks to the fact that a AND gate is 2x2 and multiple of them is really hard to fit.

By using De Morgan's law and the fact that wires act as OR gates, we can replace the bulky AND gates with the smaller and much easier to fit NOT gates, or in some cases, 1 NOT gate to make a master AND function.

Here is how it works

(AB)'=A'+B'

AB=(A'+B')'

And it works for any number of inputs, we can demonstrate this by substituting B for BC

(A(BC))'=A'+(BC)'

(ABC)'=A'+(B'+C')

ABC=(A'+B'+C')'

For those of you who are not familiar with this, A B C are inputs, ' is the negator, + is OR and multiplying them is AND. It basically means if we flip all inputs and output of an OR gate, we can make a master AND gate.

Here's an example

https://preview.redd.it/tssa7xiqsfv31.png?width=1919&format=png&auto=webp&s=50cbc48e787b38310a5541e7656bf201cb6b2623

https://preview.redd.it/rp5z6jjvsfv31.png?width=1919&format=png&auto=webp&s=82a5cf79c7aaa3bff7f0cf3caf43f6882f5ddeed

https://preview.redd.it/54572lexsfv31.png?width=1919&format=png&auto=webp&s=c190efc33acc4a12c7df4fdfe81bc9c0a4e68954

Here I want the CO2 level to go above the Oxyferns and so I set up 3 element detectors and a pressure sensor.

All element detectors have to detect CO2 and pressure sensor has to detect a high enough pressure for the carbon skimmers to run.

Notice here the pressure sensor has a built in NOT gate. You just have to set it the opposite of what you want. In fact, the NOT gates for the element sensors are also not necessary, because there are not much gas other than O2 and CO2 involved, it can very well be set to detect O2 instead and make the whole thing work with just 1 NOT gate.

As you can see, instead of using 3 AND gates, 2x2 each, I ended up with 4 NOT gates, and can hide them all behind batteries and walls. Even with 5, they are still much more easier to fit then several 2x2 AND gates.

Hope this help you

πŸ‘︎ 36
πŸ’¬︎
πŸ‘€︎ u/DanielSkyrunner
πŸ“…︎ Oct 29 2019
🚨︎ report
[Contipelli] #Bengals game status report ahead of the AFC Championship: Doubtful: WR Stanley Morgan (hamstring) DE Cam Sample (groin) Questionable: DT Josh Tupou (knee) twitter.com/bengalsmarisa…
πŸ‘︎ 56
πŸ’¬︎
πŸ‘€︎ u/CButler19
πŸ“…︎ Jan 28 2022
🚨︎ report
JP Morgan is above the law...

https://violationtracker.goodjobsfirst.org/parent/jpmorgan-chaseall they have to do is buy their way out of trouble with investors $$$$$$

πŸ‘︎ 71
πŸ’¬︎
πŸ‘€︎ u/geobjaxn
πŸ“…︎ Dec 17 2021
🚨︎ report
De Morgan's laws
πŸ‘︎ 509
πŸ’¬︎
πŸ‘€︎ u/Luexco
πŸ“…︎ Feb 08 2018
🚨︎ report
It's giving summer in the middle of a snow storm ✨✨✨ blue is Garden Variety by Essie, Neon Green is Spear Me by Law Beauty Essentials, and topper is Lots of Dots by Morgan Taylor
πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/sarawithoutan_h
πŸ“…︎ Jan 24 2022
🚨︎ report
Type-level proof of De Morgan's laws: Redundant pattern?
{-# LANGUAGE LambdaCase, TypeOperators, UnicodeSyntax #-}

I just started playing around with some very simple type-level proofs. I introduced the following types to encode logic on the type-level (I only show the necessary definitions to understand the post here, a more complete version can be found here):

data p :& q = p :& q                 -- | Conjunctions
type Iff p q = (p -> q) :& (q -> p)  -- | If and only if

data p :| q = L p | R q              -- | Disjunctions

data False                           -- | Unprovable
newtype Not a = Not (a β†’ False)      -- | Not

Next, I axiomatise an elimination rule for False and prove the Principle of Explosion. And I introduce proofs by contradiction (an inverted version since this shortens the proofs) via axiomatised tertium non datur.

axiom = error

{- | Axiomatise elimination of False & show principle of explosion -}

_falseE ∷ False β†’ a
_falseE = axiom "False β†’ a"

explode ∷ p β†’ Not p β†’ q
explode a (Not a') = _falseE (a' a)

{- | Axiomatise tertium non datur & setup pro
... keep reading on reddit ➑

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/unfixpoint
πŸ“…︎ Oct 16 2019
🚨︎ report
In an alternate universe: Arturo De La Morgan. Spanish Conquistador
πŸ‘︎ 97
πŸ’¬︎
πŸ“…︎ Jan 28 2022
🚨︎ report
[Discrete Math: Propositional Logic] Using De Morgan's Law, is it safe to say that the negation of the statement, "I need to practice physics problems but I like basketball no more than physics", is "I do not need to practice physics problems or I do not like basketball no more than physics"?

I'm confused with the "I like basketball no more than physics". Does it mean that I like physics more than basketball? Thanks!

πŸ‘︎ 3
πŸ’¬︎
πŸ‘€︎ u/Senjukotentaiho
πŸ“…︎ Jul 22 2019
🚨︎ report
Cleanup your ugly Boolean expressions with De Morgan's laws delphitools.info/2013/01/…
πŸ‘︎ 172
πŸ’¬︎
πŸ‘€︎ u/guanzo
πŸ“…︎ Dec 17 2017
🚨︎ report
Need help De Morgans Law

We have a text next week and I have been studying for hours and I keep getting stuck. In the picture provided they are two separate problems, but according to the teacher de morgans law is: not(something and something) is not (something or not(something). In the pictures, the part of the expressions that have a square should be able to have de morgans law applied to, but in one of them it applies and in the other, it goes straight to double negations. They look similar and was just wondering why one expression uses de morgans law while the other doesn't.

https://preview.redd.it/dbt0e6nkiwy31.jpg?width=960&format=pjpg&auto=webp&s=4548baecffa85748fec0a7f96fadbe613d75432b

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/Gorgeousmango78
πŸ“…︎ Nov 15 2019
🚨︎ report
On the eve of the Champions Classic, Law Firm Morgan & Morgan announces NIL Partnership with Kentucky Basketball with a billboard in Times Square. on3.com/teams/kentucky-wi…
πŸ‘︎ 45
πŸ’¬︎
πŸ‘€︎ u/BancroftAgee
πŸ“…︎ Nov 08 2021
🚨︎ report
[Contipelli] #Bengals game status report ahead of the AFC Championship: Doubtful: WR Stanley Morgan (hamstring) DE Cam Sample (groin) Questionable: DT Josh Tupou (knee) twitter.com/bengalsmarisa…
πŸ‘︎ 15
πŸ’¬︎
πŸ‘€︎ u/CButler19
πŸ“…︎ Jan 28 2022
🚨︎ report
AsΓ­ es como terminΓ© el aΓ±o, terminado tal vez el mejor juego de la historia, larga vida a Arthur Morgan
πŸ‘︎ 24
πŸ’¬︎
πŸ‘€︎ u/pelurocker
πŸ“…︎ Jan 01 2022
🚨︎ report
[11/12/13] Challenge #135 [Intermediate] De Morgan's Law

(Intermediate): De Morgan's Law

De Morgan's Law is a neat law of Boolean propositional logic, helpful in every-day programming. It helps with inverting a boolean expression to get the opposite expression. Wolfram Mathworld has a much more correct definition using set theory, being equivalent to Boolean expressions.

That's important since programming is all about Boolean-expressions! If you want to invert some "if" conditional code (that is, to compute the test for the "else" fall-through case), you need to apply the Law's two transformations:

  • The not ( of expression-A and expression-B) is-equivalent-to not expression-A or not expression-B
  • The not ( of expression-A or expression-B) is-equivalent-to not expression-A and not expression-B

An interpretation of these rules, helpful for applying it, is that you first apply the not-operator on all expressions, then replace all ands with ors, and vice-versa. This gets much more tricky and complex when order of operations come in play with parentheses (nested expressions).

Your goal is to take a C-like language's Boolean expression, and apply De Morgan's Law on it. You may choose to simplify the resulting expression as much as possible for epic bonus poinst; consider reading into Karnaugh maps as one approach. "Simplified" is measured in the least-amount of variables and operators required (not counting parentheses).

Formal Inputs & Outputs

Input Description

The grammar of this C-like language is English-language space-delimited words, uses parentheses for nested expressions, with variables strictly being lower-case alpha-numeric. The reserved key-word for logical-and is "AND", with logical-or "OR", and logical-not "NOT". The expression will be in Infix-notation.

Note that the "NOT" is a unary operator, meaning it always applies first to variables on the right of itself, or to a full expression. The expression "NOT a OR b" is equivalent to "(NOT a) OR b", but not "NOT (a or b)".

Output Description

Given the expression, print it's inverse using the same grammar and given variables. Simplify the expression for epic bonus points.

Sample Inputs & Outputs

Sample Inputs

a
NOT a
a AND b 
NOT a AND b 
... keep reading on reddit ➑

πŸ‘︎ 50
πŸ’¬︎
πŸ‘€︎ u/nint22
πŸ“…︎ Nov 13 2013
🚨︎ report
INVESTOR ALERT: Scott+Scott Attorneys at Law LLP Files Securities Class Action Against Goldman Sachs Group Inc. and Morgan Stanley on Behalf of ViacomCBS Shareholders finance.yahoo.com/news/in…
πŸ‘︎ 17
πŸ’¬︎
πŸ‘€︎ u/LowLeak
πŸ“…︎ Nov 01 2021
🚨︎ report
Regina Duarte pede Dia da ConsciΓͺncia Branca e critica vitimização | Atriz compartilhou vΓ­deo de 2005 no qual o ator norte-americano Morgan Freeman afirma que o Dia da ConsciΓͺncia Negra Γ© uma data "ridΓ­cula" metropoles.com/brasil/reg…
πŸ‘︎ 122
πŸ’¬︎
πŸ‘€︎ u/Masked_Voyeur
πŸ“…︎ Nov 22 2021
🚨︎ report
De Morgan und seine Formel oder so, hab in LuDS nicht aufgepasst.
πŸ‘︎ 26
πŸ’¬︎
πŸ‘€︎ u/zeitless
πŸ“…︎ Jan 18 2022
🚨︎ report
[Boolean Logic] Use Truth Tables To Prove De-Morgan's Law

Alright. I have have an assignment to do and at one part it's asking me to,

*Given that a = Communication and b = Computer Systems Hardware, use the truth tables to prove that (a.b)' = a' + b'

*Given that a = Communication and b = Computer Systems Hardware, use the truth tables to prove that a'.b' = (a+b)'

Image to tables (https://imgur.com/a/b4lxR)

So these are my truth tables which I believe are correct however!, I'm not sure if I am fully answering the question and feel like I am missing the full answer I'm supposed to give. If I am can someone please help me with this, I honestly am not sure what to really add on or to do after the truth table if anything else is needed to be added..

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/BobbyDidIt
πŸ“…︎ Jan 08 2018
🚨︎ report
BREAKING. J.P. Morgan, cea mai mare bancΔƒ americanΔƒ trimite o undΔƒ de şoc pentru RomΓ’nia zf.ro/banci-si-asigurari/…
πŸ‘︎ 10
πŸ’¬︎
πŸ‘€︎ u/sorin_
πŸ“…︎ Dec 15 2021
🚨︎ report
In De Morgan's laws wrt set theory, do the sets A and B always have the same universal set?

So,

 1) ( A βˆͺ B)’ = A’ ∩ B’
 2) ( A ∩ B)’ = A’ βˆͺ B’

In (1) the left side doesn't make sense( I think!) if A and B have different universal sets but right side does even if A and B have different universal sets( again, I think!). Is there any scenario(maybe other fields of mathematics) where these laws hold true for A and B having different universal sets or is it just undefined?

πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/chanzerre
πŸ“…︎ Aug 30 2016
🚨︎ report
Tamp-down ladies sing this song, doo da, do da, Tamp-down ladies sing this song, oh de doo da dey! We are going to buy all night, gonna buy sound money all day, we bet our money on the silver horse, and JP Morgan will paaay : D
πŸ‘︎ 148
πŸ’¬︎
πŸ‘€︎ u/DarumaBanana
πŸ“…︎ Nov 26 2021
🚨︎ report
I just found out about Evelyn De Morgan and my witchy heart is happy. (The Love Potion, 1903)
πŸ‘︎ 88
πŸ’¬︎
πŸ‘€︎ u/Alchemtic
πŸ“…︎ Dec 20 2021
🚨︎ report
Can someone explain how De Morgan's law was used to get from this proposition to that proposition?

https://imgur.com/a/mpHQTYY

I'm really having a tough time trying to figure out how all you need is De Morgan's Law to get from step 11 to step 12. It looks like so much more happened

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/Missing_Back
πŸ“…︎ Oct 07 2020
🚨︎ report
Can someone explain how De Morgan's law was used to get from this proposition to that proposition?

https://imgur.com/a/mpHQTYY

I'm really having a tough time trying to figure out how all you need is De Morgan's Law to get from step 11 to step 12. It looks like so much more happened

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/Missing_Back
πŸ“…︎ Oct 07 2020
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.